forked from AbleOS/holey-bytes
38 lines
733 B
Plaintext
38 lines
733 B
Plaintext
add_one:
|
|
ADDI64 r254, r254, -8d
|
|
ST r32, r254, 0a, 8h
|
|
CP r13, r2
|
|
ADDI64 r13, r13, 1d
|
|
CP r1, r13
|
|
LD r32, r254, 0a, 8h
|
|
ADDI64 r254, r254, 8d
|
|
JALA r0, r31, 0a
|
|
add_two:
|
|
ADDI64 r254, r254, -8d
|
|
ST r32, r254, 0a, 8h
|
|
CP r13, r2
|
|
ADDI64 r13, r13, 2d
|
|
CP r1, r13
|
|
LD r32, r254, 0a, 8h
|
|
ADDI64 r254, r254, 8d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -32d
|
|
ST r31, r254, 0a, 32h
|
|
LI64 r32, 10d
|
|
CP r2, r32
|
|
JAL r31, r0, :add_one
|
|
CP r32, r1
|
|
LI64 r33, 20d
|
|
CP r2, r33
|
|
JAL r31, r0, :add_two
|
|
CP r33, r1
|
|
ADD64 r32, r33, r32
|
|
CP r1, r32
|
|
LD r31, r254, 0a, 32h
|
|
ADDI64 r254, r254, 32d
|
|
JALA r0, r31, 0a
|
|
code size: 272
|
|
ret: 33
|
|
status: Ok(())
|