holey-bytes/lang/tests/son_tests_loops.txt

29 lines
485 B
Plaintext
Raw Normal View History

2024-09-15 13:14:56 -05:00
fib:
2024-11-15 15:35:03 -06:00
CP r13, r2
LI64 r17, 1d
CP r15, r0
CP r14, r15
CP r16, r17
2024-11-15 15:35:03 -06:00
2: JNE r13, r15, :0
CP r1, r14
2024-09-15 13:14:56 -05:00
JMP :1
0: SUB64 r13, r13, r17
ADD64 r14, r16, r14
2024-11-15 15:35:03 -06:00
SWA r14, r16
2024-09-15 13:14:56 -05:00
JMP :2
1: JALA r0, r31, 0a
2024-09-20 04:01:10 -05:00
main:
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
2024-11-15 15:35:03 -06:00
LI64 r32, 10d
CP r2, r32
2024-09-20 04:01:10 -05:00
JAL r31, r0, :fib
2024-11-15 15:35:03 -06:00
CP r32, r1
CP r1, r32
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
2024-09-15 13:14:56 -05:00
JALA r0, r31, 0a
code size: 155
2024-09-15 13:14:56 -05:00
ret: 55
status: Ok(())