Subversion Repositories Kolibri OS

Rev

Rev 280 | Rev 311 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 280 Rev 297
Line 1... Line 1...
1
;-----------------------------------------------------------------------------
1
;-----------------------------------------------------------------------------
2
; project name:      TINYPAD
2
; project name:      TINYPAD
3
; compiler:          flat assembler 1.67.15
3
; compiler:          flat assembler 1.67.18
4
; memory to compile: 2.0/7.0 MBytes (without/with size optimizations)
4
; memory to compile: 3.0/9.0 MBytes (without/with size optimizations)
5
; version:           4.0.4 pre
5
; version:           4.0.4
6
; last update:       2007-01-18 (Jan 18, 2007)
6
; last update:       2007-01-28 (Jan 28, 2007)
7
; minimal kernel:    revision #270 (svn://kolibrios.org/kernel)
7
; minimal kernel:    revision #270 (svn://kolibrios.org/kernel)
8
;-----------------------------------------------------------------------------
8
;-----------------------------------------------------------------------------
9
; originally by:     Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
9
; originally by:     Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
10
; maintained by:     Mike Semenyako          >> mike.dld@gmail.com
10
; maintained by:     Mike Semenyako          >> mike.dld@gmail.com
11
;                    Ivan Poddubny           >> ivan-yar@bk.ru
11
;                    Ivan Poddubny           >> ivan-yar@bk.ru
12
;-----------------------------------------------------------------------------
12
;-----------------------------------------------------------------------------
13
; TODO (FOR 4.1.0):
13
; TODO (4.1.0):
14
;   - optimize drawing (reduce flickering)
14
;   - optimize drawing (reduce flickering)
15
;   - add vertical selection, undo, goto position, overwrite mode
15
;   - add vertical selection, undo, goto position, overwrite mode
16
;   - improve window drawing with small dimensions
16
;   - improve window drawing with small dimensions
17
;   - other bug-fixes and speed/size optimizations
-
 
18
;   - save settings to ini file, not to executable
17
;   - save settings to ini file, not to executable
19
;
-
 
20
; TODO (4.0.4, PLANNED FOR 2007-01-21):
-
 
21
;   normal:
-
 
22
;     - finish tabbed interface (tab switching, Ctrl+F4)
-
 
23
;     - reduce flickering (introduce changes checker)
-
 
24
;     - compile default file if selected
18
;   - add prompt to save file before closing/opening
25
;   low:
-
 
26
;     - add prompt to save file before closing/opening
19
;   - other bug-fixes and speed/size optimizations
27
;
20
;
28
; HISTORY:
21
; HISTORY:
29
; 4.0.4 pre (mike.dld)
22
; 4.0.4 (mike.dld)
30
;   bug-fixes:
23
;   bug-fixes:
31
;     - statusbar contained hint after dialog operation cancelled
24
;     - statusbar contained hint after dialog operation cancelled
32
;     - small drawing fix for gutter and line saved/modified markers
25
;     - small drawing fix for gutter and line saved/modified markers
-
 
26
;       (incorrect calculations)
33
;     - incorrect lines marking on Ctrl+V
27
;     - incorrect lines marking on Ctrl+V
34
;   changes:
28
;   changes:
35
;     - editor and other modifications to ease parts placement changing,
29
;     - editor and other modifications to ease parts placement changing,
36
;       including changes in look
30
;       including changes in look
37
;     - modified/saved colors now match those in MSVS
31
;     - modified/saved colors now match those in MSVS
38
;     - function 70 for *all* file operations (including diamond's fixes)
32
;     - function 70 for *all* file operations (including diamond's fixes)
39
;     - use memory manager instead of statically allocated region
33
;     - use memory manager instead of statically allocated region
40
;     - case-insensitive filenames input, to be able to open/save files with
34
;     - case-insensitive filenames input, to be able to open/save files with
41
;       non-latin chars in name (russian etc.)
35
;       non-latin chars in name (russian etc.)
-
 
36
;     - reduced flickering (changes checker)
42
;     - overall code cleanup
37
;     - overall code cleanup
43
;   new features:
38
;   new features:
44
;     - recode tables between CP866, CP1251 and KOI8-R (suggested by Victor)
39
;     - recode tables between CP866, CP1251 and KOI8-R (suggested by Victor)
45
;     - tabbed interface, ability to open several files in one app instance
40
;     - tabbed interface, ability to open several files in one app instance
46
;       (thanks IRC guys for ideas and testing
41
;       (thanks IRC guys for ideas and testing)
47
;     - make any tab default to compile it disregarding currently active tab
42
;     - make any tab default to compile it disregarding currently active tab
-
 
43
;     - configuration dialog (colors, tabs positioning)
48
; 4.0.3 (mike.dld)
44
; 4.0.3 (mike.dld)
49
;   bug-fixes:
45
;   bug-fixes:
50
;     - 1-char selection if pressing  out of real line length
46
;     - 1-char selection if pressing  out of real line length
51
;     - fault in `writepos`, added call to function 9
47
;     - fault in `writepos`, added call to function 9
52
;     - main menu items weren't highlighted if popup opened and cursor
48
;     - main menu items weren't highlighted if popup opened and cursor
Line 155... Line 151...
155
 
151
 
156
include 'lang.inc'
152
include 'lang.inc'
157
include 'macros.inc' ; useful stuff
153
include 'macros.inc' ; useful stuff
158
;include 'proc32.inc'
154
;include 'proc32.inc'
159
include 'tinypad.inc'
155
include 'tinypad.inc'
Line 160... Line 156...
160
purge mov,add,sub	     ;  SPEED
156
;purge mov,add,sub            ;  SPEED
Line 161... Line 157...
161
 
157
 
Line 162... Line 158...
162
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,self_path
158
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,self_path
163
 
159
 
164
APP_VERSION equ '4.0.4 pre'
160
APP_VERSION equ '4.0.4'
165
 
161
 
Line 183... Line 179...
183
;-----------------------------------------------------------------------------
179
;-----------------------------------------------------------------------------
184
section @OPTIONS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
180
section @OPTIONS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
185
;-----------------------------------------------------------------------------
181
;-----------------------------------------------------------------------------
Line 186... Line 182...
186
 
182
 
187
label color_tbl dword
183
label color_tbl dword
188
  RGB(	0,  0,	0) ; RGB(  0,  0,  0) ; RGB(  0,  0,  0) ; text
184
  .text:       RGB(  0,  0,  0)
189
  RGB(	0,144,	0) ; RGB(  0,160,  0) ; RGB(  0,144,  0) ; numbers
185
  .back:       RGB(255,255,255)
190
  RGB(176,  0,	0) ; RGB(  0,128,255) ; RGB(160,  0,  0) ; strings
186
  .text.sel:   RGB(255,255,255)
191
  RGB(128,128,128) ; RGB(160,160,160) ; RGB(144,144,144) ; comments
187
  .back.sel:   RGB( 10, 36,106)
192
  RGB( 48, 48,240) ; RGB(255,  0,  0) ; RGB( 48, 48,240) ; symbols
188
  .symbol:     RGB( 48, 48,240)
193
  RGB(255,255,255) ; RGB(255,255,255) ; RGB(224,224,224) ; background
189
  .number:     RGB(  0,144,  0)
194
  RGB(255,255,255) ; RGB(255,255,255) ; RGB(255,255,255) ; selection text
190
  .string:     RGB(176,  0,  0)
195
  RGB( 10, 36,106) ; RGB(  0, 64,128) ; RGB(  0,  0,128) ; selection background
191
  .comment:    RGB(128,128,128)
196
  RGB(255,238, 98) ; modified line marker
192
  .line.moded: RGB(255,238, 98)
Line 197... Line 193...
197
  RGB(108,226,108) ; saved line marker
193
  .line.saved: RGB(108,226,108)
-
 
194
 
Line 198... Line 195...
198
 
195
ins_mode db 1
Line 199... Line 196...
199
ins_mode db 1
196
tab_pos  db 2
200
 
197
 
Line 227... Line 224...
227
	mov	edi,@UDATA
224
	mov	edi,@UDATA
228
	mov	ecx,@PARAMS-@UDATA
225
	mov	ecx,@PARAMS-@UDATA
229
	mov	al,0
226
	mov	al,0
230
	rep	stosb
227
	rep	stosb
Line -... Line 228...
-
 
228
 
231
 
229
	mov	al,[tab_pos]
Line 232... Line 230...
232
	mov	[tab_bar.Style],2
230
	mov	[tab_bar.Style],al
233
 
231
 
234
	mcall	68,11
232
	mcall	68,11
Line 239... Line 237...
239
	call	mem.Alloc
237
	call	mem.Alloc
240
	mov	[temp_buf],eax
238
	mov	[temp_buf],eax
Line 241... Line 239...
241
 
239
 
Line -... Line 240...
-
 
240
	inc	[do_not_draw]
-
 
241
 
242
	inc	[do_not_draw]
242
	mov	dword[app_start],7
243
 
243
 
244
	mov	esi,s_example
244
	mov	esi,s_example
245
	mov	edi,tb_opensave.text
245
	mov	edi,tb_opensave.text
246
	mov	ecx,s_example.size
246
	mov	ecx,s_example.size
Line 251... Line 251...
251
	mov	edi,s_search
251
	mov	edi,s_search
252
	mov	ecx,s_still.size
252
	mov	ecx,s_still.size
253
	mov	[s_search.size],ecx
253
	mov	[s_search.size],ecx
254
	rep	movsb
254
	rep	movsb
Line 255... Line -...
255
 
-
 
256
;       DEBUGF  1,"params: '%s'\n",@PARAMS
-
 
257
 
255
 
258
	cmp	byte[@PARAMS],0
256
	cmp	byte[@PARAMS],0
Line 259... Line 257...
259
	jz	no_params
257
	jz	no_params
Line 260... Line 258...
260
 
258
 
261
;// Willow's code to support DOCPAK [
259
;// Willow's code to support DOCPAK [
Line 262... Line -...
262
 
-
 
263
	cmp	byte[@PARAMS],'*'
-
 
264
	jne	.noipc
260
 
265
 
261
	cmp	byte[@PARAMS],'*'
266
;       DEBUGF  1,"  started by DOCPAK\n"
262
	jne	.noipc
267
 
263
 
268
;// diamond [ (convert size from decimal representation to dword)
264
;// diamond [ (convert size from decimal representation to dword)
Line 279... Line 275...
279
    @@:
275
    @@:
280
;// diamond ]
276
;// diamond ]
Line 281... Line 277...
281
 
277
 
Line 282... Line -...
282
	add	edx,20
-
 
283
 
-
 
284
;       DEBUGF  1,"  data size (+20) = %d\n",edx
278
	add	edx,20
285
 
279
 
286
	mov	eax,edx
280
	mov	eax,edx
287
	call	mem.Alloc
281
	call	mem.Alloc
Line 288... Line -...
288
	mov	ebp,eax
-
 
289
	push	eax
-
 
290
 
-
 
291
;       DEBUGF  1,"  mem.Alloc() returned 0x%x, allocated size = %d\n",eax,[eax-4]
-
 
292
 
282
	mov	ebp,eax
293
;!      mcall   60,1,AREA_TEMP-16 ; 0x10000-16
283
	push	eax
294
;!      mov     dword[AREA_TEMP-16+4],8 ; [0x10000-16+4],8
284
 
295
	mov	dword[ebp+0],0
285
	mov	dword[ebp+0],0
Line 296... Line -...
296
	mov	dword[ebp+4],8
-
 
297
	mcall	60,1,ebp
286
	mov	dword[ebp+4],8
298
	mcall	40,1000000b
-
 
Line 299... Line 287...
299
 
287
	mcall	60,1,ebp
300
;       DEBUGF  1,"  got IPC message within 2 secs? "
288
	mcall	40,1000000b
301
	mcall	23,200
-
 
302
;       DEBUGF  1,"%b\n",eax == 7
-
 
303
 
-
 
304
	cmp	eax,7
289
 
305
	jne	key.alt_x.close
-
 
306
;!      mov     esi,AREA_TEMP-16 ; 0x10000-16
-
 
307
;!      mov     byte[esi],1
-
 
308
;!      mov     eax,[esi+12]
-
 
309
	mov	byte[ebp],1
-
 
Line 310... Line 290...
310
;!      mov     eax,[ebp+12]
290
	mcall	23,200
311
;!      inc     eax
291
 
312
;!      call    load_file.file_found
292
	cmp	eax,7
313
 
293
	jne	key.alt_x.close
Line 314... Line 294...
314
;       DEBUGF  1,"  creating new document\n"
294
	mov	byte[ebp],1
315
 
295
 
316
	mov	ecx,[ebp+12]
296
	mov	ecx,[ebp+12]
Line 317... Line -...
317
	lea	esi,[ebp+16]
-
 
318
	call	create_tab
-
 
319
	call	load_from_memory
297
	lea	esi,[ebp+16]
320
 
298
	call	create_tab
Line 321... Line 299...
321
	pop	ebp
299
	call	load_from_memory
Line 322... Line -...
322
	mov	eax,ebp
-
 
323
	call	mem.Free
300
 
324
 
301
	pop	ebp
325
;       DEBUGF  1,"  mem.Free(0x%x) returned %d\n",ebp,eax
302
	mov	eax,ebp
326
 
303
	call	mem.Free
327
	jmp	@f
304
 
Line 339... Line 316...
339
	xor	al,al
316
	xor	al,al
340
	repne	scasb
317
	repne	scasb
341
	jne	key.alt_x.close
318
	jne	key.alt_x.close
342
	lea	eax,[edi-tb_opensave.text-1]
319
	lea	eax,[edi-tb_opensave.text-1]
343
	mov	[tb_opensave.length],al
320
	mov	[tb_opensave.length],al
344
	call	btn.load_file
321
	call	load_file
345
	jnc	@f
322
	jnc	@f
Line 346... Line 323...
346
 
323
 
347
  no_params:
324
  no_params:
Line 352... Line 329...
352
	dec	[do_not_draw]
329
	dec	[do_not_draw]
353
	mcall	66,1,1
330
	mcall	66,1,1
354
	mcall	40,00100111b
331
	mcall	40,00100111b
355
red:
332
red:
356
	call	drawwindow
333
	call	drawwindow
357
	call	check_inv_all.skip_check
-
 
Line 358... Line 334...
358
 
334
 
Line 359... Line 335...
359
;-----------------------------------------------------------------------------
335
;-----------------------------------------------------------------------------
360
 
336
 
Line 361... Line 337...
361
still:
337
still:
362
       call    draw_statusbar ; write current position & number of strings
338
	call	draw_statusbar ; write current position & number of strings
363
 
339
 
364
  .skip_write:
340
  .skip_write:
365
	mcall	10;23,50; wait here until event
341
	mcall	10	; wait here until event
366
	cmp	[main_closed],0
342
	cmp	[main_closed],0
367
	jne	key.alt_x
343
	jne	key.alt_x
Line 379... Line 355...
379
;-----------------------------------------------------------------------------
355
;-----------------------------------------------------------------------------
380
func start_fasm ;/////////////////////////////////////////////////////////////
356
func start_fasm ;/////////////////////////////////////////////////////////////
381
;-----------------------------------------------------------------------------
357
;-----------------------------------------------------------------------------
382
; BL = run after compile
358
; BL = run after compile
383
;-----------------------------------------------------------------------------
359
;-----------------------------------------------------------------------------
-
 
360
; FASM infile,outfile,/path/to/files[,run]
-
 
361
;-----------------------------------------------------------------------------
384
	cmp	[cur_editor.AsmMode],0 ;! [asm_mode],0
362
	cmp	[cur_editor.AsmMode],0
385
	jne	@f
363
	jne	@f
386
	ret
364
	ret
-
 
365
    @@:
-
 
366
	mov	eax,[tab_bar.Default.Ptr]
-
 
367
	or	eax,eax
-
 
368
	jnz	@f
-
 
369
	mov	eax,[tab_bar.Current.Ptr]
387
    @@: mov	esi,f_info.path ; s_fname
370
    @@: cmp	byte[eax+TABITEM.Editor.FilePath],'/'
-
 
371
	je	@f
-
 
372
	ret
-
 
373
    @@:
388
	mov	edi,fasm_parameters
374
	mov	edi,fasm_parameters
-
 
375
	push	eax
Line 389... Line -...
389
 
-
 
390
	cmp	byte[esi],'/'
-
 
391
	je	.yes_systree
-
 
392
 
-
 
393
	mov	ecx,[f_info.length] ; [s_fname.size]
-
 
394
	rep	movsb
-
 
395
 
-
 
396
	mov	al,','
376
 
397
	stosb
-
 
398
 
-
 
399
	mov	ecx,[f_info.length] ; [s_fname.size]
-
 
400
	add	ecx,-4
-
 
401
	mov	esi,f_info.path ; s_fname
-
 
402
	rep	movsb
-
 
403
 
-
 
404
	mov	al,','
-
 
405
	stosb
-
 
406
 
-
 
407
	mov	dword[edi],'/RD/'
-
 
408
	mov	word[edi+4],'1/'
-
 
409
	add	edi,6
-
 
410
 
-
 
411
	mov	al,0
-
 
412
	stosb
-
 
413
 
-
 
Line 414... Line -...
414
	jmp	.run
-
 
415
 
377
	cld
416
 .yes_systree:
378
 
417
	mov	eax,[f_info.length]
379
	lea	esi,[eax+TABITEM.Editor.FilePath]
418
	add	esi,eax ; [s_fname.size]
-
 
419
	dec	esi
380
	add	esi,[eax+TABITEM.Editor.FileName]
420
 
381
	push	esi esi
421
	xor	ecx,ecx
-
 
422
	mov	al,'/'
382
    @@: lodsb
423
    @@: cmp	[esi],al
383
	cmp	al,0
-
 
384
	je	@f
424
	je	@f
385
	stosb
-
 
386
	cmp	al,'.'
425
	dec	esi
387
	jne	@b
426
	inc	ecx
388
	mov	ecx,esi
427
	jmp	@b
-
 
428
    @@: inc	esi
-
 
429
 
-
 
430
	push	esi esi ecx
-
 
431
 
-
 
432
	rep	movsb
389
	jmp	@b
433
 
390
    @@:
Line 434... Line 391...
434
	mov	al,','
391
	mov	al,','
435
	stosb
392
	stosb
436
 
393
 
-
 
394
	pop	esi
437
	pop	ecx esi
395
	sub	ecx,esi
438
 
396
	dec	ecx
439
	add	ecx,-4
397
	jz	@f
440
	rep	movsb
398
	rep	movsb
Line 441... Line 399...
441
 
399
    @@:
442
	mov	al,','
400
	mov	al,','
443
	stosb
401
	stosb
444
 
-
 
445
	pop	ecx
402
 
Line 446... Line -...
446
	sub	ecx,f_info.path ; s_fname
-
 
447
	mov	esi,f_info.path ; s_fname
-
 
448
 
-
 
449
	rep	movsb
-
 
450
 
403
	pop	ecx esi
451
	mov	al,0
404
	add	esi,TABITEM.Editor.FilePath
452
	stosb
405
	sub	ecx,esi
453
 
406
	rep	movsb
454
 .run:
407
 
455
	cmp	bl,0 ; run outfile ?
408
	cmp	bl,0 ; run outfile ?
-
 
409
	je	@f
-
 
410
	mov	dword[edi],',run'
-
 
411
	add	edi,4
-
 
412
    @@:
456
	je	@f
413
	mov	al,0
457
	mov	dword[edi-1],',run'
414
	stosb
458
	mov	byte[edi+3],0
-
 
459
    @@:
415
 
460
	mov	ebx, fasm_start
416
	mov	[app_start.filename],app_fasm
Line 461... Line 417...
461
start_ret:
417
	mov	[app_start.params],fasm_parameters
462
	mov	eax, 70
418
start_ret:
463
	int	0x40
419
	mcall	70,app_start
-
 
420
	ret
464
	ret
421
endf
465
endf
422
 
466
 
423
;-----------------------------------------------------------------------------
Line 467... Line 424...
467
;-----------------------------------------------------------------------------
424
func open_debug_board ;///////////////////////////////////////////////////////
468
func open_debug_board ;///////////////////////////////////////////////////////
425
;-----------------------------------------------------------------------------
469
;-----------------------------------------------------------------------------
426
	mov	[app_start.filename],app_board
-
 
427
	mov	[app_start.params],0
470
	mov	ebx, board_start
428
	jmp	start_ret
471
	jmp	start_ret
429
endf
472
endf
430
 
473
 
431
;-----------------------------------------------------------------------------
474
;-----------------------------------------------------------------------------
432
func open_sysfuncs_txt ;//////////////////////////////////////////////////////
475
func open_sysfuncs_txt ;//////////////////////////////////////////////////////
433
;-----------------------------------------------------------------------------
476
;-----------------------------------------------------------------------------
434
	mov	[app_start.filename],app_docpak
477
	mov	ebx, docpak_start
435
	mov	[app_start.params],sysfuncs_param
478
	call	start_ret
436
	call	start_ret
Line 479... Line -...
479
	cmp	eax,0xfffffff0
-
 
480
	jb	@f
-
 
481
	mov	ebx, tinypad_start
-
 
482
	mov	dword [ebx+8], sysfuncs_filename
-
 
483
	call	start_ret
-
 
484
    @@: ret
-
 
485
endf
-
 
486
 
-
 
487
;-----------------------------------------------------------------------------
-
 
488
;func layout  ;///// change keyboard layout ///////////////////////////////////
-
 
489
;-----------------------------------------------------------------------------
-
 
490
;        mcall   19,setup,param_setup
-
 
491
;        mcall   5,eax
-
 
492
;;       call    activate_me
-
 
493
;;       ret
-
 
494
;;endf
-
 
495
 
-
 
496
;;func activate_me
-
 
497
;        mcall   9,p_info,-1
-
 
498
;        inc     eax
-
 
499
;        inc     eax
-
 
500
;        mov     ecx,eax
-
 
501
;        mov     edi,[p_info.PID]
-
 
502
;        mov     ebx,p_info
-
 
503
;    @@: dec     ecx
-
 
504
;        jz      @f    ; counter=0 => not found? => return
-
 
505
;        mcall   9
437
	cmp	eax,0xfffffff0
Line -... Line 438...
-
 
438
	jb	@f
-
 
439
	mov	[app_start.filename],app_tinypad
-
 
440
	mov	[app_start.params],sysfuncs_filename
-
 
441
	call	start_ret
-
 
442
    @@: ret
-
 
443
endf
-
 
444
 
-
 
445
set_opt:
-
 
446
 
-
 
447
  .dialog:
-
 
448
	mov	[bot_mode],1
-
 
449
	mov	[bot_dlg_height],128
-
 
450
	mov	[bot_dlg_handler],optsdlg_handler
-
 
451
	mov	[focused_tb],tb_color
-
 
452
	mov	al,[tb_color.length]
-
 
453
	mov	[tb_color.pos.x],al
-
 
454
	mov	[tb_color.sel.x],0
-
 
455
	mov	[tb_casesen],1
-
 
456
	mov	[cur_part],0
506
;        cmp     edi,[p_info.PID]
457
	m2m	[cur_color],dword[color_tbl.text]
507
;        jne     @b
458
	mov	esi,color_tbl
508
;        mcall   18,3
459
	mov	edi,cur_colors
509
;        mcall   5,eax
460
	mov	ecx,10
510
;    @@: ret
461
	cld
Line 552... Line 503...
552
 
503
 
553
;-----------------------------------------------------------------------------
504
;-----------------------------------------------------------------------------
554
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
505
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Line 555... Line -...
555
;-----------------------------------------------------------------------------
-
 
556
 
-
 
557
;addr       dd s_fname  ; address of input string
506
;-----------------------------------------------------------------------------
558
;temp       dd 0xABCD   ; used in read_string
507
 
559
vscrl_capt dd -1
508
vscrl_capt dd -1
Line 560... Line 509...
560
hscrl_capt dd -1
509
hscrl_capt dd -1
Line 650... Line 599...
650
  0x0001014D,key.tb.shift_right    ,\ ; Shift+Right
599
  0x0001014D,key.tb.shift_right    ,\ ; Shift+Right
651
  0x0001014F,key.tb.shift_end	   ,\ ; Shift+End
600
  0x0001014F,key.tb.shift_end	   ,\ ; Shift+End
652
  0x00010153,key.tb.del 	   ,\ ; Shift+Del
601
  0x00010153,key.tb.del 	   ,\ ; Shift+Del
653
  0
602
  0
Line 654... Line 603...
654
 
603
 
655
accel_table2 dd 	   \
604
accel_table2 dd 	  \
656
  1,btn.close_main_window ,\
605
  1    ,key.alt_x	 ,\
657
  'VSL',btn.vscroll_up	 ,\
606
  'VSL',btn.vscroll_up	 ,\
658
  'VSG',btn.vscroll_down ,\
607
  'VSG',btn.vscroll_down ,\
659
  'HSL',btn.hscroll_up	 ,\
608
  'HSL',btn.hscroll_up	 ,\
660
  'HSG',btn.hscroll_down ,\
609
  'HSG',btn.hscroll_down ,\
661
  'TBL',btn.tabctl_right ,\
610
  'TBL',btn.tabctl_right ,\
662
  'TBG',btn.tabctl_left  ,\
611
  'TBG',btn.tabctl_left  ,\
Line 663... Line 612...
663
  0
612
  0
664
 
613
 
665
accel_table2_botdlg dd	   \
614
accel_table2_botdlg dd	   \
666
  1,btn.close_main_window ,\
615
  1    ,key.alt_x	  ,\
667
  20001,btn.bot.cancel	  ,\
616
  20001,btn.bot.cancel	  ,\
-
 
617
  20002,btn.bot.opensave  ,\
-
 
618
  20003,btn.bot.find	  ,\
668
  20002,btn.bot.opensave  ,\
619
  20004,btn.bot.appearance,\
Line 669... Line 620...
669
  20003,btn.bot.find	  ,\
620
  21001,btn.bot.tabpos	  ,\
670
  0
621
  0
671
 
622
 
Line 678... Line 629...
678
  times $04 db -$00,-$01
629
  times $04 db -$00,-$01
679
  times $08 db -$00
630
  times $08 db -$00
Line 680... Line 631...
680
 
631
 
Line -... Line 632...
-
 
632
s_status dd 0
681
s_status dd 0
633
 
682
 
634
@^
683
fasm_start:
635
fasm_start:
684
	dd	7
636
	dd	7
685
	dd	0
637
	dd	0
Line 706... Line 658...
706
	dd	0
658
	dd	0
707
	dd	sysfuncs_param
659
	dd	sysfuncs_param
708
	dd	0
660
	dd	0
709
	dd	0
661
	dd	0
710
	db	'/RD/1/DOCPAK',0
662
	db	'/RD/1/DOCPAK',0
-
 
663
^@
-
 
664
 
-
 
665
sz app_fasm    ,'/RD/1/DEVELOP/FASM',0
-
 
666
sz app_board   ,'/RD/1/BOARD',0
-
 
667
sz app_tinypad ,'/RD/1/TINYPAD',0
-
 
668
sz app_docpak  ,'/RD/1/DOCPAK',0
Line 711... Line 669...
711
 
669
 
Line 712... Line 670...
712
sz sysfuncs_param,'g',0
670
sz sysfuncs_param,'g',0
Line -... Line 671...
-
 
671
 
-
 
672
include 'tp-locale.inc'
-
 
673
 
-
 
674
;// options dialog data [
-
 
675
label optsdlg_editor at $-EDITOR.Bounds
-
 
676
; rb PATHL     ; FilePath       db PATHL dup(?)
-
 
677
; dd 0         ; FileName       dd ?
-
 
678
  dd ?,?,?,?   ; Bounds         RECT
-
 
679
  dd @f        ; Lines          dd ?
-
 
680
  dd ?	       ; Lines.Size     dd ?
-
 
681
  dd 9	       ; Lines.Count    dd ?
-
 
682
  dd 21        ; Columns.Count  dd ?
-
 
683
  dd 0,4       ; Caret          POINT
-
 
684
  dd 100,4     ; SelStart       POINT
-
 
685
  dd 0,0       ; TopLeft        POINT
-
 
686
  dd 0,0       ; VScroll        SCROLLBAR
-
 
687
  dd 0,0       ; HScroll        SCROLLBAR
-
 
688
  dd 0	       ; Gutter.Width   dd ?
-
 
689
  db 0	       ; Gutter.Visible db ?
-
 
690
  db 1	       ; AsmMode        db ?
-
 
691
  db 0	       ; Modified       db ?
-
 
692
 
-
 
693
@@:
-
 
694
  dd 0x00000000+1
-
 
695
  db ' '
-
 
696
  dd 0x00010000+9
-
 
697
  db ' org 100h'
-
 
698
  dd 0x00000000+1
-
 
699
  db ' '
-
 
700
  dd 0x00000000+20
-
 
701
  db ' mov ah,09h  ; write'
-
 
702
  dd 0x00000000+12
-
 
703
  db ' mov dx,text'
-
 
704
  dd 0x00000000+8
-
 
705
  db ' int 21h'
-
 
706
  dd 0x00030000+8
-
 
707
  db ' int 20h'
-
 
708
  dd 0x00000000+1
-
 
709
  db ' '
-
 
710
  dd 0x00000000+21
-
 
711
  db ' text db "Hello!",24h'
-
 
712
  dd 0
-
 
713
 
-
 
714
optsdlg_editor_parts:	; left,top,right,bottom,type
-
 
715
  db 0, 12, 13, 29, 22
-
 
716
  db 0, 12, 33, 47, 42
-
 
717
  db 0, 12, 53, 29, 72
-
 
718
  db 0, 12, 83, 53, 92
-
 
719
  db 2, 12, 43, 77, 52
-
 
720
  db 3,  4, 43,148, 52
-
 
721
  db 4, 48, 33, 53, 42
-
 
722
  db 4,108, 83,113, 92
-
 
723
  db 5, 36, 13, 59, 22
-
 
724
  db 5, 54, 33, 71, 42
-
 
725
  db 5, 36, 53, 53, 72
-
 
726
  db 5,114, 83,131, 92
-
 
727
  db 6, 60, 83,107, 92
-
 
728
  db 7, 84, 33,125, 42
-
 
729
  db 8,  1, 13,  5, 22
-
 
730
  db 9,  1, 63,  5, 72
-
 
731
  db 1,  1,  1,148,105
713
 
732
  db -1
714
include 'tp-locale.inc'
733
;// ]
Line 715... Line 734...
715
 
734
 
716
sz symbols_ex,';?.%"',"'"
735
sz symbols_ex,';?.%"',"'"
717
sz symbols   ,'#&*\:/<>|{}()[]=+-, '
736
sz symbols   ,'#&*\:/<>|{}()[]=+-, '
718
 
737
 
719
sz ini_sec_window   ,'Window',0
738
sz ini_sec_window   ,'Window',0
Line 720... Line -...
720
sz ini_window_top   ,'Top',0
-
 
721
sz ini_window_left  ,'Left',0
-
 
722
sz ini_window_right ,'Right',0
739
sz ini_window_top   ,'Top',0
Line 723... Line 740...
723
sz ini_window_bottom,'Bottom',0
740
sz ini_window_left  ,'Left',0
Line 724... Line 741...
724
 
741
sz ini_window_right ,'Right',0
725
;include_debug_strings
742
sz ini_window_bottom,'Bottom',0
726
 
743
 
Line -... Line 744...
-
 
744
TINYPAD_END:	 ; end of file
-
 
745
 
-
 
746
self_path rb PATHL
-
 
747
 
-
 
748
;-----------------------------------------------------------------------------
-
 
749
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
 
750
;-----------------------------------------------------------------------------
727
TINYPAD_END:	 ; end of file
751
 
728
 
752
app_start:
729
self_path rb PATHL
753
	   dd ?,?
730
 
754
 .params   dd ?
Line 731... Line 755...
731
;-----------------------------------------------------------------------------
755
	   dd ?,?
Line -... Line 756...
-
 
756
	   db ?
-
 
757
 .filename dd ?
732
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
758
 
733
;-----------------------------------------------------------------------------
759
f_info.length dd ?
734
 
760
f_info.path:
735
f_info.length dd ?
761
    times PATHL+1 db ?
736
f_info.path:
762
f_info70 rd 7
Line 772... Line 798...
772
 
798
 
773
do_not_draw   db ?    ; draw top and bottom buttons?
799
do_not_draw   db ?    ; draw top and bottom buttons?
774
main_closed   db ?    ; main window closed?
800
main_closed   db ?    ; main window closed?
Line -... Line 801...
-
 
801
tb_casesen    db ?    ; focused textbox is case-sensitive?
-
 
802
 
775
tb_casesen    db ?    ; focused textbox is case-sensitive?
803
draw_blines   db ?
776
 
804
 
777
align 4
805
align 4
778
s_fname.size  dd ?
806
s_fname.size  dd ?
779
s_fname       rb PATHL+1
807
s_fname       rb PATHL+1
Line 792... Line 820...
792
cl_3d_pushed dd ?
820
cl_3d_pushed dd ?
793
cl_3d_outset dd ?
821
cl_3d_outset dd ?
794
cl_3d_inset  dd ?
822
cl_3d_inset  dd ?
795
cl_3d_grayed dd ?
823
cl_3d_grayed dd ?
Line -... Line 824...
-
 
824
 
796
 
825
tb_color     TBOX
797
tb_opensave  TBOX
826
tb_opensave  TBOX
798
tb_find      TBOX
827
tb_find      TBOX
799
tb_replace   TBOX
828
tb_replace   TBOX
800
tb_gotorow   TBOX
829
tb_gotorow   TBOX
Line 828... Line 857...
828
 
857
 
829
p_info	process_information
858
p_info	process_information
830
p_info2 process_information
859
p_info2 process_information
Line 831... Line -...
831
sc	system_colors
-
 
832
 
-
 
833
;store dword '/hd/' at tb_opensave.text+4*0
-
 
834
;store dword '1/tp' at tb_opensave.text+4*1
-
 
835
;store dword 'ad4/' at tb_opensave.text+4*2
-
 
836
;store dword 'tiny' at tb_opensave.text+4*3
-
 
837
;store dword 'pad.' at tb_opensave.text+4*4
-
 
838
;store dword 'asm'  at tb_opensave.text+4*5
-
 
839
;store byte  23     at tb_opensave.length
-
 
840
 
860
sc	system_colors
841
;rb 1024*36
861
 
842
rb 1024*4
862
rb 1024*4
843
MAIN_STACK:
863
MAIN_STACK: