added dio interface, standard mouse and joystick functions, osmaperrno
git-svn-id: svn://svn.cc65.org/cc65/trunk@773 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
40
libsrc/geos/mousesprite/readjoy.s
Normal file
40
libsrc/geos/mousesprite/readjoy.s
Normal file
@@ -0,0 +1,40 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 23.09.1998
|
||||
;
|
||||
; unsigned readjoy (unsigned char joy);
|
||||
;
|
||||
|
||||
.export _readjoy
|
||||
|
||||
.include "../inc/geossym.inc"
|
||||
|
||||
.proc _readjoy
|
||||
|
||||
tax ; Joystick number into X
|
||||
bne joy2
|
||||
|
||||
; Read joystick 1
|
||||
|
||||
joy1: lda #$7F
|
||||
sei
|
||||
sta cia1base
|
||||
lda cia1base+1
|
||||
cli
|
||||
and #$1F
|
||||
eor #$1F
|
||||
rts
|
||||
|
||||
; Read joystick 2
|
||||
|
||||
joy2: ldx #0
|
||||
lda #$E0
|
||||
ldy #$FF
|
||||
sta cia1base+2
|
||||
lda cia1base+1
|
||||
sty cia1base+2
|
||||
and #$1F
|
||||
eor #$1F
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
Reference in New Issue
Block a user