2024-11-03 14:13:24 -06:00
|
|
|
get_ptr:
|
2024-11-08 04:51:10 -06:00
|
|
|
LI64 r1, 0d
|
2024-11-03 14:13:24 -06:00
|
|
|
JALA r0, r31, 0a
|
|
|
|
main:
|
2024-11-05 07:52:30 -06:00
|
|
|
ADDI64 r254, r254, -40d
|
|
|
|
ST r31, r254, 0a, 40h
|
2024-11-03 14:13:24 -06:00
|
|
|
JAL r31, r0, :get_ptr
|
2024-11-05 07:52:30 -06:00
|
|
|
LI64 r32, 0d
|
|
|
|
JNE r1, r32, :0
|
2024-11-03 14:13:24 -06:00
|
|
|
LI64 r1, 0d
|
|
|
|
JMP :1
|
2024-11-05 07:52:30 -06:00
|
|
|
0: LI64 r33, 10d
|
|
|
|
CP r34, r1
|
|
|
|
2: LD r1, r34, 0a, 8h
|
|
|
|
JEQ r1, r33, :1
|
|
|
|
ADDI64 r35, r1, 1d
|
|
|
|
ST r35, r34, 0a, 8h
|
2024-11-03 14:13:24 -06:00
|
|
|
JMP :2
|
2024-11-05 07:52:30 -06:00
|
|
|
1: LD r31, r254, 0a, 40h
|
|
|
|
ADDI64 r254, r254, 40d
|
2024-11-03 14:13:24 -06:00
|
|
|
JALA r0, r31, 0a
|
2024-11-08 04:51:10 -06:00
|
|
|
code size: 185
|
|
|
|
ret: 0
|
2024-11-03 14:13:24 -06:00
|
|
|
status: Ok(())
|