forked from AbleOS/holey-bytes
36 lines
731 B
Plaintext
36 lines
731 B
Plaintext
main:
|
|
ADDI64 r254, r254, -28d
|
|
ST r31, r254, 4a, 24h
|
|
LRA r32, r0, :white
|
|
ADDI64 r33, r254, 0d
|
|
LD r32, r32, 0a, 4h
|
|
CP r2, r32
|
|
JAL r31, r0, :u32_to_color
|
|
ST r1, r33, 0a, 4h
|
|
LD r32, r254, 0a, 1h
|
|
ANDI r32, r32, 255d
|
|
CP r1, r32
|
|
LD r31, r254, 4a, 24h
|
|
ADDI64 r254, r254, 28d
|
|
JALA r0, r31, 0a
|
|
u32_to_color:
|
|
ADDI64 r254, r254, -28d
|
|
ST r31, r254, 4a, 24h
|
|
CP r32, r2
|
|
CP r2, r32
|
|
JAL r31, r0, :u32_to_u32
|
|
CP r32, r1
|
|
ADDI64 r33, r254, 0d
|
|
ST r32, r254, 0a, 4h
|
|
LD r1, r33, 0a, 4h
|
|
LD r31, r254, 4a, 24h
|
|
ADDI64 r254, r254, 28d
|
|
JALA r0, r31, 0a
|
|
u32_to_u32:
|
|
CP r13, r2
|
|
CP r1, r13
|
|
JALA r0, r31, 0a
|
|
code size: 281
|
|
ret: 255
|
|
status: Ok(())
|