Rev 8177 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8177 | Rev 9053 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | SECTION .text |
1 | SECTION .text |
Line 2... | Line -... | ||
2 | - | ||
3 | [GLOBAL __start] |
- | |
4 | extern go.kernel.Load |
- | |
5 | 2 | ||
6 | global go.os.Sleep |
3 | global go.os.Sleep |
7 | global go.os.Event |
4 | global go.os.Event |
8 | global go.os.GetButtonID |
5 | global go.os.GetButtonID |
9 | global go.os.CreateButton |
6 | global go.os.CreateButton |
Line 16... | Line 13... | ||
16 | global go.os.DrawBar |
13 | global go.os.DrawBar |
17 | global go.os.DebugOutHex |
14 | global go.os.DebugOutHex |
18 | global go.os.DebugOutChar |
15 | global go.os.DebugOutChar |
19 | global go.os.DebugOutStr |
16 | global go.os.DebugOutStr |
20 | 17 | global go.os.WriteText2 |
|
21 | __start: |
- | |
22 | call go.kernel.Load |
- | |
23 | ret |
18 | |
24 | - | ||
Line 25... | Line 19... | ||
25 | go.os.Sleep: |
19 | go.os.Sleep: |
26 | push ebp |
20 | push ebp |
27 | mov ebp,esp |
21 | mov ebp,esp |
28 | mov eax, 5 |
22 | mov eax, 5 |
Line 33... | Line 27... | ||
33 | ret |
27 | ret |
34 | 28 | ||
Line 35... | Line 29... | ||
35 | 29 | ||
36 | go.os.Event: |
- | |
37 | push ebp |
- | |
38 | mov ebp,esp |
30 | go.os.Event: |
39 | mov eax, 10 |
31 | mov eax, 10 |
40 | int 0x40 |
- | |
41 | mov esp,ebp |
- | |
42 | pop ebp |
32 | int 0x40 |
Line 43... | Line 33... | ||
43 | ret |
33 | ret |
44 | 34 | ||
45 | go.os.GetButtonID: |
35 | go.os.GetButtonID: |
Line 54... | Line 44... | ||
54 | dec eax |
44 | dec eax |
55 | ret |
45 | ret |
56 | 46 | ||
Line 57... | Line 47... | ||
57 | go.os.Exit: |
47 | go.os.Exit: |
58 | push ebp |
- | |
59 | mov ebp,esp |
- | |
60 | mov eax, -1 |
48 | mov eax, -1 |
61 | int 0x40 |
49 | int 0x40 |
62 | mov esp,ebp |
- | |
63 | pop ebp |
- | |
64 | ret |
50 | ret |
Line 65... | Line 51... | ||
65 | 51 | ||
66 | go.os.Redraw: |
52 | go.os.Redraw: |
67 | push ebp |
53 | push ebp |
Line 93... | Line 79... | ||
93 | pop ebp |
79 | pop ebp |
94 | ret |
80 | ret |
95 | 81 | ||
Line 96... | Line 82... | ||
96 | go.os.WriteText: |
82 | go.os.WriteText: |
- | 83 | push ebp |
|
- | 84 | mov ebp,esp |
|
97 | mov eax,4 |
85 | mov eax,4 |
98 | mov ebx,[esp+4] |
86 | mov ebx,[ebp+8] |
- | 87 | shl ebx,16 |
|
- | 88 | mov bx,[ebp+12] |
|
- | 89 | mov ecx,[ebp+16] |
|
- | 90 | mov edx,[ebp+20] |
|
- | 91 | mov esi,[ebp+24] |
|
- | 92 | int 0x40 |
|
- | 93 | mov esp,ebp |
|
- | 94 | pop ebp |
|
- | 95 | ret |
|
- | 96 | ||
- | 97 | go.os.WriteText2: |
|
- | 98 | push ebp |
|
- | 99 | mov ebp,esp |
|
- | 100 | mov eax,47 |
|
- | 101 | mov ebx,[ebp+8] |
|
99 | shl ebx,16 |
102 | shl ebx,16 |
100 | mov bx,[esp+8] |
103 | mov ecx,[ebp+12] |
101 | mov ecx,[esp+12] |
104 | mov edx,[ebp+20] |
- | 105 | shl edx,16 |
|
102 | mov edx,[esp+16] |
106 | add edx, [ebp+24] |
103 | mov esi,[esp+20] |
107 | mov esi,[ebp+28] |
104 | int 0x40 |
108 | int 0x40 |
- | 109 | mov esp,ebp |
|
- | 110 | pop ebp |
|
105 | ret |
111 | ret |
Line 106... | Line 112... | ||
106 | 112 | ||
107 | go.os.DrawLine: |
113 | go.os.DrawLine: |
- | 114 | push ebp |
|
108 | push ebx |
115 | mov ebp,esp |
109 | mov ebx,[esp+8] |
116 | mov ebx,[ebp+8] |
110 | shl ebx,16 |
117 | shl ebx,16 |
111 | mov bx,[esp+16] |
118 | mov bx,[ebp+16] |
112 | mov ecx,[esp+12] |
119 | mov ecx,[ebp+12] |
113 | shl ecx,16 |
120 | shl ecx,16 |
114 | mov cx,[esp+20] |
121 | mov cx,[ebp+20] |
115 | mov edx,[esp+24] |
122 | mov edx,[ebp+24] |
116 | mov eax,38 |
123 | mov eax,38 |
- | 124 | int 0x40 |
|
117 | int 0x40 |
125 | mov esp,ebp |
118 | pop ebx |
126 | pop ebp |
Line 119... | Line 127... | ||
119 | ret |
127 | ret |
120 | 128 | ||
- | 129 | go.os.DrawBar: |
|
121 | go.os.DrawBar: |
130 | push ebp |
122 | push ebx |
131 | mov ebp,esp |
123 | mov eax,13 |
132 | mov eax,13 |
124 | mov ebx,[esp+8] |
133 | mov ebx,[ebp+8] |
125 | shl ebx,16 |
134 | shl ebx,16 |
126 | mov bx,[esp+16] |
135 | mov bx,[ebp+16] |
127 | mov ecx,[esp+12] |
136 | mov ecx,[ebp+12] |
128 | shl ecx,16 |
137 | shl ecx,16 |
129 | mov cx,[esp+20] |
138 | mov cx,[ebp+20] |
- | 139 | mov edx,[ebp+24] |
|
130 | mov edx,[esp+24] |
140 | int 0x40 |
131 | int 0x40 |
141 | mov esp,ebp |
Line 132... | Line 142... | ||
132 | pop ebx |
142 | pop ebp |
133 | ret |
143 | ret |
134 | 144 | ||
Line 180... | Line 190... | ||
180 | m1: |
190 | m1: |
181 | ret |
191 | ret |
182 | 192 | ||
Line 183... | Line 193... | ||
183 | go.os.CreateButton: |
193 | go.os.CreateButton: |
184 | push ebx |
194 | push ebp |
185 | push esi |
195 | mov ebp,esp |
- | 196 | mov eax, 8 |
|
186 | mov ebx,[esp+12] |
197 | mov ebx, [ebp+8] |
187 | shl ebx,16 |
198 | shl ebx, 16 |
188 | mov bx,[esp+20] |
199 | mov bx, [ebp+16] |
189 | mov ecx,[esp+16] |
200 | mov ecx, [ebp+12] |
190 | shl ecx,16 |
201 | shl ecx, 16 |
191 | mov cx,[esp+24] |
202 | mov cx, [ebp+20] |
192 | mov edx,[esp+28] |
203 | mov edx, [ebp+24] |
193 | mov esi,[esp+32] |
204 | mov esi, [ebp+28] |
194 | mov eax,8 |
- | |
195 | int 0x40 |
205 | int 0x40 |
196 | pop esi |
206 | mov esp,ebp |
197 | pop ebx |
207 | pop ebp |
198 | ret |
208 | ret |
Line 199... | Line 209... | ||
199 | 209 | ||
200 | SECTION .data |
210 | SECTION .data |
201 | __hexdigits: |
211 | __hexdigits: |