%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 ret wallpaper_name db 'wallpaper.bin', 0