1
0
mirror of https://github.com/danog/ton.git synced 2024-12-11 16:49:37 +01:00
ton/crypto/test/fift/testvm9.fif
2019-09-07 14:33:36 +04:00

8 lines
368 B
Plaintext

"Asm.fif" include
<{ 2 INT 3 INT 9 INT NULL CONS CONS CONS }>s dup csr. runvmcode .s
drop =: L
<{ ZERO WHILE:<{ OVER ISNULL NOT }>DO<{ SWAP SECOND SWAP INC }> NIP }>s dup csr. =: ListLength
L ListLength runvmcode .s 2drop
<{ CONT:<{ DUP ISNULL IF:<{ 2DROP ZERO }>ELSE: CDR OVER EXECUTE INC }> TUCK JMPX }>s dup csr. =: ListLengthRec
L ListLengthRec runvmcode .s 2drop