holey-bytes/lang/tests/son_tests_fb_driver.txt

54 lines
992 B
Plaintext
Raw Normal View History

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