Subversion Repositories Kolibri OS

Rev

Rev 4505 | Rev 5240 | 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)
4505 mario79 5
; version:           SVN (4.0.8)
6
; last update:       2014-01-22 (Jan 22, 2014)
7
; minimal kernel:    revision #4199 (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
4505 mario79 12
;                    Marat Zakiyanov aka Mario79
122 diamond 13
;-----------------------------------------------------------------------------
297 mikedld 14
; TODO (4.1.0):
617 mikedld 15
;   - add vertical selection, undo, goto position, overwrite mode, smart tabulation
178 heavyiron 16
;   - improve window drawing with small dimensions
617 mikedld 17
;   - save/load settings to/from ini file, not executable
18
;   - path autocompletion for open/save dialogs
259 mikedld 19
;   - other bug-fixes and speed/size optimizations
122 diamond 20
;-----------------------------------------------------------------------------
617 mikedld 21
; See history.txt for complete changelog
22
;-----------------------------------------------------------------------------
31 halyavin 23
 
178 heavyiron 24
include 'lang.inc'
617 mikedld 25
 
1702 Lrz 26
include '../../../config.inc'		;for nightbuild
27
include '../../../macros.inc'		; useful stuff
617 mikedld 28
include '../../../struct.inc'
29
include '../../../proc32.inc'
30
 
31
include 'external/libio.inc'
32
 
122 diamond 33
include 'tinypad.inc'
617 mikedld 34
 
297 mikedld 35
;purge mov,add,sub            ;  SPEED
31 halyavin 36
 
987 mikedld 37
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,ini_path
31 halyavin 38
 
4505 mario79 39
APP_VERSION equ 'SVN (4.0.8)'
258 mikedld 40
 
617 mikedld 41
TRUE = 1
42
FALSE = 0
43
 
280 mikedld 44
;define __DEBUG__ 1
45
;define __DEBUG_LEVEL__ 1
4487 mario79 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
;-----------------------------------------------------------------------------
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
;---------------------------------------------------------------------
4274 tserj 196
;OpenDialog     initialisation
197
	push	dword OpenDialog_data
198
	call	[OpenDialog_Init]
1624 mario79 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
3265 mario79 216
 
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
4274 tserj 245
	push	dword OpenDialog_data
246
	call	[OpenDialog_Start]
1624 mario79 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
4274 tserj 260
 
1624 mario79 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
4274 tserj 296
	mov	edi,edx ; edi filename_area
1624 mario79 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
;-----------------------------------------------------------------------------
4274 tserj 469
; BL = 0 - compile
470
; BL = 1 - run after compile
471
; BL = 2 - run under mtdbg after compile
122 diamond 472
;-----------------------------------------------------------------------------
297 mikedld 473
; FASM infile,outfile,/path/to/files[,run]
474
;-----------------------------------------------------------------------------
475
	cmp	[cur_editor.AsmMode],0
258 mikedld 476
	jne	@f
477
	ret
297 mikedld 478
    @@:
479
	mov	eax,[tab_bar.Default.Ptr]
480
	or	eax,eax
481
	jnz	@f
482
	mov	eax,[tab_bar.Current.Ptr]
483
    @@: cmp	byte[eax+TABITEM.Editor.FilePath],'/'
484
	je	@f
485
	ret
486
    @@:
258 mikedld 487
	mov	edi,fasm_parameters
297 mikedld 488
	push	eax
31 halyavin 489
 
297 mikedld 490
	cld
31 halyavin 491
 
297 mikedld 492
	lea	esi,[eax+TABITEM.Editor.FilePath]
493
	add	esi,[eax+TABITEM.Editor.FileName]
494
	push	esi esi
495
    @@: lodsb
496
	cmp	al,0
497
	je	@f
258 mikedld 498
	stosb
297 mikedld 499
	cmp	al,'.'
500
	jne	@b
501
	mov	ecx,esi
502
	jmp	@b
503
    @@:
258 mikedld 504
	mov	al,','
505
	stosb
31 halyavin 506
 
297 mikedld 507
	pop	esi
508
	sub	ecx,esi
509
	dec	ecx
510
	jz	@f
258 mikedld 511
	rep	movsb
297 mikedld 512
    @@:
258 mikedld 513
	mov	al,','
514
	stosb
31 halyavin 515
 
258 mikedld 516
	pop	ecx esi
297 mikedld 517
	add	esi,TABITEM.Editor.FilePath
518
	sub	ecx,esi
258 mikedld 519
	rep	movsb
31 halyavin 520
 
4274 tserj 521
	cmp	bl,0 ; compile outfile ?
297 mikedld 522
	je	@f
523
	mov	dword[edi],',run'
4274 tserj 524
	cmp	bl,1 ; run outfile ?
525
	je	do_run
526
	mov	dword[edi],',dbg'
527
do_run:
297 mikedld 528
	add	edi,4
4274 tserj 529
		@@:
258 mikedld 530
	mov	al,0
531
	stosb
31 halyavin 532
 
297 mikedld 533
	mov	[app_start.filename],app_fasm
534
	mov	[app_start.params],fasm_parameters
178 heavyiron 535
start_ret:
297 mikedld 536
	mcall	70,app_start
258 mikedld 537
	ret
617 mikedld 538
endp
31 halyavin 539
 
122 diamond 540
;-----------------------------------------------------------------------------
617 mikedld 541
proc open_debug_board ;///////////////////////////////////////////////////////
122 diamond 542
;-----------------------------------------------------------------------------
297 mikedld 543
	mov	[app_start.filename],app_board
544
	mov	[app_start.params],0
258 mikedld 545
	jmp	start_ret
617 mikedld 546
endp
31 halyavin 547
 
122 diamond 548
;-----------------------------------------------------------------------------
617 mikedld 549
proc open_sysfuncs_txt ;//////////////////////////////////////////////////////
122 diamond 550
;-----------------------------------------------------------------------------
297 mikedld 551
	mov	[app_start.filename],app_docpak
552
	mov	[app_start.params],sysfuncs_param
258 mikedld 553
	call	start_ret
554
	cmp	eax,0xfffffff0
555
	jb	@f
297 mikedld 556
	mov	[app_start.filename],app_tinypad
557
	mov	[app_start.params],sysfuncs_filename
258 mikedld 558
	call	start_ret
122 diamond 559
    @@: ret
617 mikedld 560
endp
31 halyavin 561
 
297 mikedld 562
set_opt:
178 heavyiron 563
 
297 mikedld 564
  .dialog:
565
	mov	[bot_mode],1
566
	mov	[bot_dlg_height],128
567
	mov	[bot_dlg_handler],optsdlg_handler
568
	mov	[focused_tb],tb_color
569
	mov	al,[tb_color.length]
570
	mov	[tb_color.pos.x],al
571
	mov	[tb_color.sel.x],0
572
	mov	[tb_casesen],1
573
	mov	[cur_part],0
574
	m2m	[cur_color],dword[color_tbl.text]
575
	mov	esi,color_tbl
576
	mov	edi,cur_colors
577
	mov	ecx,10
578
	cld
579
	rep	movsd
580
	call	drawwindow
581
	ret
31 halyavin 582
 
259 mikedld 583
  .line_numbers:
987 mikedld 584
	xor	[line_nums],1
585
	ret
259 mikedld 586
  .optimal_fill:
987 mikedld 587
	xor	[optim_save],1
588
	ret
259 mikedld 589
  .auto_indents:
987 mikedld 590
	xor	[auto_indent],1
591
	ret
259 mikedld 592
  .auto_braces:
987 mikedld 593
	xor	[auto_braces],1
594
	ret
259 mikedld 595
  .secure_sel:
987 mikedld 596
	xor	[secure_sel],1
258 mikedld 597
	ret
31 halyavin 598
 
122 diamond 599
;-----------------------------------------------------------------------------
31 halyavin 600
 
617 mikedld 601
include 'data/tp-defines.inc'
259 mikedld 602
 
122 diamond 603
include 'tp-draw.asm'
604
include 'tp-key.asm'
258 mikedld 605
include 'tp-button.asm'
122 diamond 606
include 'tp-mouse.asm'
607
include 'tp-files.asm'
258 mikedld 608
include 'tp-common.asm'
609
include 'tp-dialog.asm'
122 diamond 610
include 'tp-popup.asm'
611
include 'tp-tbox.asm'
259 mikedld 612
include 'tp-tabctl.asm'
613
include 'tp-editor.asm'
258 mikedld 614
include 'tp-recode.asm'
4487 mario79 615
include 'tp-clipboard.asm'
31 halyavin 616
 
3014 dunkaist 617
include '../../../dll.inc'
178 heavyiron 618
 
31 halyavin 619
;-----------------------------------------------------------------------------
122 diamond 620
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 621
;-----------------------------------------------------------------------------
622
 
827 mikedld 623
;include_debug_strings
624
 
617 mikedld 625
include 'data/tp-idata.inc'
31 halyavin 626
 
617 mikedld 627
;-----------------------------------------------------------------------------
628
section @IMPORT ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
629
;-----------------------------------------------------------------------------
31 halyavin 630
 
617 mikedld 631
library \
632
	libini,'libini.obj',\
633
	libio,'libio.obj',\
1624 mario79 634
	libgfx,'libgfx.obj',\
635
	proc_lib,'proc_lib.obj'
31 halyavin 636
 
617 mikedld 637
import	libini, \
1102 diamond 638
	ini.get_str  ,'ini_get_str',\
639
	ini.set_str  ,'ini_set_str',\
640
	ini.get_int  ,'ini_get_int',\
641
	ini.set_int  ,'ini_set_int',\
642
	ini.get_color,'ini_get_color',\
643
	ini.set_color,'ini_set_color'
31 halyavin 644
 
617 mikedld 645
import	libio, \
1102 diamond 646
	file.find_first,'file_find_first',\
647
	file.find_next ,'file_find_next',\
648
	file.find_close,'file_find_close',\
649
	file.size      ,'file_size',\
650
	file.open      ,'file_open',\
651
	file.read      ,'file_read',\
652
	file.write     ,'file_write',\
653
	file.seek      ,'file_seek',\
654
	file.tell      ,'file_tell',\
655
	file.eof?      ,'file_iseof',\
656
	file.truncate  ,'file_truncate',\
657
	file.close     ,'file_close'
31 halyavin 658
 
617 mikedld 659
import	libgfx, \
1102 diamond 660
	gfx.open	,'gfx_open',\
661
	gfx.close	,'gfx_close',\
662
	gfx.pen.color	,'gfx_pen_color',\
663
	gfx.brush.color ,'gfx_brush_color',\
664
	gfx.pixel	,'gfx_pixel',\
665
	gfx.move.to	,'gfx_move_to',\
666
	gfx.line.to	,'gfx_line_to',\
667
	gfx.line	,'gfx_line',\
668
	gfx.polyline	,'gfx_polyline',\
669
	gfx.polyline.to ,'gfx_polyline_to',\
670
	gfx.fillrect	,'gfx_fillrect',\
671
	gfx.fillrect.ex ,'gfx_fillrect_ex',\
672
	gfx.framerect	,'gfx_framerect',\
673
	gfx.framerect.ex,'gfx_framerect_ex',\
674
	gfx.rectangle	,'gfx_rectangle',\
675
	gfx.rectangle.ex,'gfx_rectangle_ex'
31 halyavin 676
 
1624 mario79 677
import	proc_lib, \
678
	OpenDialog_Init  ,'OpenDialog_init',\
679
	OpenDialog_Start  ,'OpenDialog_start'
680
 
258 mikedld 681
TINYPAD_END:	 ; end of file
122 diamond 682
 
31 halyavin 683
;-----------------------------------------------------------------------------
122 diamond 684
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 685
;-----------------------------------------------------------------------------
686
 
617 mikedld 687
include 'data/tp-udata.inc'
297 mikedld 688
 
31 halyavin 689
;-----------------------------------------------------------------------------
122 diamond 690
section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
31 halyavin 691
;-----------------------------------------------------------------------------
692
 
693
fasm_parameters:
694
 
258 mikedld 695
p_info	process_information
122 diamond 696
p_info2 process_information
258 mikedld 697
sc	system_colors
122 diamond 698
 
987 mikedld 699
ini_path rb PATHL
700
 
1624 mario79 701
;---------------------------------------------------------------------
702
temp_dir_pach:
703
	rb 4096
704
;---------------------------------------------------------------------
705
fname_Info:
4274 tserj 706
	rb 4096 	   ; filename
1624 mario79 707
;---------------------------------------------------------------------
708
filename_area:
709
	rb 256
710
;---------------------------------------------------------------------
259 mikedld 711
rb 1024*4
712
MAIN_STACK:
713
rb 1024*4
714
POPUP_STACK:
715
 
716
STATIC_MEM_END:
717
 
718
diff10 'Main memory size',0,$