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>
24 lines
437 B
Plaintext
24 lines
437 B
Plaintext
inb:
|
|
CP r1, r0
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -24d
|
|
ST r31, r254, 0a, 24h
|
|
LRA r32, r0, :ports
|
|
LD r33, r32, 0a, 1h
|
|
ANDI r33, r33, 255d
|
|
JNE r33, r0, :0
|
|
JMP :1
|
|
0: JAL r31, r0, :inb
|
|
CP r33, r1
|
|
CMPU r33, r33, r0
|
|
CMPUI r33, r33, 0d
|
|
NOT r33, r33
|
|
ST r33, r32, 0a, 1h
|
|
1: LD r31, r254, 0a, 24h
|
|
ADDI64 r254, r254, 24d
|
|
JALA r0, r31, 0a
|
|
code size: 164
|
|
ret: 0
|
|
status: Ok(())
|