Rev 3478 | Rev 4260 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3478 | 0CodErr | 1 | ; Run with OpenDialog ; |
2 | ; this source can be compiled ; |
||
3 | ; with FASM or NASM ; |
||
4 | |||
5 | org 0 |
||
6 | use32 |
||
7 | |||
8 | STACK_SIZE equ 256 |
||
9 | REDRAW_EVENT equ 1 |
||
10 | KEY_EVENT equ 2 |
||
11 | BUTTON_EVENT equ 3 |
||
12 | MOUSE_EVENT equ 6 |
||
3634 | fedesco | 13 | |
3478 | 0CodErr | 14 | BUTTON_RUN equ 10 |
15 | BUTTON_BROWSE equ 20 |
||
16 | |||
17 | MENUET01 db 'MENUET01' |
||
18 | version dd 1 |
||
19 | program.start dd start_ |
||
20 | program.end dd end_ |
||
21 | program.memory dd end_ + STACK_SIZE |
||
22 | program.stack dd end_ + STACK_SIZE |
||
23 | program.params dd 0 |
||
24 | program.path dd 0 |
||
25 | |||
3634 | fedesco | 26 | include 'lang.inc' |
27 | |||
28 | ; ======================================================================= ; |
||
3478 | 0CodErr | 29 | start_: |
30 | ; set.event |
||
31 | mov eax, 40 |
||
32 | mov ebx, 39 |
||
33 | int 64 |
||
34 | |||
35 | push sz_box_lib |
||
36 | call load.library |
||
37 | mov [box_lib], eax |
||
38 | |||
39 | push dword[box_lib] |
||
40 | push sz_edit_box |
||
41 | call getprocaddress |
||
42 | mov [edit_box_draw], eax |
||
43 | |||
44 | push dword[box_lib] |
||
45 | push sz_edit_box_key |
||
46 | call getprocaddress |
||
47 | mov [edit_box_key], eax |
||
48 | |||
49 | push dword[box_lib] |
||
50 | push sz_edit_box_mouse |
||
51 | call getprocaddress |
||
52 | mov [edit_box_mouse], eax |
||
53 | |||
54 | push dword[box_lib] |
||
55 | push sz_edit_box_set_text |
||
56 | call getprocaddress |
||
57 | mov [edit_box_set_text], eax |
||
58 | |||
59 | push sz_proc_lib |
||
60 | call load.library |
||
61 | mov [proc_lib], eax |
||
62 | |||
63 | push dword[proc_lib] |
||
64 | push sz_OpenDialog_init |
||
65 | call getprocaddress |
||
66 | mov [opendialog_init], eax |
||
67 | |||
68 | push dword[proc_lib] |
||
69 | push sz_OpenDialog_start |
||
70 | call getprocaddress |
||
71 | mov [opendialog_start], eax |
||
72 | |||
3634 | fedesco | 73 | |
3478 | 0CodErr | 74 | ; memory.allocate: |
75 | mov eax, 68 |
||
76 | mov ebx, 12 |
||
77 | mov ecx, 4096 + 4096 + 4096 |
||
78 | int 64 |
||
79 | |||
80 | mov [od.procinfo], eax |
||
3634 | fedesco | 81 | |
3478 | 0CodErr | 82 | add eax, 1024 |
3634 | fedesco | 83 | mov [od.filename_area], eax |
84 | |||
3478 | 0CodErr | 85 | add eax, 4096 - 1024 |
86 | mov [od.opendir_path], eax |
||
3634 | fedesco | 87 | |
3478 | 0CodErr | 88 | add eax, 4096 |
89 | mov [od.openfile_path], eax |
||
90 | |||
91 | push od |
||
92 | call [opendialog_init] |
||
93 | |||
94 | |||
95 | ; get.screen.size |
||
96 | mov eax, 61 |
||
97 | mov ebx, 1 |
||
98 | int 64 |
||
99 | |||
100 | mov [screen], eax |
||
101 | movzx eax, word[screen.width] |
||
102 | shr eax, 3 |
||
103 | lea eax, [eax*2 + eax] |
||
104 | add eax, 72 |
||
105 | mov [window.width], eax |
||
106 | |||
107 | ; skin.height |
||
108 | mov eax, 48 |
||
109 | mov ebx, 4 |
||
3634 | fedesco | 110 | int 64 |
3478 | 0CodErr | 111 | |
112 | add eax, 64 |
||
113 | mov [window.height], eax |
||
114 | |||
115 | movzx eax, word[screen.width] |
||
116 | sub eax, [window.width] |
||
117 | shr eax, 1 |
||
118 | mov [window.left], eax |
||
119 | |||
120 | movzx eax, word[screen.height] |
||
121 | sub eax, [window.height] |
||
122 | sub eax, 24 |
||
123 | mov [window.top], eax |
||
124 | |||
125 | mov eax, [window.width] |
||
126 | sub eax, 20 |
||
127 | mov [edit1.width], eax |
||
128 | |||
129 | mov eax, [od.openfile_path] |
||
130 | mov [edit1.text], eax |
||
3634 | fedesco | 131 | |
132 | |||
3478 | 0CodErr | 133 | call on_redraw |
3634 | fedesco | 134 | ; ----------------------- ; |
3478 | 0CodErr | 135 | .loop: |
136 | ; wait.event |
||
137 | mov eax, 10 |
||
138 | int 64 |
||
139 | cmp eax, REDRAW_EVENT |
||
140 | jne .check_key |
||
141 | call on_redraw |
||
142 | jmp .loop |
||
3634 | fedesco | 143 | ; ----------------------- ; |
3478 | 0CodErr | 144 | .check_key: |
145 | cmp eax, KEY_EVENT |
||
146 | jne .check_button |
||
147 | mov eax, 2 |
||
148 | int 64 |
||
149 | cmp ah, 13 |
||
150 | jne .no_key_enter |
||
151 | call on_button_run |
||
152 | jmp .loop |
||
3634 | fedesco | 153 | ; ----------------------- ; |
3478 | 0CodErr | 154 | .no_key_enter: |
155 | push edit1 |
||
156 | call [edit_box_key] |
||
157 | jmp .loop |
||
3634 | fedesco | 158 | ; ----------------------- ; |
3478 | 0CodErr | 159 | .check_button: |
160 | cmp eax, BUTTON_EVENT |
||
161 | jne .check_mouse |
||
162 | ; get.button.number |
||
163 | mov eax, 17 |
||
164 | int 64 |
||
165 | cmp ah, 1 |
||
166 | jne .check_button_run |
||
167 | ; program.terminate |
||
168 | or eax, -1 |
||
169 | int 64 |
||
3634 | fedesco | 170 | ; ----------------------- ; |
3478 | 0CodErr | 171 | .check_button_run: |
172 | cmp ah, BUTTON_RUN |
||
173 | jne .check_button_browse |
||
174 | call on_button_run |
||
175 | jmp .loop |
||
3634 | fedesco | 176 | ; ----------------------- ; |
3478 | 0CodErr | 177 | .check_button_browse: |
178 | cmp ah, BUTTON_BROWSE |
||
179 | jne .loop |
||
180 | call on_button_browse |
||
181 | jmp .loop |
||
3634 | fedesco | 182 | ; ----------------------- ; |
3478 | 0CodErr | 183 | .check_mouse: |
184 | cmp eax, MOUSE_EVENT |
||
185 | jne .loop |
||
186 | push edit1 |
||
187 | call [edit_box_mouse] |
||
188 | jmp .loop |
||
189 | |||
190 | |||
3634 | fedesco | 191 | ; ======================================================================= ; |
3478 | 0CodErr | 192 | on_button_run: |
193 | push dword[edit1.text] |
||
194 | call extractrunpathandparams |
||
195 | |||
196 | ;file.run: |
||
197 | mov eax, 70 |
||
198 | mov ebx, file_info |
||
199 | int 64 |
||
3634 | fedesco | 200 | |
3478 | 0CodErr | 201 | mov dl, byte[lastendpath] |
202 | mov ecx, [ptrlastendpath] |
||
3634 | fedesco | 203 | mov [ecx], dl |
3478 | 0CodErr | 204 | |
205 | test eax, eax |
||
206 | jnge .error |
||
207 | mov [runresult], dword sz_Program_run_successfully |
||
208 | jmp .exit |
||
3634 | fedesco | 209 | |
3478 | 0CodErr | 210 | .error: |
3634 | fedesco | 211 | ; ----------------------- ; |
212 | .5: |
||
3478 | 0CodErr | 213 | cmp al, -5 |
214 | jne .31 |
||
215 | mov [runresult], dword sz_File_not_found |
||
216 | jmp .exit |
||
3634 | fedesco | 217 | ; ----------------------- ; |
218 | .31: |
||
3478 | 0CodErr | 219 | cmp al, -31 |
220 | jne .32 |
||
221 | mov [runresult], dword sz_File_is_not_executable |
||
222 | jmp .exit |
||
3634 | fedesco | 223 | ; ----------------------- ; |
224 | .32: |
||
3478 | 0CodErr | 225 | cmp al, -32 |
226 | jne .10 |
||
227 | mov [runresult], dword sz_Too_many_processes |
||
228 | jmp .exit |
||
3634 | fedesco | 229 | ; ----------------------- ; |
230 | .10: |
||
3478 | 0CodErr | 231 | cmp al, -10 |
232 | jne .30 |
||
233 | mov [runresult], dword sz_Access_denied |
||
234 | jmp .exit |
||
3634 | fedesco | 235 | ; ----------------------- ; |
236 | .30: |
||
3478 | 0CodErr | 237 | cmp al, -30 |
238 | jne .unknown |
||
239 | mov [runresult], dword sz_Out_of_memory |
||
3634 | fedesco | 240 | jmp .exit |
241 | ; ----------------------- ; |
||
3478 | 0CodErr | 242 | .unknown: |
3634 | fedesco | 243 | mov [runresult], dword sz_Unknown_error |
244 | ; ----------------------- ; |
||
3478 | 0CodErr | 245 | .exit: |
246 | call on_redraw |
||
3634 | fedesco | 247 | ret |
3478 | 0CodErr | 248 | |
3634 | fedesco | 249 | ; ======================================================================= ; |
3478 | 0CodErr | 250 | on_button_browse: |
251 | push od |
||
252 | call [opendialog_start] |
||
253 | |||
3634 | fedesco | 254 | mov eax, [od.status] |
3478 | 0CodErr | 255 | test eax, eax |
256 | je .exit |
||
257 | |||
258 | ;======== if space exist in filepath, then quote filepath |
||
259 | mov eax, [od.openfile_path] |
||
3634 | fedesco | 260 | ; ----------------------- ; |
3478 | 0CodErr | 261 | .check_space: |
262 | cmp [eax], byte 0 |
||
263 | je .no_space |
||
264 | cmp [eax], byte 32 ;space |
||
265 | je .space |
||
266 | inc eax |
||
267 | jmp .check_space |
||
268 | .space: |
||
3634 | fedesco | 269 | ; ----------------------- ; |
3478 | 0CodErr | 270 | .find_end_zero: |
271 | inc eax |
||
272 | cmp [eax], byte 0 |
||
273 | jne .find_end_zero |
||
274 | mov [eax + 2], byte 0 |
||
275 | mov [eax + 1], byte 34 ; quote |
||
3634 | fedesco | 276 | ; ----------------------- ; |
3478 | 0CodErr | 277 | .shift_path: |
278 | dec eax |
||
279 | |||
280 | mov dl, byte [eax ] |
||
281 | mov [eax + 1], dl |
||
282 | |||
283 | cmp eax, [od.openfile_path] |
||
284 | jne .shift_path |
||
285 | mov [eax ], byte 34 ; quote |
||
286 | |||
287 | .no_space: |
||
288 | ;================================= |
||
289 | |||
290 | push dword[od.openfile_path] |
||
291 | push edit1 |
||
292 | call [edit_box_set_text] |
||
3634 | fedesco | 293 | ; ----------------------- ; |
3478 | 0CodErr | 294 | .exit: |
295 | ret |
||
296 | |||
297 | |||
3634 | fedesco | 298 | ; ======================================================================= ; |
3478 | 0CodErr | 299 | on_redraw: |
300 | ; redraw.start |
||
301 | mov eax, 12 |
||
302 | mov ebx, 1 |
||
303 | int 64 |
||
304 | ; get.standart.colors |
||
305 | mov eax, 48 |
||
306 | mov ebx, 3 |
||
307 | mov ecx, sc |
||
308 | mov edx, 40 |
||
3634 | fedesco | 309 | int 64 |
3478 | 0CodErr | 310 | |
311 | mov eax, [sc.work_graph] |
||
312 | mov [edit1.shift_color], eax |
||
313 | |||
314 | mov eax, [sc.work_graph] |
||
3634 | fedesco | 315 | mov [edit1.focus_border_color], eax |
3478 | 0CodErr | 316 | |
317 | mov eax, [sc.frames] |
||
318 | mov [edit1.blur_border_color], eax |
||
319 | |||
320 | mov eax, [sc.work_text] |
||
3634 | fedesco | 321 | mov [edit1.text_color], eax |
3478 | 0CodErr | 322 | |
323 | ; draw.window |
||
324 | xor eax, eax |
||
325 | mov ebx, [window.left] |
||
326 | shl ebx, 16 |
||
327 | add ebx, [window.width] |
||
328 | mov ecx, [window.top] |
||
329 | shl ecx, 16 |
||
330 | add ecx, [window.height] |
||
331 | mov edx, [sc.work] |
||
332 | or edx, 34000000h |
||
333 | mov edi, sz_run |
||
334 | int 64 |
||
3634 | fedesco | 335 | |
3478 | 0CodErr | 336 | mov eax, [window.width] |
337 | sub eax, 318 |
||
338 | shr eax, 1 |
||
339 | sub eax, 5 |
||
340 | push eax |
||
341 | push 5 |
||
342 | push sz_Type_name_of_program |
||
343 | push dword [sc.work_text] |
||
344 | call draw.text |
||
3634 | fedesco | 345 | |
346 | ; ====================| browse button |==================== |
||
3478 | 0CodErr | 347 | push 20 |
348 | push 5 |
||
349 | push 38 |
||
350 | push 42 |
||
351 | push 17 |
||
352 | call draw.button |
||
353 | |||
354 | push 3 |
||
355 | push 42 |
||
356 | push sz_browse |
||
357 | push dword [sc.work_button_text] |
||
358 | call draw.text |
||
359 | |||
3634 | fedesco | 360 | ; ====================| run button |==================== |
3478 | 0CodErr | 361 | push 10 |
362 | mov eax, [window.width] |
||
363 | sub eax, 57 |
||
364 | push eax |
||
365 | push 38 |
||
366 | push 42 |
||
367 | push 17 |
||
368 | call draw.button |
||
369 | |||
370 | mov eax, [window.width] |
||
371 | sub eax, 56 |
||
372 | push eax |
||
373 | push 42 |
||
374 | push sz_run |
||
375 | push dword [sc.work_button_text] |
||
376 | call draw.text |
||
3634 | fedesco | 377 | ; ===================================================== |
378 | |||
3478 | 0CodErr | 379 | mov eax, 57 |
380 | push eax |
||
381 | mov eax, [window.height] |
||
382 | sub eax, 44 |
||
383 | push eax |
||
384 | push dword[runresult] |
||
385 | push dword [sc.work_text] |
||
386 | call draw.text |
||
387 | |||
388 | push edit1 |
||
389 | call [edit_box_draw] |
||
3634 | fedesco | 390 | |
3478 | 0CodErr | 391 | ; redraw.finish |
392 | mov eax, 12 |
||
393 | mov ebx, 2 |
||
394 | int 64 |
||
395 | |||
396 | ret |
||
397 | |||
398 | |||
3634 | fedesco | 399 | ; ======================================================================= ; |
3478 | 0CodErr | 400 | extractrunpathandparams: |
401 | xor ecx, ecx |
||
402 | |||
403 | mov eax, [esp + 4] |
||
404 | mov [runpath], eax |
||
405 | |||
3634 | fedesco | 406 | movzx eax, byte [eax] |
3478 | 0CodErr | 407 | cmp eax, 34 |
408 | jne .start_without_quote |
||
409 | |||
410 | inc ecx |
||
3634 | fedesco | 411 | ; ----------------------- ; |
3478 | 0CodErr | 412 | .loop1: |
3634 | fedesco | 413 | mov eax, [runpath] |
414 | movzx eax, byte [eax + ecx] |
||
3478 | 0CodErr | 415 | cmp eax, 34 |
416 | jne .not_quote |
||
417 | |||
418 | mov eax, [runpath] |
||
419 | mov [eax + ecx], byte 0 |
||
420 | |||
421 | mov eax, [runpath] |
||
422 | add eax, ecx |
||
423 | mov [ptrlastendpath], eax |
||
424 | mov [lastendpath], byte 34 |
||
425 | inc ecx |
||
3634 | fedesco | 426 | ; ----------------------- ; |
427 | .skip_space1: |
||
3478 | 0CodErr | 428 | mov eax, [runpath] |
3634 | fedesco | 429 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 430 | cmp al, 32 |
431 | jne .skipped1 |
||
432 | inc ecx |
||
433 | jmp .skip_space1 |
||
3634 | fedesco | 434 | ; ----------------------- ; |
3478 | 0CodErr | 435 | .skipped1: |
436 | mov eax, [runpath] |
||
437 | add eax, ecx |
||
438 | mov [runparams], eax |
||
439 | inc dword [runpath] |
||
3634 | fedesco | 440 | jmp .exit |
441 | ; ----------------------- ; |
||
442 | .not_quote: |
||
3478 | 0CodErr | 443 | mov eax, [runpath] |
3634 | fedesco | 444 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 445 | |
446 | test eax, eax |
||
447 | jne .not_zero1 |
||
448 | mov eax, [runpath] |
||
449 | add eax, ecx |
||
450 | mov [runparams], eax |
||
451 | mov eax, [runpath] |
||
452 | add eax, ecx |
||
453 | mov [ptrlastendpath], eax |
||
454 | mov [lastendpath], byte 0 |
||
3634 | fedesco | 455 | jmp .exit |
456 | ; ----------------------- ; |
||
457 | .not_zero1: |
||
3478 | 0CodErr | 458 | inc ecx |
459 | jmp .loop1 |
||
3634 | fedesco | 460 | ; ----------------------- ; |
3478 | 0CodErr | 461 | .start_without_quote: |
3634 | fedesco | 462 | ; ----------------------- ; |
463 | .loop2: |
||
3478 | 0CodErr | 464 | mov eax, [runpath] |
3634 | fedesco | 465 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 466 | cmp eax, 32 |
467 | jne .not_space |
||
468 | |||
469 | mov eax, [runpath] |
||
470 | mov [eax + ecx], byte 0 |
||
471 | |||
472 | mov eax, [runpath] |
||
473 | add eax, ecx |
||
474 | mov [ptrlastendpath], eax |
||
475 | mov [lastendpath], byte 32 |
||
476 | inc ecx |
||
3634 | fedesco | 477 | ; ----------------------- ; |
478 | .skip_space2: |
||
3478 | 0CodErr | 479 | mov eax, [runpath] |
3634 | fedesco | 480 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 481 | cmp al, 32 |
482 | jne .skipped2 |
||
483 | inc ecx |
||
484 | jmp .skip_space2 |
||
3634 | fedesco | 485 | ; ----------------------- ; |
486 | .skipped2: |
||
3478 | 0CodErr | 487 | mov eax, [runpath] |
488 | add eax, ecx |
||
489 | mov [runparams], eax |
||
3634 | fedesco | 490 | jmp .exit |
491 | ; ----------------------- ; |
||
492 | .not_space: |
||
3478 | 0CodErr | 493 | mov eax, [runpath] |
3634 | fedesco | 494 | movzx eax, byte [eax + ecx] |
3478 | 0CodErr | 495 | |
496 | test eax, eax |
||
497 | jne .not_zero2 |
||
498 | mov eax, [runpath] |
||
499 | add eax, ecx |
||
500 | mov [runparams], eax |
||
501 | mov eax, [runpath] |
||
502 | add eax, ecx |
||
503 | mov [ptrlastendpath], eax |
||
504 | mov [lastendpath], byte 0 |
||
3634 | fedesco | 505 | jmp .exit |
506 | ; ----------------------- ; |
||
507 | .not_zero2: |
||
3478 | 0CodErr | 508 | inc ecx |
509 | jmp .loop2 |
||
3634 | fedesco | 510 | ; ----------------------- ; |
3478 | 0CodErr | 511 | .exit: |
512 | ret 4 |
||
513 | |||
3634 | fedesco | 514 | ; ======================================================================= ; |
3478 | 0CodErr | 515 | draw.button: |
516 | mov eax, 8 |
||
517 | mov ebx, [esp + 16] |
||
518 | shl ebx, 16 |
||
519 | add ebx, [esp + 8] |
||
520 | mov ecx, [esp + 12] |
||
521 | shl ecx, 16 |
||
522 | add ecx, [esp + 4] |
||
523 | mov edx, [esp + 20] |
||
524 | mov esi, [sc.work_button] |
||
525 | int 64 |
||
526 | ret 20 |
||
3634 | fedesco | 527 | ; ======================================================================= ; |
3478 | 0CodErr | 528 | draw.text: |
529 | mov eax, 4 |
||
530 | mov ebx, [esp + 16] |
||
531 | shl ebx, 16 |
||
532 | add ebx, [esp + 12] |
||
533 | mov ecx, 2147483648 |
||
534 | or ecx, [esp + 4] |
||
535 | mov edx, [esp + 8] |
||
536 | int 64 |
||
537 | ret 16 |
||
3634 | fedesco | 538 | ; ======================================================================= ; |
3478 | 0CodErr | 539 | load.library: |
540 | mov eax, 68 |
||
541 | mov ebx, 19 |
||
542 | mov ecx, [esp + 4] |
||
543 | int 64 |
||
544 | ret 4 |
||
3634 | fedesco | 545 | ; ======================================================================= ; |
3478 | 0CodErr | 546 | getprocaddress: |
547 | mov edx, [esp + 8] ; hlib |
||
548 | xor eax, eax |
||
549 | test edx, edx ; If hlib = 0 then goto .end |
||
550 | jz .end |
||
551 | ; ----------------------- ; |
||
3634 | fedesco | 552 | .next: |
3478 | 0CodErr | 553 | cmp [edx], dword 0 ; If end of export table then goto .end |
554 | jz .end |
||
555 | |||
556 | xor eax, eax |
||
557 | mov esi, [edx] |
||
558 | mov edi, [esp + 4] ; name |
||
559 | ; ----------------------- ; |
||
3634 | fedesco | 560 | .next_: |
3478 | 0CodErr | 561 | lodsb |
562 | scasb |
||
563 | jne .fail |
||
564 | or al, al |
||
565 | jnz .next_ |
||
566 | jmp .ok |
||
567 | ; ----------------------- ; |
||
3634 | fedesco | 568 | .fail: |
3478 | 0CodErr | 569 | add edx, 8 |
570 | jmp .next |
||
571 | ; ----------------------- ; |
||
572 | .ok: ; return address |
||
573 | mov eax, [edx + 4] |
||
574 | ; ----------------------- ; |
||
3634 | fedesco | 575 | .end: |
3478 | 0CodErr | 576 | ret 8 |
577 | |||
578 | |||
3634 | fedesco | 579 | |
3478 | 0CodErr | 580 | file_info: |
581 | dd 7 |
||
582 | dd 0 |
||
583 | runparams: |
||
584 | dd 0 |
||
585 | dd 0 |
||
586 | dd 0 |
||
587 | db 0 |
||
3634 | fedesco | 588 | runpath: |
589 | dd 0 |
||
590 | |||
591 | |||
3478 | 0CodErr | 592 | screen: |
593 | .height dw 0 |
||
594 | .width dw 0 |
||
3634 | fedesco | 595 | |
3478 | 0CodErr | 596 | window: |
597 | .left dd 0 |
||
598 | .top dd 0 |
||
599 | .width dd 0 |
||
600 | .height dd 0 |
||
3634 | fedesco | 601 | |
3478 | 0CodErr | 602 | box_lib dd 0 |
603 | |||
604 | edit1: |
||
605 | .width dd 0 |
||
606 | .left dd 5 |
||
607 | .top dd 19 |
||
608 | .color dd 0ffffffffh |
||
609 | .shift_color dd 0 |
||
610 | .focus_border_color dd 0 |
||
611 | .blur_border_color dd 0 |
||
612 | .text_color dd 0 |
||
613 | .max dd 4096 |
||
614 | .text dd 0 |
||
615 | .mouse_variable dd 0 |
||
616 | .flags dd 2 |
||
617 | .size dd 0 |
||
618 | .pos dd 0 |
||
619 | .offset dd 0 |
||
620 | .cl_curs_x dd 0 |
||
621 | .cl_curs_y dd 0 |
||
622 | .shift dd 0 |
||
623 | .shift_old dd 0 |
||
3634 | fedesco | 624 | |
3478 | 0CodErr | 625 | edit_box_draw dd 0 |
626 | edit_box_key dd 0 |
||
627 | edit_box_mouse dd 0 |
||
628 | edit_box_set_text dd 0 |
||
3634 | fedesco | 629 | |
630 | sc: |
||
3478 | 0CodErr | 631 | .frames dd 0 |
632 | .grab dd 0 |
||
633 | .grab_button dd 0 |
||
634 | .grab_button_text dd 0 |
||
635 | .grab_text dd 0 |
||
636 | .work dd 0 |
||
637 | .work_button dd 0 |
||
638 | .work_button_text dd 0 |
||
639 | .work_text dd 0 |
||
640 | .work_graph dd 0 |
||
3634 | fedesco | 641 | |
3478 | 0CodErr | 642 | proc_lib dd 0 |
3634 | fedesco | 643 | |
644 | od: |
||
3478 | 0CodErr | 645 | .mode dd 0 |
646 | .procinfo dd 0 |
||
647 | .com_area_name dd sz_FFFFFFFF_open_dialog |
||
648 | .com_area dd 0 |
||
649 | .opendir_path dd 0 |
||
650 | .dir_default_path dd sz_SYS |
||
651 | .start_path dd sz_opendial_path |
||
652 | .draw_window dd on_redraw |
||
653 | .status dd 0 |
||
654 | .openfile_path dd 0 |
||
655 | .filename_area dd 0 |
||
656 | .filter_area dd filefilter |
||
657 | .x_size dw 414 |
||
658 | .x_start dw 0 |
||
659 | .y_size dw 414 |
||
660 | .y_start dw 0 |
||
3634 | fedesco | 661 | |
3478 | 0CodErr | 662 | opendialog_init dd 0 |
663 | opendialog_start dd 0 |
||
664 | |||
665 | filefilter dd 0 |
||
666 | runresult dd sz_empty |
||
667 | |||
668 | lastendpath db 0 |
||
3634 | fedesco | 669 | ptrlastendpath dd 0 |
670 | |||
3478 | 0CodErr | 671 | sz_empty db 0 |
672 | |||
673 | sz_box_lib db "/sys/lib/box_lib.obj",0 |
||
674 | sz_edit_box db "edit_box",0 |
||
675 | sz_edit_box_key db "edit_box_key",0 |
||
676 | sz_edit_box_mouse db "edit_box_mouse",0 |
||
677 | sz_edit_box_set_text db "edit_box_set_text",0 |
||
678 | |||
679 | sz_proc_lib db "/sys/lib/proc_lib.obj",0 |
||
680 | sz_OpenDialog_init db "OpenDialog_init",0 |
||
681 | sz_OpenDialog_start db "OpenDialog_start",0 |
||
682 | sz_FFFFFFFF_open_dialog db "FFFFFFFF_open_dialog",0 |
||
683 | sz_SYS db "/sys",0 |
||
684 | sz_opendial_path db "/sys/File managers/opendial",0 |
||
685 | |||
3634 | fedesco | 686 | if lang eq it |
687 | sz_Program_run_successfully db "Programma eseguito correttamente",0 |
||
688 | sz_File_not_found db "File non trovato",0 |
||
689 | sz_File_is_not_executable db "File non eseguibile",0 |
||
690 | sz_Too_many_processes db "Troppi processi",0 |
||
691 | sz_Access_denied db "Accesso negato",0 |
||
692 | sz_Out_of_memory db "Out of memory",0 |
||
693 | sz_Unknown_error db "Errore sconosciuto",0 |
||
3478 | 0CodErr | 694 | |
3634 | fedesco | 695 | sz_Type_name_of_program db "Digita il nome del programma per eseguirlo",0 |
3478 | 0CodErr | 696 | |
3634 | fedesco | 697 | sz_run db "Esegui ",0 |
698 | sz_browse db " Naviga",0 |
||
3478 | 0CodErr | 699 | |
3634 | fedesco | 700 | else |
701 | sz_Program_run_successfully db "Program run successfully",0 |
||
702 | sz_File_not_found db "File not found",0 |
||
703 | sz_File_is_not_executable db "File is not executable",0 |
||
704 | sz_Too_many_processes db "Too many processes",0 |
||
705 | sz_Access_denied db "Access denied",0 |
||
706 | sz_Out_of_memory db "Out of memory",0 |
||
707 | sz_Unknown_error db "Unknown error",0 |
||
708 | |||
709 | sz_Type_name_of_program db "Type name of program, and Kolibri will run it for you",0 |
||
710 | |||
711 | sz_run db " Run ",0 |
||
712 | sz_browse db " Browse ",0 |
||
713 | end if |
||
714 | ; ======================================================================= ; |
||
3478 | 0CodErr | 715 | end_: |
716 |