home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / acmautils.lha / AcmaUtils / Source / CheckLeftButton.s next >
Encoding:
Text File  |  1994-03-05  |  543 b   |  27 lines

  1. ;
  2. ; CheckLeftButton V1.00   30-Aug-1993
  3. ;
  4. ; by Jan Hagqvist
  5. ;
  6. ; This program is PUBLIC DOMAIN
  7. ;
  8.  
  9. ;
  10. ; Returns WARN if LeftMouseButton is pressed
  11. ;
  12.  
  13. CheckLeftButton
  14.   moveq.l #0,d0            ; ReturnFlag=0
  15.   btst    #6,$bfe001        ; Is LMB pressed?
  16.   bne.s   CheckLeftButton2    ; No
  17.   moveq.l #5,d0            ; Yes, return WARN
  18.   move.w  #8191,d1        ; Set up a loop
  19. CheckLeftButton1
  20.   move.w  #$0000,$dff180    ; Flash screen black
  21.   move.w  #$0FFF,$dff180    ; Flash screen white
  22.   dbf     d1,CheckLeftButton1    ; Do the loop
  23. CheckLeftButton2
  24.   rts                ; Return to DOS
  25.  
  26.   END
  27.