2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; project name: TINYPAD
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; compiler: flat assembler 1.67.18
|
|
|
|
|
; memory to compile: 3.0/9.0 MBytes (without/with size optimizations)
|
|
|
|
|
; version: 4.0.4
|
|
|
|
|
; last update: 2007-01-28 (Jan 28, 2007)
|
2007-01-18 22:14:15 +01:00
|
|
|
|
; minimal kernel: revision #270 (svn://kolibrios.org/kernel)
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
; originally by: Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; maintained by: Mike Semenyako >> mike.dld@gmail.com
|
|
|
|
|
; Ivan Poddubny >> ivan-yar@bk.ru
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; TODO (4.1.0):
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; - optimize drawing (reduce flickering)
|
2007-01-03 19:22:05 +01:00
|
|
|
|
; - add vertical selection, undo, goto position, overwrite mode
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; - improve window drawing with small dimensions
|
2007-01-10 07:03:39 +01:00
|
|
|
|
; - save settings to ini file, not to executable
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; - add prompt to save file before closing/opening
|
|
|
|
|
; - other bug-fixes and speed/size optimizations
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; HISTORY:
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; 4.0.4 (mike.dld)
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; bug-fixes:
|
2007-01-03 19:22:05 +01:00
|
|
|
|
; - statusbar contained hint after dialog operation cancelled
|
|
|
|
|
; - small drawing fix for gutter and line saved/modified markers
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; (incorrect calculations)
|
2007-01-18 22:14:15 +01:00
|
|
|
|
; - incorrect lines marking on Ctrl+V
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; changes:
|
2007-01-18 22:14:15 +01:00
|
|
|
|
; - editor and other modifications to ease parts placement changing,
|
|
|
|
|
; including changes in look
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; - modified/saved colors now match those in MSVS
|
2007-01-03 19:22:05 +01:00
|
|
|
|
; - function 70 for *all* file operations (including diamond's fixes)
|
|
|
|
|
; - use memory manager instead of statically allocated region
|
2007-01-10 07:03:39 +01:00
|
|
|
|
; - case-insensitive filenames input, to be able to open/save files with
|
|
|
|
|
; non-latin chars in name (russian etc.)
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; - reduced flickering (changes checker)
|
2007-01-10 07:03:39 +01:00
|
|
|
|
; - overall code cleanup
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; new features:
|
|
|
|
|
; - recode tables between CP866, CP1251 and KOI8-R (suggested by Victor)
|
2007-01-03 19:22:05 +01:00
|
|
|
|
; - tabbed interface, ability to open several files in one app instance
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; (thanks IRC guys for ideas and testing)
|
2007-01-18 22:14:15 +01:00
|
|
|
|
; - make any tab default to compile it disregarding currently active tab
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; - configuration dialog (colors, tabs positioning)
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; 4.0.3 (mike.dld)
|
|
|
|
|
; bug-fixes:
|
|
|
|
|
; - 1-char selection if pressing <BS> out of real line length
|
|
|
|
|
; - fault in `writepos`, added call to function 9
|
|
|
|
|
; - main menu items weren't highlighted if popup opened and cursor
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; isn't in main menu item's area
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; - statusbar and textboxes drawing fixes (wrong colors)
|
|
|
|
|
; - perform no redraw while pressing Shift, Ctrl, Alt keys
|
2006-12-30 18:44:05 +01:00
|
|
|
|
; - data length from DOCPAK in string representation (fixed by diamond)
|
2007-01-10 07:03:39 +01:00
|
|
|
|
; - compare file extension case-insensitively (fixed by diamond)
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; changes:
|
|
|
|
|
; - function 70 instead of 58 for files loading/saving
|
|
|
|
|
; - clientarea-relative drawing (less code)
|
|
|
|
|
; - every line's dword is now splitted into 2 words;
|
|
|
|
|
; low word - line block length, so max line length is 65535 now
|
|
|
|
|
; high word - various flags. for now, only 2 of 16 bits are used:
|
|
|
|
|
; if bit #0 is set, line was modified since file open
|
|
|
|
|
; if bit #1 is set, line was saved after last modification
|
|
|
|
|
; high word could also be further used for code collapsing and different
|
|
|
|
|
; line marking features (breakpoints, errors, bookmarks, etc.)
|
|
|
|
|
; new features:
|
|
|
|
|
; - line markers for modified and saved lines
|
|
|
|
|
; - status messages for various actions
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; 4.0.2 (mike.dld)
|
|
|
|
|
; bug-fixes:
|
|
|
|
|
; - program terminates if started with parameters (fine for DOCPAK)
|
|
|
|
|
; 4.0.1 (mike.dld)
|
|
|
|
|
; bug-fixes:
|
|
|
|
|
; - unable to run program after exiting from main menu (Alt+X)
|
|
|
|
|
; new features:
|
|
|
|
|
; - integration with DOCPAK
|
|
|
|
|
; 4.0 (mike.dld)
|
|
|
|
|
; bug-fixes:
|
|
|
|
|
; - main menu popups' "on show" was called only for first shown popup
|
|
|
|
|
; - clear selection on left/right arrow keys
|
|
|
|
|
; new features:
|
|
|
|
|
; - "replace" dialog (w/o "skip", "replace all")
|
|
|
|
|
; - line numbers display
|
|
|
|
|
; - options (except "appearance" and "smart tabulation")
|
|
|
|
|
; - options saving (colors, window position, "Options" popup triggers)
|
|
|
|
|
; 4.0 beta 2 (mike.dld)
|
|
|
|
|
; bug-fixes:
|
|
|
|
|
; - unable to start if /rd/1/example.asm is missing (from Halyavin)
|
|
|
|
|
; - clicking on menu items draws main window in popup (from Rohan)
|
|
|
|
|
; - passed parameters aren't taken into account (from Mario79)
|
|
|
|
|
; - background isn't erased if text lines < screen lines after
|
|
|
|
|
; selection deletion (from Rohan)
|
|
|
|
|
; 4.0 beta 1 (mike.dld)
|
|
|
|
|
; menu bar and popup menu;
|
|
|
|
|
; removed buttons from the top and input fields from the bottom since
|
|
|
|
|
; now they're accesible through main/popup menu;
|
|
|
|
|
; improved keyboard handling (using 66th function);
|
|
|
|
|
; support for almost all FASMW keyboard shourtcuts;
|
|
|
|
|
; added text selection ability, standard selection operations
|
|
|
|
|
; (copy,cut,paste);
|
|
|
|
|
; new integrated dialogs (open, save, find)
|
|
|
|
|
; fix to collapse SPACEs into TABs only for *.asm and *.inc files
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; 3.78a (mike.dld)
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; fixed termination while typing in x positions higher than (line_length+10);
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; improved drawing on small heights
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; don't draw window while its height = 0 (Kolibri "minimize" support)
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; 3.78 (mike.dld)
|
|
|
|
|
; now lines may be of ANY length;
|
|
|
|
|
; optimized memory usage (less memory for internal file representation)
|
|
|
|
|
; after loading file, it's internal size equals to its real size
|
|
|
|
|
; plus 14 bytes for each line (4 bytes for line length
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; and 10 spaced to the end - to reduce data relocations count);
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; completely rewritten keyboard handling;
|
|
|
|
|
; added horizontal scrollbar;
|
|
|
|
|
; all line feed formats are supported: WIN(CRLF),*NIX(LF),MAC(CR);
|
|
|
|
|
; etc.
|
|
|
|
|
; 3.77 (mike.dld)
|
|
|
|
|
; changed save_string to collapse SPACEs into TABs;
|
|
|
|
|
; rewrote drawfile from scratch (speed++)
|
2006-10-11 22:40:53 +02:00
|
|
|
|
; through some drawing improvements needed
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; (some checkups to reduce flickering);
|
|
|
|
|
; writepos (size--);
|
|
|
|
|
; fixed drawing window while height < 100px, and for non-asm files;
|
|
|
|
|
; several small fixes; speed/size optimizations
|
|
|
|
|
; 3.76 (mike.dld)
|
|
|
|
|
; changed loadfile/loadhdfile to expand TABs into SPACEs;
|
|
|
|
|
; changed TAB,ENTER,DELETE,BSPACE keys behaviour (rewritten from scratch);
|
|
|
|
|
; vertical scrollbar;
|
|
|
|
|
; extra window resizing capabilities (added a couple of constants);
|
|
|
|
|
; completely new text cursor management & moving text cursor with mouse;
|
|
|
|
|
; improved search function, moving cursor to beginning of text found;
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; adjustable max line width (change LINE_WIDTH & recompile) // (obsolet)
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; 3.75a
|
|
|
|
|
; fixed converting char to upper case in read_string
|
|
|
|
|
; 3.75
|
|
|
|
|
; rewrote save_file from scratch; bugfix in loadfile;
|
|
|
|
|
; 3.74
|
|
|
|
|
; optimisation
|
|
|
|
|
; 3.73
|
|
|
|
|
; completly new load_file function
|
|
|
|
|
; 3.72
|
|
|
|
|
; speed++
|
|
|
|
|
; 3.71
|
|
|
|
|
; error beep
|
|
|
|
|
; 3.6,3.7:
|
|
|
|
|
; many bugs fixed
|
|
|
|
|
; simple toolbar
|
|
|
|
|
; compile, run applications from TINYPAD, all fasm output is in debug board
|
|
|
|
|
; TAB button
|
|
|
|
|
; auto-indent
|
|
|
|
|
; Ctrl+L - insert comment string
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
2006-10-11 22:40:53 +02:00
|
|
|
|
include 'lang.inc'
|
2006-01-03 10:43:31 +01:00
|
|
|
|
include 'macros.inc' ; useful stuff
|
2006-10-11 22:40:53 +02:00
|
|
|
|
;include 'proc32.inc'
|
2006-08-14 14:50:43 +02:00
|
|
|
|
include 'tinypad.inc'
|
2007-01-28 00:36:07 +01:00
|
|
|
|
;purge mov,add,sub ; SPEED
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
header '01',1,@CODE,TINYPAD_END,STATIC_MEM_END,MAIN_STACK,@PARAMS,self_path
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
APP_VERSION equ '4.0.4'
|
2006-12-30 18:44:05 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;include 'debug.inc'
|
2007-01-18 22:14:15 +01:00
|
|
|
|
;define __DEBUG__ 1
|
|
|
|
|
;define __DEBUG_LEVEL__ 1
|
|
|
|
|
;include 'debug-fdo.inc'
|
|
|
|
|
|
|
|
|
|
ASEPC = '-' ; separator character (char)
|
|
|
|
|
ATOPH = 19 ; menu bar height (pixels)
|
|
|
|
|
SCRLW = 16 ; scrollbar widht/height (pixels)
|
|
|
|
|
ATABW = 8 ; tab key indent width (chars)
|
|
|
|
|
LINEH = 10 ; line height (pixels)
|
|
|
|
|
PATHL = 256 ; maximum path length (chars) !!! don't change !!!
|
|
|
|
|
AMINS = 8 ; minimal scroll thumb size (pixels)
|
|
|
|
|
LCHGW = 3 ; changed/saved marker width (pixels)
|
|
|
|
|
|
|
|
|
|
STATH = 16 ; status bar height (pixels)
|
|
|
|
|
TBARH = 18 ; tab bar height (pixels)
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
section @OPTIONS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
label color_tbl dword
|
2007-01-28 00:36:07 +01:00
|
|
|
|
.text: RGB( 0, 0, 0)
|
|
|
|
|
.back: RGB(255,255,255)
|
|
|
|
|
.text.sel: RGB(255,255,255)
|
|
|
|
|
.back.sel: RGB( 10, 36,106)
|
|
|
|
|
.symbol: RGB( 48, 48,240)
|
|
|
|
|
.number: RGB( 0,144, 0)
|
|
|
|
|
.string: RGB(176, 0, 0)
|
|
|
|
|
.comment: RGB(128,128,128)
|
|
|
|
|
.line.moded: RGB(255,238, 98)
|
|
|
|
|
.line.saved: RGB(108,226,108)
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
ins_mode db 1
|
2007-01-28 00:36:07 +01:00
|
|
|
|
tab_pos db 2
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
options db OPTS_AUTOINDENT+OPTS_OPTIMSAVE+OPTS_SMARTTAB
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
mainwnd_pos:
|
2007-01-10 07:03:39 +01:00
|
|
|
|
.x dd 250
|
2006-08-14 14:50:43 +02:00
|
|
|
|
.y dd 75
|
2007-01-18 22:14:15 +01:00
|
|
|
|
.w dd 6*80+6+SCRLW+5 ;- 220
|
|
|
|
|
.h dd 402 ;- 220
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
; fninit
|
|
|
|
|
|
2007-01-18 22:14:15 +01:00
|
|
|
|
; stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_left,50
|
|
|
|
|
; mov [mainwnd_pos.x],eax
|
|
|
|
|
; stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_top,50
|
|
|
|
|
; mov [mainwnd_pos.y],eax
|
|
|
|
|
; stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_right,350
|
|
|
|
|
; sub eax,[mainwnd_pos.x]
|
|
|
|
|
; mov [mainwnd_pos.w],eax
|
|
|
|
|
; stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_bottom,450
|
|
|
|
|
; sub eax,[mainwnd_pos.y]
|
|
|
|
|
; mov [mainwnd_pos.h],eax
|
2006-10-11 22:40:53 +02:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cld
|
|
|
|
|
mov edi,@UDATA
|
|
|
|
|
mov ecx,@PARAMS-@UDATA
|
|
|
|
|
mov al,0
|
|
|
|
|
rep stosb
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov al,[tab_pos]
|
|
|
|
|
mov [tab_bar.Style],al
|
2007-01-03 19:22:05 +01:00
|
|
|
|
|
|
|
|
|
mcall 68,11
|
|
|
|
|
or eax,eax
|
|
|
|
|
jz key.alt_x.close
|
|
|
|
|
|
|
|
|
|
mov eax,65536
|
|
|
|
|
call mem.Alloc
|
|
|
|
|
mov [temp_buf],eax
|
|
|
|
|
|
2006-10-11 22:40:53 +02:00
|
|
|
|
inc [do_not_draw]
|
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov dword[app_start],7
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov esi,s_example
|
|
|
|
|
mov edi,tb_opensave.text
|
|
|
|
|
mov ecx,s_example.size
|
|
|
|
|
mov [tb_opensave.length],cl
|
|
|
|
|
rep movsb
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov esi,s_still
|
|
|
|
|
mov edi,s_search
|
|
|
|
|
mov ecx,s_still.size
|
|
|
|
|
mov [s_search.size],ecx
|
|
|
|
|
rep movsb
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cmp byte[@PARAMS],0
|
|
|
|
|
jz no_params
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
|
|
|
|
;// Willow's code to support DOCPAK [
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cmp byte[@PARAMS],'*'
|
|
|
|
|
jne .noipc
|
2006-10-11 22:40:53 +02:00
|
|
|
|
|
|
|
|
|
;// diamond [ (convert size from decimal representation to dword)
|
|
|
|
|
;-- mov edx,dword[@PARAMS+1]
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov esi,@PARAMS+1
|
|
|
|
|
xor edx,edx
|
|
|
|
|
xor eax,eax
|
2006-10-11 22:40:53 +02:00
|
|
|
|
@@: lodsb
|
2006-12-30 18:44:05 +01:00
|
|
|
|
test al,al
|
|
|
|
|
jz @f
|
|
|
|
|
lea edx,[edx*4+edx]
|
|
|
|
|
lea edx,[edx*2+eax-'0']
|
|
|
|
|
jmp @b
|
2006-10-11 22:40:53 +02:00
|
|
|
|
@@:
|
|
|
|
|
;// diamond ]
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
add edx,20
|
2007-01-03 19:22:05 +01:00
|
|
|
|
|
|
|
|
|
mov eax,edx
|
|
|
|
|
call mem.Alloc
|
|
|
|
|
mov ebp,eax
|
2007-01-18 22:14:15 +01:00
|
|
|
|
push eax
|
|
|
|
|
|
|
|
|
|
mov dword[ebp+0],0
|
2007-01-03 19:22:05 +01:00
|
|
|
|
mov dword[ebp+4],8
|
2007-01-18 22:14:15 +01:00
|
|
|
|
mcall 60,1,ebp
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mcall 40,1000000b
|
2007-01-18 22:14:15 +01:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mcall 23,200
|
2007-01-18 22:14:15 +01:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cmp eax,7
|
2007-01-03 19:22:05 +01:00
|
|
|
|
jne key.alt_x.close
|
|
|
|
|
mov byte[ebp],1
|
2007-01-18 22:14:15 +01:00
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
mov ecx,[ebp+12]
|
2007-01-18 22:14:15 +01:00
|
|
|
|
lea esi,[ebp+16]
|
2007-01-03 19:22:05 +01:00
|
|
|
|
call create_tab
|
|
|
|
|
call load_from_memory
|
|
|
|
|
|
2007-01-18 22:14:15 +01:00
|
|
|
|
pop ebp
|
2007-01-03 19:22:05 +01:00
|
|
|
|
mov eax,ebp
|
|
|
|
|
call mem.Free
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
jmp @f
|
2006-08-14 14:50:43 +02:00
|
|
|
|
.noipc:
|
|
|
|
|
|
|
|
|
|
;// Willow's code to support DOCPAK ]
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov esi,@PARAMS
|
|
|
|
|
mov edi,tb_opensave.text
|
|
|
|
|
mov ecx,PATHL
|
|
|
|
|
rep movsb
|
|
|
|
|
mov edi,tb_opensave.text
|
|
|
|
|
mov ecx,PATHL
|
|
|
|
|
xor al,al
|
|
|
|
|
repne scasb
|
|
|
|
|
jne key.alt_x.close
|
|
|
|
|
lea eax,[edi-tb_opensave.text-1]
|
|
|
|
|
mov [tb_opensave.length],al
|
2007-01-28 00:36:07 +01:00
|
|
|
|
call load_file
|
2007-01-18 22:14:15 +01:00
|
|
|
|
jnc @f
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
no_params:
|
2007-01-03 19:22:05 +01:00
|
|
|
|
call create_tab
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
@@:
|
2007-01-18 22:14:15 +01:00
|
|
|
|
mov [s_status],0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
dec [do_not_draw]
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mcall 66,1,1
|
|
|
|
|
mcall 40,00100111b
|
2006-10-11 22:40:53 +02:00
|
|
|
|
red:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
call drawwindow
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
still:
|
2007-01-28 00:36:07 +01:00
|
|
|
|
call draw_statusbar ; write current position & number of strings
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
.skip_write:
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mcall 10 ; wait here until event
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cmp [main_closed],0
|
|
|
|
|
jne key.alt_x
|
|
|
|
|
dec eax ; redraw ?
|
|
|
|
|
jz red
|
|
|
|
|
dec eax ; key ?
|
|
|
|
|
jz key
|
|
|
|
|
dec eax ; button ?
|
|
|
|
|
jz button
|
|
|
|
|
sub eax,3 ; mouse ?
|
|
|
|
|
jz mouse
|
|
|
|
|
|
|
|
|
|
jmp still.skip_write
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
func start_fasm ;/////////////////////////////////////////////////////////////
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; BL = run after compile
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2007-01-28 00:36:07 +01:00
|
|
|
|
; FASM infile,outfile,/path/to/files[,run]
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
cmp [cur_editor.AsmMode],0
|
2006-12-30 18:44:05 +01:00
|
|
|
|
jne @f
|
|
|
|
|
ret
|
2007-01-28 00:36:07 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov eax,[tab_bar.Default.Ptr]
|
|
|
|
|
or eax,eax
|
|
|
|
|
jnz @f
|
|
|
|
|
mov eax,[tab_bar.Current.Ptr]
|
|
|
|
|
@@: cmp byte[eax+TABITEM.Editor.FilePath],'/'
|
|
|
|
|
je @f
|
|
|
|
|
ret
|
|
|
|
|
@@:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov edi,fasm_parameters
|
2007-01-28 00:36:07 +01:00
|
|
|
|
push eax
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
cld
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
lea esi,[eax+TABITEM.Editor.FilePath]
|
|
|
|
|
add esi,[eax+TABITEM.Editor.FileName]
|
|
|
|
|
push esi esi
|
|
|
|
|
@@: lodsb
|
|
|
|
|
cmp al,0
|
2006-12-30 18:44:05 +01:00
|
|
|
|
je @f
|
2007-01-28 00:36:07 +01:00
|
|
|
|
stosb
|
|
|
|
|
cmp al,'.'
|
|
|
|
|
jne @b
|
|
|
|
|
mov ecx,esi
|
2006-12-30 18:44:05 +01:00
|
|
|
|
jmp @b
|
2007-01-28 00:36:07 +01:00
|
|
|
|
@@:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,','
|
|
|
|
|
stosb
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
pop esi
|
|
|
|
|
sub ecx,esi
|
|
|
|
|
dec ecx
|
|
|
|
|
jz @f
|
2006-12-30 18:44:05 +01:00
|
|
|
|
rep movsb
|
2007-01-28 00:36:07 +01:00
|
|
|
|
@@:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,','
|
|
|
|
|
stosb
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
pop ecx esi
|
|
|
|
|
add esi,TABITEM.Editor.FilePath
|
|
|
|
|
sub ecx,esi
|
2006-12-30 18:44:05 +01:00
|
|
|
|
rep movsb
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
cmp bl,0 ; run outfile ?
|
|
|
|
|
je @f
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov dword[edi],',run'
|
|
|
|
|
add edi,4
|
2006-10-11 22:40:53 +02:00
|
|
|
|
@@:
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov al,0
|
|
|
|
|
stosb
|
|
|
|
|
|
|
|
|
|
mov [app_start.filename],app_fasm
|
|
|
|
|
mov [app_start.params],fasm_parameters
|
2006-10-11 22:40:53 +02:00
|
|
|
|
start_ret:
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mcall 70,app_start
|
2006-12-30 18:44:05 +01:00
|
|
|
|
ret
|
2006-01-03 10:43:31 +01:00
|
|
|
|
endf
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
func open_debug_board ;///////////////////////////////////////////////////////
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov [app_start.filename],app_board
|
|
|
|
|
mov [app_start.params],0
|
2006-12-30 18:44:05 +01:00
|
|
|
|
jmp start_ret
|
2006-01-03 10:43:31 +01:00
|
|
|
|
endf
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
func open_sysfuncs_txt ;//////////////////////////////////////////////////////
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov [app_start.filename],app_docpak
|
|
|
|
|
mov [app_start.params],sysfuncs_param
|
2006-12-30 18:44:05 +01:00
|
|
|
|
call start_ret
|
|
|
|
|
cmp eax,0xfffffff0
|
|
|
|
|
jb @f
|
2007-01-28 00:36:07 +01:00
|
|
|
|
mov [app_start.filename],app_tinypad
|
|
|
|
|
mov [app_start.params],sysfuncs_filename
|
2006-12-30 18:44:05 +01:00
|
|
|
|
call start_ret
|
2006-08-14 14:50:43 +02:00
|
|
|
|
@@: ret
|
2006-01-03 10:43:31 +01:00
|
|
|
|
endf
|
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
set_opt:
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
.dialog:
|
|
|
|
|
mov [bot_mode],1
|
|
|
|
|
mov [bot_dlg_height],128
|
|
|
|
|
mov [bot_dlg_handler],optsdlg_handler
|
|
|
|
|
mov [focused_tb],tb_color
|
|
|
|
|
mov al,[tb_color.length]
|
|
|
|
|
mov [tb_color.pos.x],al
|
|
|
|
|
mov [tb_color.sel.x],0
|
|
|
|
|
mov [tb_casesen],1
|
|
|
|
|
mov [cur_part],0
|
|
|
|
|
m2m [cur_color],dword[color_tbl.text]
|
|
|
|
|
mov esi,color_tbl
|
|
|
|
|
mov edi,cur_colors
|
|
|
|
|
mov ecx,10
|
|
|
|
|
cld
|
|
|
|
|
rep movsd
|
|
|
|
|
call drawwindow
|
|
|
|
|
ret
|
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
.line_numbers:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,OPTS_LINENUMS
|
2007-01-03 19:22:05 +01:00
|
|
|
|
jmp .main
|
|
|
|
|
.optimal_fill:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,OPTS_OPTIMSAVE
|
2007-01-03 19:22:05 +01:00
|
|
|
|
jmp .main
|
|
|
|
|
.auto_indents:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,OPTS_AUTOINDENT
|
2007-01-03 19:22:05 +01:00
|
|
|
|
jmp .main
|
|
|
|
|
.auto_braces:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,OPTS_AUTOBRACES
|
2007-01-03 19:22:05 +01:00
|
|
|
|
jmp .main
|
|
|
|
|
.secure_sel:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mov al,OPTS_SECURESEL
|
2007-01-03 19:22:05 +01:00
|
|
|
|
|
|
|
|
|
.main:
|
|
|
|
|
xor [options],al
|
2006-12-30 18:44:05 +01:00
|
|
|
|
ret
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
include 'tp-defines.inc'
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
include 'tp-draw.asm'
|
|
|
|
|
include 'tp-key.asm'
|
2006-12-30 18:44:05 +01:00
|
|
|
|
include 'tp-button.asm'
|
2006-08-14 14:50:43 +02:00
|
|
|
|
include 'tp-mouse.asm'
|
|
|
|
|
include 'tp-files.asm'
|
2006-12-30 18:44:05 +01:00
|
|
|
|
include 'tp-common.asm'
|
|
|
|
|
include 'tp-dialog.asm'
|
2006-08-14 14:50:43 +02:00
|
|
|
|
include 'tp-popup.asm'
|
|
|
|
|
include 'tp-tbox.asm'
|
2007-01-03 19:22:05 +01:00
|
|
|
|
include 'tp-tabctl.asm'
|
|
|
|
|
include 'tp-editor.asm'
|
2006-12-30 18:44:05 +01:00
|
|
|
|
include 'tp-recode.asm'
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-10-11 22:40:53 +02:00
|
|
|
|
;include 'lib-ini.asm'
|
|
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-08-14 14:50:43 +02:00
|
|
|
|
section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
2006-01-03 10:43:31 +01:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
vscrl_capt dd -1
|
|
|
|
|
hscrl_capt dd -1
|
2006-08-14 14:50:43 +02:00
|
|
|
|
body_capt dd -1
|
|
|
|
|
|
|
|
|
|
key0 db \
|
|
|
|
|
0x00,0x00,0x02,0x03,0x04,0x05,0x06,0x07,\
|
|
|
|
|
0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x00,0x00,\
|
|
|
|
|
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,\
|
|
|
|
|
0x18,0x19,0x1A,0x1B,0x00,0x00,0x1E,0x1F,\
|
|
|
|
|
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,\
|
|
|
|
|
0x28,0x29,0x00,0x2B,0x2C,0x2D,0x2E,0x2F,\
|
|
|
|
|
0x30,0x31,0x32,0x33,0x34,0x35,0x00,0x00,\
|
|
|
|
|
0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00
|
|
|
|
|
times 12*16 db 0x00
|
|
|
|
|
|
2007-01-10 07:03:39 +01:00
|
|
|
|
accel_table_main dd \
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0000000E,key.bkspace ,\ ; BackSpace
|
|
|
|
|
0x0000000F,key.tab ,\ ; Tab
|
|
|
|
|
0x0000001C,key.return ,\ ; Return
|
|
|
|
|
0x0000003D,key.f3 ,\ ; F3
|
|
|
|
|
0x00000043,key.f9 ,\ ; F9
|
|
|
|
|
0x00000147,key.home ,\ ; Home
|
|
|
|
|
0x00000148,key.up ,\ ; Up
|
|
|
|
|
0x00000149,key.pgup ,\ ; PageUp
|
|
|
|
|
0x0000014B,key.left ,\ ; Left
|
|
|
|
|
0x0000014D,key.right ,\ ; Right
|
|
|
|
|
0x0000014F,key.end ,\ ; End
|
|
|
|
|
0x00000150,key.down ,\ ; Down
|
|
|
|
|
0x00000151,key.pgdn ,\ ; PageDown
|
|
|
|
|
0x00000152,key.ins ,\ ; Insert
|
|
|
|
|
0x00000153,key.del ,\ ; Delete
|
2007-01-18 22:14:15 +01:00
|
|
|
|
0x00010043,key.shift_f9 ,\ ; Shift+F9
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00010147,key.shift_home ,\ ; Shift+Home
|
|
|
|
|
0x00010148,key.shift_up ,\ ; Shift+Up
|
|
|
|
|
0x00010149,key.shift_pgup ,\ ; Shift+PageUp
|
|
|
|
|
0x0001014B,key.shift_left ,\ ; Shift+Left
|
|
|
|
|
0x0001014D,key.shift_right ,\ ; Shift+Right
|
|
|
|
|
0x0001014F,key.shift_end ,\ ; Shift+End
|
|
|
|
|
0x00010150,key.shift_down ,\ ; Shift+Down
|
|
|
|
|
0x00010151,key.shift_pgdn ,\ ; Shift+PageDown
|
|
|
|
|
0x00010153,key.del ,\ ; Shift+Delete
|
2007-01-03 19:22:05 +01:00
|
|
|
|
0x0002000F,key.ctrl_tab ,\ ; Ctrl+Tab
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00020015,key.ctrl_y ,\ ; Ctrl+Y
|
|
|
|
|
0x00020018,key.ctrl_o ,\ ; Ctrl+O
|
|
|
|
|
0x0002001E,key.ctrl_a ,\ ; Ctrl+A
|
|
|
|
|
0x0002001F,key.ctrl_s ,\ ; Ctrl+S
|
|
|
|
|
0x00020020,key.ctrl_d ,\ ; Ctrl+D
|
|
|
|
|
0x00020021,key.ctrl_f ,\ ; Ctrl+F
|
|
|
|
|
0x00020022,key.ctrl_g ,\ ; Ctrl+G
|
|
|
|
|
0x00020023,key.ctrl_h ,\ ; Ctrl+H
|
2006-08-14 14:50:43 +02:00
|
|
|
|
\;0x00020026,key.ctrl_l ,\ ; Ctrl+L
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0002002D,key.ctrl_x ,\ ; Ctrl+X
|
|
|
|
|
0x0002002E,key.ctrl_c ,\ ; Ctrl+C
|
|
|
|
|
0x0002002F,key.ctrl_v ,\ ; Ctrl+V
|
|
|
|
|
0x00020031,key.ctrl_n ,\ ; Ctrl+N
|
2007-01-10 07:03:39 +01:00
|
|
|
|
0x0002003E,key.ctrl_f4 ,\ ; Ctrl+F4
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00020043,key.ctrl_f9 ,\ ; Ctrl+F9
|
|
|
|
|
0x00020147,key.ctrl_home ,\ ; Ctrl+Home
|
2006-08-14 14:50:43 +02:00
|
|
|
|
\;0x00020148,key.ctrl_up ,\ ; Ctrl+Up
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00020149,key.ctrl_pgup ,\ ; Ctrl+PageUp
|
|
|
|
|
0x0002014B,key.ctrl_left ,\ ; Ctrl+Left
|
|
|
|
|
0x0002014D,key.ctrl_right ,\ ; Ctrl+Right
|
|
|
|
|
0x0002014F,key.ctrl_end ,\ ; Ctrl+End
|
2006-08-14 14:50:43 +02:00
|
|
|
|
\;0x00020150,key.ctrl_down ,\ ; Ctrl+Down
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00020151,key.ctrl_pgdn ,\ ; Ctrl+PageDown
|
|
|
|
|
0x00020153,key.del ,\ ; Ctrl+Del
|
2007-01-03 19:22:05 +01:00
|
|
|
|
0x0003000F,key.shift_ctrl_tab ,\ ; Shift+Ctrl+Tab
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0003001F,key.shift_ctrl_s ,\ ; Shift+Ctrl+S
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0x00030147,key.shift_ctrl_home ,\ ; Shift+Ctrl+Home
|
|
|
|
|
\;0x00030148,key.shift_ctrl_up ,\ ; Shift+Ctrl+Up
|
|
|
|
|
0x00030149,key.shift_ctrl_pgup ,\ ; Shift+Ctrl+PageUp
|
|
|
|
|
0x0003014B,key.shift_ctrl_left ,\ ; Shift+Ctrl+Left
|
|
|
|
|
0x0003014D,key.shift_ctrl_right ,\ ; Shift+Ctrl+Right
|
|
|
|
|
0x0003014F,key.shift_ctrl_end ,\ ; Shift+Ctrl+End
|
|
|
|
|
\;0x00030150,key.shift_ctrl_down ,\ ; Shift+Ctrl+Down
|
|
|
|
|
0x00030151,key.shift_ctrl_pgdn ,\ ; Shift+Ctrl+PageDown
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0004002D,key.alt_x ,\ ; Alt+X
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
accel_table_textbox dd \
|
2006-08-14 14:50:43 +02:00
|
|
|
|
\;0x00000001,key.tb.escape ,\ ; Escape
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0000000E,key.tb.bkspace ,\ ; BackSpace
|
2006-08-14 14:50:43 +02:00
|
|
|
|
\;0x0000000F,key.tb.tab ,\ ; Tab
|
|
|
|
|
\;0x0000001C,key.tb.return ,\ ; Return
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x00000147,key.tb.home ,\ ; Home
|
|
|
|
|
0x0000014B,key.tb.left ,\ ; Left
|
|
|
|
|
0x0000014D,key.tb.right ,\ ; Right
|
|
|
|
|
0x0000014F,key.tb.end ,\ ; End
|
|
|
|
|
0x00000153,key.tb.del ,\ ; Delete
|
|
|
|
|
0x00010147,key.tb.shift_home ,\ ; Shift+Home
|
|
|
|
|
0x0001014B,key.tb.shift_left ,\ ; Shift+Left
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0x0001014D,key.tb.shift_right ,\ ; Shift+Right
|
2006-12-30 18:44:05 +01:00
|
|
|
|
0x0001014F,key.tb.shift_end ,\ ; Shift+End
|
|
|
|
|
0x00010153,key.tb.del ,\ ; Shift+Del
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0
|
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
accel_table2 dd \
|
|
|
|
|
1 ,key.alt_x ,\
|
2007-01-10 07:03:39 +01:00
|
|
|
|
'VSL',btn.vscroll_up ,\
|
|
|
|
|
'VSG',btn.vscroll_down ,\
|
|
|
|
|
'HSL',btn.hscroll_up ,\
|
|
|
|
|
'HSG',btn.hscroll_down ,\
|
|
|
|
|
'TBL',btn.tabctl_right ,\
|
|
|
|
|
'TBG',btn.tabctl_left ,\
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
accel_table2_botdlg dd \
|
2007-01-28 00:36:07 +01:00
|
|
|
|
1 ,key.alt_x ,\
|
2006-12-30 18:44:05 +01:00
|
|
|
|
20001,btn.bot.cancel ,\
|
2006-08-14 14:50:43 +02:00
|
|
|
|
20002,btn.bot.opensave ,\
|
2006-12-30 18:44:05 +01:00
|
|
|
|
20003,btn.bot.find ,\
|
2007-01-28 00:36:07 +01:00
|
|
|
|
20004,btn.bot.appearance,\
|
|
|
|
|
21001,btn.bot.tabpos ,\
|
2006-08-14 14:50:43 +02:00
|
|
|
|
0
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
add_table:
|
|
|
|
|
times $1A db -$20
|
|
|
|
|
times $25 db -$00
|
|
|
|
|
times $10 db -$20
|
|
|
|
|
times $30 db -$00
|
|
|
|
|
times $10 db -$50
|
|
|
|
|
times $04 db -$00,-$01
|
|
|
|
|
times $08 db -$00
|
|
|
|
|
|
2006-10-11 22:40:53 +02:00
|
|
|
|
s_status dd 0
|
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
@^
|
2006-10-11 22:40:53 +02:00
|
|
|
|
fasm_start:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
dd 7
|
|
|
|
|
dd 0
|
|
|
|
|
dd fasm_parameters
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db '/RD/1/DEVELOP/FASM',0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
board_start:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
dd 7
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db '/RD/1/BOARD',0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
tinypad_start:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
dd 7
|
|
|
|
|
dd 0
|
|
|
|
|
dd ?
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db '/RD/1/TINYPAD',0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
docpak_start:
|
2006-12-30 18:44:05 +01:00
|
|
|
|
dd 7
|
|
|
|
|
dd 0
|
|
|
|
|
dd sysfuncs_param
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db '/RD/1/DOCPAK',0
|
2007-01-28 00:36:07 +01:00
|
|
|
|
^@
|
|
|
|
|
|
|
|
|
|
sz app_fasm ,'/RD/1/DEVELOP/FASM',0
|
|
|
|
|
sz app_board ,'/RD/1/BOARD',0
|
|
|
|
|
sz app_tinypad ,'/RD/1/TINYPAD',0
|
|
|
|
|
sz app_docpak ,'/RD/1/DOCPAK',0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
sz sysfuncs_param,'g',0
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
include 'tp-locale.inc'
|
2006-10-11 22:40:53 +02:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
;// options dialog data [
|
|
|
|
|
label optsdlg_editor at $-EDITOR.Bounds
|
|
|
|
|
; rb PATHL ; FilePath db PATHL dup(?)
|
|
|
|
|
; dd 0 ; FileName dd ?
|
|
|
|
|
dd ?,?,?,? ; Bounds RECT
|
|
|
|
|
dd @f ; Lines dd ?
|
|
|
|
|
dd ? ; Lines.Size dd ?
|
|
|
|
|
dd 9 ; Lines.Count dd ?
|
|
|
|
|
dd 21 ; Columns.Count dd ?
|
|
|
|
|
dd 0,4 ; Caret POINT
|
|
|
|
|
dd 100,4 ; SelStart POINT
|
|
|
|
|
dd 0,0 ; TopLeft POINT
|
|
|
|
|
dd 0,0 ; VScroll SCROLLBAR
|
|
|
|
|
dd 0,0 ; HScroll SCROLLBAR
|
|
|
|
|
dd 0 ; Gutter.Width dd ?
|
|
|
|
|
db 0 ; Gutter.Visible db ?
|
|
|
|
|
db 1 ; AsmMode db ?
|
|
|
|
|
db 0 ; Modified db ?
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
dd 0x00000000+1
|
|
|
|
|
db ' '
|
|
|
|
|
dd 0x00010000+9
|
|
|
|
|
db ' org 100h'
|
|
|
|
|
dd 0x00000000+1
|
|
|
|
|
db ' '
|
|
|
|
|
dd 0x00000000+20
|
|
|
|
|
db ' mov ah,09h ; write'
|
|
|
|
|
dd 0x00000000+12
|
|
|
|
|
db ' mov dx,text'
|
|
|
|
|
dd 0x00000000+8
|
|
|
|
|
db ' int 21h'
|
|
|
|
|
dd 0x00030000+8
|
|
|
|
|
db ' int 20h'
|
|
|
|
|
dd 0x00000000+1
|
|
|
|
|
db ' '
|
|
|
|
|
dd 0x00000000+21
|
|
|
|
|
db ' text db "Hello!",24h'
|
|
|
|
|
dd 0
|
|
|
|
|
|
|
|
|
|
optsdlg_editor_parts: ; left,top,right,bottom,type
|
|
|
|
|
db 0, 12, 13, 29, 22
|
|
|
|
|
db 0, 12, 33, 47, 42
|
|
|
|
|
db 0, 12, 53, 29, 72
|
|
|
|
|
db 0, 12, 83, 53, 92
|
|
|
|
|
db 2, 12, 43, 77, 52
|
|
|
|
|
db 3, 4, 43,148, 52
|
|
|
|
|
db 4, 48, 33, 53, 42
|
|
|
|
|
db 4,108, 83,113, 92
|
|
|
|
|
db 5, 36, 13, 59, 22
|
|
|
|
|
db 5, 54, 33, 71, 42
|
|
|
|
|
db 5, 36, 53, 53, 72
|
|
|
|
|
db 5,114, 83,131, 92
|
|
|
|
|
db 6, 60, 83,107, 92
|
|
|
|
|
db 7, 84, 33,125, 42
|
|
|
|
|
db 8, 1, 13, 5, 22
|
|
|
|
|
db 9, 1, 63, 5, 72
|
|
|
|
|
db 1, 1, 1,148,105
|
|
|
|
|
db -1
|
|
|
|
|
;// ]
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
sz symbols_ex,';?.%"',"'"
|
|
|
|
|
sz symbols ,'#&*\:/<>|{}()[]=+-, '
|
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
sz ini_sec_window ,'Window',0
|
|
|
|
|
sz ini_window_top ,'Top',0
|
|
|
|
|
sz ini_window_left ,'Left',0
|
|
|
|
|
sz ini_window_right ,'Right',0
|
|
|
|
|
sz ini_window_bottom,'Bottom',0
|
2006-10-11 22:40:53 +02:00
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
TINYPAD_END: ; end of file
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
|
|
|
|
self_path rb PATHL
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
app_start:
|
|
|
|
|
dd ?,?
|
|
|
|
|
.params dd ?
|
|
|
|
|
dd ?,?
|
|
|
|
|
db ?
|
|
|
|
|
.filename dd ?
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
f_info.length dd ?
|
|
|
|
|
f_info.path:
|
2006-01-03 10:43:31 +01:00
|
|
|
|
times PATHL+1 db ?
|
2007-01-03 19:22:05 +01:00
|
|
|
|
f_info70 rd 7
|
|
|
|
|
|
|
|
|
|
file_info FILEINFO
|
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
checker_ed EDITOR
|
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
tab_bar TABCTL
|
|
|
|
|
virtual at tab_bar.Current
|
|
|
|
|
cur_tab TABITEM
|
2007-01-10 07:03:39 +01:00
|
|
|
|
end virtual
|
|
|
|
|
virtual at tab_bar.Current.Editor
|
|
|
|
|
cur_editor EDITOR
|
2007-01-03 19:22:05 +01:00
|
|
|
|
end virtual
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
lines.scr dd ? ; number of lines on the screen
|
|
|
|
|
columns.scr dd ? ; number of columns on the screen
|
2006-01-03 10:43:31 +01:00
|
|
|
|
top_ofs dd ? ; height occupied by top buttons
|
|
|
|
|
bot_ofs dd ? ; height occupied by bottom buttons
|
2006-12-30 18:44:05 +01:00
|
|
|
|
dw ?
|
2006-08-14 14:50:43 +02:00
|
|
|
|
left_ofs dd ? ;
|
2006-12-30 18:44:05 +01:00
|
|
|
|
__rc dd ?,?,?,?
|
2006-01-03 10:43:31 +01:00
|
|
|
|
copy_count dd ? ; number of lines for copying (Ctrl+E)
|
|
|
|
|
copy_size dd ? ; size of data to copy
|
|
|
|
|
s_title.size dd ? ; caption length
|
|
|
|
|
|
|
|
|
|
cur_line_len dd ?
|
2006-08-14 14:50:43 +02:00
|
|
|
|
h_popup dd ?
|
|
|
|
|
bot_dlg_handler dd ?
|
|
|
|
|
|
|
|
|
|
sel.begin.x dd ?
|
|
|
|
|
sel.begin.y dd ?
|
|
|
|
|
sel.end.x dd ?
|
|
|
|
|
sel.end.y dd ?
|
|
|
|
|
sel.selected db ?
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
in_sel db ?
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
do_not_draw db ? ; draw top and bottom buttons?
|
2006-08-14 14:50:43 +02:00
|
|
|
|
main_closed db ? ; main window closed?
|
|
|
|
|
tb_casesen db ? ; focused textbox is case-sensitive?
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
draw_blines db ?
|
|
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
|
align 4
|
|
|
|
|
s_fname.size dd ?
|
|
|
|
|
s_fname rb PATHL+1
|
|
|
|
|
align 4
|
|
|
|
|
s_search.size dd ?
|
|
|
|
|
s_search rb PATHL+1
|
|
|
|
|
|
2006-08-14 14:50:43 +02:00
|
|
|
|
s_title rb PATHL+11 ; window caption
|
|
|
|
|
|
|
|
|
|
chr db ?
|
|
|
|
|
ext db ?
|
|
|
|
|
shi dd ?
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
cl_3d_normal dd ?
|
|
|
|
|
cl_3d_pushed dd ?
|
|
|
|
|
cl_3d_outset dd ?
|
|
|
|
|
cl_3d_inset dd ?
|
|
|
|
|
cl_3d_grayed dd ?
|
|
|
|
|
|
2007-01-28 00:36:07 +01:00
|
|
|
|
tb_color TBOX
|
2006-08-14 14:50:43 +02:00
|
|
|
|
tb_opensave TBOX
|
|
|
|
|
tb_find TBOX
|
|
|
|
|
tb_replace TBOX
|
|
|
|
|
tb_gotorow TBOX
|
|
|
|
|
tb_gotocol TBOX
|
|
|
|
|
|
|
|
|
|
focused_tb dd ?
|
|
|
|
|
|
|
|
|
|
key1 rb 256
|
|
|
|
|
|
|
|
|
|
mst db ?
|
|
|
|
|
mst2 db ?
|
|
|
|
|
mev db ?
|
2006-12-30 18:44:05 +01:00
|
|
|
|
mouse_captured db ?
|
2006-08-14 14:50:43 +02:00
|
|
|
|
just_from_popup db ?
|
|
|
|
|
|
|
|
|
|
bot_mode db ?
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
|
|
|
|
|
bot_dlg_height dd ?
|
|
|
|
|
bot_dlg_mode2 db ?
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
temp_buf dd ?
|
|
|
|
|
copy_buf dd ?
|
|
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-08-14 14:50:43 +02:00
|
|
|
|
section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
2006-01-03 10:43:31 +01:00
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
fasm_parameters:
|
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
|
p_info process_information
|
2006-08-14 14:50:43 +02:00
|
|
|
|
p_info2 process_information
|
2006-12-30 18:44:05 +01:00
|
|
|
|
sc system_colors
|
2006-08-14 14:50:43 +02:00
|
|
|
|
|
2007-01-03 19:22:05 +01:00
|
|
|
|
rb 1024*4
|
|
|
|
|
MAIN_STACK:
|
|
|
|
|
rb 1024*4
|
|
|
|
|
POPUP_STACK:
|
|
|
|
|
|
|
|
|
|
STATIC_MEM_END:
|
|
|
|
|
|
|
|
|
|
diff10 'Main memory size',0,$
|