Subversion Repositories Kolibri OS

Rev

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