home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / gchsrc31 / atarilib / joyisr.s < prev    next >
Text File  |  1992-04-27  |  752b  |  31 lines

  1. |//////////////////////////////////////////////////////////////////////////////
  2. |//
  3. |//  This file is part of the Atari Machine Specific Library,
  4. |//  and is Copyright 1992 by Warwick W. Allison.
  5. |//
  6. |//  You are free to copy and modify these sources, provided you acknoledge
  7. |//  the origin by retaining this notice, and adhere to the conditions
  8. |//  described in the file COPYING.
  9. |//
  10. |//////////////////////////////////////////////////////////////////////////////
  11.     .text
  12.  
  13.     .globl    _JoyISR
  14.  
  15. _JoyISR:
  16.     |moveml    d0/a1,sp@-
  17.     movel    #_JoyFlags,a1
  18.     addl    #4,a1
  19.     moveq    #0,d0
  20.     movel    sp@(4),a0    | Get joystick packet.
  21.     movew    a0@(1),d0
  22.     cmpb    #0xFF,a0@
  23.     beq        Joy1
  24.     lsrw    #8,d0
  25.     subl    #4,a1
  26. Joy1:    
  27.     movel    d0,a1@
  28.     |moveml    sp@+,d0/a1
  29.  
  30.     rts
  31.