home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Kbd / s / KeyDown
Encoding:
Text File  |  1993-05-13  |  796 b   |  33 lines

  1. ; Author:  Copyright 1993 Jason Williams
  2. ; Version: 1.00 (14 May 1993)
  3.  
  4. ; BOOL Kbd_KeyDown(keynum)
  5. ;   where keynum is a negative INKEY number
  6. ;   e.g. -1 = SHIFT, -2 = CTRL, etc
  7. ; Returns TRUE if the given key is currently depressed
  8. ; (Who would have thought you had a manic depressive keyboard? ;-)
  9.  
  10.  
  11.         GET     h.regdefs
  12.         GET     h.swinos
  13.         GET     h.macros
  14.         
  15.         
  16.         PREAMBLE
  17.         STARTCODE Kbd_KeyDown
  18.         
  19.         STMFD  sp!, {lr}
  20.         
  21.         MOV    r1, r0
  22.         MOV    r0, #129
  23.         MOV    r2, #255
  24.         SWI    SWI_OS_Byte + XOS_Bit
  25.         
  26.         CMP    r2, #255
  27.         MOVEQ  r0, #1                   ; return(TRUE);
  28.         MOVNE  r0, #0                   ; return(FALSE);
  29.         
  30.         LDMFD  sp!, {pc}^
  31.         
  32.         END
  33.