annotate src/stdlib/SDL_stdlib.c @ 1346:1b5fbaf1d2c6

Default to build SDL without MSVCRT
author Sam Lantinga <slouken@libsdl.org>
date Wed, 08 Feb 2006 08:55:33 +0000
parents 7f32b9bede06
children 22f39393668a
rev   line source
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 /* This file contains portable stdlib functions for SDL */
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #include "SDL_stdlib.h"
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 #ifndef HAVE_LIBC
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 /* These are some C runtime intrinsics that need to be defined */
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 #if defined(_MSC_VER)
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
33 /* Float to long */
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
34 void __declspec(naked) _ftol()
1345
7f32b9bede06 Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents: 1331
diff changeset
35 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
36 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
37 push ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
38 mov ebp,esp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
39 sub esp,20h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
40 and esp,0FFFFFFF0h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
41 fld st(0)
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
42 fst dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
43 fistp qword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
44 fild qword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
45 mov edx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
46 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
47 test eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
48 je integer_QnaN_or_zero
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
49 arg_is_not_integer_QnaN:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
50 fsubp st(1),st
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
51 test edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
52 jns positive
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
53 fstp dword ptr [esp]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
54 mov ecx,dword ptr [esp]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
55 xor ecx,80000000h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
56 add ecx,7FFFFFFFh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
57 adc eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
58 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
59 adc edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
60 jmp localexit
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
61 positive:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
62 fstp dword ptr [esp]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
63 mov ecx,dword ptr [esp]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
64 add ecx,7FFFFFFFh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
65 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
66 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
67 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
68 jmp localexit
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
69 integer_QnaN_or_zero:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
70 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
71 test edx,7FFFFFFFh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
72 jne arg_is_not_integer_QnaN
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
73 fstp dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
74 fstp dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
75 localexit:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
76 leave
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
77 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
78 }
1345
7f32b9bede06 Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents: 1331
diff changeset
79 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
80 void __declspec(naked) _ftol2_sse()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
82 _ftol();
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 }
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
85 /* 64-bit math operators for 32-bit systems */
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
86 void __declspec(naked) _allmul()
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
87 {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
88 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
89 push ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
90 mov ebp,esp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
91 push edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
92 push esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
93 push ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
94 sub esp,0Ch
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
95 mov eax,dword ptr [ebp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
96 mov edi,dword ptr [ebp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
97 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
98 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
99 sar esi,1Fh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
100 mov eax,dword ptr [ebp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
101 mul ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
102 imul edi,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
103 mov ecx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
104 mov dword ptr [ebp-18h],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
105 mov edx,dword ptr [ebp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
106 add ecx,edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
107 imul ebx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
108 mov eax,dword ptr [ebp-18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
109 lea ebx,[ebx+ecx]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
110 mov dword ptr [ebp-14h],ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
111 mov edx,dword ptr [ebp-14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
112 add esp,0Ch
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
113 pop ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
114 pop esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
115 pop edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
116 pop ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
117 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
118 }
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
119 }
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
120 void __declspec(naked) _alldiv()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
122 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
123 push edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
124 push esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
125 push ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
126 xor edi,edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
127 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
128 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
129 jge L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
130 inc edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
131 mov edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
132 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
133 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
134 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
135 mov dword ptr [esp+14h],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
136 mov dword ptr [esp+10h],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
137 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
138 mov eax,dword ptr [esp+1Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
139 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
140 jge L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
141 inc edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
142 mov edx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
143 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
144 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
145 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
146 mov dword ptr [esp+1Ch],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
147 mov dword ptr [esp+18h],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
148 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
149 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
150 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
151 mov ecx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
152 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
153 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
154 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
155 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
156 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
157 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
158 mov edx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
159 jmp L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
160 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
161 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
162 mov ecx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
163 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
164 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
165 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
166 shr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
167 rcr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
168 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
169 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
170 or ebx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
171 jne L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
172 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
173 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
174 mul dword ptr [esp+1Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
175 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
176 mov eax,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
177 mul esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
178 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
179 jb L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
180 cmp edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
181 ja L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
182 jb L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
183 cmp eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
184 jbe L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
185 L6:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
186 dec esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
187 L7:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
188 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
189 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
190 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
191 dec edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
192 jne L8
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
193 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
194 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
195 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
196 L8:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
197 pop ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
198 pop esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
199 pop edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
200 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
201 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
202 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
203 void __declspec(naked) _aulldiv()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
204 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
205 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
206 push ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
207 push esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
208 mov eax,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
209 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
210 jne L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
211 mov ecx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
212 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
213 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
214 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
215 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
216 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
217 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
218 mov edx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
219 jmp L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
220 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
221 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
222 mov ebx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
223 mov edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
224 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
225 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
226 shr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
227 rcr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
228 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
229 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
230 or ecx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
231 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
232 div ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
233 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
234 mul dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
235 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
236 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
237 mul esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
238 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
239 jb L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
240 cmp edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
241 ja L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
242 jb L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
243 cmp eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
244 jbe L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
245 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
246 dec esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
247 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
248 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
249 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
250 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
251 pop esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
252 pop ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
253 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
254 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
255 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
256 void __declspec(naked) _allrem()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
257 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
258 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
259 push ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
260 push edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
261 xor edi,edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
262 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
263 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
264 jge L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
265 inc edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
266 mov edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
267 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
268 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
269 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
270 mov dword ptr [esp+10h],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
271 mov dword ptr [esp+0Ch],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
272 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
273 mov eax,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
274 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
275 jge L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
276 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
277 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
278 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
279 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
280 mov dword ptr [esp+18h],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
281 mov dword ptr [esp+14h],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
282 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
283 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
284 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
285 mov ecx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
286 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
287 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
288 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
289 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
290 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
291 mov eax,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
292 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
293 dec edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
294 jns L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
295 jmp L8
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
296 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
297 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
298 mov ecx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
299 mov edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
300 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
301 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
302 shr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
303 rcr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
304 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
305 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
306 or ebx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
307 jne L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
308 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
309 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
310 mul dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
311 xchg eax,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
312 mul dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
313 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
314 jb L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
315 cmp edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
316 ja L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
317 jb L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
318 cmp eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
319 jbe L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
320 L6:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
321 sub eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
322 sbb edx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
323 L7:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
324 sub eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
325 sbb edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
326 dec edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
327 jns L8
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
328 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
329 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
330 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
331 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
332 L8:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
333 pop edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
334 pop ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
335 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
336 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
337 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
338 void __declspec(naked) _aullrem()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
339 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
340 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
341 push ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
342 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
343 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
344 jne L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
345 mov ecx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
346 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
347 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
348 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
349 mov eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
350 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
351 mov eax,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
352 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
353 jmp L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
354 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
355 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
356 mov ebx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
357 mov edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
358 mov eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
359 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
360 shr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
361 rcr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
362 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
363 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
364 or ecx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
365 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
366 div ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
367 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
368 mul dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
369 xchg eax,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
370 mul dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
371 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
372 jb L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
373 cmp edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
374 ja L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
375 jb L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
376 cmp eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
377 jbe L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
378 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
379 sub eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
380 sbb edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
381 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
382 sub eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
383 sbb edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
384 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
385 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
386 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
387 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
388 pop ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
389 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
390 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
391 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
392 void __declspec(naked) _alldvrm()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
393 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
394 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
395 push edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
396 push esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
397 push ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
398 xor edi,edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
399 xor ebp,ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
400 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
401 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
402 jge L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
403 inc edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
404 inc ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
405 mov edx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
406 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
407 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
408 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
409 mov dword ptr [esp+14h],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
410 mov dword ptr [esp+10h],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
411 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
412 mov eax,dword ptr [esp+1Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
413 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
414 jge L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
415 inc edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
416 mov edx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
417 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
418 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
419 sbb eax,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
420 mov dword ptr [esp+1Ch],eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
421 mov dword ptr [esp+18h],edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
422 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
423 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
424 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
425 mov ecx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
426 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
427 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
428 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
429 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
430 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
431 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
432 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
433 mov eax,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
434 mul dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
435 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
436 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
437 mul dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
438 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
439 jmp L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
440 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
441 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
442 mov ecx,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
443 mov edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
444 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
445 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
446 shr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
447 rcr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
448 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
449 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
450 or ebx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
451 jne L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
452 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
453 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
454 mul dword ptr [esp+1Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
455 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
456 mov eax,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
457 mul esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
458 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
459 jb L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
460 cmp edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
461 ja L6
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
462 jb L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
463 cmp eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
464 jbe L7
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
465 L6:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
466 dec esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
467 sub eax,dword ptr [esp+18h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
468 sbb edx,dword ptr [esp+1Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
469 L7:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
470 xor ebx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
471 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
472 sub eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
473 sbb edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
474 dec ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
475 jns L9
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
476 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
477 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
478 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
479 L9:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
480 mov ecx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
481 mov edx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
482 mov ebx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
483 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
484 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
485 dec edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
486 jne L8
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
487 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
488 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
489 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
490 L8:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
491 pop ebp
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
492 pop esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
493 pop edi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
494 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
495 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
496 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
497 void __declspec(naked) _aulldvrm()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
498 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
499 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
500 push esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
501 mov eax,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
502 or eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
503 jne L1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
504 mov ecx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
505 mov eax,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
506 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
507 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
508 mov ebx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
509 mov eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
510 div ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
511 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
512 mov eax,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
513 mul dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
514 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
515 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
516 mul dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
517 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
518 jmp L2
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
519 L1:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
520 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
521 mov ebx,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
522 mov edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
523 mov eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
524 L3:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
525 shr ecx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
526 rcr ebx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
527 shr edx,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
528 rcr eax,1
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
529 or ecx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
530 jne L3
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
531 div ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
532 mov esi,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
533 mul dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
534 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
535 mov eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
536 mul esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
537 add edx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
538 jb L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
539 cmp edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
540 ja L4
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
541 jb L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
542 cmp eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
543 jbe L5
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
544 L4:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
545 dec esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
546 sub eax,dword ptr [esp+10h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
547 sbb edx,dword ptr [esp+14h]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
548 L5:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
549 xor ebx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
550 L2:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
551 sub eax,dword ptr [esp+8]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
552 sbb edx,dword ptr [esp+0Ch]
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
553 neg edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
554 neg eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
555 sbb edx,0
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
556 mov ecx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
557 mov edx,ebx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
558 mov ebx,ecx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
559 mov ecx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
560 mov eax,esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
561 pop esi
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
562 ret 10h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
563 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
564 }
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
565 void __declspec(naked) _allshl()
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
566 {
1346
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
567 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
568 cmp cl,40h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
569 jae RETZERO
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
570 cmp cl,20h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
571 jae MORE32
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
572 shld edx,eax,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
573 shl eax,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
574 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
575 MORE32:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
576 mov edx,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
577 xor eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
578 and cl,1Fh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
579 shl edx,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
580 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
581 RETZERO:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
582 xor eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
583 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
584 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
585 }
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
586 }
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
587 void __declspec(naked) _aullshr()
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
588 {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
589 __asm {
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
590 cmp cl,40h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
591 jae RETZERO
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
592 cmp cl,20h
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
593 jae MORE32
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
594 shrd eax,edx,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
595 shr edx,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
596 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
597 MORE32:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
598 mov eax,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
599 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
600 and cl,1Fh
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
601 shr eax,cl
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
602 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
603 RETZERO:
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
604 xor eax,eax
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
605 xor edx,edx
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
606 ret
1b5fbaf1d2c6 Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents: 1345
diff changeset
607 }
1330
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
608 }
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
609
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
610 #endif /* MSC_VER */
450721ad5436 It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
611
1331
1cbaeee565b1 A few fixes to get this building on Linux again
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
612 #endif /* !HAVE_LIBC */