Rev 255 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 255 | Rev 485 | ||
---|---|---|---|
1 | ;load cursors from memory |
1 | ;load cursors from memory |
2 | ;IN |
2 | ;IN |
3 | ; eax- pointer to memory for ID of cursors |
3 | ; eax- pointer to memory for ID of cursors |
4 | ;OUT |
4 | ;OUT |
5 | ; not returned value |
5 | ; not returned value |
6 | 6 | ||
7 | load_cursors: |
7 | load_cursors: |
8 | 8 | ||
9 | mov [PointerToCursorsID],eax |
9 | mov [PointerToCursorsID],eax |
10 | 10 | ||
11 | mov eax, 37 |
11 | mov eax, 37 |
12 | mov ebx, 4 |
12 | mov ebx, 4 |
13 | mov ecx,brush_cursor |
13 | mov ecx,brush_cursor |
14 | mov edx,1 |
14 | mov edx,1 |
15 | int 0x40 |
15 | mcall |
16 | 16 | ||
17 | mov ebx,[PointerToCursorsID] |
17 | mov ebx,[PointerToCursorsID] |
18 | mov [ebx],eax |
18 | mov [ebx],eax |
19 | add [PointerToCursorsID],4 |
19 | add [PointerToCursorsID],4 |
20 | 20 | ||
21 | mov eax, 37 |
21 | mov eax, 37 |
22 | mov ebx, 4 |
22 | mov ebx, 4 |
23 | mov ecx,flood_fill_cursor |
23 | mov ecx,flood_fill_cursor |
24 | mov edx,1 |
24 | mov edx,1 |
25 | int 0x40 |
25 | mcall |
26 | 26 | ||
27 | mov ebx,[PointerToCursorsID] |
27 | mov ebx,[PointerToCursorsID] |
28 | mov [ebx],eax |
28 | mov [ebx],eax |
29 | add [PointerToCursorsID],4 |
29 | add [PointerToCursorsID],4 |
30 | 30 | ||
31 | mov eax, 37 |
31 | mov eax, 37 |
32 | mov ebx, 4 |
32 | mov ebx, 4 |
33 | mov ecx,lastik_cursor |
33 | mov ecx,lastik_cursor |
34 | mov edx,1 |
34 | mov edx,1 |
35 | int 0x40 |
35 | mcall |
36 | 36 | ||
37 | mov ebx,[PointerToCursorsID] |
37 | mov ebx,[PointerToCursorsID] |
38 | mov [ebx],eax |
38 | mov [ebx],eax |
39 | add [PointerToCursorsID],4 |
39 | add [PointerToCursorsID],4 |
40 | 40 | ||
41 | 41 | ||
42 | mov eax, 37 |
42 | mov eax, 37 |
43 | mov ebx, 4 |
43 | mov ebx, 4 |
44 | mov ecx,other_cursor |
44 | mov ecx,other_cursor |
45 | mov edx,1 |
45 | mov edx,1 |
46 | int 0x40 |
46 | mcall |
47 | 47 | ||
48 | 48 | ||
49 | mov ebx,[PointerToCursorsID] |
49 | mov ebx,[PointerToCursorsID] |
50 | mov [ebx],eax |
50 | mov [ebx],eax |
51 | add [PointerToCursorsID],4 |
51 | add [PointerToCursorsID],4 |
52 | 52 | ||
53 | mov eax, 37 |
53 | mov eax, 37 |
54 | mov ebx, 4 |
54 | mov ebx, 4 |
55 | mov ecx,pencil_cursor |
55 | mov ecx,pencil_cursor |
56 | mov edx,1 |
56 | mov edx,1 |
57 | int 0x40 |
57 | mcall |
58 | 58 | ||
59 | 59 | ||
60 | mov ebx,[PointerToCursorsID] |
60 | mov ebx,[PointerToCursorsID] |
61 | mov [ebx],eax |
61 | mov [ebx],eax |
62 | add [PointerToCursorsID],4 |
62 | add [PointerToCursorsID],4 |
63 | 63 | ||
64 | mov eax, 37 |
64 | mov eax, 37 |
65 | mov ebx, 4 |
65 | mov ebx, 4 |
66 | mov ecx,pipette_cursor |
66 | mov ecx,pipette_cursor |
67 | mov edx,1 |
67 | mov edx,1 |
68 | int 0x40 |
68 | mcall |
69 | 69 | ||
70 | mov ebx,[PointerToCursorsID] |
70 | mov ebx,[PointerToCursorsID] |
71 | mov [ebx],eax |
71 | mov [ebx],eax |
72 | add [PointerToCursorsID],4 |
72 | add [PointerToCursorsID],4 |
73 | 73 | ||
74 | mov eax, 37 |
74 | mov eax, 37 |
75 | mov ebx, 4 |
75 | mov ebx, 4 |
76 | mov ecx,spray_cursor |
76 | mov ecx,spray_cursor |
77 | mov edx,1 |
77 | mov edx,1 |
78 | int 0x40 |
78 | mcall |
79 | 79 | ||
80 | mov ebx,[PointerToCursorsID] |
80 | mov ebx,[PointerToCursorsID] |
81 | mov [ebx],eax |
81 | mov [ebx],eax |
82 | add [PointerToCursorsID],4 |
82 | add [PointerToCursorsID],4 |
83 | 83 | ||
84 | mov eax, 37 |
84 | mov eax, 37 |
85 | mov ebx, 4 |
85 | mov ebx, 4 |
86 | mov ecx,zoom_cursor |
86 | mov ecx,zoom_cursor |
87 | mov edx,1 |
87 | mov edx,1 |
88 | int 0x40 |
88 | mcall |
89 | 89 | ||
90 | mov ebx,[PointerToCursorsID] |
90 | mov ebx,[PointerToCursorsID] |
91 | mov [ebx],eax |
91 | mov [ebx],eax |
92 | add [PointerToCursorsID],4 |
92 | add [PointerToCursorsID],4 |
93 | 93 | ||
94 | ret |
94 | ret |
95 | 95 | ||
96 | ;set cirsor |
96 | ;set cirsor |
97 | ;IN |
97 | ;IN |
98 | ;eax- pointer to IDs of cursors |
98 | ;eax- pointer to IDs of cursors |
99 | ;ebx- number(ID) of current instrument |
99 | ;ebx- number(ID) of current instrument |
100 | 100 | ||
101 | set_cursor: |
101 | set_cursor: |
102 | 102 | ||
103 | mov [PointerToCursorsID],eax |
103 | mov [PointerToCursorsID],eax |
104 | 104 | ||
105 | cmp ebx,10 |
105 | cmp ebx,10 |
106 | jne no_1_l |
106 | jne no_1_l |
107 | mov eax,5 |
107 | mov eax,5 |
108 | jmp che |
108 | jmp che |
109 | no_1_l: |
109 | no_1_l: |
110 | 110 | ||
111 | cmp ebx,11 |
111 | cmp ebx,11 |
112 | jne no_2_l |
112 | jne no_2_l |
113 | mov eax,1 |
113 | mov eax,1 |
114 | jmp che |
114 | jmp che |
115 | no_2_l: |
115 | no_2_l: |
116 | 116 | ||
117 | cmp ebx,12 |
117 | cmp ebx,12 |
118 | jne no_3_l |
118 | jne no_3_l |
119 | mov eax,7 |
119 | mov eax,7 |
120 | jmp che |
120 | jmp che |
121 | no_3_l: |
121 | no_3_l: |
122 | 122 | ||
123 | cmp ebx,13 |
123 | cmp ebx,13 |
124 | jne no_4_l |
124 | jne no_4_l |
125 | mov eax,3 |
125 | mov eax,3 |
126 | jmp che |
126 | jmp che |
127 | no_4_l: |
127 | no_4_l: |
128 | 128 | ||
129 | cmp ebx,14 |
129 | cmp ebx,14 |
130 | jne no_5_l |
130 | jne no_5_l |
131 | mov eax,2 |
131 | mov eax,2 |
132 | jmp che |
132 | jmp che |
133 | no_5_l: |
133 | no_5_l: |
134 | 134 | ||
135 | cmp ebx,15 |
135 | cmp ebx,15 |
136 | jne no_6_l |
136 | jne no_6_l |
137 | mov eax,6 |
137 | mov eax,6 |
138 | jmp che |
138 | jmp che |
139 | no_6_l: |
139 | no_6_l: |
140 | 140 | ||
141 | cmp ebx,16 |
141 | cmp ebx,16 |
142 | jne no_7_l |
142 | jne no_7_l |
143 | mov eax,4 |
143 | mov eax,4 |
144 | jmp che |
144 | jmp che |
145 | no_7_l: |
145 | no_7_l: |
146 | 146 | ||
147 | cmp ebx,17 |
147 | cmp ebx,17 |
148 | jne no_8_l |
148 | jne no_8_l |
149 | mov eax,4 |
149 | mov eax,4 |
150 | jmp che |
150 | jmp che |
151 | no_8_l: |
151 | no_8_l: |
152 | 152 | ||
153 | cmp ebx,18 |
153 | cmp ebx,18 |
154 | jne no_9_l |
154 | jne no_9_l |
155 | mov eax,4 |
155 | mov eax,4 |
156 | jmp che |
156 | jmp che |
157 | no_9_l: |
157 | no_9_l: |
158 | 158 | ||
159 | cmp ebx,19 |
159 | cmp ebx,19 |
160 | jne no_10_l |
160 | jne no_10_l |
161 | mov eax,4 |
161 | mov eax,4 |
162 | jmp che |
162 | jmp che |
163 | no_10_l: |
163 | no_10_l: |
164 | 164 | ||
165 | cmp ebx,20 |
165 | cmp ebx,20 |
166 | jne no_11_l |
166 | jne no_11_l |
167 | mov eax,4 |
167 | mov eax,4 |
168 | jmp che |
168 | jmp che |
169 | no_11_l: |
169 | no_11_l: |
170 | 170 | ||
171 | cmp ebx,21 |
171 | cmp ebx,21 |
172 | jne no_12_l |
172 | jne no_12_l |
173 | mov eax,4 |
173 | mov eax,4 |
174 | jmp che |
174 | jmp che |
175 | no_12_l: |
175 | no_12_l: |
176 | 176 | ||
177 | cmp ebx,22 |
177 | cmp ebx,22 |
178 | jne no_13_l |
178 | jne no_13_l |
179 | mov eax,4 |
179 | mov eax,4 |
180 | jmp che |
180 | jmp che |
181 | no_13_l: |
181 | no_13_l: |
182 | 182 | ||
183 | cmp ebx,23 |
183 | cmp ebx,23 |
184 | jne no_14_l |
184 | jne no_14_l |
185 | mov eax,4 |
185 | mov eax,4 |
186 | jmp che |
186 | jmp che |
187 | no_14_l: |
187 | no_14_l: |
188 | 188 | ||
189 | cmp ebx,24 |
189 | cmp ebx,24 |
190 | jne no_15_l |
190 | jne no_15_l |
191 | mov eax,4 |
191 | mov eax,4 |
192 | jmp che |
192 | jmp che |
193 | no_15_l: |
193 | no_15_l: |
194 | 194 | ||
195 | cmp ebx,25 |
195 | cmp ebx,25 |
196 | jne no_16_l |
196 | jne no_16_l |
197 | mov eax,4 |
197 | mov eax,4 |
198 | jmp che |
198 | jmp che |
199 | no_16_l: |
199 | no_16_l: |
200 | 200 | ||
201 | cmp ebx,26 |
201 | cmp ebx,26 |
202 | jne no_17_l |
202 | jne no_17_l |
203 | mov eax,4 |
203 | mov eax,4 |
204 | jmp che |
204 | jmp che |
205 | no_17_l: |
205 | no_17_l: |
206 | 206 | ||
207 | cmp ebx,27 |
207 | cmp ebx,27 |
208 | jne no_18_l |
208 | jne no_18_l |
209 | mov eax,4 |
209 | mov eax,4 |
210 | jmp che |
210 | jmp che |
211 | no_18_l: |
211 | no_18_l: |
212 | 212 | ||
213 | cmp ebx,28 |
213 | cmp ebx,28 |
214 | jne no_19_l |
214 | jne no_19_l |
215 | mov eax,4 |
215 | mov eax,4 |
216 | jmp che |
216 | jmp che |
217 | no_19_l: |
217 | no_19_l: |
218 | 218 | ||
219 | 219 | ||
220 | cmp ebx,45 |
220 | cmp ebx,45 |
221 | jne no_25_l |
221 | jne no_25_l |
222 | mov eax,8 |
222 | mov eax,8 |
223 | jmp che |
223 | jmp che |
224 | no_25_l: |
224 | no_25_l: |
225 | 225 | ||
226 | cmp ebx,46 |
226 | cmp ebx,46 |
227 | jne no_26_l |
227 | jne no_26_l |
228 | mov eax,8 |
228 | mov eax,8 |
229 | jmp che |
229 | jmp che |
230 | no_26_l: |
230 | no_26_l: |
231 | 231 | ||
232 | cmp ebx,47 |
232 | cmp ebx,47 |
233 | jne no_27_l |
233 | jne no_27_l |
234 | mov eax,8 |
234 | mov eax,8 |
235 | jmp che |
235 | jmp che |
236 | no_27_l: |
236 | no_27_l: |
237 | 237 | ||
238 | cmp ebx,48 |
238 | cmp ebx,48 |
239 | jne no_28_l |
239 | jne no_28_l |
240 | mov eax,8 |
240 | mov eax,8 |
241 | jmp che |
241 | jmp che |
242 | no_28_l: |
242 | no_28_l: |
243 | 243 | ||
244 | cmp ebx,49 |
244 | cmp ebx,49 |
245 | jne no_29_l |
245 | jne no_29_l |
246 | mov eax,8 |
246 | mov eax,8 |
247 | jmp che |
247 | jmp che |
248 | no_29_l: |
248 | no_29_l: |
249 | 249 | ||
250 | 250 | ||
251 | cmp ebx,50 |
251 | cmp ebx,50 |
252 | jne no_30_l |
252 | jne no_30_l |
253 | mov eax,8 |
253 | mov eax,8 |
254 | jmp che |
254 | jmp che |
255 | no_30_l: |
255 | no_30_l: |
256 | 256 | ||
257 | cmp ebx,40 |
257 | cmp ebx,40 |
258 | je no_change_cursor |
258 | je no_change_cursor |
259 | 259 | ||
260 | cmp ebx,41 |
260 | cmp ebx,41 |
261 | je no_change_cursor |
261 | je no_change_cursor |
262 | 262 | ||
263 | cmp ebx,42 |
263 | cmp ebx,42 |
264 | je no_change_cursor |
264 | je no_change_cursor |
265 | 265 | ||
266 | cmp ebx,43 |
266 | cmp ebx,43 |
267 | je no_change_cursor |
267 | je no_change_cursor |
268 | 268 | ||
269 | cmp ebx,44 |
269 | cmp ebx,44 |
270 | je no_change_cursor |
270 | je no_change_cursor |
271 | 271 | ||
272 | cmp ebx,52 |
272 | cmp ebx,52 |
273 | je no_change_cursor |
273 | je no_change_cursor |
274 | 274 | ||
275 | cmp ebx,51 |
275 | cmp ebx,51 |
276 | je no_change_cursor |
276 | je no_change_cursor |
277 | 277 | ||
278 | cmp ebx,52 |
278 | cmp ebx,52 |
279 | je no_change_cursor |
279 | je no_change_cursor |
280 | 280 | ||
281 | che: |
281 | che: |
282 | 282 | ||
283 | dec eax |
283 | dec eax |
284 | shl eax,2 |
284 | shl eax,2 |
285 | mov ebx,[PointerToCursorsID] |
285 | mov ebx,[PointerToCursorsID] |
286 | add eax,ebx |
286 | add eax,ebx |
287 | mov ecx,[eax] |
287 | mov ecx,[eax] |
288 | 288 | ||
289 | mov eax, 37 |
289 | mov eax, 37 |
290 | mov ebx, 5 |
290 | mov ebx, 5 |
291 | int 0x40 |
291 | mcall |
292 | 292 | ||
293 | no_change_cursor: |
293 | no_change_cursor: |
294 | 294 | ||
295 | ret |
295 | ret |
296 | 296 | ||
297 | ;delete cursors |
297 | ;delete cursors |
298 | ;IN |
298 | ;IN |
299 | ;eax- pointer to IDs of cursors |
299 | ;eax- pointer to IDs of cursors |
300 | ;OUT |
300 | ;OUT |
301 | ;not returned value |
301 | ;not returned value |
302 | 302 | ||
303 | delete_cursors: |
303 | delete_cursors: |
304 | 304 | ||
305 | mov [PointerToCursorsID],eax |
305 | mov [PointerToCursorsID],eax |
306 | mov edx,8 |
306 | mov edx,8 |
307 | 307 | ||
308 | next_cursor_delete: |
308 | next_cursor_delete: |
309 | 309 | ||
310 | mov eax,[PointerToCursorsID] |
310 | mov eax,[PointerToCursorsID] |
311 | mov ecx,[eax] |
311 | mov ecx,[eax] |
312 | 312 | ||
313 | mov eax,37 |
313 | mov eax,37 |
314 | mov ebx,6 |
314 | mov ebx,6 |
315 | int 0x40 |
315 | mcall |
316 | 316 | ||
317 | add [PointerToCursorsID],4 |
317 | add [PointerToCursorsID],4 |
318 | 318 | ||
319 | dec edx |
319 | dec edx |
320 | jnz next_cursor_delete |
320 | jnz next_cursor_delete |
321 | 321 | ||
322 | ret |
322 | ret |
323 | 323 | ||
324 | PointerToCursorsID dd 0 |
324 | PointerToCursorsID dd 0 |