holey-bytes/lang/tests/son_tests_fb_driver.txt

56 lines
1 KiB
Plaintext
Raw Normal View History

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