.ORG 0x84 ; INT 21 DW 0xFFFF ; Code Segment DW PRINT_INT_HANDLE ; Program Counter .ORG 0x0100 start: MOV SP,#STACK MOV AX,#0x0000 MOV CX,#0x0000 MOV BX,#0x0000 CALL TEST_ ADD CX,#0xBEEF ADD CX,#0x4111 mov AX,#0x00FF inc AL mov AX,#0x00FF inc ax ADD AX,#0x2200 MOV SI,#0x0101 MOV [SI],AX inc [si] inc [si] inc [si] dec [si] dec cx cmp CX,#0x00 MOV CH,#0x9A inw #0x20 CMP AL,#0xCD jz WAZZ mov al,#'0 out byte #0xA5 hlt WAZZ: CMP AH,#0xAB jz WAZZ2 mov al,#'0 out byte #0xA5 hlt WAZZ2: mov al,#'1 outb #0xA5 hlt TEST_: ADD AX,#0xDEAD RET ;quick&dirty PRINT_INT_HANDLE: push AX MOV AL,DL out byte #0xA5 POP AX iret .BLKB 10 STACK: .ORG 0xFFF0 MOV AX,#0x0100 JMP AX