Rev 370 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 370 | Rev 485 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | dd APP_MEMORY ; required amount of memory |
30 | dd APP_MEMORY ; required amount of memory |
31 | dd 0xDFFF0 ; stack |
31 | dd 0xDFFF0 ; stack |
32 | dd params,0x0 ; parameters,icon |
32 | dd params,0x0 ; parameters,icon |
Line 33... | Line 33... | ||
33 | 33 | ||
- | 34 | include 'lang.inc' |
|
34 | include 'lang.inc' |
35 | include '..\..\..\macros.inc' |
Line 35... | Line 36... | ||
35 | include 'fasm.inc' |
36 | include 'fasm.inc' |
Line 36... | Line 37... | ||
36 | 37 | ||
Line 88... | Line 89... | ||
88 | call draw_window |
89 | call draw_window |
Line 89... | Line 90... | ||
89 | 90 | ||
90 | still: |
91 | still: |
91 | push 10 ; Wait here for event |
92 | push 10 ; Wait here for event |
92 | pop eax |
93 | pop eax |
93 | int 40h |
94 | mcall |
94 | dec eax |
95 | dec eax |
95 | je red ; Redraw request |
96 | je red ; Redraw request |
96 | dec eax |
97 | dec eax |
Line 97... | Line 98... | ||
97 | jne button ; Button in buffer |
98 | jne button ; Button in buffer |
98 | 99 | ||
99 | key: ; Key |
100 | key: ; Key |
100 | mov al,2 ; Read it and ignore |
101 | mov al,2 ; Read it and ignore |
Line 101... | Line 102... | ||
101 | int 0x40 |
102 | mcall |
Line 102... | Line 103... | ||
102 | jmp still |
103 | jmp still |
103 | 104 | ||
Line 104... | Line 105... | ||
104 | button: ; Button in Window |
105 | button: ; Button in Window |
105 | 106 | ||
106 | mov al,17 |
107 | mov al,17 |
107 | int 0x40 |
108 | mcall |
Line 108... | Line 109... | ||
108 | 109 | ||
109 | cmp ah,1 |
110 | cmp ah,1 |
110 | jne noclose |
111 | jne noclose |
111 | or eax,-1 |
112 | or eax,-1 |
Line 148... | Line 149... | ||
148 | xor eax,eax |
149 | xor eax,eax |
149 | mov ebx,50*65536+280 |
150 | mov ebx,50*65536+280 |
150 | mov ecx,50*65536+250 |
151 | mov ecx,50*65536+250 |
151 | mov edx,[sc.work] |
152 | mov edx,[sc.work] |
152 | or edx,0x33000000 |
153 | or edx,0x33000000 |
153 | mov edi,header ; Draw Window Label Text |
154 | mov edi,title ; Draw Window Label Text |
154 | int 0x40 |
155 | mcall |
Line 155... | Line 156... | ||
155 | 156 | ||
Line 156... | Line 157... | ||
156 | mcall 9,PROCESSINFO,-1 |
157 | mcall 9,PROCESSINFO,-1 |
157 | 158 | ||
158 | mpack ecx,1,1 |
159 | mpack ecx,1,1 |
Line 159... | Line 160... | ||
159 | mov ebx,[pinfo.x_size] |
160 | mov ebx,[pinfo.box.left] |
160 | sub ebx,10 |
161 | sub ebx,10 |
161 | 162 | ||
Line 187... | Line 188... | ||
187 | madd ecx, 14,0 |
188 | madd ecx, 14,0 |
188 | mcall ,,,0x4000000C ; Button: Enter Outfile |
189 | mcall ,,,0x4000000C ; Button: Enter Outfile |
189 | madd ecx, 14,0 |
190 | madd ecx, 14,0 |
190 | mcall ,,,0x4000000D ; Button: Enter Path |
191 | mcall ,,,0x4000000D ; Button: Enter Path |
Line 191... | Line 192... | ||
191 | 192 | ||
192 | mpack ebx,[pinfo.x_size],MAGIC1 |
193 | mpack ebx,[pinfo.box.left],MAGIC1 |
193 | msub ebx,MAGIC1+10+1,0 |
194 | msub ebx,MAGIC1+10+1,0 |
194 | mpack ecx,0, 14*3/2-1 |
195 | mpack ecx,0, 14*3/2-1 |
195 | madd ecx,1,0 |
196 | madd ecx,1,0 |
196 | mcall ,,,0x00000002,[sc.work_button] |
197 | mcall ,,,0x00000002,[sc.work_button] |
Line 202... | Line 203... | ||
202 | mov ecx,[sc.work_text] |
203 | mov ecx,[sc.work_text] |
203 | mov edx,text |
204 | mov edx,text |
204 | mov esi,text.line_size |
205 | mov esi,text.line_size |
205 | mov eax,4 |
206 | mov eax,4 |
206 | newline: |
207 | newline: |
207 | int 0x40 |
208 | mcall |
208 | add ebx, 14 |
209 | add ebx, 14 |
209 | add edx,text.line_size |
210 | add edx,text.line_size |
210 | cmp byte[edx],'x' |
211 | cmp byte[edx],'x' |
211 | jne newline |
212 | jne newline |
Line 212... | Line 213... | ||
212 | 213 | ||
213 | mov ebx,[pinfo.x_size] |
214 | mov ebx,[pinfo.box.left] |
214 | sub ebx,MAGIC1+10+1-9 |
215 | sub ebx,MAGIC1+10+1-9 |
215 | shl ebx,16 |
216 | shl ebx,16 |
216 | add ebx,1+( 14*3/2-1)/2-3 |
217 | add ebx,1+( 14*3/2-1)/2-3 |
217 | mcall ,,[sc.work_button_text],s_compile,7 |
218 | mcall ,,[sc.work_button_text],s_compile,7 |
218 | add ebx,14*3/2+1 |
219 | add ebx,14*3/2+1 |
Line 219... | Line 220... | ||
219 | mcall ,,,s_run |
220 | mcall ,,,s_run |
220 | 221 | ||
221 | mpack ebx,MAGIC1+6,0 |
222 | mpack ebx,MAGIC1+6,0 |
222 | add ebx,1+ 14/2-3+ 14*0 |
223 | add ebx,1+ 14/2-3+ 14*0 |
223 | mov esi,[pinfo.x_size] |
224 | mov esi,[pinfo.box.left] |
224 | sub esi,MAGIC1*2+5*2+6+3 |
225 | sub esi,MAGIC1*2+5*2+6+3 |
225 | mov eax,esi |
226 | mov eax,esi |
226 | mov cl,6 |
227 | mov cl,6 |
Line 244... | Line 245... | ||
244 | 245 | ||
Line 245... | Line 246... | ||
245 | bottom_right dd ? |
246 | bottom_right dd ? |
246 | 247 | ||
247 | draw_messages: |
248 | draw_messages: |
248 | mov eax,13 ; clear work area |
249 | mov eax,13 ; clear work area |
249 | mpack ebx,7-2,[pinfo.x_size] |
250 | mpack ebx,7-2,[pinfo.box.left] |
250 | sub ebx,5*2+7*2-1-2*2 |
251 | sub ebx,5*2+7*2-1-2*2 |
251 | mpack ecx,0,[pinfo.y_size] |
252 | mpack ecx,0,[pinfo.box.top] |
252 | madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) |
253 | madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) |
253 | mov word[bottom_right+2],bx |
254 | mov word[bottom_right+2],bx |
254 | mov word[bottom_right],cx |
255 | mov word[bottom_right],cx |
255 | msub [bottom_right],7,11 |
256 | msub [bottom_right],7,11 |
256 | add [bottom_right],7 shl 16 + 53 |
257 | add [bottom_right],7 shl 16 + 53 |
257 | mov edx,[sc.work] |
258 | mov edx,[sc.work] |
258 | int 0x40 |
259 | mcall |
259 | _cy = 0 |
260 | _cy = 0 |
260 | _sy = 2 |
261 | _sy = 2 |
261 | _cx = 4 |
262 | _cx = 4 |
Line 358... | Line 359... | ||
358 | 359 | ||
Line 359... | Line 360... | ||
359 | jmp still |
360 | jmp still |
Line 360... | Line 361... | ||
360 | 361 | ||
361 | print_text: |
362 | print_text: |
362 | 363 | ||
363 | mpack ebx,MAGIC1+6,[pinfo.x_size] |
364 | mpack ebx,MAGIC1+6,[pinfo.box.left] |
364 | sub ebx,MAGIC1*2+19 |
365 | sub ebx,MAGIC1*2+19 |
365 | movzx esi,bx |
366 | movzx esi,bx |
Line 485... | Line 486... | ||
485 | mov edx,outfile |
486 | mov edx,outfile |
486 | call make_fullpaths |
487 | call make_fullpaths |
487 | mov eax,70 |
488 | mov eax,70 |
488 | mov ebx,file_info_start |
489 | mov ebx,file_info_start |
489 | xor ecx,ecx |
490 | xor ecx,ecx |
490 | int 0x40 |
491 | mcall |
491 | @@: |
492 | @@: |
492 | jmp exit_program |
493 | jmp exit_program |
Line 493... | Line 494... | ||
493 | 494 | ||
Line 501... | Line 502... | ||
501 | include 'assemble.inc' |
502 | include 'assemble.inc' |
502 | include 'formats.inc' |
503 | include 'formats.inc' |
503 | include 'x86_64.inc' |
504 | include 'x86_64.inc' |
504 | include 'tables.inc' |
505 | include 'tables.inc' |
Line 505... | Line 506... | ||
505 | 506 | ||
Line 506... | Line 507... | ||
506 | header db appname,VERSION_STRING,0 |
507 | title db appname,VERSION_STRING,0 |
Line 507... | Line 508... | ||
507 | 508 | ||
508 | _logo db 'flat assembler version ',VERSION_STRING,13,10,0 |
509 | _logo db 'flat assembler version ',VERSION_STRING,13,10,0 |