home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1991 / number6 / scancode.asm < prev    next >
Assembly Source File  |  1991-11-14  |  389b  |  17 lines

  1. ; Listing 1 -- Using EQU to define text macros
  2. ;
  3. ; Return registers for INT 16h, Function 0
  4. ;
  5. ScanCode       equ  <ah>
  6. AsciiValue     equ  <al>
  7.  
  8. WaitForESC:
  9.      mov ah,0
  10.      int 16h
  11.      cmp ScanCode,1      ;expands to "cmp ah,1"
  12.      jne WaitForESC
  13.      cmp AsciiValue,27   ;expands to "cmp al,27"
  14.      jne WaitForESC
  15. ; ESC key has been pressed, continue processing
  16.  
  17.