holey-bytes/lang/tests/son_tests_functions.txt

30 lines
527 B
Plaintext
Raw Normal View History

2024-09-20 04:01:10 -05:00
add_one:
2024-11-15 15:35:03 -06:00
CP r13, r2
ADDI64 r13, r13, 1d
CP r1, r13
2024-09-04 16:46:32 -05:00
JALA r0, r31, 0a
2024-09-20 04:01:10 -05:00
add_two:
2024-11-15 15:35:03 -06:00
CP r13, r2
ADDI64 r13, r13, 2d
CP r1, r13
2024-09-04 16:46:32 -05:00
JALA r0, r31, 0a
2024-09-20 04:01:10 -05:00
main:
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
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, :add_one
CP r32, r1
2024-11-15 15:35:03 -06:00
LI64 r33, 20d
CP r2, r33
2024-09-20 04:01:10 -05:00
JAL r31, r0, :add_two
2024-11-15 15:35:03 -06:00
CP r33, r1
ADD64 r32, r33, r32
CP r1, r32
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
2024-09-20 04:01:10 -05:00
JALA r0, r31, 0a
code size: 176
2024-09-04 16:46:32 -05:00
ret: 33
status: Ok(())