init: .segments: mov ax, 0x07C0 mov ds, ax mov ax, 0 mov fs, ax .interrupt: mov [fs:0x08*4], word timer mov [fs:0x08*4+2], ds sti main: hlt jmp main timer: push ax push bx push bp mov ah, 0x0e mov al, 0x41 int 0x10 mov al, 20h out 20h, al pop bp pop bx pop ax iret times 510-($-$$) db 0 dw 0xaa55