Use structs
git-svn-id: svn://svn.cc65.org/cc65/trunk@2778 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
b15e4106dc
commit
bfc4e54c41
1 changed files with 15 additions and 12 deletions
|
@ -39,19 +39,22 @@
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver header stuff
|
; Driver header stuff
|
||||||
|
|
||||||
JOY_HDR_ID = 0 ; $6A, $6F, $79 ("joy")
|
.struct JOY_HDR
|
||||||
JOY_HDR_VERSION = 3 ; Interface version
|
ID .byte 3 ; $6A, $6F, $79 ("joy")
|
||||||
|
VERSION .byte 1 ; Interface version
|
||||||
|
MASKS .byte 8 ; Joystick state mask array
|
||||||
|
JUMPTAB .struct
|
||||||
|
INSTALL .word ; INSTALL routine
|
||||||
|
UNINSTALL .word ; UNINSTALL routine
|
||||||
|
COUNT .word ; COUNT routine
|
||||||
|
READ .word ; READ routine
|
||||||
|
.endstruct
|
||||||
|
.endstruct
|
||||||
|
|
||||||
JOY_MASKS = 4 ; Joystick state mask array
|
;------------------------------------------------------------------------------
|
||||||
JOY_MASK_COUNT = 8 ; Size of the array
|
; The JOY API version, stored in JOY_HDR::VERSION
|
||||||
|
|
||||||
JOY_HDR_JUMPTAB = 12
|
JOY_API_VERSION = $00
|
||||||
JOY_HDR_INSTALL = JOY_HDR_JUMPTAB+0 ; INSTALL routine
|
|
||||||
JOY_HDR_UNINSTALL = JOY_HDR_JUMPTAB+2 ; UNINSTALL routine
|
|
||||||
JOY_HDR_COUNT = JOY_HDR_JUMPTAB+4 ; COUNT routine
|
|
||||||
JOY_HDR_READ = JOY_HDR_JUMPTAB+6 ; READ routine
|
|
||||||
|
|
||||||
JOY_HDR_JUMPCOUNT = 4 ; Number of jump vectors
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
@ -74,4 +77,4 @@ JOY_HDR_JUMPCOUNT = 4 ; Number of jump vectors
|
||||||
.global _joy_count
|
.global _joy_count
|
||||||
.global _joy_read
|
.global _joy_read
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue