Subversion Repositories Kolibri OS

Rev

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