forked from AbleOS/holey-bytes
a8aba7e7c2
return value is now a separate node pinned to the call Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
29 lines
523 B
Plaintext
29 lines
523 B
Plaintext
integer_range:
|
|
CP r13, r2
|
|
CP r14, r3
|
|
LI64 r15, 4d
|
|
LI64 r16, 3d
|
|
CP r2, r16
|
|
CP r3, r15
|
|
ECA
|
|
SUB64 r14, r14, r13
|
|
ADDI64 r14, r14, 1d
|
|
CP r15, r1
|
|
DIRU64 r0, r14, r15, r14
|
|
ADD64 r13, r14, r13
|
|
CP r1, r13
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -16d
|
|
ST r31, r254, 0a, 16h
|
|
LI64 r32, 1000d
|
|
CP r2, r0
|
|
CP r3, r32
|
|
JAL r31, r0, :integer_range
|
|
LD r31, r254, 0a, 16h
|
|
ADDI64 r254, r254, 16d
|
|
JALA r0, r31, 0a
|
|
code size: 164
|
|
ret: 42
|
|
status: Ok(())
|