Subversion Repositories Kolibri OS

Rev

Rev 242 | Rev 259 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;-----------------------------------------------------------------------------
  2. ; project name:      TINYPAD
  3. ; compiler:          flat assembler 1.67.1
  4. ; memory to compile: 2.0/7.0 MBytes (without/with size optimizations)
  5. ; version:           4.0.4 pre
  6. ; last update:       2006-12-30 (Dec 30, 2006)
  7. ; minimal kernel:    revision #138 (svn://kolibrios.org/kernel)
  8. ;-----------------------------------------------------------------------------
  9. ; originally by:     Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
  10. ; maintained by:     Mike Semenyako          >> mike.dld@gmail.com
  11. ;                    Ivan Poddubny           >> ivan-yar@bk.ru
  12. ;-----------------------------------------------------------------------------
  13. ; TODO:
  14. ;   - optimize drawing (reduce flickering)
  15. ;   - optimize memory usage (allocate only needed amount, not static 3 Mbytes)
  16. ;   - add block selection ability, undo action, goto position
  17. ;   - working with multiple files (add tabs)
  18. ;   - improve window drawing with small dimensions
  19. ;   - other bugfixes and speed/size optimizations
  20. ;
  21. ; HISTORY:
  22. ; 4.0.4 pre (mike.dld)
  23. ;   bug-fixes:
  24. ;     - clear statusbar text if dialog operation cancelled
  25. ;   changes:
  26. ;     - modified/saved colors now match those in MSVS
  27. ;   new features:
  28. ;     - recode tables between CP866, CP1251 and KOI8-R (suggested by Victor)
  29. ; 4.0.3 (mike.dld)
  30. ;   bug-fixes:
  31. ;     - 1-char selection if pressing <BS> out of real line length
  32. ;     - fault in `writepos`, added call to function 9
  33. ;     - main menu items weren't highlighted if popup opened and cursor
  34. ;       isn't in main menu item's area
  35. ;     - statusbar and textboxes drawing fixes (wrong colors)
  36. ;     - perform no redraw while pressing Shift, Ctrl, Alt keys
  37. ;     - data length from DOCPAK in string representation (fixed by diamond)
  38. ;   changes:
  39. ;     - function 70 instead of 58 for files loading/saving
  40. ;     - clientarea-relative drawing (less code)
  41. ;     - every line's dword is now splitted into 2 words;
  42. ;       low word - line block length, so max line length is 65535 now
  43. ;       high word - various flags. for now, only 2 of 16 bits are used:
  44. ;         if bit #0 is set, line was modified since file open
  45. ;         if bit #1 is set, line was saved after last modification
  46. ;       high word could also be further used for code collapsing and different
  47. ;         line marking features (breakpoints, errors, bookmarks, etc.)
  48. ;   new features:
  49. ;     - line markers for modified and saved lines
  50. ;     - status messages for various actions
  51. ; 4.0.2 (mike.dld)
  52. ;   bug-fixes:
  53. ;     - program terminates if started with parameters (fine for DOCPAK)
  54. ; 4.0.1 (mike.dld)
  55. ;   bug-fixes:
  56. ;     - unable to run program after exiting from main menu (Alt+X)
  57. ;   new features:
  58. ;     - integration with DOCPAK
  59. ; 4.0 (mike.dld)
  60. ;   bug-fixes:
  61. ;     - main menu popups' "on show" was called only for first shown popup
  62. ;     - clear selection on left/right arrow keys
  63. ;   new features:
  64. ;     - "replace" dialog (w/o "skip", "replace all")
  65. ;     - line numbers display
  66. ;     - options (except "appearance" and "smart tabulation")
  67. ;     - options saving (colors, window position, "Options" popup triggers)
  68. ; 4.0 beta 2 (mike.dld)
  69. ;   bug-fixes:
  70. ;     - unable to start if /rd/1/example.asm is missing (from Halyavin)
  71. ;     - clicking on menu items draws main window in popup (from Rohan)
  72. ;     - passed parameters aren't taken into account (from Mario79)
  73. ;     - background isn't erased if text lines < screen lines after
  74. ;       selection deletion (from Rohan)
  75. ; 4.0 beta 1 (mike.dld)
  76. ;   menu bar and popup menu;
  77. ;     removed buttons from the top and input fields from the bottom since
  78. ;     now they're accesible through main/popup menu;
  79. ;   improved keyboard handling (using 66th function);
  80. ;     support for almost all FASMW keyboard shourtcuts;
  81. ;   added text selection ability, standard selection operations
  82. ;     (copy,cut,paste);
  83. ;   new integrated dialogs (open, save, find)
  84. ;   fix to collapse SPACEs into TABs only for *.asm and *.inc files
  85. ; 3.78a (mike.dld)
  86. ;   fixed termination while typing in x positions higher than (line_length+10);
  87. ;   improved drawing on small heights
  88. ;     don't draw window while its height = 0 (Kolibri "minimize" support)
  89. ; 3.78 (mike.dld)
  90. ;   now lines may be of ANY length;
  91. ;     optimized memory usage (less memory for internal file representation)
  92. ;       after loading file, it's internal size equals to its real size
  93. ;       plus 14 bytes for each line (4 bytes for line length
  94. ;         and 10 spaced to the end - to reduce data relocations count);
  95. ;     completely rewritten keyboard handling;
  96. ;     added horizontal scrollbar;
  97. ;   all line feed formats are supported: WIN(CRLF),*NIX(LF),MAC(CR);
  98. ;   etc.
  99. ; 3.77 (mike.dld)
  100. ;   changed save_string to collapse SPACEs into TABs;
  101. ;   rewrote drawfile from scratch (speed++)
  102. ;     through some drawing improvements  needed
  103. ;     (some checkups to reduce flickering);
  104. ;   writepos (size--);
  105. ;   fixed drawing window while height < 100px, and for non-asm files;
  106. ;   several small fixes; speed/size optimizations
  107. ; 3.76 (mike.dld)
  108. ;   changed loadfile/loadhdfile to expand TABs into SPACEs;
  109. ;   changed TAB,ENTER,DELETE,BSPACE keys behaviour (rewritten from scratch);
  110. ;   vertical scrollbar;
  111. ;   extra window resizing capabilities (added a couple of constants);
  112. ;   completely new text cursor management & moving text cursor with mouse;
  113. ;   improved search function, moving cursor to beginning of text found;
  114. ;   adjustable max line width (change LINE_WIDTH & recompile) // (obsolet)
  115. ; 3.75a
  116. ;   fixed converting char to upper case in read_string
  117. ; 3.75
  118. ;   rewrote save_file from scratch; bugfix in loadfile;
  119. ; 3.74
  120. ;   optimisation
  121. ; 3.73
  122. ;   completly new load_file function
  123. ; 3.72
  124. ;   speed++
  125. ; 3.71
  126. ;   error beep
  127. ; 3.6,3.7:
  128. ;   many bugs fixed
  129. ;   simple toolbar
  130. ;   compile, run applications from TINYPAD, all fasm output is in debug board
  131. ;   TAB button
  132. ;   auto-indent
  133. ;   Ctrl+L - insert comment string
  134. ;-----------------------------------------------------------------------------
  135. ; Memory 0x300000:
  136. ;   stack for popup  0x00dff0 -
  137. ;   stack for help   0x00eff0 -
  138. ;   stack            0x00fff0 -
  139. ;   load position    0x010000 +
  140. ;   edit area        0x080000 +
  141. ;   copy/paste area  0x2f0000 +
  142. ;-----------------------------------------------------------------------------
  143.  
  144. include 'lang.inc'
  145. include 'macros.inc' ; useful stuff
  146. ;include 'proc32.inc'
  147. include 'tinypad.inc'
  148. ;purge mov,add,sub            ;  SPEED
  149.  
  150. header '01',1,@CODE,TINYPAD_END,AREA_ENDMEM,MAIN_STACK,@PARAMS,self_path
  151.  
  152. APP_VERSION equ '4.0.4 pre'
  153.  
  154. ;include 'debug.inc'
  155.  
  156. ASEPC     = '-'           ; separator character (char)
  157. ATOPH     = POP_IHEIGHT+2 ; menu bar height (pixels)
  158. ;OLEFT    = 50+1          ; left offset (pixels)        !!! don't change !!!
  159. SCRLW     = 16            ; scrollbar widht/height (pixels)
  160. ATABW     = 8             ; tab width (chars)
  161. LINEH     = 10            ; line height (pixels)
  162. PATHL     = 255           ; maximum path length (chars) !!! don't change !!!
  163. AMINS     = 8             ; minimal scroll thumb size (pixels)
  164. LCHGW     = 2             ; changed/saved marker width
  165.  
  166. STATH     = 14            ; status bar height
  167.  
  168. MEV_LDOWN = 1
  169. MEV_LUP   = 2
  170. MEV_RDOWN = 3
  171. MEV_RUP   = 4
  172. MEV_MOVE  = 5
  173.  
  174. ;-----------------------------------------------------------------------------
  175. section @OPTIONS ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  176. ;-----------------------------------------------------------------------------
  177.  
  178. label color_tbl dword
  179.   RGB(  0,  0,  0) ; RGB(  0,  0,  0) ; RGB(  0,  0,  0) ; text
  180.   RGB(  0,144,  0) ; RGB(  0,144,  0) ; RGB(  0,160,  0) ; numbers
  181.   RGB(176,  0,  0) ; RGB(160,  0,  0) ; RGB(  0,128,255) ; strings
  182.   RGB(128,128,128) ; RGB(144,144,144) ; RGB(160,160,160) ; comments
  183.   RGB( 48, 48,240) ; RGB( 48, 48,240) ; RGB(255,  0,  0) ; symbols
  184.   RGB(255,255,255) ; RGB(224,224,224) ; RGB(255,255,255) ; background
  185.   RGB(255,255,255) ; RGB(255,255,255) ; RGB(255,255,255) ; selection text
  186.   RGB( 10, 36,106) ; RGB(  0,  0,128) ; RGB(  0, 64,128) ; selection background
  187.   RGB(255,255,  0) ; modified line marker
  188.   RGB(  0,255,  0) ; saved line marker
  189.  
  190. ins_mode db 1
  191.  
  192. options  db OPTS_AUTOINDENT+OPTS_OPTIMSAVE+OPTS_SMARTTAB
  193.  
  194. mainwnd_pos:
  195.   .x dd 100
  196.   .y dd 75
  197.   .w dd 6*80+6+SCRLW+5
  198.   .h dd 402
  199.  
  200. ;-----------------------------------------------------------------------------
  201. section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  202. ;-----------------------------------------------------------------------------
  203.  
  204. ;       fninit
  205.  
  206. ;        stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_left,50
  207. ;        mov     [mainwnd_pos.x],eax
  208. ;        stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_top,50
  209. ;        mov     [mainwnd_pos.y],eax
  210. ;        stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_right,350
  211. ;        sub     eax,[mainwnd_pos.x]
  212. ;        mov     [mainwnd_pos.w],eax
  213. ;        stdcall ini.get_int,finfo_ini,ini_sec_window,ini_window_bottom,450
  214. ;        sub     eax,[mainwnd_pos.y]
  215. ;        mov     [mainwnd_pos.h],eax
  216.  
  217.         cld
  218.         mov     edi,@UDATA
  219.         mov     ecx,@PARAMS-@UDATA
  220.         mov     al,0
  221.         rep     stosb
  222.  
  223.         inc     [do_not_draw]
  224.  
  225.         mov     [left_ofs],40+1
  226.         mov     [f_info+4],0
  227.         mov     [f_info+12],AREA_TEMP
  228.         mov     [f_info+16],AREA_EDIT-AREA_TEMP
  229.  
  230.         mov     esi,s_example
  231.         mov     edi,tb_opensave.text
  232.         mov     ecx,s_example.size
  233.         mov     [tb_opensave.length],cl
  234.         rep     movsb
  235.  
  236.         mov     esi,s_still
  237.         mov     edi,s_search
  238.         mov     ecx,s_still.size
  239.         mov     [s_search.size],ecx
  240.         rep     movsb
  241.  
  242.         cmp     byte[@PARAMS],0
  243.         jz      no_params
  244.  
  245. ;// Willow's code to support DOCPAK [
  246.  
  247.         cmp     byte[@PARAMS],'*'
  248.         jne     .noipc
  249.  
  250. ;// diamond [ (convert size from decimal representation to dword)
  251. ;--     mov     edx,dword[@PARAMS+1]
  252.         mov     esi,@PARAMS+1
  253.         xor     edx,edx
  254.         xor     eax,eax
  255.     @@: lodsb
  256.         test    al,al
  257.         jz      @f
  258.         lea     edx,[edx*4+edx]
  259.         lea     edx,[edx*2+eax-'0']
  260.         jmp     @b
  261.     @@:
  262. ;// diamond ]
  263.  
  264.         add     edx,20
  265.         mcall   60,1,AREA_TEMP-16 ; 0x10000-16
  266.         mov     dword[AREA_TEMP-16+4],8 ; [0x10000-16+4],8
  267.         mcall   40,1000000b
  268.         mcall   23,200
  269.         cmp     eax,7
  270.         jne     key.alt_x.close  ; ýòî íà mcall -1 ìåòêà
  271.         mov     esi,AREA_TEMP-16 ; 0x10000-16
  272.         mov     byte[esi],1
  273.         mov     eax,[esi+12]
  274.         inc     eax
  275.         call    load_file.file_found
  276.         jmp     @f
  277.   .noipc:
  278.  
  279. ;// Willow's code to support DOCPAK ]
  280.  
  281.     ; parameters are at @PARAMS
  282.         mov     esi,@PARAMS
  283.         mov     edi,tb_opensave.text
  284.         mov     ecx,PATHL
  285.         rep     movsb
  286.         mov     edi,tb_opensave.text
  287.         mov     ecx,PATHL
  288.         xor     al,al
  289.         repne   scasb
  290.         jne     key.alt_x.close
  291.         lea     eax,[edi-tb_opensave.text-1]
  292.         mov     [tb_opensave.length],al
  293.  
  294.   no_params:
  295.         call    btn.load_file;do_load_file
  296.         jnc     @f
  297.         call    new_file
  298.  
  299.     @@:
  300.         dec     [do_not_draw]
  301.         mcall   66,1,1
  302.         mcall   40,00100111b
  303. red:
  304.         call    drawwindow
  305.         call    check_inv_all.skip_check
  306.  
  307. ;-----------------------------------------------------------------------------
  308.  
  309. still:
  310.        call    writepos ; write current position & number of strings
  311.  
  312.   .skip_write:
  313.         mcall   10;23,50; wait here until event
  314.         cmp     [main_closed],0
  315.         jne     key.alt_x
  316.         dec     eax     ; redraw ?
  317.         jz      red
  318.         dec     eax     ; key ?
  319.         jz      key
  320.         dec     eax     ; button ?
  321.         jz      button
  322.         sub     eax,3   ; mouse ?
  323.         jz      mouse
  324.  
  325.         jmp     still.skip_write
  326.  
  327. ;-----------------------------------------------------------------------------
  328. func start_fasm ;/////////////////////////////////////////////////////////////
  329. ;-----------------------------------------------------------------------------
  330. ; BL = run after compile
  331. ;-----------------------------------------------------------------------------
  332.         cmp     [asm_mode],0
  333.         jne     @f
  334.         ret
  335.     @@: mov     esi,f_info.path ; s_fname
  336.         mov     edi,fasm_parameters
  337.  
  338.         cmp     byte[esi],'/'
  339.         je      .yes_systree
  340.  
  341.         mov     ecx,[f_info.length] ; [s_fname.size]
  342.         rep     movsb
  343.  
  344.         mov     al,','
  345.         stosb
  346.  
  347.         mov     ecx,[f_info.length] ; [s_fname.size]
  348.         add     ecx,-4
  349.         mov     esi,f_info.path ; s_fname
  350.         rep     movsb
  351.  
  352.         mov     al,','
  353.         stosb
  354.  
  355.         mov     dword[edi],'/RD/'
  356.         mov     word[edi+4],'1/'
  357.         add     edi,6
  358.  
  359.         mov     al,0
  360.         stosb
  361.  
  362.         jmp     .run
  363.  
  364.  .yes_systree:
  365.         mov     eax,[f_info.length]
  366.         add     esi,eax ; [s_fname.size]
  367.         dec     esi
  368.  
  369.         xor     ecx,ecx
  370.         mov     al,'/'
  371.     @@: cmp     [esi],al
  372.         je      @f
  373.         dec     esi
  374.         inc     ecx
  375.         jmp     @b
  376.     @@: inc     esi
  377.  
  378.         push    esi esi ecx
  379.  
  380.         rep     movsb
  381.  
  382.         mov     al,','
  383.         stosb
  384.  
  385.         pop     ecx esi
  386.  
  387.         add     ecx,-4
  388.         rep     movsb
  389.  
  390.         mov     al,','
  391.         stosb
  392.  
  393.         pop     ecx
  394.         sub     ecx,f_info.path ; s_fname
  395.         mov     esi,f_info.path ; s_fname
  396.  
  397.         rep     movsb
  398.  
  399.         mov     al,0
  400.         stosb
  401.  
  402.  .run:
  403.         cmp     bl,0 ; run outfile ?
  404.         je      @f
  405.         mov     dword[edi-1],',run'
  406.         mov     byte[edi+3],0
  407.     @@:
  408.         mov     ebx, fasm_start
  409. start_ret:
  410.         mov     eax, 70
  411.         int     0x40
  412.         ret
  413. endf
  414.  
  415. ;-----------------------------------------------------------------------------
  416. func open_debug_board ;///////////////////////////////////////////////////////
  417. ;-----------------------------------------------------------------------------
  418.         mov     ebx, board_start
  419.         jmp     start_ret
  420. endf
  421.  
  422. ;-----------------------------------------------------------------------------
  423. func open_sysfuncs_txt ;//////////////////////////////////////////////////////
  424. ;-----------------------------------------------------------------------------
  425.         mov     ebx, docpak_start
  426.         call    start_ret
  427.         cmp     eax,0xfffffff0
  428.         jb      @f
  429.         mov     ebx, tinypad_start
  430.         mov     dword [ebx+8], sysfuncs_filename
  431.         call    start_ret
  432.     @@: ret
  433. endf
  434.  
  435. ;-----------------------------------------------------------------------------
  436. ;func layout  ;///// change keyboard layout ///////////////////////////////////
  437. ;-----------------------------------------------------------------------------
  438. ;        mcall   19,setup,param_setup
  439. ;        mcall   5,eax
  440. ;;       call    activate_me
  441. ;;       ret
  442. ;;endf
  443.  
  444. ;;func activate_me
  445. ;        mcall   9,p_info,-1
  446. ;        inc     eax
  447. ;        inc     eax
  448. ;        mov     ecx,eax
  449. ;        mov     edi,[p_info.PID]
  450. ;        mov     ebx,p_info
  451. ;    @@: dec     ecx
  452. ;        jz      @f    ; counter=0 => not found? => return
  453. ;        mcall   9
  454. ;        cmp     edi,[p_info.PID]
  455. ;        jne     @b
  456. ;        mcall   18,3
  457. ;        mcall   5,eax
  458. ;    @@: ret
  459. ;endf
  460.  
  461. func set_opt
  462.         test    [options],al
  463.         je      @f
  464.         not     al
  465.         and     [options],al
  466.         ret
  467.     @@: or      [options],al
  468.         ret
  469. endf
  470.  
  471. func set_line_numbers
  472.         mov     al,OPTS_LINENUMS
  473.         call    set_opt
  474.         ret
  475. endf
  476.  
  477. func set_optimal_fill
  478.         mov     al,OPTS_OPTIMSAVE
  479.         call    set_opt
  480.         ret
  481. endf
  482.  
  483. func set_auto_indents
  484.         mov     al,OPTS_AUTOINDENT
  485.         call    set_opt
  486.         ret
  487. endf
  488.  
  489. func set_auto_braces
  490.         mov     al,OPTS_AUTOBRACES
  491.         call    set_opt
  492.         ret
  493. endf
  494.  
  495. func set_secure_sel
  496.         mov     al,OPTS_SECURESEL
  497.         call    set_opt
  498.         ret
  499. endf
  500.  
  501. ;-----------------------------------------------------------------------------
  502.  
  503. include 'tp-draw.asm'
  504. include 'tp-key.asm'
  505. include 'tp-button.asm'
  506. include 'tp-mouse.asm'
  507. include 'tp-files.asm'
  508. include 'tp-common.asm'
  509. include 'tp-dialog.asm'
  510. include 'tp-popup.asm'
  511. include 'tp-tbox.asm'
  512. include 'tp-recode.asm'
  513.  
  514. ;include 'lib-ini.asm'
  515.  
  516. ;-----------------------------------------------------------------------------
  517. section @DATA ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  518. ;-----------------------------------------------------------------------------
  519.  
  520. ;addr       dd s_fname  ; address of input string
  521. ;temp       dd 0xABCD   ; used in read_string
  522. vscrl_capt dd -1
  523. hscrl_capt dd -1
  524. body_capt  dd -1
  525.  
  526. key0 db \
  527.   0x00,0x00,0x02,0x03,0x04,0x05,0x06,0x07,\
  528.   0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x00,0x00,\
  529.   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,\
  530.   0x18,0x19,0x1A,0x1B,0x00,0x00,0x1E,0x1F,\
  531.   0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,\
  532.   0x28,0x29,0x00,0x2B,0x2C,0x2D,0x2E,0x2F,\
  533.   0x30,0x31,0x32,0x33,0x34,0x35,0x00,0x00,\
  534.   0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00
  535.   times 12*16 db 0x00
  536.  
  537. accel_table dd                      \
  538.   0x0000000E,key.bkspace           ,\ ; BackSpace
  539.   0x0000000F,key.tab               ,\ ; Tab
  540.   0x0000001C,key.return            ,\ ; Return
  541.   0x0000003D,key.f3                ,\ ; F3
  542.   0x00000043,key.f9                ,\ ; F9
  543.   0x00000147,key.home              ,\ ; Home
  544.   0x00000148,key.up                ,\ ; Up
  545.   0x00000149,key.pgup              ,\ ; PageUp
  546.   0x0000014B,key.left              ,\ ; Left
  547.   0x0000014D,key.right             ,\ ; Right
  548.   0x0000014F,key.end               ,\ ; End
  549.   0x00000150,key.down              ,\ ; Down
  550.   0x00000151,key.pgdn              ,\ ; PageDown
  551.   0x00000152,key.ins               ,\ ; Insert
  552.   0x00000153,key.del               ,\ ; Delete
  553.   0x00010147,key.shift_home        ,\ ; Shift+Home
  554.   0x00010148,key.shift_up          ,\ ; Shift+Up
  555.   0x00010149,key.shift_pgup        ,\ ; Shift+PageUp
  556.   0x0001014B,key.shift_left        ,\ ; Shift+Left
  557.   0x0001014D,key.shift_right       ,\ ; Shift+Right
  558.   0x0001014F,key.shift_end         ,\ ; Shift+End
  559.   0x00010150,key.shift_down        ,\ ; Shift+Down
  560.   0x00010151,key.shift_pgdn        ,\ ; Shift+PageDown
  561.   0x00010153,key.del               ,\ ; Shift+Delete
  562.   0x00020015,key.ctrl_y            ,\ ; Ctrl+Y
  563.   0x00020018,key.ctrl_o            ,\ ; Ctrl+O
  564.   0x0002001E,key.ctrl_a            ,\ ; Ctrl+A
  565.   0x0002001F,key.ctrl_s            ,\ ; Ctrl+S
  566.   0x00020020,key.ctrl_d            ,\ ; Ctrl+D
  567.   0x00020021,key.ctrl_f            ,\ ; Ctrl+F
  568.   0x00020022,key.ctrl_g            ,\ ; Ctrl+G
  569.   0x00020023,key.ctrl_h            ,\ ; Ctrl+H
  570. \;0x00020026,key.ctrl_l            ,\ ; Ctrl+L
  571.   0x0002002D,key.ctrl_x            ,\ ; Ctrl+X
  572.   0x0002002E,key.ctrl_c            ,\ ; Ctrl+C
  573.   0x0002002F,key.ctrl_v            ,\ ; Ctrl+V
  574.   0x00020031,key.ctrl_n            ,\ ; Ctrl+N
  575.   0x00020043,key.ctrl_f9           ,\ ; Ctrl+F9
  576.   0x00020147,key.ctrl_home         ,\ ; Ctrl+Home
  577. \;0x00020148,key.ctrl_up           ,\ ; Ctrl+Up
  578.   0x00020149,key.ctrl_pgup         ,\ ; Ctrl+PageUp
  579.   0x0002014B,key.ctrl_left         ,\ ; Ctrl+Left
  580.   0x0002014D,key.ctrl_right        ,\ ; Ctrl+Right
  581.   0x0002014F,key.ctrl_end          ,\ ; Ctrl+End
  582. \;0x00020150,key.ctrl_down         ,\ ; Ctrl+Down
  583.   0x00020151,key.ctrl_pgdn         ,\ ; Ctrl+PageDown
  584.   0x00020153,key.del               ,\ ; Ctrl+Del
  585.   0x0003001F,key.shift_ctrl_s      ,\ ; Shift+Ctrl+S
  586.   0x00030147,key.shift_ctrl_home   ,\ ; Shift+Ctrl+Home
  587. \;0x00030148,key.shift_ctrl_up     ,\ ; Shift+Ctrl+Up
  588.   0x00030149,key.shift_ctrl_pgup   ,\ ; Shift+Ctrl+PageUp
  589.   0x0003014B,key.shift_ctrl_left   ,\ ; Shift+Ctrl+Left
  590.   0x0003014D,key.shift_ctrl_right  ,\ ; Shift+Ctrl+Right
  591.   0x0003014F,key.shift_ctrl_end    ,\ ; Shift+Ctrl+End
  592. \;0x00030150,key.shift_ctrl_down   ,\ ; Shift+Ctrl+Down
  593.   0x00030151,key.shift_ctrl_pgdn   ,\ ; Shift+Ctrl+PageDown
  594.   0x0004002D,key.alt_x             ,\ ; Alt+X
  595.   0
  596.  
  597. accel_table_textbox dd              \
  598. \;0x00000001,key.tb.escape         ,\ ; Escape
  599.   0x0000000E,key.tb.bkspace        ,\ ; BackSpace
  600. \;0x0000000F,key.tb.tab            ,\ ; Tab
  601. \;0x0000001C,key.tb.return         ,\ ; Return
  602.   0x00000147,key.tb.home           ,\ ; Home
  603.   0x0000014B,key.tb.left           ,\ ; Left
  604.   0x0000014D,key.tb.right          ,\ ; Right
  605.   0x0000014F,key.tb.end            ,\ ; End
  606.   0x00000153,key.tb.del            ,\ ; Delete
  607.   0x00010147,key.tb.shift_home     ,\ ; Shift+Home
  608.   0x0001014B,key.tb.shift_left     ,\ ; Shift+Left
  609.   0x0001014D,key.tb.shift_right    ,\ ; Shift+Right
  610.   0x0001014F,key.tb.shift_end      ,\ ; Shift+End
  611.   0x00010153,key.tb.del            ,\ ; Shift+Del
  612.   0
  613.  
  614. accel_table2 dd            \
  615.   1,btn.close_main_window ,\
  616. \;10000,btn.compile       ,\
  617. \;10001,btn.compile_run   ,\
  618. \;10002,btn.debug_board   ,\
  619. \;10003,btn.sysfuncs_txt  ,\
  620.   'UP',btn.scroll_up      ,\
  621.   'DN',btn.scroll_down    ,\
  622.   'LT',btn.scroll_left    ,\
  623.   'RT',btn.scroll_right   ,\
  624. \;5,key.ctrl_o            ,\
  625.   0
  626.  
  627. accel_table2_botdlg dd     \
  628.   1,btn.close_main_window ,\
  629.   20001,btn.bot.cancel    ,\
  630.   20002,btn.bot.opensave  ,\
  631.   20003,btn.bot.find      ,\
  632.   0
  633.  
  634. add_table:
  635. ; times $61 db -$00
  636.   times $1A db -$20
  637.   times $25 db -$00
  638.   times $10 db -$20
  639.   times $30 db -$00
  640.   times $10 db -$50
  641.   times $04 db -$00,-$01
  642.   times $08 db -$00
  643.  
  644. ;error_beep      db 0xA0,0x30,0
  645.  
  646. s_status dd 0
  647.  
  648. sz s_example,'EXAMPLE.ASM'
  649. sz s_still  ,'still'
  650.  
  651. ;sz param_setup,'LANG',0 ; parameter for SETUP
  652.  
  653. fasm_start:
  654.         dd      7
  655.         dd      0
  656.         dd      fasm_parameters
  657.         dd      0
  658.         dd      0
  659.         db      '/RD/1/DEVELOP/FASM',0
  660. board_start:
  661.         dd      7
  662.         dd      0
  663.         dd      0
  664.         dd      0
  665.         dd      0
  666.         db      '/RD/1/BOARD',0
  667. tinypad_start:
  668.         dd      7
  669.         dd      0
  670.         dd      ?
  671.         dd      0
  672.         dd      0
  673.         db      '/RD/1/TINYPAD',0
  674. docpak_start:
  675.         dd      7
  676.         dd      0
  677.         dd      sysfuncs_param
  678.         dd      0
  679.         dd      0
  680.         db      '/RD/1/DOCPAK',0
  681.  
  682. ;sz setup           ,'SETUP      ' ; to change keyboard layout
  683.  
  684. sz sysfuncs_param,'g',0
  685.  
  686. lsz sysfuncs_filename,\
  687.   ru,<'SYSFUNCR.TXT',0>,\
  688.   en,<'SYSFUNCS.TXT',0>
  689.  
  690. sz htext,'TINYPAD ',APP_VERSION
  691.  
  692. lszc help_text,b,\
  693.   ru,'ŠŽŒ€„›:',\
  694.   ru,' ',\
  695.   ru,'  CTRL+F1 : â® ®ª­®',\
  696.   ru,'  CTRL+S  : ¥à¢ ï áâப  ¤«ï ª®¯¨à®¢ ­¨ï',\
  697.   ru,'  CTRL+E  : ®á«¥¤­ïï áâப  ¤«ï ª®¯¨à®¢ ­¨ï',\
  698.   ru,'  CTRL+P  : ‚áâ ¢¨âì ¢ë¡à ­­®¥ ­  ⥪ãéãî ¯®§¨æ¨î',\
  699.   ru,'  CTRL+D  : “¤ «¨âì áâபã',\
  700.   ru,'  CTRL+L  : ‚áâ ¢¨âì áâபã-à §¤¥«¨â¥«ì',\
  701.   ru,'  CTRL+[  : ¥à¥©â¨ ¢ ­ ç «® ä ©« ',\
  702.   ru,'  CTRL+]  : ¥à¥©â¨ ¢ ª®­¥æ ä ©« ',\
  703.   ru,'  CTRL+F2 : ‡ £à㧨âì ä ©«',\
  704.   ru,'  CTRL+F3 : ®¨áª',\
  705.   ru,'  CTRL+F4 : ‘®åà ­¨âì ä ©«',\
  706.   ru,'  CTRL+F5 : ‚¢¥á⨠¨¬ï ä ©« ',\
  707.   ru,'  CTRL+F6 : ‚¢¥á⨠áâப㠤«ï ¯®¨áª ',\
  708.   ru,'  CTRL+F8 : ‘¬¥­¨âì à áª« ¤ªã ª« ¢¨ âãàë',\
  709. \
  710.   en,'COMMANDS:',\
  711.   en,' ',\
  712.   en,'  CTRL+F1 : SHOW THIS WINDOW',\
  713.   en,'  CTRL+S  : SELECT FIRST STRING TO COPY',\
  714.   en,'  CTRL+E  : SELECT LAST STRING TO COPY',\
  715.   en,'  CTRL+P  : PASTE SELECTED TO CURRENT POSITION',\
  716.   en,'  CTRL+D  : DELETE CURRENT LINE',\
  717.   en,'  CTRL+L  : INSERT SEPARATOR LINE',\
  718.   en,'  CTRL+[  : GO TO THE BEGINNING OF FILE',\
  719.   en,'  CTRL+]  : GO TO THE END OF FILE',\
  720.   en,'  CTRL+F2 : LOAD FILE',\
  721.   en,'  CTRL+F3 : SEARCH',\
  722.   en,'  CTRL+F4 : SAVE FILE',\
  723.   en,'  CTRL+F5 : ENTER FILENAME',\
  724.   en,'  CTRL+F6 : ENTER SEARCH STRING',\
  725.   en,'  CTRL+F8 : CHANGE KEYBOARD LAYOUT'
  726. db 0
  727.  
  728. menubar_res main_menu,\
  729.   ru,'” ©«'     ,popup_file   ,onshow.file   ,\
  730.   ru,'à ¢ª '   ,popup_edit   ,onshow.edit   ,\
  731.   ru,'®¨áª'    ,popup_search ,onshow.search ,\
  732.   ru,'‡ ¯ãáª'   ,popup_run    ,onshow.run    ,\
  733.   ru,'Š®¤¨à®¢ª ',popup_recode ,onshow.recode ,\
  734.   ru,'Ž¯æ¨¨'    ,popup_options,onshow.options,\
  735. \
  736.   en,'File'    ,popup_file   ,onshow.file   ,\
  737.   en,'Edit'    ,popup_edit   ,onshow.edit   ,\
  738.   en,'Search'  ,popup_search ,onshow.search ,\
  739.   en,'Run'     ,popup_run    ,onshow.run    ,\
  740.   en,'Encoding',popup_recode ,onshow.recode ,\
  741.   en,'Options' ,popup_options,onshow.options
  742.  
  743. popup_res popup_file,\
  744.   ru,'®¢ë©'           ,'Ctrl+N'      ,key.ctrl_n      ,\
  745.   ru,'Žâªàëâì...'      ,'Ctrl+O'      ,key.ctrl_o      ,\
  746.   ru,'‘®åà ­¨âì'       ,'Ctrl+S'      ,key.ctrl_s      ,\
  747.   ru,'‘®åà ­¨âì ª ª...','Ctrl+Shift+S',key.shift_ctrl_s,\
  748.   ru,'-'               ,''            ,0               ,\
  749.   ru,'‚ë室'           ,'Alt+X'       ,key.alt_x       ,\
  750. \
  751.   en,'New'       ,'Ctrl+N'      ,key.ctrl_n      ,\
  752.   en,'Open...'   ,'Ctrl+O'      ,key.ctrl_o      ,\
  753.   en,'Save'      ,'Ctrl+S'      ,key.ctrl_s      ,\
  754.   en,'Save as...','Ctrl+Shift+S',key.shift_ctrl_s,\
  755.   en,'-'         ,''            ,0               ,\
  756.   en,'Exit'      ,'Alt+X'       ,key.alt_x
  757.  
  758. popup_res popup_edit,\
  759.   ru,'‚ë१ âì'    ,'Ctrl+X',key.ctrl_x,\
  760.   ru,'Š®¯¨à®¢ âì'  ,'Ctrl+C',key.ctrl_c,\
  761.   ru,'‚áâ ¢¨âì'    ,'Ctrl+V',key.ctrl_v,\
  762.   ru,'“¤ «¨âì'     ,''      ,key.del   ,\
  763.   ru,'-'           ,''      ,0         ,\
  764.   ru,'‚뤥«¨âì ¢áñ','Ctrl+A',key.ctrl_a,\
  765. \;  ru,'-'           ,''      ,0         ,\
  766. \;  ru,'‚¥à⨪ «ì­®¥ ¢ë¤¥«¥­¨¥','Alt+Ins',0         ,\
  767. \
  768.   en,'Cut'       ,'Ctrl+X',key.ctrl_x,\
  769.   en,'Copy'      ,'Ctrl+C',key.ctrl_c,\
  770.   en,'Paste'     ,'Ctrl+V',key.ctrl_v,\
  771.   en,'Delete'    ,''      ,key.del   ,\
  772.   en,'-'         ,''      ,0         ,\
  773.   en,'Select all','Ctrl+A',key.ctrl_a;,\
  774. ;  en,'-'         ,''      ,0         ,\
  775. ;  en,'Vertical selection','Alt+Ins',0
  776.  
  777. popup_res popup_search,\
  778.   ru,'¥à¥©â¨...' ,'Ctrl+G',key.ctrl_g,\
  779.   ru,'-'          ,''      ,0         ,\
  780.   ru,' ©â¨...'   ,'Ctrl+F',key.ctrl_f,\
  781.   ru,' ©â¨ ¤ «¥¥','F3'    ,key.f3    ,\
  782.   ru,'‡ ¬¥­¨âì...','Ctrl+H',key.ctrl_h,\
  783. \
  784.   en,'Position...','Ctrl+G',key.ctrl_g,\
  785.   en,'-'          ,''      ,0         ,\
  786.   en,'Find...'    ,'Ctrl+F',key.ctrl_f,\
  787.   en,'Find next'  ,'F3'    ,key.f3    ,\
  788.   en,'Replace...' ,'Ctrl+H',key.ctrl_h
  789.  
  790. popup_res popup_run,\
  791.   ru,'‡ ¯ãáâ¨âì'        ,'F9'     ,key.f9           ,\
  792.   ru,'Š®¬¯¨«¨à®¢ âì'    ,'Ctrl+F9',key.ctrl_f9      ,\
  793.   ru,'-'                ,''       ,0                ,\
  794.   ru,'„®áª  ®â« ¤ª¨'    ,''       ,open_debug_board ,\
  795.   ru,'‘¨á⥬­ë¥ ä㭪樨',''       ,open_sysfuncs_txt,\
  796. \
  797.   en,'Run'              ,'F9'     ,key.f9           ,\
  798.   en,'Compile'          ,'Ctrl+F9',key.ctrl_f9      ,\
  799.   en,'-'                ,''       ,0                ,\
  800.   en,'Debug board'      ,''       ,open_debug_board ,\
  801.   en,'System functions' ,''       ,open_sysfuncs_txt
  802.  
  803. popup_res popup_recode,\
  804.   ru,'CP866  -> CP1251' ,'',recode.866.1251,\
  805.   ru,'CP1251 -> CP866'  ,'',recode.1251.866,\
  806.   ru,'-'                ,'',0,\
  807.   ru,'CP866  -> KOI8-R' ,'',recode.866.koi,\
  808.   ru,'KOI8-R -> CP866'  ,'',recode.koi.866,\
  809.   ru,'-'                ,'',0,\
  810.   ru,'CP1251 -> KOI8-R' ,'',recode.1251.koi,\
  811.   ru,'KOI8-R -> CP1251' ,'',recode.koi.1251,\
  812. \
  813.   en,'CP866  -> CP1251' ,'',recode.866.1251,\
  814.   en,'CP1251 -> CP866'  ,'',recode.1251.866,\
  815.   en,'-'                ,'',0,\
  816.   en,'CP866  -> KOI8-R' ,'',recode.866.koi,\
  817.   en,'KOI8-R -> CP866'  ,'',recode.koi.866,\
  818.   en,'-'                ,'',0,\
  819.   en,'CP1251 -> KOI8-R' ,'',recode.1251.koi,\
  820.   en,'KOI8-R -> CP1251' ,'',recode.koi.1251
  821.  
  822. popup_res popup_options,\
  823.   ru,'‚­¥è­¨© ¢¨¤...'        ,'',0,\
  824.   ru,'-'                     ,'',0,\
  825.   ru,'¥§®¯ á­®¥ ¢ë¤¥«¥­¨¥'  ,'',set_secure_sel,\
  826.   ru,'€¢â®¬ â¨ç¥áª¨¥ ᪮¡ª¨' ,'',set_auto_braces,\
  827.   ru,'€¢â®¬ â¨ç¥áª¨© ®âáâã¯' ,'',set_auto_indents,\
  828.   ru,'“¬­ ï â ¡ã«ïæ¨ï'       ,'',0,\
  829.   ru,'Ž¯â¨¬ «ì­®¥ á®åà ­¥­¨¥','',set_optimal_fill,\
  830.   ru,'-'                     ,'',0,\
  831.   ru,'®¬¥à  áâப'          ,'',set_line_numbers,\
  832. \
  833.   en,'Appearance...'         ,'',0,\
  834.   en,'-'                     ,'',0,\
  835.   en,'Secure selection'      ,'',set_secure_sel,\
  836.   en,'Automatic brackets'    ,'',set_auto_braces,\
  837.   en,'Automatic indents'     ,'',set_auto_indents,\
  838.   en,'Smart tabulation'      ,'',0,\
  839.   en,'Optimal fill on saving','',set_optimal_fill,\
  840.   en,'-'                     ,'',0,\
  841.   en,'Line numbers'          ,'',set_line_numbers
  842.  
  843. lsz s_modified,\
  844.   ru,'ˆ§¬¥­¥­®',\
  845.   en,'Modified'
  846.  
  847. lsz s_2filename,\
  848.   ru,'ˆ¬ï ä ©« :',\
  849.   en,'Filename:'
  850. lsz s_2open,\
  851.   ru,'Žâªàëâì',\
  852.   en,'Open'
  853. lsz s_2save,\
  854.   ru,'‘®åà ­¨âì',\
  855.   en,'Save'
  856. lsz s_2find,\
  857.   ru,' ©â¨',\
  858.   en,'Find'
  859. db ':'
  860. lsz s_2replace,\
  861.   ru,'‡ ¬¥­¨âì',\
  862.   en,'Replace'
  863. db ':'
  864. lsz s_2cancel,\
  865.   ru,'Žâ¬¥­ ',\
  866.   en,'Cancel'
  867.  
  868. lsz s_enter_filename,\
  869.   ru,<'‚¢¥¤¨â¥ ¨¬ï ä ©« ',0>,\
  870.   en,<'Enter filename',0>
  871.  
  872. lsz s_enter_text_to_find,\
  873.   ru,<'‚¢¥¤¨â¥ ⥪áâ ¤«ï ¯®¨áª ',0>,\
  874.   en,<'Enter text to find',0>
  875.  
  876. lsz s_enter_text_to_replace,\
  877.   ru,<'‚¢¥¤¨â¥ ⥪áâ ¤«ï § ¬¥­ë',0>,\
  878.   en,<'Enter text to replace',0>
  879.  
  880. lsz s_text_not_found,\
  881.   ru,<'„®á⨣­ãâ ª®­¥æ ä ©« , ⥪áâ ­¥ ­ ©¤¥­',0>,\
  882.   en,<'Reached end of file, text not found',0>
  883.  
  884. lszc s_fs_error,b,\
  885.   ru,<'Ž¯¥à æ¨ï § ¢¥à襭  ãᯥ譮 (0)',0>,\
  886.   ru,<'',0>,\
  887.   ru,<'”ã­ªæ¨ï ­¥ ¯®¤¤¥à¦¨¢ ¥âáï ¤«ï ¤ ­­®© ä ©«®¢®© á¨á⥬ë (2)',0>,\
  888.   ru,<'¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬  (3)',0>,\
  889.   ru,<'',0>,\
  890.   ru,<'¥¢®§¬®¦­® ®âªàëâì ä ©« (5)',0>,\
  891.   ru,<'Ž¯¥à æ¨ï § ¢¥à襭  ãᯥ譮 (6)',0>,\
  892.   ru,<'€¤à¥á ­ å®¤¨âáï §  £à ­¨æ ¬¨ ¯ ¬ï⨠¯à®£à ¬¬ë (7)',0>,\
  893.   ru,<'  ¤¨áª¥ ­¥â ᢮¡®¤­®£® ¬¥áâ  (8)',0>,\
  894.   ru,<'’ ¡«¨æ  FAT ã­¨ç⮦¥­  (9)',0>,\
  895.   ru,<'„®áâ㯠§ ¯à¥éñ­ (10)',0>,\
  896.   ru,<'Žè¨¡ª  ãáâனá⢠ (11)',0>,\
  897. \
  898.   en,<'Operation executed successfully (0)',0>,\
  899.   en,<'',0>,\
  900.   en,<'Function is not supported for the given filesystem (2)',0>,\
  901.   en,<'Unknown filesystem (3)',0>,\
  902.   en,<'',0>,\
  903.   en,<'Unable to open file (5)',0>,\
  904.   en,<'Operation executed successfully (6)',0>,\
  905.   en,<'Pointer lies outside of application memory (7)',0>,\
  906.   en,<'Disk is full (8)',0>,\
  907.   en,<'FAT table is destroyed (9)',0>,\
  908.   en,<'Access denied (10)',0>,\
  909.   en,<'Device error (11)',0>
  910.  
  911. sz symbols_ex,';?.%"',"'"
  912. sz symbols   ,'#&*\:/<>|{}()[]=+-, '
  913.  
  914. ini_sec_window    db 'Window',0
  915. ini_window_top    db 'Top',0
  916. ini_window_left   db 'Left',0
  917. ini_window_right  db 'Right',0
  918. ini_window_bottom db 'Bottom',0
  919.  
  920. finfo_ini dd ?,?,?,AREA_TEMP,AREA_EDIT-AREA_TEMP
  921.           db '/rd/1/tinypad.ini',0
  922.  
  923. TINYPAD_END:     ; end of file
  924.  
  925. self_path rb PATHL
  926.  
  927. ;-----------------------------------------------------------------------------
  928. section @UDATA ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  929. ;-----------------------------------------------------------------------------
  930.  
  931. f_info70 rd 7
  932.  
  933. f_info.length dd ?
  934. f_info dd ?,?,?,?,?;?,0,?,AREA_TEMP,AREA_EDIT-AREA_TEMP
  935.  
  936. f_info.path:
  937.     times PATHL+1 db ?
  938.  
  939. pos.x         dd ?    ; global X position (cursor)
  940. pos.y         dd ?    ; global Y position (cursor)
  941. sel.x         dd ?    ; global X position (selection start)
  942. sel.y         dd ?    ; global Y position (selection start)
  943. lines         dd ?    ; number of lines in file
  944. lines.scr     dd ?    ; number of lines on the screen
  945. columns       dd ?    ; number of columns in file
  946. columns.scr   dd ?    ; number of columns on the screen
  947. top_ofs       dd ?    ; height occupied by top buttons
  948. bot_ofs       dd ?    ; height occupied by bottom buttons
  949.               dw ?
  950. left_ofs      dd ?    ;
  951. top_line      dd ?    ; topmost visible line on screen
  952. left_col      dd ?    ; leftmost visible char on line
  953. vscrl_top     dd ?
  954. vscrl_size    dd ?
  955. hscrl_top     dd ?
  956. hscrl_size    dd ?
  957. ;skinh         dd ?    ; skin height
  958. __rc          dd ?,?,?,?
  959. ;filelen       dd ?    ; file size (on save) ???
  960. filesize      dd ?    ; file size (on load) ???
  961. ya            dd ?    ; for read_string
  962. ;copy_start    dd ?    ; first line for copying (Ctrl+S)
  963. copy_count    dd ?    ; number of lines for copying (Ctrl+E)
  964. copy_size     dd ?    ; size of data to copy
  965. s_title.size  dd ?    ; caption length
  966.  
  967. draw_blines   dd ?    ; last line to draw
  968.  
  969. cur_line_len  dd ?
  970. h_popup       dd ?
  971. bot_dlg_handler dd ?
  972.  
  973. sel.begin.x   dd ?
  974. sel.begin.y   dd ?
  975. sel.end.x     dd ?
  976. sel.end.y     dd ?
  977. sel.selected  db ?
  978.  
  979. in_sel        db ?
  980.  
  981. asm_mode      db ?    ; ASM highlight?
  982. do_not_draw   db ?    ; draw top and bottom buttons?
  983. main_closed   db ?    ; main window closed?
  984. tb_casesen    db ?    ; focused textbox is case-sensitive?
  985.  
  986. align 4
  987. s_fname.size  dd ?
  988. s_fname       rb PATHL+1
  989. align 4
  990. s_search.size dd ?
  991. s_search      rb PATHL+1
  992.  
  993. s_title       rb PATHL+11  ; window caption
  994.  
  995. chr db ?
  996. ext db ?
  997. shi dd ?
  998.  
  999. align 4
  1000. cl_3d_normal dd ?
  1001. cl_3d_pushed dd ?
  1002. cl_3d_outset dd ?
  1003. cl_3d_inset  dd ?
  1004. cl_3d_grayed dd ?
  1005.  
  1006. tb_opensave  TBOX
  1007. tb_find      TBOX
  1008. tb_replace   TBOX
  1009. tb_gotorow   TBOX
  1010. tb_gotocol   TBOX
  1011.  
  1012. focused_tb   dd ?
  1013.  
  1014. key1 rb 256
  1015.  
  1016. mst  db ?
  1017. mst2 db ?
  1018. mev  db ?
  1019. mouse_captured  db ?
  1020. just_from_popup db ?
  1021.  
  1022. bot_mode db ?
  1023.  
  1024. modified db ?
  1025.  
  1026. align 4
  1027.  
  1028. bot_dlg_height dd ?
  1029. bot_dlg_mode2  db ?
  1030.  
  1031. ;-----------------------------------------------------------------------------
  1032. section @PARAMS ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1033. ;-----------------------------------------------------------------------------
  1034.  
  1035. fasm_parameters:
  1036.  
  1037. p_info  process_information
  1038. p_info2 process_information
  1039. sc      system_colors
  1040.  
  1041. diff16 'Main memory size',0,$
  1042.  
  1043. MAIN_STACK  = 0x0000FFF0
  1044. POPUP_STACK = 0x0000EFF0
  1045.  
  1046. AREA_TEMP   = 0x00010000 ; 0x00010000
  1047. AREA_EDIT   = 0x000C0000 ; 0x00080000
  1048. AREA_TEMP2  = 0x00190000 ; 0x002E0000
  1049. AREA_CBUF   = 0x001A0000 ; 0x002F0000
  1050. AREA_ENDMEM = 0x001B0000 ; 0x00300000
  1051.  
  1052. diff10 'Header+options size',0,@CODE
  1053. diff10 'Load area size',AREA_TEMP,AREA_EDIT
  1054. diff10 'Edit area size',AREA_EDIT,AREA_TEMP2
  1055. diff10 'Total memory usage',0,AREA_ENDMEM
  1056.  
  1057. ;store dword '/hd/' at tb_opensave.text+4*0
  1058. ;store dword '1/tp' at tb_opensave.text+4*1
  1059. ;store dword 'ad4/' at tb_opensave.text+4*2
  1060. ;store dword 'tiny' at tb_opensave.text+4*3
  1061. ;store dword 'pad.' at tb_opensave.text+4*4
  1062. ;store dword 'asm'  at tb_opensave.text+4*5
  1063. ;store byte  23     at tb_opensave.length
  1064.