home *** CD-ROM | disk | FTP | other *** search
- ; Listing 1 -- Using EQU to define text macros
- ;
- ; Return registers for INT 16h, Function 0
- ;
- ScanCode equ <ah>
- AsciiValue equ <al>
-
- WaitForESC:
- mov ah,0
- int 16h
- cmp ScanCode,1 ;expands to "cmp ah,1"
- jne WaitForESC
- cmp AsciiValue,27 ;expands to "cmp al,27"
- jne WaitForESC
- ; ESC key has been pressed, continue processing
-