blob: 463f815d33dd90e6e69eb9bdf25f3e3711ae7916 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
on application entry:
there is a 1MiB - 8KiB area mapped writable and not
executable with guard pages on either side, and rsp is
set to the top of that. all other registers are set to 0.
for all system calls:
rax, rdi, rsi, rdx are in/out paramters.
rbx, rbp, rsp, r12-r15 are preserved.
rcx, rflags, r8-r11 are clobbered.
encode color:
rax in: 0
edi in: r + g * 256 + b * 65536
eax out: encoded color
get framebuffer:
rax in: 1
rax out: pointer to framebuffer
rdi out: width + height * 2 ** 32
esi out: pitch
framebuffer is always 32 bpp. use the encode color syscall
to encode colors. pitch is in dwords, not in bytes.
|