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