comparison src/video/ataricommon/SDL_xbiosmouseinterrupt.S @ 281:c5010ab8ba35

Added initial support for Atari (thanks Patrice!)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 17 Feb 2002 19:54:28 +0000
parents
children e4bd0cf95506
comparison
equal deleted inserted replaced
280:0ddcea45d829 281:c5010ab8ba35
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 #ifdef SAVE_RCSID
24 static char rcsid =
25 "@(#) $Id$";
26 #endif
27
28 /*
29 * IKBD 6301 mouse vector
30 *
31 * Patrice Mandin
32 */
33
34 .text
35
36 .globl _SDL_AtariXbiosMouseInstall
37 .globl _SDL_AtariXbiosMouseVector
38
39 .globl _SDL_AtariXbios_mouseb
40 .globl _SDL_AtariXbios_mousex
41 .globl _SDL_AtariXbios_mousey
42
43 /*--- Vector installer ---*/
44
45 _SDL_AtariXbiosMouseInstall:
46 movel sp@(4),a0
47 movel sp@(8),a1
48
49 /* Stop interrupts */
50
51 movew #0x2700,sr
52
53 /* Save old vector */
54
55 movel a0@(16),oldvector
56
57 /* Set our routine */
58
59 movel a1,a0@(16)
60
61 /* Restart interrupts */
62
63 movew #0x2300,sr
64
65 rts
66
67 /*--- Our mouse vector ---*/
68
69 .text
70 .even
71 .ascii "XBRA"
72 .ascii "_SDL"
73 _SDL_AtariXbiosMouseVector:
74 moveml d0/a1,sp@-
75
76 /* Mouse buttons */
77 moveb (a0),d0
78 andw #3,d0
79 movew d0,_SDL_AtariXbios_mouseb
80
81 /* X movement */
82 moveb a0@(1),d0
83 extw d0
84 addw d0,_SDL_AtariXbios_mousex
85
86 /* Y movement */
87 moveb a0@(2),d0
88 extw d0
89 addw d0,_SDL_AtariXbios_mousey
90
91 /* Jump through old vector */
92 movel oldvector,a1
93 jsr (a1)
94
95 moveml sp@+,d0/a1
96 rts
97
98 .data
99
100 .even
101 .comm oldvector,4*1
102
103 .even
104 .comm _SDL_AtariXbios_mousex,2*1
105 .even
106 .comm _SDL_AtariXbios_mousey,2*1
107 .even
108 .comm _SDL_AtariXbios_mouseb,2*1
109