2024-11-03 14:13:24 -06:00
|
|
|
get_ptr:
|
2024-11-13 03:28:16 -06:00
|
|
|
CP r1, r0
|
2024-11-03 14:13:24 -06:00
|
|
|
JALA r0, r31, 0a
|
|
|
|
main:
|
2024-11-17 03:06:10 -06:00
|
|
|
ADDI64 r254, r254, -32d
|
|
|
|
ST r31, r254, 0a, 32h
|
2024-11-03 14:13:24 -06:00
|
|
|
JAL r31, r0, :get_ptr
|
2024-11-15 15:35:03 -06:00
|
|
|
CP r32, r1
|
|
|
|
JNE r32, r0, :0
|
2024-11-13 03:28:16 -06:00
|
|
|
CP r1, r0
|
2024-11-03 14:13:24 -06:00
|
|
|
JMP :1
|
2024-11-15 15:35:03 -06:00
|
|
|
0: LI64 r33, 10d
|
|
|
|
3: LD r34, r32, 0a, 8h
|
|
|
|
JEQ r34, r33, :2
|
|
|
|
ADDI64 r34, r34, 1d
|
|
|
|
ST r34, r32, 0a, 8h
|
|
|
|
JMP :3
|
|
|
|
2: CP r1, r34
|
2024-11-17 03:06:10 -06:00
|
|
|
1: LD r31, r254, 0a, 32h
|
|
|
|
ADDI64 r254, r254, 32d
|
2024-11-03 14:13:24 -06:00
|
|
|
JALA r0, r31, 0a
|
2024-11-15 15:35:03 -06:00
|
|
|
code size: 164
|
2024-11-08 04:51:10 -06:00
|
|
|
ret: 0
|
2024-11-03 14:13:24 -06:00
|
|
|
status: Ok(())
|