Mercurial > sdl-ios-xcode
comparison src/video/ataricommon/SDL_xbiosinterrupt.S @ 820:0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 14 Feb 2004 10:12:27 +0000 |
parents | 9c6613983e85 |
children | d9f3b5bb7870 |
comparison
equal
deleted
inserted
replaced
819:1318a8b87f48 | 820:0b9b4bf3c1e7 |
---|---|
32 */ | 32 */ |
33 | 33 |
34 .text | 34 .text |
35 | 35 |
36 .globl _SDL_AtariXbios_Install | 36 .globl _SDL_AtariXbios_Install |
37 .globl _SDL_AtariXbios_Restore | |
37 .globl _SDL_AtariXbios_MouseVector | 38 .globl _SDL_AtariXbios_MouseVector |
38 .globl _SDL_AtariXbios_JoystickVector | 39 .globl _SDL_AtariXbios_JoystickVector |
39 | 40 |
40 .globl _SDL_AtariXbios_mouseb | 41 .globl _SDL_AtariXbios_mouseb |
41 .globl _SDL_AtariXbios_mousex | 42 .globl _SDL_AtariXbios_mousex |
51 | 52 |
52 movew #0x2700,sr | 53 movew #0x2700,sr |
53 | 54 |
54 /* Save old mouse vector, set our routine */ | 55 /* Save old mouse vector, set our routine */ |
55 | 56 |
57 clrl oldmousevector | |
56 movel sp@(8),d0 | 58 movel sp@(8),d0 |
57 beqs no_new_mouse_vector | 59 beqs no_new_mouse_vector |
58 movel a0@(16),oldmousevector | 60 movel a0@(16),oldmousevector |
59 movel d0,a0@(16) | 61 movel d0,a0@(16) |
60 no_new_mouse_vector: | 62 no_new_mouse_vector: |
61 | 63 |
62 /* Save old joystick vector, set our routine */ | 64 /* Save old joystick vector, set our routine */ |
63 | 65 |
66 clrl oldjoystickvector | |
64 movel sp@(12),d0 | 67 movel sp@(12),d0 |
65 beqs no_new_joystick_vector | 68 beqs no_new_joystick_vector |
66 movel a0@(24),oldjoystickvector | 69 movel a0@(24),oldjoystickvector |
67 movel d0,a0@(24) | 70 movel d0,a0@(24) |
68 no_new_joystick_vector: | 71 no_new_joystick_vector: |
72 | |
73 /* Restart interrupts */ | |
74 | |
75 movew #0x2300,sr | |
76 | |
77 rts | |
78 | |
79 /*--- Vector restorer ---*/ | |
80 | |
81 _SDL_AtariXbios_Restore: | |
82 movel sp@(4),a0 | |
83 | |
84 /* Stop interrupts */ | |
85 | |
86 movew #0x2700,sr | |
87 | |
88 /* Restore mouse vector */ | |
89 | |
90 movel oldmousevector,d0 | |
91 beqs no_restore_mouse | |
92 movel d0,a0@(16) | |
93 no_restore_mouse: | |
94 | |
95 /* Restore joystick vector */ | |
96 | |
97 movel oldjoystickvector,d0 | |
98 beqs no_restore_joystick | |
99 movel d0,a0@(24) | |
100 no_restore_joystick: | |
69 | 101 |
70 /* Restart interrupts */ | 102 /* Restart interrupts */ |
71 | 103 |
72 movew #0x2300,sr | 104 movew #0x2300,sr |
73 | 105 |
136 rts | 168 rts |
137 | 169 |
138 .data | 170 .data |
139 .even | 171 .even |
140 .comm _SDL_AtariXbios_joystick,2*1 | 172 .comm _SDL_AtariXbios_joystick,2*1 |
141 |