Subversion Repositories Kolibri OS

Rev

Rev 1702 | Rev 3279 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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