Rev 1624 | Rev 3265 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1624 | Rev 1702 | ||
---|---|---|---|
1 | ;----------------------------------------------------------------------------- |
1 | ;----------------------------------------------------------------------------- |
2 | ; project name: TINYPAD |
2 | ; project name: TINYPAD |
3 | ; compiler: flat assembler 1.67.21 |
3 | ; compiler: flat assembler 1.67.21 |
4 | ; memory to compile: 3.0/9.0 MBytes (without/with size optimizations) |
4 | ; memory to compile: 3.0/9.0 MBytes (without/with size optimizations) |
5 | ; version: SVN (4.0.5) |
5 | ; version: SVN (4.0.5) |
6 | ; last update: 2008-07-18 (Jul 18, 2008) |
6 | ; last update: 2008-07-18 (Jul 18, 2008) |
7 | ; minimal kernel: revision #823 (svn://kolibrios.org/kernel/trunk) |
7 | ; minimal kernel: revision #823 (svn://kolibrios.org/kernel/trunk) |
8 | ;----------------------------------------------------------------------------- |
8 | ;----------------------------------------------------------------------------- |
9 | ; originally by: Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi |
9 | ; originally by: Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi |
10 | ; maintained by: Mike Semenyako >> mike.dld@gmail.com |
10 | ; maintained by: Mike Semenyako >> mike.dld@gmail.com |
11 | ; Ivan Poddubny >> ivan-yar@bk.ru |
11 | ; Ivan Poddubny >> ivan-yar@bk.ru |
12 | ;----------------------------------------------------------------------------- |
12 | ;----------------------------------------------------------------------------- |
13 | ; TODO (4.1.0): |
13 | ; TODO (4.1.0): |
14 | ; - add vertical selection, undo, goto position, overwrite mode, smart tabulation |
14 | ; - add vertical selection, undo, goto position, overwrite mode, smart tabulation |
15 | ; - improve window drawing with small dimensions |
15 | ; - improve window drawing with small dimensions |
16 | ; - save/load settings to/from ini file, not executable |
16 | ; - save/load settings to/from ini file, not executable |
17 | ; - path autocompletion for open/save dialogs |
17 | ; - path autocompletion for open/save dialogs |
18 | ; - other bug-fixes and speed/size optimizations |
18 | ; - other bug-fixes and speed/size optimizations |
19 | ;----------------------------------------------------------------------------- |
19 | ;----------------------------------------------------------------------------- |
20 | ; See history.txt for complete changelog |
20 | ; See history.txt for complete changelog |
21 | ;----------------------------------------------------------------------------- |
21 | ;----------------------------------------------------------------------------- |
22 | 22 | ||
23 | include 'lang.inc' |
23 | include 'lang.inc' |
- | 24 | ||
24 | 25 | include '../../../config.inc' ;for nightbuild |
|
25 | include '../../../macros.inc' ; useful stuff |
26 | include '../../../macros.inc' ; useful stuff |
26 | include '../../../struct.inc' |
27 | include '../../../struct.inc' |
27 | include '../../../proc32.inc' |
28 | include '../../../proc32.inc' |
28 | 29 | ||
29 | include 'external/libio.inc' |
30 | include 'external/libio.inc' |
30 | 31 | ||
31 | include 'tinypad.inc' |
32 | include 'tinypad.inc' |
32 | 33 | ||
33 | ;purge mov,add,sub ; SPEED |
34 | ;purge mov,add,sub ; SPEED |
34 | 35 | ||
35 | header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path |
36 | header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path |
36 | 37 | ||
37 | APP_VERSION equ 'SVN (4.0.6)' |
38 | APP_VERSION equ 'SVN (4.0.6)' |
38 | 39 | ||
39 | TRUE = 1 |
40 | TRUE = 1 |
40 | FALSE = 0 |
41 | FALSE = 0 |
41 | 42 | ||
42 | ;include 'debug.inc' |
43 | ;include 'debug.inc' |
43 | ;define __DEBUG__ 1 |
44 | ;define __DEBUG__ 1 |
44 | ;define __DEBUG_LEVEL__ 1 |
45 | ;define __DEBUG_LEVEL__ 1 |
45 | ;include 'debug-fdo.inc' |
46 | ;include 'debug-fdo.inc' |
46 | 47 | ||
47 | ; compiled-in options |
48 | ; compiled-in options |
48 | 49 | ||
49 | ASEPC = '-' ; separator character (char) |
50 | ASEPC = '-' ; separator character (char) |
50 | ATOPH = 19 ; menu bar height (pixels) |
51 | ATOPH = 19 ; menu bar height (pixels) |
51 | SCRLW = 16 ; scrollbar widht/height (pixels) |
52 | SCRLW = 16 ; scrollbar widht/height (pixels) |
52 | ATABW = 8 ; tab key indent width (chars) |
53 | ATABW = 8 ; tab key indent width (chars) |
53 | LINEH = 10 ; line height (pixels) |
54 | LINEH = 10 ; line height (pixels) |
54 | PATHL = 256 ; maximum path length (chars) !!! don't change !!! |
55 | PATHL = 256 ; maximum path length (chars) !!! don't change !!! |
55 | AMINS = 8 ; minimal scroll thumb size (pixels) |
56 | AMINS = 8 ; minimal scroll thumb size (pixels) |
56 | LCHGW = 3 ; changed/saved marker width (pixels) |
57 | LCHGW = 3 ; changed/saved marker width (pixels) |
57 | 58 | ||
58 | STATH = 16 ; status bar height (pixels) |
59 | STATH = 16 ; status bar height (pixels) |
59 | TBARH = 18 ; tab bar height (pixels) |
60 | TBARH = 18 ; tab bar height (pixels) |
60 | 61 | ||
61 | INI_SEC_PREFIX equ '' |
62 | INI_SEC_PREFIX equ '' |
62 | 63 | ||
63 | ;----------------------------------------------------------------------------- |
64 | ;----------------------------------------------------------------------------- |
64 | section @CODE ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
65 | section @CODE ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
65 | ;----------------------------------------------------------------------------- |
66 | ;----------------------------------------------------------------------------- |
66 | 67 | ||
67 | cld |
68 | cld |
68 | mov edi,@UDATA |
69 | mov edi,@UDATA |
69 | mov ecx,@PARAMS-@UDATA |
70 | mov ecx,@PARAMS-@UDATA |
70 | mov al,0 |
71 | mov al,0 |
71 | rep stosb |
72 | rep stosb |
72 | 73 | ||
73 | mcall 68,11 |
74 | mcall 68,11 |
74 | or eax,eax |
75 | or eax,eax |
75 | jz key.alt_x.close |
76 | jz key.alt_x.close |
76 | 77 | ||
77 | stdcall dll.Load,@IMPORT |
78 | stdcall dll.Load,@IMPORT |
78 | or eax,eax |
79 | or eax,eax |
79 | jnz key.alt_x.close |
80 | jnz key.alt_x.close |
80 | 81 | ||
81 | mov edi,ini_path |
82 | mov edi,ini_path |
82 | xor al,al |
83 | xor al,al |
83 | mov ecx,PATHL |
84 | mov ecx,PATHL |
84 | repne scasb |
85 | repne scasb |
85 | mov dword[edi-1],'.ini' |
86 | mov dword[edi-1],'.ini' |
86 | mov byte[edi+3],0 |
87 | mov byte[edi+3],0 |
87 | 88 | ||
88 | stdcall load_settings |
89 | stdcall load_settings |
89 | 90 | ||
90 | stdcall mem.Alloc,65536 |
91 | stdcall mem.Alloc,65536 |
91 | mov [temp_buf],eax |
92 | mov [temp_buf],eax |
92 | 93 | ||
93 | inc [do_not_draw] |
94 | inc [do_not_draw] |
94 | 95 | ||
95 | mov dword[app_start],7 |
96 | mov dword[app_start],7 |
96 | 97 | ||
97 | mov esi,s_example |
98 | mov esi,s_example |
98 | mov edi,tb_opensave.text |
99 | mov edi,tb_opensave.text |
99 | mov ecx,s_example.size |
100 | mov ecx,s_example.size |
100 | mov [tb_opensave.length],cl |
101 | mov [tb_opensave.length],cl |
101 | rep movsb |
102 | rep movsb |
102 | 103 | ||
103 | mov esi,s_still |
104 | mov esi,s_still |
104 | mov edi,s_search |
105 | mov edi,s_search |
105 | mov ecx,s_still.size |
106 | mov ecx,s_still.size |
106 | mov [s_search.size],ecx |
107 | mov [s_search.size],ecx |
107 | rep movsb |
108 | rep movsb |
108 | 109 | ||
109 | cmp byte[@PARAMS],0 |
110 | cmp byte[@PARAMS],0 |
110 | jz no_params |
111 | jz no_params |
111 | 112 | ||
112 | ;// Willow's code to support DOCPAK [ |
113 | ;// Willow's code to support DOCPAK [ |
113 | 114 | ||
114 | cmp byte[@PARAMS],'*' |
115 | cmp byte[@PARAMS],'*' |
115 | jne .noipc |
116 | jne .noipc |
116 | 117 | ||
117 | ;// diamond [ (convert size from decimal representation to dword) |
118 | ;// diamond [ (convert size from decimal representation to dword) |
118 | ;-- mov edx,dword[@PARAMS+1] |
119 | ;-- mov edx,dword[@PARAMS+1] |
119 | mov esi,@PARAMS+1 |
120 | mov esi,@PARAMS+1 |
120 | xor edx,edx |
121 | xor edx,edx |
121 | xor eax,eax |
122 | xor eax,eax |
122 | @@: lodsb |
123 | @@: lodsb |
123 | test al,al |
124 | test al,al |
124 | jz @f |
125 | jz @f |
125 | lea edx,[edx*4+edx] |
126 | lea edx,[edx*4+edx] |
126 | lea edx,[edx*2+eax-'0'] |
127 | lea edx,[edx*2+eax-'0'] |
127 | jmp @b |
128 | jmp @b |
128 | @@: |
129 | @@: |
129 | ;// diamond ] |
130 | ;// diamond ] |
130 | 131 | ||
131 | add edx,20 |
132 | add edx,20 |
132 | 133 | ||
133 | stdcall mem.Alloc,edx |
134 | stdcall mem.Alloc,edx |
134 | mov ebp,eax |
135 | mov ebp,eax |
135 | push eax |
136 | push eax |
136 | 137 | ||
137 | mov dword[ebp+0],0 |
138 | mov dword[ebp+0],0 |
138 | mov dword[ebp+4],8 |
139 | mov dword[ebp+4],8 |
139 | mcall 60,1,ebp |
140 | mcall 60,1,ebp |
140 | mcall 40,1000000b |
141 | mcall 40,1000000b |
141 | 142 | ||
142 | mcall 23,200 |
143 | mcall 23,200 |
143 | 144 | ||
144 | cmp eax,7 |
145 | cmp eax,7 |
145 | jne key.alt_x.close |
146 | jne key.alt_x.close |
146 | mov byte[ebp],1 |
147 | mov byte[ebp],1 |
147 | 148 | ||
148 | mov ecx,[ebp+12] |
149 | mov ecx,[ebp+12] |
149 | lea esi,[ebp+16] |
150 | lea esi,[ebp+16] |
150 | call create_tab |
151 | call create_tab |
151 | call load_from_memory |
152 | call load_from_memory |
152 | 153 | ||
153 | pop ebp |
154 | pop ebp |
154 | stdcall mem.Free,ebp |
155 | stdcall mem.Free,ebp |
155 | 156 | ||
156 | jmp @f |
157 | jmp @f |
157 | .noipc: |
158 | .noipc: |
158 | 159 | ||
159 | ;// Willow's code to support DOCPAK ] |
160 | ;// Willow's code to support DOCPAK ] |
160 | 161 | ||
161 | mov esi,@PARAMS |
162 | mov esi,@PARAMS |
162 | mov edi,tb_opensave.text |
163 | mov edi,tb_opensave.text |
163 | mov ecx,PATHL |
164 | mov ecx,PATHL |
164 | rep movsb |
165 | rep movsb |
165 | mov edi,tb_opensave.text |
166 | mov edi,tb_opensave.text |
166 | mov ecx,PATHL |
167 | mov ecx,PATHL |
167 | xor al,al |
168 | xor al,al |
168 | repne scasb |
169 | repne scasb |
169 | jne key.alt_x.close |
170 | jne key.alt_x.close |
170 | lea eax,[edi-tb_opensave.text-1] |
171 | lea eax,[edi-tb_opensave.text-1] |
171 | mov [tb_opensave.length],al |
172 | mov [tb_opensave.length],al |
172 | call load_file |
173 | call load_file |
173 | jnc @f |
174 | jnc @f |
174 | 175 | ||
175 | no_params: |
176 | no_params: |
176 | call create_tab |
177 | call create_tab |
177 | 178 | ||
178 | @@: |
179 | @@: |
179 | mov [s_status],0 |
180 | mov [s_status],0 |
180 | dec [do_not_draw] |
181 | dec [do_not_draw] |
181 | 182 | ||
182 | mov al,[tabs_pos] |
183 | mov al,[tabs_pos] |
183 | mov [tab_bar.Style],al |
184 | mov [tab_bar.Style],al |
184 | 185 | ||
185 | ;--------------------------------------------------------------------- |
186 | ;--------------------------------------------------------------------- |
186 | mov edi,filename_area |
187 | mov edi,filename_area |
187 | mov esi,s_example+5 |
188 | mov esi,s_example+5 |
188 | call copy_str_1 |
189 | call copy_str_1 |
189 | 190 | ||
190 | mov esi,tb_opensave.text |
191 | mov esi,tb_opensave.text |
191 | mov edi,fname_Info |
192 | mov edi,fname_Info |
192 | call copy_str_1 |
193 | call copy_str_1 |
193 | xor eax,eax |
194 | xor eax,eax |
194 | mov [edi],al |
195 | mov [edi],al |
195 | ;--------------------------------------------------------------------- |
196 | ;--------------------------------------------------------------------- |
196 | ;OpenDialog initialisation |
197 | ;OpenDialog initialisation |
197 | push dword OpenDialog_data |
198 | push dword OpenDialog_data |
198 | call [OpenDialog_Init] |
199 | call [OpenDialog_Init] |
199 | ;--------------------------------------------------------------------- |
200 | ;--------------------------------------------------------------------- |
200 | 201 | ||
201 | 202 | ||
202 | mcall 66,1,1 |
203 | mcall 66,1,1 |
203 | mcall 40,00100111b |
204 | mcall 40,00100111b |
204 | red: |
205 | red: |
205 | call drawwindow |
206 | call drawwindow |
206 | 207 | ||
207 | ;----------------------------------------------------------------------------- |
208 | ;----------------------------------------------------------------------------- |
208 | 209 | ||
209 | still: |
210 | still: |
210 | call draw_statusbar ; write current position & number of strings |
211 | call draw_statusbar ; write current position & number of strings |
211 | 212 | ||
212 | .skip_write: |
213 | .skip_write: |
213 | cmp [open_dialog],1 |
214 | cmp [open_dialog],1 |
214 | je .open_dialog |
215 | je .open_dialog |
215 | mcall 10 ; wait here until event |
216 | mcall 10 ; wait here until event |
216 | cmp [main_closed],0 |
217 | cmp [main_closed],0 |
217 | jne key.alt_x |
218 | jne key.alt_x |
218 | dec eax ; redraw ? |
219 | dec eax ; redraw ? |
219 | jz red |
220 | jz red |
220 | dec eax ; key ? |
221 | dec eax ; key ? |
221 | jz key |
222 | jz key |
222 | dec eax ; button ? |
223 | dec eax ; button ? |
223 | jz button |
224 | jz button |
224 | sub eax,3 ; mouse ? |
225 | sub eax,3 ; mouse ? |
225 | jz mouse |
226 | jz mouse |
226 | 227 | ||
227 | jmp still.skip_write |
228 | jmp still.skip_write |
228 | ;--------------------------------------------------------------------- |
229 | ;--------------------------------------------------------------------- |
229 | .open_dialog: |
230 | .open_dialog: |
230 | pusha |
231 | pusha |
231 | 232 | ||
232 | call btn.bot.cancel |
233 | call btn.bot.cancel |
233 | 234 | ||
234 | mov esi,tb_opensave.text |
235 | mov esi,tb_opensave.text |
235 | mov edi,[OpenDialog_data.openfile_pach] |
236 | mov edi,[OpenDialog_data.openfile_pach] |
236 | movzx ecx,[tb_opensave.length] |
237 | movzx ecx,[tb_opensave.length] |
237 | mov edx,[OpenDialog_data.filename_area] |
238 | mov edx,[OpenDialog_data.filename_area] |
238 | mov ebx,[OpenDialog_data.opendir_pach] |
239 | mov ebx,[OpenDialog_data.opendir_pach] |
239 | call copy_str_2 |
240 | call copy_str_2 |
240 | movzx eax,byte [bot_mode2] |
241 | movzx eax,byte [bot_mode2] |
241 | mov [OpenDialog_data.type],eax |
242 | mov [OpenDialog_data.type],eax |
242 | popa |
243 | popa |
243 | ; invoke OpenDialog |
244 | ; invoke OpenDialog |
244 | push dword OpenDialog_data |
245 | push dword OpenDialog_data |
245 | call [OpenDialog_Start] |
246 | call [OpenDialog_Start] |
246 | 247 | ||
247 | cmp [OpenDialog_data.status],1 |
248 | cmp [OpenDialog_data.status],1 |
248 | jne .3 |
249 | jne .3 |
249 | 250 | ||
250 | pusha |
251 | pusha |
251 | mov edi,tb_opensave.text |
252 | mov edi,tb_opensave.text |
252 | mov esi,[OpenDialog_data.openfile_pach] |
253 | mov esi,[OpenDialog_data.openfile_pach] |
253 | call copy_str_1 |
254 | call copy_str_1 |
254 | sub edi,tb_opensave.text |
255 | sub edi,tb_opensave.text |
255 | dec edi |
256 | dec edi |
256 | mov eax,edi |
257 | mov eax,edi |
257 | mov [tb_opensave.length],al |
258 | mov [tb_opensave.length],al |
258 | popa |
259 | popa |
259 | 260 | ||
260 | cmp [bot_mode2],0 |
261 | cmp [bot_mode2],0 |
261 | je .2 |
262 | je .2 |
262 | call save_file |
263 | call save_file |
263 | jmp .3 |
264 | jmp .3 |
264 | .2: |
265 | .2: |
265 | call load_file |
266 | call load_file |
266 | .3: |
267 | .3: |
267 | mov [open_dialog],0 |
268 | mov [open_dialog],0 |
268 | jmp red |
269 | jmp red |
269 | ;----------------------------------------------------------------------------- |
270 | ;----------------------------------------------------------------------------- |
270 | draw_window_for_OD: |
271 | draw_window_for_OD: |
271 | call drawwindow |
272 | call drawwindow |
272 | call draw_statusbar |
273 | call draw_statusbar |
273 | ret |
274 | ret |
274 | ;----------------------------------------------------------------------------- |
275 | ;----------------------------------------------------------------------------- |
275 | copy_str_2: |
276 | copy_str_2: |
276 | cld |
277 | cld |
277 | push esi ecx |
278 | push esi ecx |
278 | rep movsb ; edi openfile_pach |
279 | rep movsb ; edi openfile_pach |
279 | xor eax,eax |
280 | xor eax,eax |
280 | mov [edi],al |
281 | mov [edi],al |
281 | pop ecx esi |
282 | pop ecx esi |
282 | mov edi,ebx |
283 | mov edi,ebx |
283 | rep movsb ; edi opendir_pach |
284 | rep movsb ; edi opendir_pach |
284 | mov [edi],al |
285 | mov [edi],al |
285 | mov esi,edi |
286 | mov esi,edi |
286 | std |
287 | std |
287 | @@: |
288 | @@: |
288 | lodsb |
289 | lodsb |
289 | cmp al,byte '/' |
290 | cmp al,byte '/' |
290 | jne @b |
291 | jne @b |
291 | inc esi |
292 | inc esi |
292 | xor eax,eax |
293 | xor eax,eax |
293 | mov [esi],al |
294 | mov [esi],al |
294 | inc esi |
295 | inc esi |
295 | mov edi,edx ; edi filename_area |
296 | mov edi,edx ; edi filename_area |
296 | call copy_str_1 |
297 | call copy_str_1 |
297 | ret |
298 | ret |
298 | ;----------------------------------------------------------------------------- |
299 | ;----------------------------------------------------------------------------- |
299 | copy_str_1: |
300 | copy_str_1: |
300 | xor eax,eax |
301 | xor eax,eax |
301 | cld |
302 | cld |
302 | @@: |
303 | @@: |
303 | lodsb |
304 | lodsb |
304 | stosb |
305 | stosb |
305 | test eax,eax |
306 | test eax,eax |
306 | jnz @b |
307 | jnz @b |
307 | ret |
308 | ret |
308 | ;----------------------------------------------------------------------------- |
309 | ;----------------------------------------------------------------------------- |
309 | proc get_event ctx ;////////////////////////////////////////////////////////// |
310 | proc get_event ctx ;////////////////////////////////////////////////////////// |
310 | ;----------------------------------------------------------------------------- |
311 | ;----------------------------------------------------------------------------- |
311 | mcall 10 |
312 | mcall 10 |
312 | dec eax ; redraw ? |
313 | dec eax ; redraw ? |
313 | jz .redraw |
314 | jz .redraw |
314 | dec eax ; key ? |
315 | dec eax ; key ? |
315 | jz .key |
316 | jz .key |
316 | dec eax ; button ? |
317 | dec eax ; button ? |
317 | jz .button |
318 | jz .button |
318 | sub eax,2 ; background ? |
319 | sub eax,2 ; background ? |
319 | jz .background |
320 | jz .background |
320 | dec eax ; mouse ? |
321 | dec eax ; mouse ? |
321 | jz .mouse |
322 | jz .mouse |
322 | dec eax ; ipc ? |
323 | dec eax ; ipc ? |
323 | jz .ipc |
324 | jz .ipc |
324 | dec eax ; network ? |
325 | dec eax ; network ? |
325 | jz .network |
326 | jz .network |
326 | dec eax ; debug ? |
327 | dec eax ; debug ? |
327 | jz .debug |
328 | jz .debug |
328 | sub eax,7 ; irq ? |
329 | sub eax,7 ; irq ? |
329 | js .nothing |
330 | js .nothing |
330 | cmp eax,15 |
331 | cmp eax,15 |
331 | jg .nothing |
332 | jg .nothing |
332 | jmp .irq |
333 | jmp .irq |
333 | 334 | ||
334 | .nothing: |
335 | .nothing: |
335 | mov eax,EV_IDLE |
336 | mov eax,EV_IDLE |
336 | ret |
337 | ret |
337 | 338 | ||
338 | .redraw: |
339 | .redraw: |
339 | mov eax,EV_REDRAW |
340 | mov eax,EV_REDRAW |
340 | ret |
341 | ret |
341 | 342 | ||
342 | .key: |
343 | .key: |
343 | mov eax,EV_KEY |
344 | mov eax,EV_KEY |
344 | ret |
345 | ret |
345 | 346 | ||
346 | .button: |
347 | .button: |
347 | mov eax,EV_BUTTON |
348 | mov eax,EV_BUTTON |
348 | ret |
349 | ret |
349 | 350 | ||
350 | .background: |
351 | .background: |
351 | mov eax,EV_BACKGROUND |
352 | mov eax,EV_BACKGROUND |
352 | ret |
353 | ret |
353 | 354 | ||
354 | .mouse: |
355 | .mouse: |
355 | mov eax,EV_MOUSE |
356 | mov eax,EV_MOUSE |
356 | ret |
357 | ret |
357 | 358 | ||
358 | .ipc: |
359 | .ipc: |
359 | mov eax,EV_IPC |
360 | mov eax,EV_IPC |
360 | ret |
361 | ret |
361 | 362 | ||
362 | .network: |
363 | .network: |
363 | mov eax,EV_NETWORK |
364 | mov eax,EV_NETWORK |
364 | ret |
365 | ret |
365 | 366 | ||
366 | .debug: |
367 | .debug: |
367 | mov eax,EV_DEBUG |
368 | mov eax,EV_DEBUG |
368 | ret |
369 | ret |
369 | endp |
370 | endp |
370 | 371 | ||
371 | ;----------------------------------------------------------------------------- |
372 | ;----------------------------------------------------------------------------- |
372 | proc load_settings ;////////////////////////////////////////////////////////// |
373 | proc load_settings ;////////////////////////////////////////////////////////// |
373 | ;----------------------------------------------------------------------------- |
374 | ;----------------------------------------------------------------------------- |
374 | pushad |
375 | pushad |
375 | 376 | ||
376 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_tabs_pos,2 |
377 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_tabs_pos,2 |
377 | mov [tabs_pos],al |
378 | mov [tabs_pos],al |
378 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_secure_sel,0 |
379 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_secure_sel,0 |
379 | mov [secure_sel],al |
380 | mov [secure_sel],al |
380 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_braces,0 |
381 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_braces,0 |
381 | mov [auto_braces],al |
382 | mov [auto_braces],al |
382 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1 |
383 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1 |
383 | mov [auto_indent],al |
384 | mov [auto_indent],al |
384 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_smart_tab,1 |
385 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_smart_tab,1 |
385 | mov [smart_tab],al |
386 | mov [smart_tab],al |
386 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1 |
387 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1 |
387 | mov [optim_save],al |
388 | mov [optim_save],al |
388 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0 |
389 | invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0 |
389 | mov [line_nums],al |
390 | mov [line_nums],al |
390 | 391 | ||
391 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_text,0x00000000 |
392 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_text,0x00000000 |
392 | mov [color_tbl.text],eax |
393 | mov [color_tbl.text],eax |
393 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_back,0x00ffffff |
394 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_back,0x00ffffff |
394 | mov [color_tbl.back],eax |
395 | mov [color_tbl.back],eax |
395 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_text_sel,0x00ffffff |
396 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_text_sel,0x00ffffff |
396 | mov [color_tbl.text.sel],eax |
397 | mov [color_tbl.text.sel],eax |
397 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_back_sel,0x000a246a |
398 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_back_sel,0x000a246a |
398 | mov [color_tbl.back.sel],eax |
399 | mov [color_tbl.back.sel],eax |
399 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_symbol,0x003030f0 |
400 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_symbol,0x003030f0 |
400 | mov [color_tbl.symbol],eax |
401 | mov [color_tbl.symbol],eax |
401 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_number,0x00009000 |
402 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_number,0x00009000 |
402 | mov [color_tbl.number],eax |
403 | mov [color_tbl.number],eax |
403 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_string,0x00b00000 |
404 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_string,0x00b00000 |
404 | mov [color_tbl.string],eax |
405 | mov [color_tbl.string],eax |
405 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_comment,0x00808080 |
406 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_comment,0x00808080 |
406 | mov [color_tbl.comment],eax |
407 | mov [color_tbl.comment],eax |
407 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_line_moded,0x00ffee62 |
408 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_line_moded,0x00ffee62 |
408 | mov [color_tbl.line.moded],eax |
409 | mov [color_tbl.line.moded],eax |
409 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_line_saved,0x006ce26c |
410 | invoke ini.get_color,ini_path,ini_sec_colors,ini_colors_line_saved,0x006ce26c |
410 | mov [color_tbl.line.saved],eax |
411 | mov [color_tbl.line.saved],eax |
411 | 412 | ||
412 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_left,250 |
413 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_left,250 |
413 | mov [mainwnd_pos.x],eax |
414 | mov [mainwnd_pos.x],eax |
414 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_top,75 |
415 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_top,75 |
415 | mov [mainwnd_pos.y],eax |
416 | mov [mainwnd_pos.y],eax |
416 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_width,6*80+6+SCRLW+5 |
417 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_width,6*80+6+SCRLW+5 |
417 | mov [mainwnd_pos.w],eax |
418 | mov [mainwnd_pos.w],eax |
418 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_height,402 |
419 | invoke ini.get_int,ini_path,ini_sec_window,ini_window_height,402 |
419 | mov [mainwnd_pos.h],eax |
420 | mov [mainwnd_pos.h],eax |
420 | 421 | ||
421 | popad |
422 | popad |
422 | ret |
423 | ret |
423 | endp |
424 | endp |
424 | 425 | ||
425 | ;----------------------------------------------------------------------------- |
426 | ;----------------------------------------------------------------------------- |
426 | proc save_settings ;////////////////////////////////////////////////////////// |
427 | proc save_settings ;////////////////////////////////////////////////////////// |
427 | ;----------------------------------------------------------------------------- |
428 | ;----------------------------------------------------------------------------- |
428 | pushad |
429 | pushad |
429 | 430 | ||
430 | movzx eax,[tabs_pos] |
431 | movzx eax,[tabs_pos] |
431 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_tabs_pos,eax |
432 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_tabs_pos,eax |
432 | movzx eax,[secure_sel] |
433 | movzx eax,[secure_sel] |
433 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_secure_sel,eax |
434 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_secure_sel,eax |
434 | movzx eax,[auto_braces] |
435 | movzx eax,[auto_braces] |
435 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_braces,eax |
436 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_braces,eax |
436 | movzx eax,[auto_indent] |
437 | movzx eax,[auto_indent] |
437 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_indent,eax |
438 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_indent,eax |
438 | movzx eax,[smart_tab] |
439 | movzx eax,[smart_tab] |
439 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_smart_tab,eax |
440 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_smart_tab,eax |
440 | movzx eax,[optim_save] |
441 | movzx eax,[optim_save] |
441 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_optim_save,eax |
442 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_optim_save,eax |
442 | movzx eax,[line_nums] |
443 | movzx eax,[line_nums] |
443 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_line_nums,eax |
444 | invoke ini.set_int,ini_path,ini_sec_options,ini_options_line_nums,eax |
444 | 445 | ||
445 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_text,[color_tbl.text] |
446 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_text,[color_tbl.text] |
446 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_back,[color_tbl.back] |
447 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_back,[color_tbl.back] |
447 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_text_sel,[color_tbl.text.sel] |
448 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_text_sel,[color_tbl.text.sel] |
448 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_back_sel,[color_tbl.back.sel] |
449 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_back_sel,[color_tbl.back.sel] |
449 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_symbol,[color_tbl.symbol] |
450 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_symbol,[color_tbl.symbol] |
450 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_number,[color_tbl.number] |
451 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_number,[color_tbl.number] |
451 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_string,[color_tbl.string] |
452 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_string,[color_tbl.string] |
452 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_comment,[color_tbl.comment] |
453 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_comment,[color_tbl.comment] |
453 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_line_moded,[color_tbl.line.moded] |
454 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_line_moded,[color_tbl.line.moded] |
454 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_line_saved,[color_tbl.line.saved] |
455 | invoke ini.set_color,ini_path,ini_sec_colors,ini_colors_line_saved,[color_tbl.line.saved] |
455 | 456 | ||
456 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_left,[mainwnd_pos.x] |
457 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_left,[mainwnd_pos.x] |
457 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_top,[mainwnd_pos.y] |
458 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_top,[mainwnd_pos.y] |
458 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_width,[mainwnd_pos.w] |
459 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_width,[mainwnd_pos.w] |
459 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_height,[mainwnd_pos.h] |
460 | invoke ini.set_int,ini_path,ini_sec_window,ini_window_height,[mainwnd_pos.h] |
460 | 461 | ||
461 | popad |
462 | popad |
462 | ret |
463 | ret |
463 | endp |
464 | endp |
464 | 465 | ||
465 | ;----------------------------------------------------------------------------- |
466 | ;----------------------------------------------------------------------------- |
466 | proc start_fasm ;///////////////////////////////////////////////////////////// |
467 | proc start_fasm ;///////////////////////////////////////////////////////////// |
467 | ;----------------------------------------------------------------------------- |
468 | ;----------------------------------------------------------------------------- |
468 | ; BL = run after compile |
469 | ; BL = run after compile |
469 | ;----------------------------------------------------------------------------- |
470 | ;----------------------------------------------------------------------------- |
470 | ; FASM infile,outfile,/path/to/files[,run] |
471 | ; FASM infile,outfile,/path/to/files[,run] |
471 | ;----------------------------------------------------------------------------- |
472 | ;----------------------------------------------------------------------------- |
472 | cmp [cur_editor.AsmMode],0 |
473 | cmp [cur_editor.AsmMode],0 |
473 | jne @f |
474 | jne @f |
474 | ret |
475 | ret |
475 | @@: |
476 | @@: |
476 | mov eax,[tab_bar.Default.Ptr] |
477 | mov eax,[tab_bar.Default.Ptr] |
477 | or eax,eax |
478 | or eax,eax |
478 | jnz @f |
479 | jnz @f |
479 | mov eax,[tab_bar.Current.Ptr] |
480 | mov eax,[tab_bar.Current.Ptr] |
480 | @@: cmp byte[eax+TABITEM.Editor.FilePath],'/' |
481 | @@: cmp byte[eax+TABITEM.Editor.FilePath],'/' |
481 | je @f |
482 | je @f |
482 | ret |
483 | ret |
483 | @@: |
484 | @@: |
484 | mov edi,fasm_parameters |
485 | mov edi,fasm_parameters |
485 | push eax |
486 | push eax |
486 | 487 | ||
487 | cld |
488 | cld |
488 | 489 | ||
489 | lea esi,[eax+TABITEM.Editor.FilePath] |
490 | lea esi,[eax+TABITEM.Editor.FilePath] |
490 | add esi,[eax+TABITEM.Editor.FileName] |
491 | add esi,[eax+TABITEM.Editor.FileName] |
491 | push esi esi |
492 | push esi esi |
492 | @@: lodsb |
493 | @@: lodsb |
493 | cmp al,0 |
494 | cmp al,0 |
494 | je @f |
495 | je @f |
495 | stosb |
496 | stosb |
496 | cmp al,'.' |
497 | cmp al,'.' |
497 | jne @b |
498 | jne @b |
498 | mov ecx,esi |
499 | mov ecx,esi |
499 | jmp @b |
500 | jmp @b |
500 | @@: |
501 | @@: |
501 | mov al,',' |
502 | mov al,',' |
502 | stosb |
503 | stosb |
503 | 504 | ||
504 | pop esi |
505 | pop esi |
505 | sub ecx,esi |
506 | sub ecx,esi |
506 | dec ecx |
507 | dec ecx |
507 | jz @f |
508 | jz @f |
508 | rep movsb |
509 | rep movsb |
509 | @@: |
510 | @@: |
510 | mov al,',' |
511 | mov al,',' |
511 | stosb |
512 | stosb |
512 | 513 | ||
513 | pop ecx esi |
514 | pop ecx esi |
514 | add esi,TABITEM.Editor.FilePath |
515 | add esi,TABITEM.Editor.FilePath |
515 | sub ecx,esi |
516 | sub ecx,esi |
516 | rep movsb |
517 | rep movsb |
517 | 518 | ||
518 | cmp bl,0 ; run outfile ? |
519 | cmp bl,0 ; run outfile ? |
519 | je @f |
520 | je @f |
520 | mov dword[edi],',run' |
521 | mov dword[edi],',run' |
521 | add edi,4 |
522 | add edi,4 |
522 | @@: |
523 | @@: |
523 | mov al,0 |
524 | mov al,0 |
524 | stosb |
525 | stosb |
525 | 526 | ||
526 | mov [app_start.filename],app_fasm |
527 | mov [app_start.filename],app_fasm |
527 | mov [app_start.params],fasm_parameters |
528 | mov [app_start.params],fasm_parameters |
528 | start_ret: |
529 | start_ret: |
529 | mcall 70,app_start |
530 | mcall 70,app_start |
530 | ret |
531 | ret |
531 | endp |
532 | endp |
532 | 533 | ||
533 | ;----------------------------------------------------------------------------- |
534 | ;----------------------------------------------------------------------------- |
534 | proc open_debug_board ;/////////////////////////////////////////////////////// |
535 | proc open_debug_board ;/////////////////////////////////////////////////////// |
535 | ;----------------------------------------------------------------------------- |
536 | ;----------------------------------------------------------------------------- |
536 | mov [app_start.filename],app_board |
537 | mov [app_start.filename],app_board |
537 | mov [app_start.params],0 |
538 | mov [app_start.params],0 |
538 | jmp start_ret |
539 | jmp start_ret |
539 | endp |
540 | endp |
540 | 541 | ||
541 | ;----------------------------------------------------------------------------- |
542 | ;----------------------------------------------------------------------------- |
542 | proc open_sysfuncs_txt ;////////////////////////////////////////////////////// |
543 | proc open_sysfuncs_txt ;////////////////////////////////////////////////////// |
543 | ;----------------------------------------------------------------------------- |
544 | ;----------------------------------------------------------------------------- |
544 | mov [app_start.filename],app_docpak |
545 | mov [app_start.filename],app_docpak |
545 | mov [app_start.params],sysfuncs_param |
546 | mov [app_start.params],sysfuncs_param |
546 | call start_ret |
547 | call start_ret |
547 | cmp eax,0xfffffff0 |
548 | cmp eax,0xfffffff0 |
548 | jb @f |
549 | jb @f |
549 | mov [app_start.filename],app_tinypad |
550 | mov [app_start.filename],app_tinypad |
550 | mov [app_start.params],sysfuncs_filename |
551 | mov [app_start.params],sysfuncs_filename |
551 | call start_ret |
552 | call start_ret |
552 | @@: ret |
553 | @@: ret |
553 | endp |
554 | endp |
554 | 555 | ||
555 | set_opt: |
556 | set_opt: |
556 | 557 | ||
557 | .dialog: |
558 | .dialog: |
558 | mov [bot_mode],1 |
559 | mov [bot_mode],1 |
559 | mov [bot_dlg_height],128 |
560 | mov [bot_dlg_height],128 |
560 | mov [bot_dlg_handler],optsdlg_handler |
561 | mov [bot_dlg_handler],optsdlg_handler |
561 | mov [focused_tb],tb_color |
562 | mov [focused_tb],tb_color |
562 | mov al,[tb_color.length] |
563 | mov al,[tb_color.length] |
563 | mov [tb_color.pos.x],al |
564 | mov [tb_color.pos.x],al |
564 | mov [tb_color.sel.x],0 |
565 | mov [tb_color.sel.x],0 |
565 | mov [tb_casesen],1 |
566 | mov [tb_casesen],1 |
566 | mov [cur_part],0 |
567 | mov [cur_part],0 |
567 | m2m [cur_color],dword[color_tbl.text] |
568 | m2m [cur_color],dword[color_tbl.text] |
568 | mov esi,color_tbl |
569 | mov esi,color_tbl |
569 | mov edi,cur_colors |
570 | mov edi,cur_colors |
570 | mov ecx,10 |
571 | mov ecx,10 |
571 | cld |
572 | cld |
572 | rep movsd |
573 | rep movsd |
573 | call drawwindow |
574 | call drawwindow |
574 | ret |
575 | ret |
575 | 576 | ||
576 | .line_numbers: |
577 | .line_numbers: |
577 | xor [line_nums],1 |
578 | xor [line_nums],1 |
578 | ret |
579 | ret |
579 | .optimal_fill: |
580 | .optimal_fill: |
580 | xor [optim_save],1 |
581 | xor [optim_save],1 |
581 | ret |
582 | ret |
582 | .auto_indents: |
583 | .auto_indents: |
583 | xor [auto_indent],1 |
584 | xor [auto_indent],1 |
584 | ret |
585 | ret |
585 | .auto_braces: |
586 | .auto_braces: |
586 | xor [auto_braces],1 |
587 | xor [auto_braces],1 |
587 | ret |
588 | ret |
588 | .secure_sel: |
589 | .secure_sel: |
589 | xor [secure_sel],1 |
590 | xor [secure_sel],1 |
590 | ret |
591 | ret |
591 | 592 | ||
592 | ;----------------------------------------------------------------------------- |
593 | ;----------------------------------------------------------------------------- |
593 | 594 | ||
594 | include 'data/tp-defines.inc' |
595 | include 'data/tp-defines.inc' |
595 | 596 | ||
596 | include 'tp-draw.asm' |
597 | include 'tp-draw.asm' |
597 | include 'tp-key.asm' |
598 | include 'tp-key.asm' |
598 | include 'tp-button.asm' |
599 | include 'tp-button.asm' |
599 | include 'tp-mouse.asm' |
600 | include 'tp-mouse.asm' |
600 | include 'tp-files.asm' |
601 | include 'tp-files.asm' |
601 | include 'tp-common.asm' |
602 | include 'tp-common.asm' |
602 | include 'tp-dialog.asm' |
603 | include 'tp-dialog.asm' |
603 | include 'tp-popup.asm' |
604 | include 'tp-popup.asm' |
604 | include 'tp-tbox.asm' |
605 | include 'tp-tbox.asm' |
605 | include 'tp-tabctl.asm' |
606 | include 'tp-tabctl.asm' |
606 | include 'tp-editor.asm' |
607 | include 'tp-editor.asm' |
607 | include 'tp-recode.asm' |
608 | include 'tp-recode.asm' |
608 | 609 | ||
609 | include 'external/dll.inc' |
610 | include 'external/dll.inc' |
610 | 611 | ||
611 | ;----------------------------------------------------------------------------- |
612 | ;----------------------------------------------------------------------------- |
612 | section @DATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
613 | section @DATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
613 | ;----------------------------------------------------------------------------- |
614 | ;----------------------------------------------------------------------------- |
614 | 615 | ||
615 | ;include_debug_strings |
616 | ;include_debug_strings |
616 | 617 | ||
617 | include 'data/tp-idata.inc' |
618 | include 'data/tp-idata.inc' |
618 | 619 | ||
619 | ;----------------------------------------------------------------------------- |
620 | ;----------------------------------------------------------------------------- |
620 | section @IMPORT ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
621 | section @IMPORT ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
621 | ;----------------------------------------------------------------------------- |
622 | ;----------------------------------------------------------------------------- |
622 | 623 | ||
623 | library \ |
624 | library \ |
624 | libini,'libini.obj',\ |
625 | libini,'libini.obj',\ |
625 | libio,'libio.obj',\ |
626 | libio,'libio.obj',\ |
626 | libgfx,'libgfx.obj',\ |
627 | libgfx,'libgfx.obj',\ |
627 | proc_lib,'proc_lib.obj' |
628 | proc_lib,'proc_lib.obj' |
628 | 629 | ||
629 | import libini, \ |
630 | import libini, \ |
630 | ini.get_str ,'ini_get_str',\ |
631 | ini.get_str ,'ini_get_str',\ |
631 | ini.set_str ,'ini_set_str',\ |
632 | ini.set_str ,'ini_set_str',\ |
632 | ini.get_int ,'ini_get_int',\ |
633 | ini.get_int ,'ini_get_int',\ |
633 | ini.set_int ,'ini_set_int',\ |
634 | ini.set_int ,'ini_set_int',\ |
634 | ini.get_color,'ini_get_color',\ |
635 | ini.get_color,'ini_get_color',\ |
635 | ini.set_color,'ini_set_color' |
636 | ini.set_color,'ini_set_color' |
636 | 637 | ||
637 | import libio, \ |
638 | import libio, \ |
638 | file.find_first,'file_find_first',\ |
639 | file.find_first,'file_find_first',\ |
639 | file.find_next ,'file_find_next',\ |
640 | file.find_next ,'file_find_next',\ |
640 | file.find_close,'file_find_close',\ |
641 | file.find_close,'file_find_close',\ |
641 | file.size ,'file_size',\ |
642 | file.size ,'file_size',\ |
642 | file.open ,'file_open',\ |
643 | file.open ,'file_open',\ |
643 | file.read ,'file_read',\ |
644 | file.read ,'file_read',\ |
644 | file.write ,'file_write',\ |
645 | file.write ,'file_write',\ |
645 | file.seek ,'file_seek',\ |
646 | file.seek ,'file_seek',\ |
646 | file.tell ,'file_tell',\ |
647 | file.tell ,'file_tell',\ |
647 | file.eof? ,'file_iseof',\ |
648 | file.eof? ,'file_iseof',\ |
648 | file.truncate ,'file_truncate',\ |
649 | file.truncate ,'file_truncate',\ |
649 | file.close ,'file_close' |
650 | file.close ,'file_close' |
650 | 651 | ||
651 | import libgfx, \ |
652 | import libgfx, \ |
652 | gfx.open ,'gfx_open',\ |
653 | gfx.open ,'gfx_open',\ |
653 | gfx.close ,'gfx_close',\ |
654 | gfx.close ,'gfx_close',\ |
654 | gfx.pen.color ,'gfx_pen_color',\ |
655 | gfx.pen.color ,'gfx_pen_color',\ |
655 | gfx.brush.color ,'gfx_brush_color',\ |
656 | gfx.brush.color ,'gfx_brush_color',\ |
656 | gfx.pixel ,'gfx_pixel',\ |
657 | gfx.pixel ,'gfx_pixel',\ |
657 | gfx.move.to ,'gfx_move_to',\ |
658 | gfx.move.to ,'gfx_move_to',\ |
658 | gfx.line.to ,'gfx_line_to',\ |
659 | gfx.line.to ,'gfx_line_to',\ |
659 | gfx.line ,'gfx_line',\ |
660 | gfx.line ,'gfx_line',\ |
660 | gfx.polyline ,'gfx_polyline',\ |
661 | gfx.polyline ,'gfx_polyline',\ |
661 | gfx.polyline.to ,'gfx_polyline_to',\ |
662 | gfx.polyline.to ,'gfx_polyline_to',\ |
662 | gfx.fillrect ,'gfx_fillrect',\ |
663 | gfx.fillrect ,'gfx_fillrect',\ |
663 | gfx.fillrect.ex ,'gfx_fillrect_ex',\ |
664 | gfx.fillrect.ex ,'gfx_fillrect_ex',\ |
664 | gfx.framerect ,'gfx_framerect',\ |
665 | gfx.framerect ,'gfx_framerect',\ |
665 | gfx.framerect.ex,'gfx_framerect_ex',\ |
666 | gfx.framerect.ex,'gfx_framerect_ex',\ |
666 | gfx.rectangle ,'gfx_rectangle',\ |
667 | gfx.rectangle ,'gfx_rectangle',\ |
667 | gfx.rectangle.ex,'gfx_rectangle_ex' |
668 | gfx.rectangle.ex,'gfx_rectangle_ex' |
668 | 669 | ||
669 | import proc_lib, \ |
670 | import proc_lib, \ |
670 | OpenDialog_Init ,'OpenDialog_init',\ |
671 | OpenDialog_Init ,'OpenDialog_init',\ |
671 | OpenDialog_Start ,'OpenDialog_start' |
672 | OpenDialog_Start ,'OpenDialog_start' |
672 | 673 | ||
673 | TINYPAD_END: ; end of file |
674 | TINYPAD_END: ; end of file |
674 | 675 | ||
675 | ;----------------------------------------------------------------------------- |
676 | ;----------------------------------------------------------------------------- |
676 | section @UDATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
677 | section @UDATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
677 | ;----------------------------------------------------------------------------- |
678 | ;----------------------------------------------------------------------------- |
678 | 679 | ||
679 | include 'data/tp-udata.inc' |
680 | include 'data/tp-udata.inc' |
680 | 681 | ||
681 | ;----------------------------------------------------------------------------- |
682 | ;----------------------------------------------------------------------------- |
682 | section @PARAMS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
683 | section @PARAMS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
683 | ;----------------------------------------------------------------------------- |
684 | ;----------------------------------------------------------------------------- |
684 | 685 | ||
685 | fasm_parameters: |
686 | fasm_parameters: |
686 | 687 | ||
687 | p_info process_information |
688 | p_info process_information |
688 | p_info2 process_information |
689 | p_info2 process_information |
689 | sc system_colors |
690 | sc system_colors |
690 | 691 | ||
691 | ini_path rb PATHL |
692 | ini_path rb PATHL |
692 | 693 | ||
693 | ;--------------------------------------------------------------------- |
694 | ;--------------------------------------------------------------------- |
694 | temp_dir_pach: |
695 | temp_dir_pach: |
695 | rb 4096 |
696 | rb 4096 |
696 | ;--------------------------------------------------------------------- |
697 | ;--------------------------------------------------------------------- |
697 | fname_Info: |
698 | fname_Info: |
698 | rb 4096 ; filename |
699 | rb 4096 ; filename |
699 | ;--------------------------------------------------------------------- |
700 | ;--------------------------------------------------------------------- |
700 | filename_area: |
701 | filename_area: |
701 | rb 256 |
702 | rb 256 |
702 | ;--------------------------------------------------------------------- |
703 | ;--------------------------------------------------------------------- |
703 | rb 1024*4 |
704 | rb 1024*4 |
704 | MAIN_STACK: |
705 | MAIN_STACK: |
705 | rb 1024*4 |
706 | rb 1024*4 |
706 | POPUP_STACK: |
707 | POPUP_STACK: |
707 | 708 | ||
708 | STATIC_MEM_END: |
709 | STATIC_MEM_END: |
709 | 710 | ||
710 | diff10 'Main memory size',0,$ |
711 | diff10 'Main memory size',0,$ |