holey-bytes/lang/tests/son_tests_functions.txt

22 lines
399 B
Plaintext
Raw Normal View History

2024-09-20 04:01:10 -05:00
add_one:
ADDI64 r1, r2, 1d
2024-09-04 16:46:32 -05:00
JALA r0, r31, 0a
2024-09-20 04:01:10 -05:00
add_two:
ADDI64 r1, r2, 2d
2024-09-04 16:46:32 -05:00
JALA r0, r31, 0a
2024-09-20 04:01:10 -05:00
main:
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
LI64 r2, 10d
JAL r31, r0, :add_one
CP r32, r1
LI64 r2, 20d
JAL r31, r0, :add_two
ADD64 r1, r1, r32
2024-09-20 04:01:10 -05:00
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
JALA r0, r31, 0a
code size: 152
2024-09-04 16:46:32 -05:00
ret: 33
status: Ok(())