]> git.sur5r.net Git - cc65/blob - libsrc/plus4/readjoy.s
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / libsrc / plus4 / readjoy.s
1 ;
2 ; Ullrich von Bassewitz, 23.09.1998
3 ;
4 ; unsigned readjoy (unsigned char joy);
5 ;
6
7         .export         _readjoy
8
9         .include        "plus4.inc"
10
11
12 .proc   _readjoy
13
14         ldy     #$FA            ; Load index for joystick #1
15         tax                     ; Test joystick number
16         beq     L1
17         ldy     #$FB            ; Load index for joystick #2
18 L1:     sei
19         sty     TED_KBD
20         lda     TED_KBD
21         cli
22         ldx     #$00            ; Clear high byte
23         and     #$1F
24         eor     #$1F
25         rts
26
27 .endproc
28
29