home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / desklib / sources / DeskLib / !DLSources / Libraries / Kbd / s / KeyDown < prev   
Encoding:
Text File  |  1995-08-26  |  757 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, or 0..128
  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    r1, #255
  27.         MOVEQ  r0, #1                   ; return(TRUE);
  28.         MOVNE  r0, #0                   ; return(FALSE);
  29.  
  30.         LDMFD  sp!, {pc}^
  31.  
  32.         END
  33.