/
SDL_atarieddi.S
70 lines (55 loc) · 1.48 KB
/
SDL_atarieddi.S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2012 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
/*
* Read EdDI version
*
* Patrice Mandin
*/
.text
.globl _Atari_get_EdDI_version
/*--- Vector installer ---*/
_Atari_get_EdDI_version:
#if defined(__mcoldfire__)
movel sp@(4),a0
movel a0,eddi_cookie
lea sp@(-8),sp
moveml d2/a2,sp@
#else
movel sp@(4),eddi_cookie
moveml d2/a2,sp@-
#endif
/* Supexec() to avoid crash on FreeMiNT with MP */
pea get_EdDI_version(pc)
movew #38,sp@-
trap #14
addql #6,sp
#if defined(__mcoldfire__)
moveml sp@,d2/a2
lea sp@(8),sp
#else
moveml sp@+,d2/a2
#endif
rts
get_EdDI_version:
movel eddi_cookie,a0
/* Call EdDI function #0 */
clrw d0
jmp (a0)
.bss
.even
.comm eddi_cookie, 4