holey-bytes/hblang/tests/son_tests_fb_driver.txt
2024-09-15 20:14:56 +02:00

61 lines
1.2 KiB
Plaintext

main:
ADDI64 r254, r254, -88d
ST r31, r254, 0a, 88h
JAL r31, r0, :check_platform
CP r32, r1
LI64 r33, 0d
LI64 r34, 30d
LI64 r35, 100d
CP r36, r33
CP r37, r33
CP r38, r33
5: JLTU r37, r34, :0
ADDI64 r36, r36, 1d
CP r2, r33
CP r3, r36
CP r4, r34
JAL r31, r0, :set_pixel
CP r39, r1
JEQ r39, r38, :1
CP r1, r33
JMP :2
1: JNE r36, r35, :3
CP r1, r38
JMP :2
3: CP r37, r33
CP r40, r38
JMP :4
0: ADDI64 r40, r38, 1d
ADDI64 r41, r37, 1d
CP r37, r41
4: CP r38, r40
JMP :5
2: LD r31, r254, 0a, 88h
ADDI64 r254, r254, 88d
JALA r0, r31, 0a
set_pixel:
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
MUL64 r32, r4, r3
ADD64 r1, r32, r2
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
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
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
code size: 423
ret: 3000
status: Ok(())