4 ; call video bios (10h) to set video mode (call 00h), to mode
6 mov ax, 13h ; call number in ah (0), call argument in al (13h)
7 int 10h ; call video bios
9 ; setup es to access the framebuffer segment (a000h)
13 ; prepare to fill the framebuffer with red (default palette color 4)
14 mov eax, 04040404h ; value to store each time
15 mov ecx, 16000 ; framebuffer size in 32bit units (320x200/4 = 16000)
16 xor di, di ; start from offset 0
17 rep stosd ; repeat (while ecx != 0) the "store string dword" instr.
20 in al, 60h ; read pending scancode from the keyboard port (if any)
21 dec al ; ESC is 1, so decrement ...
22 jnz .mainloop ; ... and loop as long as the result was not 0
24 ; switch back to text mode (mode 3)