1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-18 15:05:14 +00:00
cc65/libsrc/atari/readjoy.s
uz 53dd513176 This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-05-28 13:40:48 +00:00

31 lines
365 B
ArmAsm

;
; Christian Groessler
;
; unsigned readjoy (unsigned char joy);
;
.export _readjoy
.include "atari.inc"
.proc _readjoy
and #3 ; fix joystick number
tax ; Joystick number (0-3) into X
; Read joystick
lda STRIG0,x ; get button
asl a
asl a
asl a
asl a
ora STICK0,x ; add position information
eor #$1F
ldx #0 ; fix X
rts
.endproc