]> git.sur5r.net Git - cc65/commitdiff
Use structs
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 16 Dec 2003 22:38:28 +0000 (22:38 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 16 Dec 2003 22:38:28 +0000 (22:38 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2778 b7a2c559-68d2-44c3-8de9-860c34a00d81

asminc/joy-kernel.inc

index 4517767e2ee4ef617b08ee76e1b92ec1936bf2b3..20dfa58dd951ed8c291e497814b449f36acd7b1d 100644 (file)
 ;------------------------------------------------------------------------------
 ; Driver header stuff
 
-JOY_HDR_ID              = 0                     ; $6A, $6F, $79 ("joy")
-JOY_HDR_VERSION         = 3                     ; Interface version
+.struct JOY_HDR
+       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
-
-JOY_HDR_JUMPTAB         = 12
-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
+;------------------------------------------------------------------------------
+; The JOY API version, stored in JOY_HDR::VERSION
 
-JOY_HDR_JUMPCOUNT       = 4                     ; Number of jump vectors
+JOY_API_VERSION         = $00
 
 ;------------------------------------------------------------------------------
 ; Variables
@@ -74,4 +77,4 @@ JOY_HDR_JUMPCOUNT       = 4                     ; Number of jump vectors
                .global _joy_count
                .global _joy_read
 
-                       
+