58 lines
1.1 KiB
Plaintext
58 lines
1.1 KiB
Plaintext
create_back_buffer:
|
|
ADDI64 r254, r254, -40d
|
|
ST r31, r254, 0a, 40h
|
|
CP r32, r2
|
|
LI64 r33, 255d
|
|
JGTS r32, r33, :0
|
|
CP r2, r32
|
|
JAL r31, r0, :request_page
|
|
CP r32, r1
|
|
CP r1, r32
|
|
JMP :1
|
|
0: LI8 r34, 255b
|
|
CP r2, r34
|
|
JAL r31, r0, :request_page
|
|
CP r35, r1
|
|
SUB64 r32, r32, r33
|
|
5: JGTS r32, r0, :2
|
|
CP r1, r35
|
|
JMP :1
|
|
2: JLTS r32, r33, :3
|
|
CP r2, r34
|
|
JAL r31, r0, :request_page
|
|
JMP :4
|
|
3: CP r2, r32
|
|
JAL r31, r0, :request_page
|
|
4: SUB64 r32, r32, r33
|
|
JMP :5
|
|
1: LD r31, r254, 0a, 40h
|
|
ADDI64 r254, r254, 40d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -16d
|
|
ST r31, r254, 0a, 16h
|
|
LI64 r32, 400d
|
|
CP r2, r32
|
|
JAL r31, r0, :create_back_buffer
|
|
LD r31, r254, 0a, 16h
|
|
ADDI64 r254, r254, 16d
|
|
JALA r0, r31, 0a
|
|
request_page:
|
|
CP r13, r2
|
|
LRA r14, r0, :"\0\u{1}xxxxxxxx\0"
|
|
ST r13, r14, 1a, 1h
|
|
LI64 r13, 12d
|
|
LI64 r15, 2d
|
|
LI64 r16, 3d
|
|
CP r2, r16
|
|
CP r3, r15
|
|
CP r4, r14
|
|
CP r5, r13
|
|
ECA
|
|
CP r13, r1
|
|
CP r1, r13
|
|
JALA r0, r31, 0a
|
|
code size: 351
|
|
ret: 42
|
|
status: Ok(())
|