Rev 539 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 539 | Rev 542 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | 46 | ||
47 | cmp [params],0 |
47 | cmp [params],0 |
Line 48... | Line 48... | ||
48 | jz red |
48 | jz red |
49 | 49 | ||
50 | mov ecx,10 |
50 | mov ecx,10 |
51 | mov al,' ' |
51 | mov eax,' ' |
52 | mov edi,infile |
52 | mov edi,infile |
53 | push ecx |
53 | push ecx |
54 | cld |
54 | cld |
Line 123... | Line 123... | ||
123 | call make_fullpaths |
123 | call make_fullpaths |
124 | mcall 70,file_info_start |
124 | mcall 70,file_info_start |
125 | ; xor ecx,ecx |
125 | ; xor ecx,ecx |
126 | jmp still |
126 | jmp still |
127 | norunout: |
127 | norunout: |
- | 128 | cmp ah,4 |
|
- | 129 | jnz norundebug |
|
Line -... | Line 130... | ||
- | 130 | ||
- | 131 | mov edx,outfile |
|
- | 132 | call make_fullpaths |
|
- | 133 | mcall 70,file_info_debug |
|
- | 134 | jmp still |
|
- | 135 | ||
128 | 136 | norundebug: |
|
129 | mov ecx,5 |
137 | mov ecx,5 |
Line 130... | Line 138... | ||
130 | mov [ya],ecx |
138 | mov [ya],ecx |
131 | 139 | ||
132 | cmp ah,11 ; Infile |
140 | cmp ah,11 ; Infile |
133 | je f1 |
141 | je f1 |
134 | cmp ah,12 ; Outfile |
142 | cmp ah,12 ; Outfile |
135 | je f2 |
143 | je f2 |
- | 144 | cmp ah,13 ; Path |
|
- | 145 | je f3 |
|
Line 136... | Line 146... | ||
136 | cmp ah,13 ; Path |
146 | cmp ah,14 |
Line -... | Line 147... | ||
- | 147 | je f4 |
|
- | 148 | ||
- | 149 | jmp still |
|
- | 150 | ||
- | 151 | f4: |
|
Line 137... | Line 152... | ||
137 | je f3 |
152 | xor [bGenerateDebugInfo], 1 |
Line 138... | Line 153... | ||
138 | 153 | mcall 8,,,0x8000000E |
|
Line 147... | Line 162... | ||
147 | 162 | ||
Line 148... | Line 163... | ||
148 | get_sys_colors 1,0 |
163 | get_sys_colors 1,0 |
149 | 164 | ||
150 | xor eax,eax |
165 | xor eax,eax |
151 | mov ebx,50*65536+280 |
166 | mov ebx,50*65536+280 |
152 | mov ecx,50*65536+250 |
167 | mov ecx,50*65536+260 |
153 | mov edx,[sc.work] |
168 | mov edx,[sc.work] |
154 | or edx,0x33000000 |
169 | or edx,0x33000000 |
Line 160... | Line 175... | ||
160 | mpack ecx,1,1 |
175 | mpack ecx,1,1 |
161 | mov ebx,[pinfo.box.width] |
176 | mov ebx,[pinfo.box.width] |
162 | sub ebx,10 |
177 | sub ebx,10 |
Line 163... | Line 178... | ||
163 | 178 | ||
164 | push ecx |
179 | push ecx |
165 | madd ecx, 14*3+2, 14*3+2 |
180 | madd ecx, 14*3+16+2, 14*3+16+2 |
166 | mcall 38,,,[sc.work_graph] |
181 | mcall 38,,,[sc.work_graph] |
Line 167... | Line 182... | ||
167 | pop ecx |
182 | pop ecx |
168 | 183 | ||
Line 191... | Line 206... | ||
191 | madd ecx, 14,0 |
206 | madd ecx, 14,0 |
192 | mcall ,,,0x4000000D ; Button: Enter Path |
207 | mcall ,,,0x4000000D ; Button: Enter Path |
Line 193... | Line 208... | ||
193 | 208 | ||
194 | mpack ebx,[pinfo.box.width],MAGIC1 |
209 | mpack ebx,[pinfo.box.width],MAGIC1 |
195 | msub ebx,MAGIC1+10+1,0 |
210 | msub ebx,MAGIC1+10+1,0 |
196 | mpack ecx,0, 14*3/2-1 |
211 | mpack ecx,0, (14*3+16)/3-1 |
197 | madd ecx,1,0 |
212 | madd ecx,1,0 |
198 | mcall ,,,0x00000002,[sc.work_button] |
213 | mcall ,,,0x00000002,[sc.work_button] |
199 | madd ecx, 14*3/2+1,0 |
214 | madd ecx, (14*3+16)/3+1,0 |
- | 215 | mcall ,,,0x00000003 |
|
- | 216 | madd ecx, (14*3+16)/3+1,0 |
|
Line 200... | Line 217... | ||
200 | mcall ,,,0x00000003 |
217 | mcall ,,,4 |
201 | 218 | ||
202 | mpack ebx,6,0 ; Draw Window Text |
219 | mpack ebx,6,0 ; Draw Window Text |
203 | add ebx,1+ 14/2-3 |
220 | add ebx,1+ 14/2-3 |
Line 213... | Line 230... | ||
213 | jne newline |
230 | jne newline |
Line 214... | Line 231... | ||
214 | 231 | ||
215 | mov ebx,[pinfo.box.width] |
232 | mov ebx,[pinfo.box.width] |
216 | sub ebx,MAGIC1+10+1-9 |
233 | sub ebx,MAGIC1+10+1-9 |
217 | shl ebx,16 |
234 | shl ebx,16 |
218 | add ebx,1+( 14*3/2-1)/2-3 |
235 | add ebx,1+( (14*3+16)/3-1)/2-3 |
219 | mcall ,,[sc.work_button_text],s_compile,7 |
236 | mcall ,,[sc.work_button_text],s_compile,7 |
220 | add ebx,14*3/2+1 |
237 | add ebx,(14*3+16)/3+1 |
- | 238 | mcall ,,,s_run |
|
- | 239 | add ebx,(14*3+16)/3+1 |
|
Line 221... | Line 240... | ||
221 | mcall ,,,s_run |
240 | mcall ,,,s_debug |
222 | 241 | ||
223 | mpack ebx,MAGIC1+6,0 |
242 | mpack ebx,MAGIC1+6,0 |
224 | add ebx,1+ 14/2-3+ 14*0 |
243 | add ebx,1+ 14/2-3+ 14*0 |
Line 235... | Line 254... | ||
235 | add ebx,14 |
254 | add ebx,14 |
236 | mcall ,,,outfile |
255 | mcall ,,,outfile |
237 | add ebx,14 |
256 | add ebx,14 |
238 | mcall ,,,path |
257 | mcall ,,,path |
Line -... | Line 258... | ||
- | 258 | ||
- | 259 | call draw_checkbox |
|
239 | 260 | ||
Line 240... | Line 261... | ||
240 | call draw_messages |
261 | call draw_messages |
Line 241... | Line 262... | ||
241 | 262 | ||
242 | mcall 12,2 ; End of Draw |
263 | mcall 12,2 ; End of Draw |
Line 243... | Line 264... | ||
243 | 264 | ||
Line -... | Line 265... | ||
- | 265 | popa |
|
- | 266 | ret |
|
- | 267 | ||
- | 268 | bottom_right dd ? |
|
- | 269 | ||
- | 270 | draw_checkbox: |
|
- | 271 | mcall 8,<5,10>,<14*3+5,10>,14,[sc.work_button] |
|
- | 272 | cmp [bGenerateDebugInfo], 0 |
|
- | 273 | jz @f |
|
- | 274 | mov edx, [sc.work_button_text] |
|
- | 275 | mcall 38,<7,13>,<14*3+7,14*3+13> |
|
- | 276 | mcall 38,,<14*3+13,14*3+7> |
|
- | 277 | @@: |
|
244 | popa |
278 | mov ecx, [sc.work_text] |
245 | ret |
279 | or ecx, 0x80000000 |
246 | 280 | mcall 4,<20,14*3+7>,,s_dbgdescr |
|
247 | bottom_right dd ? |
281 | ret |
248 | 282 | ||
249 | draw_messages: |
283 | draw_messages: |
250 | mov eax,13 ; clear work area |
284 | mov eax,13 ; clear work area |
251 | mpack ebx,7-2,[pinfo.box.width] |
285 | mpack ebx,7-2,[pinfo.box.width] |
252 | sub ebx,5*2+7*2-1-2*2 |
286 | sub ebx,5*2+7*2-1-2*2 |
253 | mpack ecx,0,[pinfo.box.height] |
287 | mpack ecx,0,[pinfo.box.height] |
254 | madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) |
288 | madd ecx, 14*3+16+1+7+1,-( 14*3+16+1+7*2+25) |
Line 391... | Line 425... | ||
391 | db ' PATH:' |
425 | db ' PATH:' |
392 | db 'x' |
426 | db 'x' |
Line 393... | Line 427... | ||
393 | 427 | ||
394 | s_compile db 'COMPILE' |
428 | s_compile db 'COMPILE' |
- | 429 | s_run db ' RUN ' |
|
- | 430 | s_debug db ' DEBUG ' |
|
- | 431 | ||
Line 395... | Line 432... | ||
395 | s_run db ' RUN ' |
432 | s_dbgdescr db 'Generate debug information',0 |
396 | 433 | ||
397 | infile db 'example.asm' |
434 | infile db 'example.asm' |
398 | times MAX_PATH+$-infile db 0 |
435 | times MAX_PATH+$-infile db 0 |
399 | outfile db 'example' |
436 | outfile db 'example' |
400 | times MAX_PATH+$-outfile db 0 |
437 | times MAX_PATH+$-outfile db 0 |
Line 401... | Line 438... | ||
401 | path db '/sys/' |
438 | path db '/rd/1/' |
Line 402... | Line 439... | ||
402 | times MAX_PATH+$-path db 0 |
439 | times MAX_PATH+$-path db 0 |
Line 425... | Line 462... | ||
425 | 462 | ||
426 | start: |
463 | start: |
427 | cmp [_mode],NORMAL_MODE |
464 | cmp [_mode],NORMAL_MODE |
428 | jne @f |
465 | jne @f |
429 | call draw_messages |
- | |
430 | push 0 |
- | |
431 | pop [textxy] |
466 | call draw_messages |
432 | add [textxy],7 shl 16 + 53 |
467 | mov [textxy],7 shl 16 + 70 |
433 | @@: |
468 | @@: |
434 | mov esi,_logo |
469 | mov esi,_logo |
Line 435... | Line 470... | ||
435 | call display_string |
470 | call display_string |
Line 447... | Line 482... | ||
447 | mov [start_time],eax |
482 | mov [start_time],eax |
Line 448... | Line 483... | ||
448 | 483 | ||
449 | call preprocessor |
484 | call preprocessor |
450 | call parser |
485 | call parser |
- | 486 | call assembler |
|
- | 487 | cmp [bGenerateDebugInfo], 0 |
|
- | 488 | jz @f |
|
- | 489 | call symbol_dump |
|
451 | call assembler |
490 | @@: |
Line 452... | Line 491... | ||
452 | call formatter |
491 | call formatter |
453 | 492 | ||
454 | call display_user_messages |
493 | call display_user_messages |
Line 502... | Line 541... | ||
502 | include 'parser.inc' |
541 | include 'parser.inc' |
503 | include 'assemble.inc' |
542 | include 'assemble.inc' |
504 | include 'formats.inc' |
543 | include 'formats.inc' |
505 | include 'x86_64.inc' |
544 | include 'x86_64.inc' |
506 | include 'tables.inc' |
545 | include 'tables.inc' |
- | 546 | include 'symbdump.inc' |
|
Line 507... | Line 547... | ||
507 | 547 | ||
Line 508... | Line 548... | ||
508 | title db appname,VERSION_STRING,0 |
548 | title db appname,VERSION_STRING,0 |
Line 517... | Line 557... | ||
517 | 557 | ||
Line 518... | Line 558... | ||
518 | _counter db 4,'0000' |
558 | _counter db 4,'0000' |
519 | 559 | ||
- | 560 | _mode dd NORMAL_MODE |
|
Line 520... | Line 561... | ||
520 | _mode dd NORMAL_MODE |
561 | _run_outfile dd 0 |
521 | _run_outfile dd 0 |
562 | bGenerateDebugInfo db 0 |
522 | 563 | ||
523 | sub_table: |
564 | sub_table: |
Line 543... | Line 584... | ||
543 | program_base dd ? |
584 | program_base dd ? |
544 | buffer_address dd ? |
585 | buffer_address dd ? |
545 | memory_setting dd ? |
586 | memory_setting dd ? |
546 | start_time dd ? |
587 | start_time dd ? |
Line -... | Line 588... | ||
- | 588 | ||
- | 589 | dbgfilename rb MAX_PATH+4 |
|
547 | 590 | ||
548 | sc system_colors |
591 | sc system_colors |
549 | max_handles = 8 |
592 | max_handles = 8 |
550 | fileinfos rb (4+20+MAX_PATH)*max_handles |
593 | fileinfos rb (4+20+MAX_PATH)*max_handles |
551 | fileinfos_end: |
594 | fileinfos_end: |