forked from AbleOS/holey-bytes
47 lines
922 B
Plaintext
47 lines
922 B
Plaintext
create_back_buffer:
|
|
ADDI64 r254, r254, -48d
|
|
ST r31, r254, 0a, 48h
|
|
LI64 r32, 255d
|
|
JGTS r2, r32, :0
|
|
JAL r31, r0, :request_page
|
|
JMP :1
|
|
0: CP r33, r2
|
|
LI8 r34, 255b
|
|
CP r2, r34
|
|
JAL r31, r0, :request_page
|
|
CP r35, r33
|
|
5: SUB64 r35, r35, r32
|
|
JGTS r35, r0, :2
|
|
JMP :1
|
|
2: CP r36, r1
|
|
JLTS r35, r32, :3
|
|
CP r2, r34
|
|
JAL r31, r0, :request_page
|
|
JMP :4
|
|
3: CP r2, r35
|
|
JAL r31, r0, :request_page
|
|
4: CP r1, r36
|
|
JMP :5
|
|
1: LD r31, r254, 0a, 48h
|
|
ADDI64 r254, r254, 48d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -8d
|
|
ST r31, r254, 0a, 8h
|
|
LI64 r2, 400d
|
|
JAL r31, r0, :create_back_buffer
|
|
LD r31, r254, 0a, 8h
|
|
ADDI64 r254, r254, 8d
|
|
JALA r0, r31, 0a
|
|
request_page:
|
|
LRA r4, r0, :"\0\u{1}xxxxxxxx\0"
|
|
ST r2, r4, 1a, 1h
|
|
LI64 r5, 12d
|
|
LI64 r3, 2d
|
|
LI64 r2, 3d
|
|
ECA
|
|
JALA r0, r31, 0a
|
|
code size: 317
|
|
ret: 42
|
|
status: Ok(())
|