Subversion Repositories Kolibri OS

Rev

Rev 1702 | Rev 3279 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 3014
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 '../../../config.inc'		;for nightbuild
26
include '../../../macros.inc'		; useful stuff
26
include '../../../macros.inc'		; useful stuff
27
include '../../../struct.inc'
27
include '../../../struct.inc'
28
include '../../../proc32.inc'
28
include '../../../proc32.inc'
29
 
29
 
30
include 'external/libio.inc'
30
include 'external/libio.inc'
31
 
31
 
32
include 'tinypad.inc'
32
include 'tinypad.inc'
33
 
33
 
34
;purge mov,add,sub            ;  SPEED
34
;purge mov,add,sub            ;  SPEED
35
 
35
 
36
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
37
 
37
 
38
APP_VERSION equ 'SVN (4.0.6)'
38
APP_VERSION equ 'SVN (4.0.6)'
39
 
39
 
40
TRUE = 1
40
TRUE = 1
41
FALSE = 0
41
FALSE = 0
42
 
42
 
43
;include 'debug.inc'
43
;include 'debug.inc'
44
;define __DEBUG__ 1
44
;define __DEBUG__ 1
45
;define __DEBUG_LEVEL__ 1
45
;define __DEBUG_LEVEL__ 1
46
;include 'debug-fdo.inc'
46
;include 'debug-fdo.inc'
47
 
47
 
48
; compiled-in options
48
; compiled-in options
49
 
49
 
50
ASEPC = '-'  ; separator character (char)
50
ASEPC = '-'  ; separator character (char)
51
ATOPH = 19   ; menu bar height (pixels)
51
ATOPH = 19   ; menu bar height (pixels)
52
SCRLW = 16   ; scrollbar widht/height (pixels)
52
SCRLW = 16   ; scrollbar widht/height (pixels)
53
ATABW = 8    ; tab key indent width (chars)
53
ATABW = 8    ; tab key indent width (chars)
54
LINEH = 10   ; line height (pixels)
54
LINEH = 10   ; line height (pixels)
55
PATHL = 256  ; maximum path length (chars) !!! don't change !!!
55
PATHL = 256  ; maximum path length (chars) !!! don't change !!!
56
AMINS = 8    ; minimal scroll thumb size (pixels)
56
AMINS = 8    ; minimal scroll thumb size (pixels)
57
LCHGW = 3    ; changed/saved marker width (pixels)
57
LCHGW = 3    ; changed/saved marker width (pixels)
58
 
58
 
59
STATH = 16   ; status bar height (pixels)
59
STATH = 16   ; status bar height (pixels)
60
TBARH = 18   ; tab bar height (pixels)
60
TBARH = 18   ; tab bar height (pixels)
61
 
61
 
62
INI_SEC_PREFIX equ ''
62
INI_SEC_PREFIX equ ''
63
 
63
 
64
;-----------------------------------------------------------------------------
64
;-----------------------------------------------------------------------------
65
section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
65
section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
66
;-----------------------------------------------------------------------------
66
;-----------------------------------------------------------------------------
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
	cmp	[main_closed],0
217
	cmp	[main_closed],0
218
	jne	key.alt_x
218
	jne	key.alt_x
219
	dec	eax	; redraw ?
219
	dec	eax	; redraw ?
220
	jz	red
220
	jz	red
221
	dec	eax	; key ?
221
	dec	eax	; key ?
222
	jz	key
222
	jz	key
223
	dec	eax	; button ?
223
	dec	eax	; button ?
224
	jz	button
224
	jz	button
225
	sub	eax,3	; mouse ?
225
	sub	eax,3	; mouse ?
226
	jz	mouse
226
	jz	mouse
227
 
227
 
228
	jmp	still.skip_write
228
	jmp	still.skip_write
229
;---------------------------------------------------------------------
229
;---------------------------------------------------------------------
230
.open_dialog:
230
.open_dialog:
231
	pusha
231
	pusha
232
 
232
 
233
	call	btn.bot.cancel
233
	call	btn.bot.cancel
234
 
234
 
235
	mov	esi,tb_opensave.text
235
	mov	esi,tb_opensave.text
236
	mov	edi,[OpenDialog_data.openfile_pach]
236
	mov	edi,[OpenDialog_data.openfile_pach]
237
	movzx	ecx,[tb_opensave.length]
237
	movzx	ecx,[tb_opensave.length]
238
	mov	edx,[OpenDialog_data.filename_area]
238
	mov	edx,[OpenDialog_data.filename_area]
239
	mov	ebx,[OpenDialog_data.opendir_pach]
239
	mov	ebx,[OpenDialog_data.opendir_pach]
240
	call	copy_str_2
240
	call	copy_str_2
241
	movzx	eax,byte [bot_mode2]
241
	movzx	eax,byte [bot_mode2]
242
	mov	[OpenDialog_data.type],eax
242
	mov	[OpenDialog_data.type],eax
243
	popa
243
	popa
244
; invoke OpenDialog
244
; invoke OpenDialog
245
	push    dword OpenDialog_data
245
	push    dword OpenDialog_data
246
	call    [OpenDialog_Start]
246
	call    [OpenDialog_Start]
247
 
247
 
248
	cmp	[OpenDialog_data.status],1
248
	cmp	[OpenDialog_data.status],1
249
	jne	.3
249
	jne	.3
250
 
250
 
251
	pusha
251
	pusha
252
	mov	edi,tb_opensave.text
252
	mov	edi,tb_opensave.text
253
	mov	esi,[OpenDialog_data.openfile_pach]
253
	mov	esi,[OpenDialog_data.openfile_pach]
254
	call	copy_str_1
254
	call	copy_str_1
255
	sub	edi,tb_opensave.text
255
	sub	edi,tb_opensave.text
256
	dec	edi
256
	dec	edi
257
	mov	eax,edi
257
	mov	eax,edi
258
	mov	[tb_opensave.length],al
258
	mov	[tb_opensave.length],al
259
	popa
259
	popa
260
	
260
	
261
	cmp	[bot_mode2],0
261
	cmp	[bot_mode2],0
262
	je	.2
262
	je	.2
263
	call	save_file
263
	call	save_file
264
	jmp	.3
264
	jmp	.3
265
.2:
265
.2:
266
	call	load_file
266
	call	load_file
267
.3:
267
.3:
268
	mov	[open_dialog],0
268
	mov	[open_dialog],0
269
	jmp	red
269
	jmp	red
270
;-----------------------------------------------------------------------------
270
;-----------------------------------------------------------------------------
271
draw_window_for_OD:
271
draw_window_for_OD:
272
	call	drawwindow
272
	call	drawwindow
273
	call	draw_statusbar
273
	call	draw_statusbar
274
	ret
274
	ret
275
;-----------------------------------------------------------------------------
275
;-----------------------------------------------------------------------------
276
copy_str_2:
276
copy_str_2:
277
	cld
277
	cld
278
	push	esi ecx
278
	push	esi ecx
279
	rep	movsb	; edi  openfile_pach
279
	rep	movsb	; edi  openfile_pach
280
	xor	eax,eax
280
	xor	eax,eax
281
	mov	[edi],al
281
	mov	[edi],al
282
	pop	ecx esi
282
	pop	ecx esi
283
	mov	edi,ebx
283
	mov	edi,ebx
284
	rep	movsb	; edi opendir_pach
284
	rep	movsb	; edi opendir_pach
285
	mov	[edi],al
285
	mov	[edi],al
286
	mov	esi,edi
286
	mov	esi,edi
287
	std
287
	std
288
@@:
288
@@:
289
	lodsb
289
	lodsb
290
	cmp	al,byte '/'
290
	cmp	al,byte '/'
291
	jne	@b
291
	jne	@b
292
	inc	esi
292
	inc	esi
293
	xor	eax,eax
293
	xor	eax,eax
294
	mov	[esi],al
294
	mov	[esi],al
295
	inc	esi
295
	inc	esi
296
	mov	edi,edx	; edi filename_area
296
	mov	edi,edx	; edi filename_area
297
	call	copy_str_1
297
	call	copy_str_1
298
	ret
298
	ret
299
;-----------------------------------------------------------------------------
299
;-----------------------------------------------------------------------------
300
copy_str_1:
300
copy_str_1:
301
	xor	eax,eax
301
	xor	eax,eax
302
	cld
302
	cld
303
@@:
303
@@:
304
	lodsb
304
	lodsb
305
	stosb
305
	stosb
306
	test	eax,eax
306
	test	eax,eax
307
	jnz	@b
307
	jnz	@b
308
	ret
308
	ret
309
;-----------------------------------------------------------------------------
309
;-----------------------------------------------------------------------------
310
proc get_event ctx ;//////////////////////////////////////////////////////////
310
proc get_event ctx ;//////////////////////////////////////////////////////////
311
;-----------------------------------------------------------------------------
311
;-----------------------------------------------------------------------------
312
	mcall	10
312
	mcall	10
313
	dec	eax	; redraw ?
313
	dec	eax	; redraw ?
314
	jz	.redraw
314
	jz	.redraw
315
	dec	eax	; key ?
315
	dec	eax	; key ?
316
	jz	.key
316
	jz	.key
317
	dec	eax	; button ?
317
	dec	eax	; button ?
318
	jz	.button
318
	jz	.button
319
	sub	eax,2	; background ?
319
	sub	eax,2	; background ?
320
	jz	.background
320
	jz	.background
321
	dec	eax	; mouse ?
321
	dec	eax	; mouse ?
322
	jz	.mouse
322
	jz	.mouse
323
	dec	eax	; ipc ?
323
	dec	eax	; ipc ?
324
	jz	.ipc
324
	jz	.ipc
325
	dec	eax	; network ?
325
	dec	eax	; network ?
326
	jz	.network
326
	jz	.network
327
	dec	eax	; debug ?
327
	dec	eax	; debug ?
328
	jz	.debug
328
	jz	.debug
329
	sub	eax,7	; irq ?
329
	sub	eax,7	; irq ?
330
	js	.nothing
330
	js	.nothing
331
	cmp	eax,15
331
	cmp	eax,15
332
	jg	.nothing
332
	jg	.nothing
333
	jmp	.irq
333
	jmp	.irq
334
 
334
 
335
  .nothing:
335
  .nothing:
336
	mov	eax,EV_IDLE
336
	mov	eax,EV_IDLE
337
	ret
337
	ret
338
 
338
 
339
  .redraw:
339
  .redraw:
340
	mov	eax,EV_REDRAW
340
	mov	eax,EV_REDRAW
341
	ret
341
	ret
342
 
342
 
343
  .key:
343
  .key:
344
	mov	eax,EV_KEY
344
	mov	eax,EV_KEY
345
	ret
345
	ret
346
 
346
 
347
  .button:
347
  .button:
348
	mov	eax,EV_BUTTON
348
	mov	eax,EV_BUTTON
349
	ret
349
	ret
350
 
350
 
351
  .background:
351
  .background:
352
	mov	eax,EV_BACKGROUND
352
	mov	eax,EV_BACKGROUND
353
	ret
353
	ret
354
 
354
 
355
  .mouse:
355
  .mouse:
356
	mov	eax,EV_MOUSE
356
	mov	eax,EV_MOUSE
357
	ret
357
	ret
358
 
358
 
359
  .ipc:
359
  .ipc:
360
	mov	eax,EV_IPC
360
	mov	eax,EV_IPC
361
	ret
361
	ret
362
 
362
 
363
  .network:
363
  .network:
364
	mov	eax,EV_NETWORK
364
	mov	eax,EV_NETWORK
365
	ret
365
	ret
366
 
366
 
367
  .debug:
367
  .debug:
368
	mov	eax,EV_DEBUG
368
	mov	eax,EV_DEBUG
369
	ret
369
	ret
370
endp
370
endp
371
 
371
 
372
;-----------------------------------------------------------------------------
372
;-----------------------------------------------------------------------------
373
proc load_settings ;//////////////////////////////////////////////////////////
373
proc load_settings ;//////////////////////////////////////////////////////////
374
;-----------------------------------------------------------------------------
374
;-----------------------------------------------------------------------------
375
	pushad
375
	pushad
376
 
376
 
377
	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
378
	mov	[tabs_pos],al
378
	mov	[tabs_pos],al
379
	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
380
	mov	[secure_sel],al
380
	mov	[secure_sel],al
381
	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
382
	mov	[auto_braces],al
382
	mov	[auto_braces],al
383
	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
384
	mov	[auto_indent],al
384
	mov	[auto_indent],al
385
	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
386
	mov	[smart_tab],al
386
	mov	[smart_tab],al
387
	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
388
	mov	[optim_save],al
388
	mov	[optim_save],al
389
	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
390
	mov	[line_nums],al
390
	mov	[line_nums],al
391
 
391
 
392
	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
393
	mov	[color_tbl.text],eax
393
	mov	[color_tbl.text],eax
394
	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
395
	mov	[color_tbl.back],eax
395
	mov	[color_tbl.back],eax
396
	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
397
	mov	[color_tbl.text.sel],eax
397
	mov	[color_tbl.text.sel],eax
398
	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
399
	mov	[color_tbl.back.sel],eax
399
	mov	[color_tbl.back.sel],eax
400
	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
401
	mov	[color_tbl.symbol],eax
401
	mov	[color_tbl.symbol],eax
402
	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
403
	mov	[color_tbl.number],eax
403
	mov	[color_tbl.number],eax
404
	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
405
	mov	[color_tbl.string],eax
405
	mov	[color_tbl.string],eax
406
	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
407
	mov	[color_tbl.comment],eax
407
	mov	[color_tbl.comment],eax
408
	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
409
	mov	[color_tbl.line.moded],eax
409
	mov	[color_tbl.line.moded],eax
410
	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
411
	mov	[color_tbl.line.saved],eax
411
	mov	[color_tbl.line.saved],eax
412
 
412
 
413
	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
414
	mov	[mainwnd_pos.x],eax
414
	mov	[mainwnd_pos.x],eax
415
	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
416
	mov	[mainwnd_pos.y],eax
416
	mov	[mainwnd_pos.y],eax
417
	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
418
	mov	[mainwnd_pos.w],eax
418
	mov	[mainwnd_pos.w],eax
419
	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
420
	mov	[mainwnd_pos.h],eax
420
	mov	[mainwnd_pos.h],eax
421
 
421
 
422
	popad
422
	popad
423
	ret
423
	ret
424
endp
424
endp
425
 
425
 
426
;-----------------------------------------------------------------------------
426
;-----------------------------------------------------------------------------
427
proc save_settings ;//////////////////////////////////////////////////////////
427
proc save_settings ;//////////////////////////////////////////////////////////
428
;-----------------------------------------------------------------------------
428
;-----------------------------------------------------------------------------
429
	pushad
429
	pushad
430
 
430
 
431
	movzx	eax,[tabs_pos]
431
	movzx	eax,[tabs_pos]
432
	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
433
	movzx	eax,[secure_sel]
433
	movzx	eax,[secure_sel]
434
	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
435
	movzx	eax,[auto_braces]
435
	movzx	eax,[auto_braces]
436
	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
437
	movzx	eax,[auto_indent]
437
	movzx	eax,[auto_indent]
438
	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
439
	movzx	eax,[smart_tab]
439
	movzx	eax,[smart_tab]
440
	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
441
	movzx	eax,[optim_save]
441
	movzx	eax,[optim_save]
442
	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
443
	movzx	eax,[line_nums]
443
	movzx	eax,[line_nums]
444
	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
445
 
445
 
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_text,[color_tbl.text]
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_back,[color_tbl.back]
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_text_sel,[color_tbl.text.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_back_sel,[color_tbl.back.sel]
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_symbol,[color_tbl.symbol]
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_number,[color_tbl.number]
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_string,[color_tbl.string]
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_comment,[color_tbl.comment]
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_moded,[color_tbl.line.moded]
455
	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]
456
 
456
 
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_left,[mainwnd_pos.x]
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_top,[mainwnd_pos.y]
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_width,[mainwnd_pos.w]
460
	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]
461
 
461
 
462
	popad
462
	popad
463
	ret
463
	ret
464
endp
464
endp
465
 
465
 
466
;-----------------------------------------------------------------------------
466
;-----------------------------------------------------------------------------
467
proc start_fasm ;/////////////////////////////////////////////////////////////
467
proc start_fasm ;/////////////////////////////////////////////////////////////
468
;-----------------------------------------------------------------------------
468
;-----------------------------------------------------------------------------
469
; BL = run after compile
469
; BL = run after compile
470
;-----------------------------------------------------------------------------
470
;-----------------------------------------------------------------------------
471
; FASM infile,outfile,/path/to/files[,run]
471
; FASM infile,outfile,/path/to/files[,run]
472
;-----------------------------------------------------------------------------
472
;-----------------------------------------------------------------------------
473
	cmp	[cur_editor.AsmMode],0
473
	cmp	[cur_editor.AsmMode],0
474
	jne	@f
474
	jne	@f
475
	ret
475
	ret
476
    @@:
476
    @@:
477
	mov	eax,[tab_bar.Default.Ptr]
477
	mov	eax,[tab_bar.Default.Ptr]
478
	or	eax,eax
478
	or	eax,eax
479
	jnz	@f
479
	jnz	@f
480
	mov	eax,[tab_bar.Current.Ptr]
480
	mov	eax,[tab_bar.Current.Ptr]
481
    @@: cmp	byte[eax+TABITEM.Editor.FilePath],'/'
481
    @@: cmp	byte[eax+TABITEM.Editor.FilePath],'/'
482
	je	@f
482
	je	@f
483
	ret
483
	ret
484
    @@:
484
    @@:
485
	mov	edi,fasm_parameters
485
	mov	edi,fasm_parameters
486
	push	eax
486
	push	eax
487
 
487
 
488
	cld
488
	cld
489
 
489
 
490
	lea	esi,[eax+TABITEM.Editor.FilePath]
490
	lea	esi,[eax+TABITEM.Editor.FilePath]
491
	add	esi,[eax+TABITEM.Editor.FileName]
491
	add	esi,[eax+TABITEM.Editor.FileName]
492
	push	esi esi
492
	push	esi esi
493
    @@: lodsb
493
    @@: lodsb
494
	cmp	al,0
494
	cmp	al,0
495
	je	@f
495
	je	@f
496
	stosb
496
	stosb
497
	cmp	al,'.'
497
	cmp	al,'.'
498
	jne	@b
498
	jne	@b
499
	mov	ecx,esi
499
	mov	ecx,esi
500
	jmp	@b
500
	jmp	@b
501
    @@:
501
    @@:
502
	mov	al,','
502
	mov	al,','
503
	stosb
503
	stosb
504
 
504
 
505
	pop	esi
505
	pop	esi
506
	sub	ecx,esi
506
	sub	ecx,esi
507
	dec	ecx
507
	dec	ecx
508
	jz	@f
508
	jz	@f
509
	rep	movsb
509
	rep	movsb
510
    @@:
510
    @@:
511
	mov	al,','
511
	mov	al,','
512
	stosb
512
	stosb
513
 
513
 
514
	pop	ecx esi
514
	pop	ecx esi
515
	add	esi,TABITEM.Editor.FilePath
515
	add	esi,TABITEM.Editor.FilePath
516
	sub	ecx,esi
516
	sub	ecx,esi
517
	rep	movsb
517
	rep	movsb
518
 
518
 
519
	cmp	bl,0 ; run outfile ?
519
	cmp	bl,0 ; run outfile ?
520
	je	@f
520
	je	@f
521
	mov	dword[edi],',run'
521
	mov	dword[edi],',run'
522
	add	edi,4
522
	add	edi,4
523
    @@:
523
    @@:
524
	mov	al,0
524
	mov	al,0
525
	stosb
525
	stosb
526
 
526
 
527
	mov	[app_start.filename],app_fasm
527
	mov	[app_start.filename],app_fasm
528
	mov	[app_start.params],fasm_parameters
528
	mov	[app_start.params],fasm_parameters
529
start_ret:
529
start_ret:
530
	mcall	70,app_start
530
	mcall	70,app_start
531
	ret
531
	ret
532
endp
532
endp
533
 
533
 
534
;-----------------------------------------------------------------------------
534
;-----------------------------------------------------------------------------
535
proc open_debug_board ;///////////////////////////////////////////////////////
535
proc open_debug_board ;///////////////////////////////////////////////////////
536
;-----------------------------------------------------------------------------
536
;-----------------------------------------------------------------------------
537
	mov	[app_start.filename],app_board
537
	mov	[app_start.filename],app_board
538
	mov	[app_start.params],0
538
	mov	[app_start.params],0
539
	jmp	start_ret
539
	jmp	start_ret
540
endp
540
endp
541
 
541
 
542
;-----------------------------------------------------------------------------
542
;-----------------------------------------------------------------------------
543
proc open_sysfuncs_txt ;//////////////////////////////////////////////////////
543
proc open_sysfuncs_txt ;//////////////////////////////////////////////////////
544
;-----------------------------------------------------------------------------
544
;-----------------------------------------------------------------------------
545
	mov	[app_start.filename],app_docpak
545
	mov	[app_start.filename],app_docpak
546
	mov	[app_start.params],sysfuncs_param
546
	mov	[app_start.params],sysfuncs_param
547
	call	start_ret
547
	call	start_ret
548
	cmp	eax,0xfffffff0
548
	cmp	eax,0xfffffff0
549
	jb	@f
549
	jb	@f
550
	mov	[app_start.filename],app_tinypad
550
	mov	[app_start.filename],app_tinypad
551
	mov	[app_start.params],sysfuncs_filename
551
	mov	[app_start.params],sysfuncs_filename
552
	call	start_ret
552
	call	start_ret
553
    @@: ret
553
    @@: ret
554
endp
554
endp
555
 
555
 
556
set_opt:
556
set_opt:
557
 
557
 
558
  .dialog:
558
  .dialog:
559
	mov	[bot_mode],1
559
	mov	[bot_mode],1
560
	mov	[bot_dlg_height],128
560
	mov	[bot_dlg_height],128
561
	mov	[bot_dlg_handler],optsdlg_handler
561
	mov	[bot_dlg_handler],optsdlg_handler
562
	mov	[focused_tb],tb_color
562
	mov	[focused_tb],tb_color
563
	mov	al,[tb_color.length]
563
	mov	al,[tb_color.length]
564
	mov	[tb_color.pos.x],al
564
	mov	[tb_color.pos.x],al
565
	mov	[tb_color.sel.x],0
565
	mov	[tb_color.sel.x],0
566
	mov	[tb_casesen],1
566
	mov	[tb_casesen],1
567
	mov	[cur_part],0
567
	mov	[cur_part],0
568
	m2m	[cur_color],dword[color_tbl.text]
568
	m2m	[cur_color],dword[color_tbl.text]
569
	mov	esi,color_tbl
569
	mov	esi,color_tbl
570
	mov	edi,cur_colors
570
	mov	edi,cur_colors
571
	mov	ecx,10
571
	mov	ecx,10
572
	cld
572
	cld
573
	rep	movsd
573
	rep	movsd
574
	call	drawwindow
574
	call	drawwindow
575
	ret
575
	ret
576
 
576
 
577
  .line_numbers:
577
  .line_numbers:
578
	xor	[line_nums],1
578
	xor	[line_nums],1
579
	ret
579
	ret
580
  .optimal_fill:
580
  .optimal_fill:
581
	xor	[optim_save],1
581
	xor	[optim_save],1
582
	ret
582
	ret
583
  .auto_indents:
583
  .auto_indents:
584
	xor	[auto_indent],1
584
	xor	[auto_indent],1
585
	ret
585
	ret
586
  .auto_braces:
586
  .auto_braces:
587
	xor	[auto_braces],1
587
	xor	[auto_braces],1
588
	ret
588
	ret
589
  .secure_sel:
589
  .secure_sel:
590
	xor	[secure_sel],1
590
	xor	[secure_sel],1
591
	ret
591
	ret
592
 
592
 
593
;-----------------------------------------------------------------------------
593
;-----------------------------------------------------------------------------
594
 
594
 
595
include 'data/tp-defines.inc'
595
include 'data/tp-defines.inc'
596
 
596
 
597
include 'tp-draw.asm'
597
include 'tp-draw.asm'
598
include 'tp-key.asm'
598
include 'tp-key.asm'
599
include 'tp-button.asm'
599
include 'tp-button.asm'
600
include 'tp-mouse.asm'
600
include 'tp-mouse.asm'
601
include 'tp-files.asm'
601
include 'tp-files.asm'
602
include 'tp-common.asm'
602
include 'tp-common.asm'
603
include 'tp-dialog.asm'
603
include 'tp-dialog.asm'
604
include 'tp-popup.asm'
604
include 'tp-popup.asm'
605
include 'tp-tbox.asm'
605
include 'tp-tbox.asm'
606
include 'tp-tabctl.asm'
606
include 'tp-tabctl.asm'
607
include 'tp-editor.asm'
607
include 'tp-editor.asm'
608
include 'tp-recode.asm'
608
include 'tp-recode.asm'
609
 
609
 
610
include 'external/dll.inc'
610
include '../../../dll.inc'
611
 
611
 
612
;-----------------------------------------------------------------------------
612
;-----------------------------------------------------------------------------
613
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
613
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
614
;-----------------------------------------------------------------------------
614
;-----------------------------------------------------------------------------
615
 
615
 
616
;include_debug_strings
616
;include_debug_strings
617
 
617
 
618
include 'data/tp-idata.inc'
618
include 'data/tp-idata.inc'
619
 
619
 
620
;-----------------------------------------------------------------------------
620
;-----------------------------------------------------------------------------
621
section @IMPORT ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
621
section @IMPORT ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
622
;-----------------------------------------------------------------------------
622
;-----------------------------------------------------------------------------
623
 
623
 
624
library \
624
library \
625
	libini,'libini.obj',\
625
	libini,'libini.obj',\
626
	libio,'libio.obj',\
626
	libio,'libio.obj',\
627
	libgfx,'libgfx.obj',\
627
	libgfx,'libgfx.obj',\
628
	proc_lib,'proc_lib.obj'
628
	proc_lib,'proc_lib.obj'
629
 
629
 
630
import	libini, \
630
import	libini, \
631
	ini.get_str  ,'ini_get_str',\
631
	ini.get_str  ,'ini_get_str',\
632
	ini.set_str  ,'ini_set_str',\
632
	ini.set_str  ,'ini_set_str',\
633
	ini.get_int  ,'ini_get_int',\
633
	ini.get_int  ,'ini_get_int',\
634
	ini.set_int  ,'ini_set_int',\
634
	ini.set_int  ,'ini_set_int',\
635
	ini.get_color,'ini_get_color',\
635
	ini.get_color,'ini_get_color',\
636
	ini.set_color,'ini_set_color'
636
	ini.set_color,'ini_set_color'
637
 
637
 
638
import	libio, \
638
import	libio, \
639
	file.find_first,'file_find_first',\
639
	file.find_first,'file_find_first',\
640
	file.find_next ,'file_find_next',\
640
	file.find_next ,'file_find_next',\
641
	file.find_close,'file_find_close',\
641
	file.find_close,'file_find_close',\
642
	file.size      ,'file_size',\
642
	file.size      ,'file_size',\
643
	file.open      ,'file_open',\
643
	file.open      ,'file_open',\
644
	file.read      ,'file_read',\
644
	file.read      ,'file_read',\
645
	file.write     ,'file_write',\
645
	file.write     ,'file_write',\
646
	file.seek      ,'file_seek',\
646
	file.seek      ,'file_seek',\
647
	file.tell      ,'file_tell',\
647
	file.tell      ,'file_tell',\
648
	file.eof?      ,'file_iseof',\
648
	file.eof?      ,'file_iseof',\
649
	file.truncate  ,'file_truncate',\
649
	file.truncate  ,'file_truncate',\
650
	file.close     ,'file_close'
650
	file.close     ,'file_close'
651
 
651
 
652
import	libgfx, \
652
import	libgfx, \
653
	gfx.open	,'gfx_open',\
653
	gfx.open	,'gfx_open',\
654
	gfx.close	,'gfx_close',\
654
	gfx.close	,'gfx_close',\
655
	gfx.pen.color	,'gfx_pen_color',\
655
	gfx.pen.color	,'gfx_pen_color',\
656
	gfx.brush.color ,'gfx_brush_color',\
656
	gfx.brush.color ,'gfx_brush_color',\
657
	gfx.pixel	,'gfx_pixel',\
657
	gfx.pixel	,'gfx_pixel',\
658
	gfx.move.to	,'gfx_move_to',\
658
	gfx.move.to	,'gfx_move_to',\
659
	gfx.line.to	,'gfx_line_to',\
659
	gfx.line.to	,'gfx_line_to',\
660
	gfx.line	,'gfx_line',\
660
	gfx.line	,'gfx_line',\
661
	gfx.polyline	,'gfx_polyline',\
661
	gfx.polyline	,'gfx_polyline',\
662
	gfx.polyline.to ,'gfx_polyline_to',\
662
	gfx.polyline.to ,'gfx_polyline_to',\
663
	gfx.fillrect	,'gfx_fillrect',\
663
	gfx.fillrect	,'gfx_fillrect',\
664
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
664
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
665
	gfx.framerect	,'gfx_framerect',\
665
	gfx.framerect	,'gfx_framerect',\
666
	gfx.framerect.ex,'gfx_framerect_ex',\
666
	gfx.framerect.ex,'gfx_framerect_ex',\
667
	gfx.rectangle	,'gfx_rectangle',\
667
	gfx.rectangle	,'gfx_rectangle',\
668
	gfx.rectangle.ex,'gfx_rectangle_ex'
668
	gfx.rectangle.ex,'gfx_rectangle_ex'
669
 
669
 
670
import	proc_lib, \
670
import	proc_lib, \
671
	OpenDialog_Init  ,'OpenDialog_init',\
671
	OpenDialog_Init  ,'OpenDialog_init',\
672
	OpenDialog_Start  ,'OpenDialog_start'
672
	OpenDialog_Start  ,'OpenDialog_start'
673
 
673
 
674
TINYPAD_END:	 ; end of file
674
TINYPAD_END:	 ; end of file
675
 
675
 
676
;-----------------------------------------------------------------------------
676
;-----------------------------------------------------------------------------
677
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
677
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
678
;-----------------------------------------------------------------------------
678
;-----------------------------------------------------------------------------
679
 
679
 
680
include 'data/tp-udata.inc'
680
include 'data/tp-udata.inc'
681
 
681
 
682
;-----------------------------------------------------------------------------
682
;-----------------------------------------------------------------------------
683
section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
683
section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
684
;-----------------------------------------------------------------------------
684
;-----------------------------------------------------------------------------
685
 
685
 
686
fasm_parameters:
686
fasm_parameters:
687
 
687
 
688
p_info	process_information
688
p_info	process_information
689
p_info2 process_information
689
p_info2 process_information
690
sc	system_colors
690
sc	system_colors
691
 
691
 
692
ini_path rb PATHL
692
ini_path rb PATHL
693
 
693
 
694
;---------------------------------------------------------------------
694
;---------------------------------------------------------------------
695
temp_dir_pach:
695
temp_dir_pach:
696
	rb 4096
696
	rb 4096
697
;---------------------------------------------------------------------
697
;---------------------------------------------------------------------
698
fname_Info:
698
fname_Info:
699
	rb 4096            ; filename
699
	rb 4096            ; filename
700
;---------------------------------------------------------------------
700
;---------------------------------------------------------------------
701
filename_area:
701
filename_area:
702
	rb 256
702
	rb 256
703
;---------------------------------------------------------------------
703
;---------------------------------------------------------------------
704
rb 1024*4
704
rb 1024*4
705
MAIN_STACK:
705
MAIN_STACK:
706
rb 1024*4
706
rb 1024*4
707
POPUP_STACK:
707
POPUP_STACK:
708
 
708
 
709
STATIC_MEM_END:
709
STATIC_MEM_END:
710
 
710
 
711
diff10 'Main memory size',0,$
711
diff10 'Main memory size',0,$