# white sheet · pure x86_64 Linux · /dev/fb0 · no libc
# sys_open / sys_write / sys_exit only
# as --64 -o hdmi_fb.o white/hdmi_fb.asm && ld -o white/hdmi_fb white/hdmi_fb.o
        .global _start
        .text
_start:
        mov     $2, %rax
        lea     fbpath(%rip), %rdi
        mov     $2, %rsi
        xor     %rdx, %rdx
        syscall
        cmp     $0, %rax
        jl      nofb
        mov     %rax, %r12

        lea     whitebuf(%rip), %rdi
        mov     $65536, %rcx
        mov     $0xFF, %al
        rep     stosb

        mov     $1, %rax
        mov     %r12, %rdi
        lea     whitebuf(%rip), %rsi
        mov     $65536, %rdx
        syscall

        mov     $3, %rax
        mov     %r12, %rdi
        syscall

        mov     $60, %rax
        xor     %rdi, %rdi
        syscall

nofb:
        mov     $60, %rax
        mov     $1, %rdi
        syscall

        .data
fbpath: .asciz  "/dev/fb0"
        .bss
        .align 16
whitebuf: .space 65536
