2024-11-03 01:59:42 -06:00
|
|
|
inb:
|
|
|
|
CP r1, r2
|
|
|
|
JALA r0, r31, 0a
|
|
|
|
main:
|
2024-11-13 03:28:16 -06:00
|
|
|
ADDI64 r254, r254, -24d
|
|
|
|
ST r31, r254, 0a, 24h
|
|
|
|
LI64 r32, 100d
|
|
|
|
4: CP r2, r32
|
2024-11-03 01:59:42 -06:00
|
|
|
JAL r31, r0, :inb
|
2024-11-13 03:28:16 -06:00
|
|
|
ANDI r33, r1, 2d
|
|
|
|
JNE r33, r0, :0
|
2024-11-03 01:59:42 -06:00
|
|
|
LI64 r2, 96d
|
2024-11-13 03:28:16 -06:00
|
|
|
CP r3, r0
|
2024-11-03 01:59:42 -06:00
|
|
|
JAL r31, r0, :outb
|
2024-11-13 03:28:16 -06:00
|
|
|
3: CP r2, r32
|
2024-11-03 01:59:42 -06:00
|
|
|
JAL r31, r0, :inb
|
2024-11-13 03:28:16 -06:00
|
|
|
JEQ r1, r0, :1
|
2024-11-03 01:59:42 -06:00
|
|
|
LI64 r1, 1d
|
|
|
|
JMP :2
|
|
|
|
1: JMP :3
|
|
|
|
0: JMP :4
|
2024-11-13 03:28:16 -06:00
|
|
|
2: LD r31, r254, 0a, 24h
|
|
|
|
ADDI64 r254, r254, 24d
|
2024-11-03 01:59:42 -06:00
|
|
|
JALA r0, r31, 0a
|
|
|
|
outb:
|
|
|
|
JALA r0, r31, 0a
|
2024-11-13 03:28:16 -06:00
|
|
|
code size: 188
|
2024-11-03 01:59:42 -06:00
|
|
|
ret: 1
|
|
|
|
status: Ok(())
|