Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1817 | Albom | 1 | |
2 | |||
3 | |||
4 | mov eax, 68 |
||
5 | mov ebx, 19 |
||
6 | mov ecx, dll_name |
||
7 | int 0x40 |
||
8 | test eax, eax |
||
9 | jz exit |
||
10 | |||
11 | |||
12 | mov edx, eax |
||
13 | mov esi, myimport |
||
14 | import_loop: |
||
15 | lodsd |
||
16 | test eax, eax |
||
17 | jz import_done |
||
18 | push edx |
||
19 | import_find: |
||
20 | mov ebx, [edx] |
||
21 | test ebx, ebx |
||
22 | jz exit;import_not_found |
||
23 | push eax |
||
24 | @@: |
||
25 | mov cl, [eax] |
||
26 | cmp cl, [ebx] |
||
27 | jnz import_find_next |
||
28 | test cl, cl |
||
29 | jz import_found |
||
30 | inc eax |
||
31 | inc ebx |
||
32 | jmp @b |
||
33 | import_find_next: |
||
34 | pop eax |
||
35 | add edx, 8 |
||
36 | jmp import_find |
||
37 | import_found: |
||
38 | pop eax |
||
39 | mov eax, [edx+4] |
||
40 | mov [esi-4], eax |
||
41 | pop edx |
||
42 | jmp import_loop |
||
43 | import_done: |
||
44 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | or eax, -1 |
||
50 | int 0x40 |
||
51 | |||
52 | |||
53 | |||
54 | dll_name db '/sys/lib/console.obj',0 |
||
55 | caption db 'Eliza for KolibriOS', 0 |
||
56 | |||
57 | |||
58 | |||
59 | myimport: |
||
60 | dll_start dd aStart |
||
61 | dll_ver dd aVersion |
||
62 | con_init dd aConInit |
||
63 | con_write_asciiz dd aConWriteAsciiz |
||
64 | con_exit dd aConExit |
||
65 | con_getch dd aCon_getch |
||
66 | con_cls dd aCon_cls |
||
67 | con_set_cursor_pos dd aCon_set_cursor_pos |
||
68 | con_gets dd aCon_gets |
||
69 | con_printf dd aCon_printf |
||
70 | dd 0 |
||
71 | |||
72 | |||
73 | aVersion db 'version',0 |
||
74 | aConInit db 'con_init',0 |
||
75 | aConWriteAsciiz db 'con_write_asciiz',0 |
||
76 | aConExit db 'con_exit',0 |
||
77 | aCon_getch db 'con_getch',0 |
||
78 | aCon_cls db 'con_cls',0 |
||
79 | aCon_set_cursor_pos db 'con_set_cursor_pos',0 |
||
80 | aCon_gets db 'con_gets',0 |
||
81 | aCon_printf db 'con_printf',0 |
||
82 | |||
83 | |||
84 | |||
85 |