holey-bytes/lang/tests/codegen_tests_fb_driver.txt

75 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-09-03 15:34:17 -05:00
main:
2024-09-08 05:00:07 -05:00
ADDI64 r254, r254, -80d
ST r31, r254, 0a, 80h
2024-09-03 15:34:17 -05:00
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
2024-09-08 05:00:07 -05:00
CP r37, r1
CP r38, r35
ADDI64 r38, r38, 1d
CP r35, r38
2024-09-03 15:34:17 -05:00
JMP :1
0: CP r2, r35
CP r3, r36
CP r4, r33
JAL r31, r0, :set_pixel
2024-09-08 05:00:07 -05:00
CP r38, r1
2024-09-03 15:34:17 -05:00
LI64 r35, 0d
2024-09-08 05:00:07 -05:00
CP r39, r36
ADDI64 r39, r39, 1d
CP r36, r39
1: CP r39, r36
CP r40, r33
CMPS r39, r39, r40
CMPUI r39, r39, 0d
NOT r39, r39
JEQ r39, r0, :2
2024-09-03 15:34:17 -05:00
JMP :3
2: JMP :4
3: LI64 r1, 0d
2024-09-08 05:00:07 -05:00
LD r31, r254, 0a, 80h
ADDI64 r254, r254, 80d
2024-09-03 15:34:17 -05:00
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
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-08 05:00:07 -05:00
code size: 511
2024-05-12 04:52:58 -05:00
ret: 0
status: Ok(())