home *** CD-ROM | disk | FTP | other *** search
- ;Assembler header file for Joystick
- ;written by DefMod (Jun 12 1995) on Thu Jun 22 12:14:50 1995
- ;Jonathan Coxhead, Acorn Computers Ltd
-
- [ :LNOT: :DEF: Get_Types
- GBLS Get_Types
- ]
- [ :LNOT: :DEF: Types_Hdr
- Get_Types SETS "GET OS:Hdr.Types"
- |
- Get_Types SETS ""
- ]
- $Get_Types
-
- [ :LNOT: :DEF: Get_OS
- GBLS Get_OS
- ]
- [ :LNOT: :DEF: OS_Hdr
- Get_OS SETS "GET OS:Hdr.OS"
- |
- Get_OS SETS ""
- ]
- $Get_OS
-
- [ :LNOT: :DEF: Joystick_Hdr
- GBLS Joystick_Hdr
-
- ;Symbols for constants
- Joystick_X * &FF
- Joystick_Y * &FF00
- Joystick_Switches * &FF0000
- Joystick_XShift * 0
- Joystick_YShift * 8
- Joystick_SwitchesShift * 16
- Joystick_HalfWordX * &FFFF
- Joystick_HalfWordY * &FFFF0000
- Joystick_HalfWordXShift * 0
- Joystick_HalfWordYShift * 16
-
- ;Symbols for structure offsets and sizes
- Joystick_State * Bits
-
- Joystick_HalfWordState * Bits
-
-
- ;Symbols for SWI's and SWI reason codes
- XJoystick_Read * &63F40
- Joystick_Read * &43F40
- ;Entry
- ; R0 = joystick_no (Int)
- ;Exit
- ; R0 = state (Joystick_State)
-
- XJoystick_ReadHalfWord * &63F40
- Joystick_ReadHalfWord * &43F40
- ;Entry
- ; R0 = &100 :OR: joystick_no (Int)
- ;Exit
- ; R0 = state (Joystick_HalfWordState)
- ; R1 = switches (Bits)
-
- XJoystick_CalibrateTopRight * &63F41
- Joystick_CalibrateTopRight * &43F41
-
- XJoystick_CalibrateBottomLeft * &63F42
- Joystick_CalibrateBottomLeft * &43F42
-
- ]
- END
-