Subversion Repositories Kolibri OS

Rev

Rev 7996 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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