2024-09-03 15:34:17 -05:00
|
|
|
main:
|
|
|
|
ADDI64 r254, r254, -64d
|
|
|
|
ST r31, r254, 0a, 64h
|
|
|
|
JAL r31, r0, :check_platform
|
|
|
|
CP r32, r1
|
|
|
|
LI64 r33, 100d
|
|
|
|
LI64 r34, 30d
|
|
|
|
LI64 r35, 0d
|
|
|
|
LI64 r36, 0d
|
|
|
|
4: CP r37, r35
|
|
|
|
CP r38, r34
|
|
|
|
ADDI64 r38, r38, 1d
|
|
|
|
CMPS r37, r37, r38
|
|
|
|
CMPUI r37, r37, 1d
|
|
|
|
JEQ r37, r0, :0
|
|
|
|
CP r2, r35
|
|
|
|
CP r3, r36
|
|
|
|
CP r4, r33
|
|
|
|
JAL r31, r0, :set_pixel
|
|
|
|
CP r37, r35
|
|
|
|
ADDI64 r37, r37, 1d
|
|
|
|
CP r35, r37
|
|
|
|
JMP :1
|
|
|
|
0: CP r2, r35
|
|
|
|
CP r3, r36
|
|
|
|
CP r4, r33
|
|
|
|
JAL r31, r0, :set_pixel
|
|
|
|
LI64 r35, 0d
|
|
|
|
CP r37, r36
|
|
|
|
ADDI64 r37, r37, 1d
|
|
|
|
CP r36, r37
|
|
|
|
1: CP r37, r36
|
|
|
|
CP r38, r33
|
|
|
|
CMPS r37, r37, r38
|
|
|
|
CMPUI r37, r37, 0d
|
|
|
|
NOT r37, r37
|
|
|
|
JEQ r37, r0, :2
|
|
|
|
JMP :3
|
|
|
|
2: JMP :4
|
|
|
|
3: LI64 r1, 0d
|
|
|
|
LD r31, r254, 0a, 64h
|
|
|
|
ADDI64 r254, r254, 64d
|
|
|
|
JALA r0, r31, 0a
|
|
|
|
set_pixel:
|
|
|
|
ADDI64 r254, r254, -32d
|
|
|
|
ST r31, r254, 0a, 32h
|
|
|
|
CP r32, r2
|
|
|
|
CP r33, r3
|
|
|
|
CP r34, r4
|
|
|
|
MUL64 r33, r33, r34
|
|
|
|
ADD64 r33, r33, r32
|
|
|
|
LI64 r1, 0d
|
|
|
|
LD r31, r254, 0a, 32h
|
|
|
|
ADDI64 r254, r254, 32d
|
|
|
|
JALA r0, r31, 0a
|
2024-09-05 04:16:11 -05:00
|
|
|
check_platform:
|
|
|
|
ADDI64 r254, r254, -8d
|
|
|
|
ST r31, r254, 0a, 8h
|
|
|
|
JAL r31, r0, :x86_fb_ptr
|
|
|
|
LD r31, r254, 0a, 8h
|
|
|
|
ADDI64 r254, r254, 8d
|
|
|
|
JALA r0, r31, 0a
|
2024-09-03 15:34:17 -05:00
|
|
|
x86_fb_ptr:
|
|
|
|
ADDI64 r254, r254, -8d
|
|
|
|
ST r31, r254, 0a, 8h
|
|
|
|
LI64 r1, 100d
|
|
|
|
LD r31, r254, 0a, 8h
|
|
|
|
ADDI64 r254, r254, 8d
|
|
|
|
JALA r0, r31, 0a
|
2024-09-01 19:38:11 -05:00
|
|
|
code size: 505
|
2024-05-12 04:52:58 -05:00
|
|
|
ret: 0
|
|
|
|
status: Ok(())
|