%include "ponydos.inc" cpu 8086 bits 16 org 0 process_event: push ax push bx push cx push dx push si push di push bp push ds push es mov bp, cs mov ds, bp mov es, bp cmp ax, WM_INITIALIZE jne .not_initialize call initialize .not_initialize: pop es pop ds pop bp pop di pop si pop dx pop cx pop bx pop ax retf initialize: ; Set wallpaper mov si, wallpaper_name call PONYDOS_SEG:SYS_OPEN_FILE mov bp, PONYDOS_SEG mov es, bp mov bx, GLOBAL_WALLPAPER call PONYDOS_SEG:SYS_READ_SECTORS ; Draw a rectangle on-screen mov bx, 5 mov cx, 3 mov dx, 3 mov si, rect mov di, 10 mov bp, 3 call PONYDOS_SEG:SYS_DRAW_RECT call wait_key ret wallpaper_name db 'wallpaper.bin', 0 %include "debug.inc" rect: db '0', 0xf0, '1', 0xf1, '2', 0xf2, '3', 0xf3, '4', 0xf4 db 'A', 0xf5, times 4 db '*', 0xf0 db 'B', 0xf6 times 4 db '*', 0xf0 db 'C', 0xf7 times 4 db '*', 0xf0