holey-bytes/lang/tests/son_tests_fb_driver.txt

64 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-09-20 04:01:10 -05:00
check_platform:
2024-11-15 15:35:03 -06:00
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
2024-09-20 04:01:10 -05:00
JAL r31, r0, :x86_fb_ptr
2024-11-15 15:35:03 -06:00
CP r32, r1
CP r1, r32
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
2024-09-20 04:01:10 -05:00
JALA r0, r31, 0a
2024-09-06 09:11:57 -05:00
main:
ADDI64 r254, r254, -64d
ST r31, r254, 0a, 64h
2024-09-06 09:11:57 -05:00
JAL r31, r0, :check_platform
2024-11-15 15:35:03 -06:00
CP r33, r0
LI64 r36, 30d
LI64 r37, 100d
CP r35, r33
CP r34, r33
CP r32, r33
5: JLTU r32, r36, :0
ADDI64 r34, r34, 1d
CP r2, r33
CP r3, r34
CP r4, r36
2024-09-06 09:11:57 -05:00
JAL r31, r0, :set_pixel
2024-11-15 15:35:03 -06:00
CP r32, r1
JEQ r32, r35, :1
CP r1, r33
2024-09-15 13:14:56 -05:00
JMP :2
2024-11-15 15:35:03 -06:00
1: JNE r34, r37, :3
CP r1, r35
2024-09-15 13:14:56 -05:00
JMP :2
2024-11-15 15:35:03 -06:00
3: CP r32, r33
2024-09-06 09:11:57 -05:00
JMP :4
2024-11-15 15:35:03 -06:00
0: ADDI64 r35, r35, 1d
ADDI64 r32, r32, 1d
4: JMP :5
2: LD r31, r254, 0a, 64h
ADDI64 r254, r254, 64d
2024-09-06 09:11:57 -05:00
JALA r0, r31, 0a
set_pixel:
2024-11-15 15:35:03 -06:00
ADDI64 r254, r254, -24d
ST r32, r254, 0a, 24h
CP r13, r2
CP r14, r3
CP r15, r4
MUL64 r14, r14, r15
ADD64 r13, r14, r13
CP r1, r13
LD r32, r254, 0a, 24h
ADDI64 r254, r254, 24d
2024-09-06 09:11:57 -05:00
JALA r0, r31, 0a
x86_fb_ptr:
2024-11-15 15:35:03 -06:00
ADDI64 r254, r254, -8d
ST r32, r254, 0a, 8h
LI64 r13, 100d
CP r1, r13
LD r32, r254, 0a, 8h
ADDI64 r254, r254, 8d
2024-09-06 09:11:57 -05:00
JALA r0, r31, 0a
code size: 425
2024-09-15 13:14:56 -05:00
ret: 3000
2024-09-06 09:11:57 -05:00
status: Ok(())