annotate src/video/ataricommon/SDL_xbiosinterrupt.S @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents c9b51268668f
children b7d426b28c18
rev   line source
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
6 modify it under the terms of the GNU Lesser General Public
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
13 Lesser General Public License for more details.
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
15 You should have received a copy of the GNU Lesser General Public
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
16 License along with this library; if not, write to the Free Software
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1063
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 /*
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 * XBIOS mouse & joystick vectors
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 *
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 * Patrice Mandin
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 .globl _SDL_AtariXbios_Install
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
32 .globl _SDL_AtariXbios_Restore
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 .globl _SDL_AtariXbios_MouseVector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 .globl _SDL_AtariXbios_JoystickVector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 .globl _SDL_AtariXbios_mouseb
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 .globl _SDL_AtariXbios_mousex
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 .globl _SDL_AtariXbios_mousey
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 .globl _SDL_AtariXbios_joystick
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 /*--- Vector installer ---*/
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 _SDL_AtariXbios_Install:
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 movel sp@(4),a0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 /* Stop interrupts */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 movew #0x2700,sr
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 /* Save old mouse vector, set our routine */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
52 clrl oldmousevector
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 movel sp@(8),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 beqs no_new_mouse_vector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 movel a0@(16),oldmousevector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 movel d0,a0@(16)
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 no_new_mouse_vector:
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 /* Save old joystick vector, set our routine */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
61 clrl oldjoystickvector
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 movel sp@(12),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 beqs no_new_joystick_vector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 movel a0@(24),oldjoystickvector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 movel d0,a0@(24)
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66 no_new_joystick_vector:
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 /* Restart interrupts */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70 movew #0x2300,sr
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
72 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
73
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
74 /*--- Vector restorer ---*/
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
75
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
76 _SDL_AtariXbios_Restore:
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
77 movel sp@(4),a0
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
78
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
79 /* Stop interrupts */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
80
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
81 movew #0x2700,sr
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
82
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
83 /* Restore mouse vector */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
84
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
85 movel oldmousevector,d0
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
86 beqs no_restore_mouse
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
87 movel d0,a0@(16)
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
88 no_restore_mouse:
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
89
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
90 /* Restore joystick vector */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
91
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
92 movel oldjoystickvector,d0
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
93 beqs no_restore_joystick
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
94 movel d0,a0@(24)
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
95 no_restore_joystick:
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
96
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
97 /* Restart interrupts */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
98
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
99 movew #0x2300,sr
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
100
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
101 rts
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
102
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 /*--- Our mouse vector ---*/
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 .ascii "XBRA"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 .ascii "LSDL"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 .comm oldmousevector,4*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 _SDL_AtariXbios_MouseVector:
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
111 movel d0,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 /* Mouse buttons */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 moveb (a0),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 andw #3,d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 movew d0,_SDL_AtariXbios_mouseb
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 /* X movement */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 moveb a0@(1),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 extw d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 addw d0,_SDL_AtariXbios_mousex
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 /* Y movement */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 moveb a0@(2),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 extw d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 addw d0,_SDL_AtariXbios_mousey
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 /* Jump through old vector */
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
129 movel sp@+,d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
131 movel oldmousevector,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
134 .data
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
136 .comm _SDL_AtariXbios_mousex,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138 .comm _SDL_AtariXbios_mousey,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 .comm _SDL_AtariXbios_mouseb,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 /*--- Our joystick vector ---*/
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146 .ascii "XBRA"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 .ascii "LSDL"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 .comm oldjoystickvector,4*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149 _SDL_AtariXbios_JoystickVector:
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
150 movel d0,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 /* New joystick state */
1063
0fb50bfaea7f Used wrong offset in joystick packet
Patrice Mandin <patmandin@gmail.com>
parents: 987
diff changeset
153 moveb a0@(2),d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 andw #0x8f,d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155 movew d0,_SDL_AtariXbios_joystick
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 /* Jump through old vector */
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
158 movel sp@+,d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
160 movel oldjoystickvector,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
163 .data
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165 .comm _SDL_AtariXbios_joystick,2*1