From: cuz Date: Tue, 16 Dec 2003 22:38:28 +0000 (+0000) Subject: Use structs X-Git-Tag: V2.12.0~1030 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bfc4e54c41ae960d260b2f4bed421e8a08d4da51;p=cc65 Use structs git-svn-id: svn://svn.cc65.org/cc65/trunk@2778 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/asminc/joy-kernel.inc b/asminc/joy-kernel.inc index 4517767e2..20dfa58dd 100644 --- a/asminc/joy-kernel.inc +++ b/asminc/joy-kernel.inc @@ -39,19 +39,22 @@ ;------------------------------------------------------------------------------ ; 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 - +