Rev 1620 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1620 | Rev 2059 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | ;; ;; |
2 | ;; ;; |
3 | ;; flat assembler source ;; |
3 | ;; flat assembler source ;; |
4 | ;; Copyright (c) 1999-2006, Tomasz Grysztar ;; |
4 | ;; Copyright (c) 1999-2006, Tomasz Grysztar ;; |
5 | ;; All rights reserved. ;; |
5 | ;; All rights reserved. ;; |
6 | ;; ;; |
6 | ;; ;; |
- | 7 | ;; KolibriOS port by KolibriOS Team ;; |
|
7 | ;; Menuet port by VT ;; |
8 | ;; Menuet port by VT ;; |
8 | ;; ;; |
9 | ;; ;; |
9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 10... | Line 11... | ||
10 | 11 | ||
Line 17... | Line 18... | ||
17 | APP_MEMORY = 0x00800000 |
18 | APP_MEMORY = 0x00800000 |
Line 18... | Line 19... | ||
18 | 19 | ||
Line 19... | Line 20... | ||
19 | ;; Menuet header |
20 | ;; Menuet header |
20 | - | ||
- | 21 | ||
21 | appname equ "flat assembler " |
22 | appname equ "flat assembler " |
22 | - | ||
23 | use32 |
23 | ;--------------------------------------------------------------------- |
24 | 24 | use32 |
|
25 | org 0x0 |
25 | org 0x0 |
26 | db 'MENUET01' ; 8 byte id |
26 | db 'MENUET01' ; 8 byte id |
27 | dd 0x01 ; header version |
27 | dd 0x01 ; header version |
28 | dd START ; program start |
28 | dd START ; program start |
29 | dd program_end ; program image size |
29 | dd program_end ; program image size |
30 | dd stacktop ; required amount of memory |
30 | dd stacktop ; required amount of memory |
31 | dd stacktop ; stack |
- | |
- | 31 | dd stacktop ; stack |
|
32 | dd params,cur_dir_path ; parameters,icon |
32 | dd params,cur_dir_path ; parameters,icon |
33 | 33 | ;--------------------------------------------------------------------- |
|
34 | include 'lang.inc' |
34 | include 'lang.inc' |
35 | include '../../../macros.inc' |
35 | include '../../../macros.inc' |
Line 36... | Line 36... | ||
36 | purge add,sub ; macros.inc does incorrect substitution |
36 | purge add,sub ; macros.inc does incorrect substitution |
37 | include 'fasm.inc' |
37 | include 'fasm.inc' |
38 | 38 | ||
Line 39... | Line -... | ||
39 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
- | |
40 | include '../../../develop/libraries/box_lib/load_lib.mac' |
- | |
41 | @use_library |
39 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
42 | - | ||
- | 40 | include '../../../develop/libraries/box_lib/load_lib.mac' |
|
43 | 41 | @use_library |
|
44 | 42 | ||
45 | center fix true |
43 | center fix true |
46 | 44 | ;--------------------------------------------------------------------- |
|
47 | START: ; Start of execution |
45 | START: ; Start of execution |
Line 88... | Line 86... | ||
88 | dec esi |
86 | dec esi |
89 | cmp [esi], dword ',run' |
87 | cmp [esi], dword ',run' |
90 | jne @f |
88 | jne @f |
91 | mov [_run_outfile],1 |
89 | mov [_run_outfile],1 |
92 | @@: |
90 | @@: |
93 | - | ||
94 | mov [_mode],CONSOLE_MODE |
91 | mov [_mode],CONSOLE_MODE |
95 | jmp start |
92 | jmp start |
96 | - | ||
- | 93 | ;--------------------------------------------------------------------- |
|
97 | start_1: |
94 | start_1: |
98 | ;sys_ |
95 | ;sys_ |
99 | load_libraries l_libs_start,load_lib_end |
96 | load_libraries l_libs_start,load_lib_end |
Line 100... | Line 97... | ||
100 | 97 | ||
101 | cmp eax,-1 |
98 | cmp eax,-1 |
102 | jne @f |
99 | jne @f |
103 | mcall -1 ;exit if not open box_lib.obj |
100 | mcall -1 ;exit if not open box_lib.obj |
104 | @@: |
101 | @@: |
105 | mcall 40,0x27 ;¬ ᪠á¨á⥬ëå ᮡë⨩ |
- | |
- | 102 | mcall 40,0x27 ;¬ ᪠á¨á⥬ëå ᮡë⨩ |
|
106 | 103 | ;--------------------------------------------------------------------- |
|
107 | get_sys_colors 1,0 |
104 | get_sys_colors 1,0 |
108 | edit_boxes_set_sys_color edit1,editboxes_end,sc |
105 | edit_boxes_set_sys_color edit1,editboxes_end,sc |
109 | check_boxes_set_sys_color ch1_dbg,ch1_dbg+ch_struc_size,sc |
- | |
- | 106 | check_boxes_set_sys_color ch1_dbg,ch1_dbg+ch_struc_size,sc |
|
110 | 107 | ;--------------------------------------------------------------------- |
|
111 | ; OpenDialog initialisation |
108 | ; OpenDialog initialisation |
112 | push dword OpenDialog_data |
109 | push dword OpenDialog_data |
113 | call dword [OpenDialog_Init] |
- | |
- | 110 | call dword [OpenDialog_Init] |
|
114 | 111 | ;--------------------------------------------------------------------- |
|
115 | red: ; Redraw |
112 | red: ; Redraw |
Line 116... | Line 113... | ||
116 | call draw_window |
113 | call draw_window |
117 | 114 | ||
Line 123... | Line 120... | ||
123 | je call_mouse |
120 | je call_mouse |
124 | dec eax |
121 | dec eax |
125 | je red ; Redraw request |
122 | je red ; Redraw request |
126 | dec eax |
123 | dec eax |
127 | jne button ; Button in buffer |
124 | jne button ; Button in buffer |
128 | - | ||
129 | key: ; Key |
125 | key: ; Key |
130 | mov al,2 ; Read it and ignore |
126 | mov al,2 ; Read it and ignore |
131 | mcall |
127 | mcall |
Line 132... | Line 128... | ||
132 | 128 | ||
133 | push dword edit1 |
129 | push dword edit1 |
134 | call [edit_box_key] |
130 | call [edit_box_key] |
135 | push dword edit2 |
131 | push dword edit2 |
136 | call [edit_box_key] |
132 | call [edit_box_key] |
137 | push dword edit3 |
133 | push dword edit3 |
138 | call [edit_box_key] |
- | |
139 | 134 | call [edit_box_key] |
|
140 | jmp still |
- | |
- | 135 | jmp still |
|
141 | 136 | ;--------------------------------------------------------------------- |
|
142 | call_mouse: |
137 | call_mouse: |
143 | call mouse |
138 | call mouse |
144 | jmp still |
- | |
- | 139 | jmp still |
|
145 | 140 | ;--------------------------------------------------------------------- |
|
146 | button: ; Button in Window |
- | |
147 | 141 | button: ; Button in Window |
|
148 | mov al,17 |
142 | mov al,17 |
Line 149... | Line 143... | ||
149 | mcall |
143 | mcall |
150 | 144 | ||
151 | cmp ah,1 |
145 | cmp ah,1 |
152 | jne noclose |
146 | jne noclose |
153 | or eax,-1 |
- | |
- | 147 | or eax,-1 |
|
154 | mcall |
148 | mcall |
155 | 149 | ;--------------------------------------------------------------------- |
|
156 | noclose: |
150 | noclose: |
157 | cmp ah,5 ;press button for OpenDialog |
151 | cmp ah,5 ;press button for OpenDialog |
158 | jne @f |
152 | jne @f |
Line 166... | Line 160... | ||
166 | mov edx,outfile |
160 | mov edx,outfile |
167 | call make_fullpaths |
161 | call make_fullpaths |
168 | mcall 70,file_info_start |
162 | mcall 70,file_info_start |
169 | ; xor ecx,ecx |
163 | ; xor ecx,ecx |
170 | jmp still |
164 | jmp still |
- | 165 | ;--------------------------------------------------------------------- |
|
171 | norunout: |
166 | norunout: |
172 | cmp ah,4 |
167 | cmp ah,4 |
173 | jnz norundebug |
168 | jnz norundebug |
Line 174... | Line 169... | ||
174 | 169 | ||
175 | mov edx,outfile |
170 | mov edx,outfile |
176 | call make_fullpaths |
171 | call make_fullpaths |
177 | mcall 70,file_info_debug |
172 | mcall 70,file_info_debug |
178 | jmp still |
- | |
- | 173 | jmp still |
|
179 | 174 | ;--------------------------------------------------------------------- |
|
180 | norundebug: |
- | |
181 | 175 | norundebug: |
|
182 | jmp still |
- | |
183 | - | ||
- | 176 | jmp still |
|
184 | 177 | ;--------------------------------------------------------------------- |
|
185 | mouse: |
178 | mouse: |
186 | push dword edit1 |
179 | push dword edit1 |
187 | call [edit_box_mouse] |
180 | call [edit_box_mouse] |
188 | push dword edit2 |
181 | push dword edit2 |
189 | call [edit_box_mouse] |
182 | call [edit_box_mouse] |
190 | push dword edit3 |
183 | push dword edit3 |
191 | call [edit_box_mouse] |
184 | call [edit_box_mouse] |
192 | push dword ch1_dbg |
185 | push dword ch1_dbg |
193 | call [check_box_mouse] |
186 | call [check_box_mouse] |
194 | ret |
- | |
- | 187 | ret |
|
195 | 188 | ;--------------------------------------------------------------------- |
|
196 | draw_window: |
189 | draw_window: |
197 | pusha |
- | |
198 | 190 | pusha |
|
199 | mcall 12,1 ; Start of draw |
- | |
200 | 191 | mcall 12,1 ; Start of draw |
|
201 | ;get_sys_colors 1,0 |
- | |
202 | 192 | ;get_sys_colors 1,0 |
|
203 | xor eax,eax |
193 | xor eax,eax |
204 | mov ebx,100*65536+280 |
194 | mov ebx,100*65536+280 |
205 | mov ecx,90*65536+260 |
195 | mov ecx,90*65536+260 |
206 | mov edx,[sc.work] |
196 | mov edx,[sc.work] |
207 | or edx,0x33000000 |
197 | or edx,0x33000000 |
208 | mov edi,title ; Draw Window Label Text |
198 | mov edi,title ; Draw Window Label Text |
Line 209... | Line 199... | ||
209 | mcall |
199 | mcall |
Line -... | Line 200... | ||
- | 200 | ||
- | 201 | mcall 9,PROCESSINFO,-1 |
|
- | 202 | ||
- | 203 | mov eax,[PROCESSINFO+70] ;status of window |
|
210 | 204 | test eax,100b |
|
211 | mcall 9,PROCESSINFO,-1 |
205 | jne .end |
212 | 206 | ||
213 | cmp dword[pinfo.box.width],230 ; ïðîâåðÿåì øèðèíó îêíà |
207 | cmp dword[pinfo.box.width],230 ; ïðîâåðÿåì øèðèíó îêíà |
214 | jge @f |
- | |
215 | mov dword[pinfo.box.width],230 ; åñëè îêíî î÷åíü óçêîå, óâåëè÷èâàåì øèðèíó äëÿ èçáåæàíèÿ ãëþêîâ |
208 | jge @f |
216 | @@: |
209 | mov dword[pinfo.box.width],230 ; åñëè îêíî î÷åíü óçêîå, óâåëè÷èâàåì øèðèíó äëÿ èçáåæàíèÿ ãëþêîâ |
217 | 210 | @@: |
|
218 | mpack ecx,1,1 |
- | |
219 | mov ebx,[pinfo.box.width] |
211 | mpack ecx,1,1 |
220 | sub ebx,10 |
212 | mov ebx,[pinfo.box.width] |
221 | 213 | sub ebx,10 |
|
222 | mov eax,8 |
214 | mov eax,8 |
223 | mov edx,0x4000000B |
215 | mov edx,0x4000000B |
Line 228... | Line 220... | ||
228 | mcall ,,,0x00000002,[sc.work_button] |
220 | mcall ,,,0x00000002,[sc.work_button] |
229 | madd ecx, (14*3+16)/3+1,0 |
221 | madd ecx, (14*3+16)/3+1,0 |
230 | mcall ,,,0x00000003 |
222 | mcall ,,,0x00000003 |
231 | madd ecx, (14*3+16)/3+1,0 |
223 | madd ecx, (14*3+16)/3+1,0 |
232 | mcall ,,,4 |
224 | mcall ,,,4 |
233 | - | ||
234 | ;button for OpenDialog [..] |
225 | ;button for OpenDialog [..] |
235 | mov ebx, 5*65536+47 |
226 | mov ebx, 5*65536+47 |
236 | mov ecx, 33*65536+14 |
227 | mov ecx, 33*65536+14 |
237 | mcall ,,,5 |
228 | mcall ,,,5 |
Line 240... | Line 231... | ||
240 | add ebx,1+ 14/2-3 |
231 | add ebx,1+ 14/2-3 |
241 | mov ecx,[sc.work_text] |
232 | mov ecx,[sc.work_text] |
242 | mov edx,text |
233 | mov edx,text |
243 | mov esi,text.line_size |
234 | mov esi,text.line_size |
244 | mov eax,4 |
235 | mov eax,4 |
245 | - | ||
246 | mcall ;InFile |
236 | mcall ;InFile |
- | 237 | ||
247 | add ebx, 16 ;14 |
238 | add ebx, 16 ;14 |
248 | add edx,text.line_size |
239 | add edx,text.line_size |
249 | mcall ;OutFile |
240 | mcall ;OutFile |
- | 241 | ||
250 | mov ecx,[sc.work_button_text] |
242 | mov ecx,[sc.work_button_text] |
251 | add ebx, 16 ;14 |
243 | add ebx, 16 ;14 |
252 | add edx,text.line_size |
244 | add edx,text.line_size |
253 | mcall ;Path |
245 | mcall ;Path |
Line 270... | Line 262... | ||
270 | mov cl,6 |
262 | mov cl,6 |
271 | div cl |
263 | div cl |
272 | cmp al,MAX_PATH |
264 | cmp al,MAX_PATH |
273 | jbe @f |
265 | jbe @f |
274 | mov al,MAX_PATH |
266 | mov al,MAX_PATH |
- | 267 | @@: |
|
275 | @@: movzx esi,al |
268 | movzx esi,al |
Line 276... | Line 269... | ||
276 | 269 | ||
Line 277... | Line 270... | ||
277 | call draw_messages |
270 | call draw_messages |
278 | 271 | ||
Line 288... | Line 281... | ||
288 | call [edit_box_draw] |
281 | call [edit_box_draw] |
289 | push dword edit3 |
282 | push dword edit3 |
290 | call [edit_box_draw] |
283 | call [edit_box_draw] |
291 | push dword ch1_dbg |
284 | push dword ch1_dbg |
292 | call [check_box_draw] |
285 | call [check_box_draw] |
293 | 286 | .end: |
|
294 | mcall 12,2 ; End of Draw |
287 | mcall 12,2 ; End of Draw |
295 | - | ||
296 | popa |
288 | popa |
297 | ret |
289 | ret |
298 | - | ||
- | 290 | ;--------------------------------------------------------------------- |
|
299 | bottom_right dd ? |
291 | bottom_right dd ? |
Line 300... | Line 292... | ||
300 | 292 | ||
301 | align 4 |
293 | align 4 |
302 | fun_opn_dlg: ;äãªæ¨ï ¤«ï ¢ë§®¢ OpenFile ¤¨ «®£ |
294 | fun_opn_dlg: ;äãªæ¨ï ¤«ï ¢ë§®¢ OpenFile ¤¨ «®£ |
Line 311... | Line 303... | ||
311 | repne scasb |
303 | repne scasb |
312 | cmp byte[edi-2],'/' |
304 | cmp byte[edi-2],'/' |
313 | jne @f |
305 | jne @f |
314 | mov byte[edi-2],0 ;¥á«¨ ¢ ª®æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à 稢 ¥¬ 1 ᨬ¢®« |
306 | mov byte[edi-2],0 ;¥á«¨ ¢ ª®æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à 稢 ¥¬ 1 ᨬ¢®« |
315 | @@: |
307 | @@: |
316 | - | ||
317 | push dword OpenDialog_data |
308 | push dword OpenDialog_data |
318 | call dword [OpenDialog_Start] |
309 | call dword [OpenDialog_Start] |
319 | cmp [OpenDialog_data.status],2 |
310 | cmp [OpenDialog_data.status],2 |
320 | je @f |
311 | je @f |
- | 312 | ||
321 | xor al,al |
313 | xor al,al |
322 | mov edi,dword[edit3.text] |
314 | mov edi,dword[edit3.text] |
323 | mov ebx,edi ;copy text pointer |
315 | mov ebx,edi ;copy text pointer |
324 | mov ecx,dword[edit3.max] |
316 | mov ecx,dword[edit3.max] |
325 | cld |
317 | cld |
326 | repne scasb |
318 | repne scasb |
327 | cmp byte[edi-2],'/' |
319 | cmp byte[edi-2],'/' |
328 | jne .no_slash |
320 | jne .no_slash |
- | 321 | ||
329 | dec edi ;¥á«¨ ¢ ª®æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à 稢 ¥¬ 1 ᨬ¢®« |
322 | dec edi ;¥á«¨ ¢ ª®æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à 稢 ¥¬ 1 ᨬ¢®« |
330 | .no_slash: |
323 | .no_slash: |
331 | mov byte[edi-1],'/' ;áâ ¢¨¬ ¢ ª®æ¥ ¯ã⨠᫥è |
324 | mov byte[edi-1],'/' ;áâ ¢¨¬ ¢ ª®æ¥ ¯ã⨠᫥è |
332 | mov byte[edi],0 ;®â१ ¥¬ ¨¬ï ©¤¥®£® ä ©« |
325 | mov byte[edi],0 ;®â१ ¥¬ ¨¬ï ©¤¥®£® ä ©« |
333 | sub edi,ebx ;edi = strlen(edit3.text) |
326 | sub edi,ebx ;edi = strlen(edit3.text) |
Line 347... | Line 340... | ||
347 | cld |
340 | cld |
348 | .cycle: |
341 | .cycle: |
349 | lodsb |
342 | lodsb |
350 | test eax,eax |
343 | test eax,eax |
351 | jnz .cycle |
344 | jnz .cycle |
- | 345 | ||
352 | sub esi,4 |
346 | sub esi,4 |
353 | cmp esi,[edit2.text] |
347 | cmp esi,[edit2.text] |
354 | jle .short_fn |
348 | jle .short_fn |
- | 349 | ||
355 | mov byte[esi],0 |
350 | mov byte[esi],0 |
356 | sub dword [edit2.size],4 |
351 | sub dword [edit2.size],4 |
357 | sub dword [edit2.pos],4 |
352 | sub dword [edit2.pos],4 |
358 | .short_fn: |
- | |
Line -... | Line 353... | ||
- | 353 | ||
359 | 354 | .short_fn: |
|
360 | push dword edit1 |
355 | push dword edit1 |
361 | call dword [edit_box_draw] |
356 | call dword [edit_box_draw] |
362 | push dword edit2 |
357 | push dword edit2 |
363 | call dword [edit_box_draw] |
358 | call dword [edit_box_draw] |
364 | push dword edit3 |
359 | push dword edit3 |
365 | call dword [edit_box_draw] |
360 | call dword [edit_box_draw] |
366 | @@: |
361 | @@: |
367 | popad |
362 | popad |
368 | ret |
- | |
- | 363 | ret |
|
369 | 364 | ;--------------------------------------------------------------------- |
|
370 | draw_messages: |
365 | draw_messages: |
371 | mov eax,13 ; clear work area |
366 | mov eax,13 ; clear work area |
372 | mpack ebx,7-2,[pinfo.box.width] |
367 | mpack ebx,7-2,[pinfo.box.width] |
373 | sub ebx,5*2+7*2-1-2*2 |
368 | sub ebx,5*2+7*2-1-2*2 |
Line 407... | Line 402... | ||
407 | add ebx,esi |
402 | add ebx,esi |
408 | madd ebx,1,1 |
403 | madd ebx,1,1 |
409 | mcall |
404 | mcall |
410 | pop ecx ebx |
405 | pop ecx ebx |
411 | ret |
406 | ret |
412 | - | ||
413 | - | ||
- | 407 | ;--------------------------------------------------------------------- |
|
414 | ; DATA |
408 | ; DATA |
415 | - | ||
- | 409 | ;--------------------------------------------------------------------- |
|
416 | if lang eq ru |
410 | if lang eq ru |
417 | text: |
411 | text: |
418 | db ' å ©«:' |
412 | db ' å ©«:' |
419 | .line_size = $-text |
413 | .line_size = $-text |
420 | db 'ëå ©«:' |
414 | db 'ëå ©«:' |
Line 459... | Line 453... | ||
459 | system_dir0 db '/sys/lib/' |
453 | system_dir0 db '/sys/lib/' |
460 | lib0_name db 'box_lib.obj',0 |
454 | lib0_name db 'box_lib.obj',0 |
Line 461... | Line 455... | ||
461 | 455 | ||
462 | system_dir1 db '/sys/lib/' |
456 | system_dir1 db '/sys/lib/' |
463 | lib1_name db 'proc_lib.obj',0 |
- | |
464 | - | ||
- | 457 | lib1_name db 'proc_lib.obj',0 |
|
465 | 458 | ;--------------------------------------------------------------------- |
|
466 | align 4 |
459 | align 4 |
467 | import_box_lib: |
460 | import_box_lib: |
468 | edit_box_draw dd aEdit_box_draw |
461 | edit_box_draw dd aEdit_box_draw |
469 | edit_box_key dd aEdit_box_key |
462 | edit_box_key dd aEdit_box_key |
Line 484... | Line 477... | ||
484 | ;aVersion_ed db 'version_ed',0 |
477 | ;aVersion_ed db 'version_ed',0 |
Line 485... | Line 478... | ||
485 | 478 | ||
486 | aCheck_box_draw db 'check_box_draw',0 |
479 | aCheck_box_draw db 'check_box_draw',0 |
487 | aCheck_box_mouse db 'check_box_mouse',0 |
480 | aCheck_box_mouse db 'check_box_mouse',0 |
488 | ;aVersion_ch db 'version_ch',0 |
- | |
- | 481 | ;aVersion_ch db 'version_ch',0 |
|
489 | 482 | ;--------------------------------------------------------------------- |
|
490 | align 4 |
483 | align 4 |
491 | import_proc_lib: |
484 | import_proc_lib: |
492 | OpenDialog_Init dd aOpenDialog_Init |
485 | OpenDialog_Init dd aOpenDialog_Init |
493 | OpenDialog_Start dd aOpenDialog_Start |
486 | OpenDialog_Start dd aOpenDialog_Start |
494 | dd 0,0 |
487 | dd 0,0 |
495 | aOpenDialog_Init db 'OpenDialog_init',0 |
488 | aOpenDialog_Init db 'OpenDialog_init',0 |
496 | aOpenDialog_Start db 'OpenDialog_start',0 |
- | |
- | 489 | aOpenDialog_Start db 'OpenDialog_start',0 |
|
497 | 490 | ;--------------------------------------------------------------------- |
|
498 | ;library structures |
491 | ;library structures |
499 | l_libs_start: |
492 | l_libs_start: |
500 | lib0 l_libs lib0_name, cur_dir_path, library_path, system_dir0, err_message_found_lib0, head_f_l, import_box_lib, err_message_import0, head_f_i |
493 | lib0 l_libs lib0_name, cur_dir_path, library_path, system_dir0, err_message_found_lib0, head_f_l, import_box_lib, err_message_import0, head_f_i |
501 | lib1 l_libs lib1_name, cur_dir_path, library_path, system_dir1, err_message_found_lib1, head_f_l, import_proc_lib,err_message_import1, head_f_i |
494 | lib1 l_libs lib1_name, cur_dir_path, library_path, system_dir1, err_message_found_lib1, head_f_l, import_proc_lib,err_message_import1, head_f_i |
Line 504... | Line 497... | ||
504 | edit1 edit_box 153, 56, 1, 0xffffff, 0xff, 0x80ff, 0, 0x8000, (outfile-infile-1), infile, mouse_dd, 0, 11,11 |
497 | edit1 edit_box 153, 56, 1, 0xffffff, 0xff, 0x80ff, 0, 0x8000, (outfile-infile-1), infile, mouse_dd, 0, 11,11 |
505 | edit2 edit_box 153, 56, 17, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path-outfile-1), outfile, mouse_dd, 0, 7,7 |
498 | edit2 edit_box 153, 56, 17, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path-outfile-1), outfile, mouse_dd, 0, 7,7 |
506 | edit3 edit_box 153, 56, 33, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path_end-path-1), path, mouse_dd, 0, 6,6 |
499 | edit3 edit_box 153, 56, 33, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path_end-path-1), path, mouse_dd, 0, 6,6 |
507 | editboxes_end: |
500 | editboxes_end: |
508 | ch1_dbg check_box 5, 49, 6, 12, 0xffffff, 0x80ff, 0, s_dbgdescr,(s_dbgdescr_end-s_dbgdescr) |
501 | ch1_dbg check_box 5, 49, 6, 12, 0xffffff, 0x80ff, 0, s_dbgdescr,(s_dbgdescr_end-s_dbgdescr) |
509 | - | ||
510 | ;--------------------------------------------------------------------- |
502 | ;--------------------------------------------------------------------- |
511 | align 4 |
503 | align 4 |
512 | OpenDialog_data: |
504 | OpenDialog_data: |
513 | .type dd 0 |
505 | .type dd 0 |
514 | .procinfo dd pinfo ;+4 |
506 | .procinfo dd pinfo ;+4 |
Line 542... | Line 534... | ||
542 | dd Filter.end - Filter |
534 | dd Filter.end - Filter |
543 | .1: |
535 | .1: |
544 | db 'ASM',0 |
536 | db 'ASM',0 |
545 | .end: |
537 | .end: |
546 | db 0 |
538 | db 0 |
547 | - | ||
- | 539 | ;--------------------------------------------------------------------- |
|
548 | mouse_dd dd 0 ;íóæíî äëÿ Shift-à â editbox |
540 | mouse_dd dd 0 ;íóæíî äëÿ Shift-à â editbox |
549 | - | ||
- | 541 | ;--------------------------------------------------------------------- |
|
550 | infile db 'example.asm' |
542 | infile db 'example.asm' |
551 | times MAX_PATH-$+infile db 0 |
543 | times MAX_PATH-$+infile db 0 |
552 | outfile db 'example' |
544 | outfile db 'example' |
553 | times MAX_PATH-$+outfile db 0 |
545 | times MAX_PATH-$+outfile db 0 |
554 | path db '/rd/1//' ;OpenDialog ¯à¨ § ¯ã᪥ ã¡¨à ¥â ¯®á«¥¤¨© á«¥è, ® ¤¨ «®£ ¬®¦¥â ¨á¯®«ì§®¢ âìáï ¥ ¢á¥£¤ , ¯®â®¬ã á«¥è 2 |
546 | path db '/rd/1//' ;OpenDialog ¯à¨ § ¯ã᪥ ã¡¨à ¥â ¯®á«¥¤¨© á«¥è, ® ¤¨ «®£ ¬®¦¥â ¨á¯®«ì§®¢ âìáï ¥ ¢á¥£¤ , ¯®â®¬ã á«¥è 2 |
555 | times MAX_PATH-$+path db 0 |
547 | times MAX_PATH-$+path db 0 |
556 | path_end: |
548 | path_end: |
557 | lf db 13,10,0 |
549 | lf db 13,10,0 |
558 | - | ||
559 | - | ||
- | 550 | ;--------------------------------------------------------------------- |
|
560 | mov_param_str: |
551 | mov_param_str: |
561 | cld |
552 | cld |
562 | @@: |
553 | @@: |
563 | lodsb |
554 | lodsb |
564 | cmp al,',' |
555 | cmp al,',' |
Line 568... | Line 559... | ||
568 | jnz @b |
559 | jnz @b |
569 | @@: |
560 | @@: |
570 | xor al,al |
561 | xor al,al |
571 | stosb |
562 | stosb |
572 | ret |
563 | ret |
573 | - | ||
574 | - | ||
575 | - | ||
- | 564 | ;--------------------------------------------------------------------- |
|
576 | start: |
565 | start: |
577 | cmp [_mode],NORMAL_MODE |
566 | cmp [_mode],NORMAL_MODE |
578 | jne @f |
567 | jne @f |
579 | call draw_messages |
568 | call draw_messages |
580 | mov [textxy],7 shl 16 + 70 |
569 | mov [textxy],7 shl 16 + 70 |
581 | @@: |
570 | @@: |
582 | mov esi,_logo |
571 | mov esi,_logo |
583 | call display_string |
572 | call display_string |
Line 584... | Line -... | ||
584 | - | ||
- | 573 | ||
585 | ; |
574 | ;--------------------------------------------------------------------- |
586 | ; Fasm native code |
- | |
587 | ; |
- | |
- | 575 | ; Fasm native code |
|
588 | 576 | ;--------------------------------------------------------------------- |
|
589 | mov [input_file],infile |
577 | mov [input_file],infile |
Line 590... | Line 578... | ||
590 | mov [output_file],outfile |
578 | mov [output_file],outfile |
Line 642... | Line 630... | ||
642 | mov ebx,file_info_start |
630 | mov ebx,file_info_start |
643 | xor ecx,ecx |
631 | xor ecx,ecx |
644 | mcall |
632 | mcall |
645 | @@: |
633 | @@: |
646 | jmp exit_program |
634 | jmp exit_program |
647 | - | ||
648 | - | ||
- | 635 | ;--------------------------------------------------------------------- |
|
649 | include 'system.inc' |
636 | include 'system.inc' |
650 | include 'version.inc' |
637 | include 'version.inc' |
651 | include 'errors.inc' |
638 | include 'errors.inc' |
652 | include 'expressi.inc' |
639 | include 'expressi.inc' |
653 | include 'preproce.inc' |
640 | include 'preproce.inc' |
Line 656... | Line 643... | ||
656 | include 'formats.inc' |
643 | include 'formats.inc' |
657 | include 'x86_64.inc' |
644 | include 'x86_64.inc' |
658 | include 'tables.inc' |
645 | include 'tables.inc' |
659 | include 'symbdump.inc' |
646 | include 'symbdump.inc' |
660 | include 'messages.inc' |
647 | include 'messages.inc' |
661 | - | ||
- | 648 | ;--------------------------------------------------------------------- |
|
662 | title db appname,VERSION_STRING,0 |
649 | title db appname,VERSION_STRING,0 |
Line 663... | Line 650... | ||
663 | 650 | ||
Line 664... | Line 651... | ||
664 | _logo db 'flat assembler version ',VERSION_STRING,13,10,0 |
651 | _logo db 'flat assembler version ',VERSION_STRING,13,10,0 |