holey-bytes/lang/tests/son_tests_if_statements.txt
2024-11-15 22:35:03 +01:00

37 lines
678 B
Plaintext

fib:
ADDI64 r254, r254, -40d
ST r31, r254, 0a, 40h
CP r32, r2
LI64 r33, 1d
LI64 r34, 2d
JGTU r32, r34, :0
CP r1, r33
JMP :1
0: SUB64 r33, r32, r33
CP r2, r33
JAL r31, r0, :fib
CP r33, r1
SUB64 r32, r32, r34
CP r2, r32
JAL r31, r0, :fib
CP r32, r1
ADD64 r32, r32, r33
CP r1, r32
1: LD r31, r254, 0a, 40h
ADDI64 r254, r254, 40d
JALA r0, r31, 0a
main:
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
LI64 r32, 10d
CP r2, r32
JAL r31, r0, :fib
CP r32, r1
CP r1, r32
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
JALA r0, r31, 0a
code size: 229
ret: 55
status: Ok(())