2024-11-13 01:49:25 -06:00
|
|
|
inb:
|
2024-11-13 03:28:16 -06:00
|
|
|
CP r1, r0
|
2024-11-13 01:49:25 -06:00
|
|
|
JALA r0, r31, 0a
|
|
|
|
main:
|
2024-12-19 03:48:05 -06:00
|
|
|
ADDI64 r254, r254, -24d
|
|
|
|
ST r31, r254, 0a, 24h
|
2024-11-13 01:49:25 -06:00
|
|
|
LRA r32, r0, :ports
|
|
|
|
LD r33, r32, 0a, 1h
|
|
|
|
ANDI r33, r33, 255d
|
|
|
|
JNE r33, r0, :0
|
|
|
|
JMP :1
|
|
|
|
0: JAL r31, r0, :inb
|
2024-11-15 15:35:03 -06:00
|
|
|
CP r33, r1
|
2024-12-19 03:48:05 -06:00
|
|
|
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
|
2024-11-13 01:49:25 -06:00
|
|
|
JALA r0, r31, 0a
|
2024-11-15 15:35:03 -06:00
|
|
|
code size: 164
|
2024-11-13 01:49:25 -06:00
|
|
|
ret: 0
|
|
|
|
status: Ok(())
|