2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2011-07-30 19:11:55 +02:00
; v.016 30.07.2011
; Start with open file path
; Show working file path
; Some optimization
;
; Marat Zakiyanov aka Mario79, aka Mario
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
; v.015 08.03.2010
; Support for OpenDialog - Open and Save
; Some optimization
2011-07-30 19:11:55 +02:00
;
; Marat Zakiyanov aka Mario79, aka Mario
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
; v.014 05.02.2010
;
; PageUp, PageDown - <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD>
; Ctrl+UP, Ctrl+Down - <20> ப<EFBFBD> <E0AEAA> ⪠ <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <20> <> <20> <> ப<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᬥ饭<E1ACA5> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; Home,End - <20> <20> <> 砫<EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
; Ctrl+Home, Ctrl+End - <20> <20> <> ࢮ<EFBFBD> <E0A2AE> /<2F> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9>
; Left, Right - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> ࠢ<EFBFBD>
; Ctrl+O - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<>
; Ctrl+S - <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
; Ctrl+F - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> (+Tab <20> <> <EFBFBD> OptionBox)
; Ctrl+G - <20> <> <EFBFBD> <EFBFBD> 室 <20> <> ᬥ饭<E1ACA5> <E9A5AD> (+Tab <20> <> <EFBFBD> OptionBox)
; Ctrl+B - <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
; ESC - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD>
; Ctrl+C - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
; Ctrl+V - <20> <> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <20> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; Ctrl+X - <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> (<28> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> )
; n - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
; Ins - ० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> ⠢<EFBFBD> <E2A0A2> (<28> <> 㬮<> 砭<EFBFBD> <E7A0AD> )
; Del - <20> ० <> <E0A5A6> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> - 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
; BackSpace - <20> ० <> <E0A5A6> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> - 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> । <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
; ~ - ᬥ<> <E1ACA5> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> (cp866,cp1251)
; Shift+~ - ᬥ<> <E1ACA5> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> (cp866 <20> <> <EFBFBD> cp1251,koi8-r)
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㢥<> <E3A2A5> 祭<EFBFBD> <E7A5AD> i umen'shenie.
; <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 㦠<EFBFBD> <E3A6A0> <EFBFBD> <EFBFBD> 楫<> <E6A5AB> <EFBFBD> <EFBFBD> .
2020-11-26 23:02:39 +01:00
; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> load_lib.mac <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> box_lib.obj ᮧ<> <E1AEA7> <EFBFBD> <EFBFBD> :
2010-03-08 18:57:35 +01:00
; <Lrz> - Alexey Teplov / <20> <> <EFBFBD> <EFBFBD> ᥩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
; Mario79, Mario - Marat Zakiyanov / <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ﭮ<EFBFBD>
; Diamondz - Evgeny Grechnikov / <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> 筨<EFBFBD> <E7ADA8> <EFBFBD> <20> <20> <> .
;
; staper@inbox.ru
; babalbes@yandex.ru
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
use32
2020-11-26 23:02:39 +01:00
org 0
2010-03-08 18:57:35 +01:00
db 'MENUET01'
2020-11-26 23:02:39 +01:00
dd 1
2010-03-08 18:57:35 +01:00
dd START ;program start
dd I_END ;program image size
dd ( D_END + 0x600 ) and not 3 ;required amount of memory
dd ( D_END + 0x600 ) and not 3 ;stack
2011-07-30 19:11:55 +02:00
dd fname_buf
2010-03-08 18:57:35 +01:00
dd cur_dir_path
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2011-07-30 19:11:55 +02:00
_title equ 'HeEd 0.16' , 0
2010-03-08 18:57:35 +01:00
include 'lang.inc'
2020-11-22 14:13:45 +01:00
include '../../../KOSfuncs.inc'
2010-11-15 19:47:23 +01:00
include '../../../config.inc' ;for nightbuild
2010-03-08 18:57:35 +01:00
include '../../../macros.inc'
include '../../libraries/box_lib/trunk/box_lib.mac'
2020-11-22 14:13:45 +01:00
include '../../../load_lib.mac'
2010-03-08 18:57:35 +01:00
@ use_library
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
times 16 dd 0
frgrd_color equ 0xfefefe
bkgrd_color equ 0x000000
kursred_color equ 0x0039ff
kurstxt_color equ 0x708090
text_color equ 0xaaaaaa
panel_clr1 equ 0xe9e9e2
panel_clr2 equ 0x8b8b89
panel_clr3 equ 0x777777 ;eaeae3
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
palitra:
.1 dd frgrd_color , bkgrd_color ;梥<> <20> <> <EFBFBD> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
.2 dd frgrd_color , text_color ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> ࠢ<EFBFBD> <E0A0A2> <20> ⮫<EFBFBD> <E2AEAB> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
.3 dd kursred_color , frgrd_color ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.4 dd kurstxt_color , bkgrd_color ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ⥪<> ⮢<EFBFBD> <E2AEA2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
.5 dd panel_clr1 , not text_color ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
FIRST_HEX equ 0 * 65536 + 24
scroll_width_size equ 15
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
struc t f70
2020-11-26 23:02:39 +01:00
Function rd 1
Position rd 1
Flags rd 1
Count rd 1
Buffer rd 1
2010-03-08 18:57:35 +01:00
rezerv rb 1
2020-11-26 23:02:39 +01:00
FileName rd 1
2010-03-08 18:57:35 +01:00
ends
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
START:
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_HEAP_INIT
2010-07-01 21:17:20 +02:00
load_libraries l_libs_start , end_l_libs
2011-07-30 19:11:55 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;OpenDialog initialisation
2010-07-01 21:17:20 +02:00
push dword OpenDialog_data
call [ OpenDialog_Init ]
2011-07-30 19:11:55 +02:00
;--------------------------------------------------------------------
mov esi , fname_buf
cmp [ esi ], byte 0
je .start_temp_file_name
cld
@ @ :
lodsb
test al , al
jne @ b
std
@ @ :
lodsb
cmp al , '/'
jne @ b
add esi , 2
jmp .selected_start_file_name
;--------------------------------------------------------------------
.start_temp_file_name:
2010-03-19 10:46:23 +01:00
mov esi , start_temp_file_name
2011-07-30 19:11:55 +02:00
.selected_start_file_name:
mov edi , filename_area
2010-03-19 10:46:23 +01:00
xor eax , eax
cld
@ @ :
lodsb
stosb
test eax , eax
jnz @ b
2020-11-26 23:02:39 +01:00
mcall SF_SET_EVENTS_MASK , 0x27
2010-03-08 18:57:35 +01:00
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_ALLOC , 32 * 1024 ;<3B> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
2010-03-08 18:57:35 +01:00
mov [ screen_table ], eax
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_ALLOC , 4 * 1024
2011-07-30 19:11:55 +02:00
2010-03-08 18:57:35 +01:00
mov [ file_buffer ], eax
2011-07-30 19:11:55 +02:00
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_ALLOC , 1024
2010-03-08 18:57:35 +01:00
mov [ copy_buf ], eax
;ࠧ<> <E0A0A7> <EFBFBD> ⥪<> 饣<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov esi , cur_dir_path
@ @ :
cmp byte [ esi ], 0
je @ f
inc esi
jmp @ b
2011-10-07 01:18:43 +02:00
;-------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
sub esi , cur_dir_path
mov [ edi t1.pos ], esi
mov [ edi t1.size ], esi
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥬<EFBFBD> <E2A5AC> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> Shift+<2B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2020-11-26 23:02:39 +01:00
; mcall SF_KEYBOARD,SSF_SET_SYS_HOTKEY,75,1
; mcall SF_KEYBOARD,,77
; mcall SF_KEYBOARD,,72
; mcall SF_KEYBOARD,,80
2006-01-03 10:43:31 +01:00
2010-03-08 18:57:35 +01:00
call ready_screen_buffer
; jmp open_file
2020-11-26 23:02:39 +01:00
mcall SF_THREAD_INFO , procinfo , - 1
2011-01-19 21:05:36 +01:00
mov ecx ,[ ebx + 30 ] ; PID
2020-11-26 23:02:39 +01:00
mcall SF_SYSTEM , SS F_GET_THREAD_SLOT
2011-01-19 21:05:36 +01:00
mov [ active_process ], eax ; WINDOW SLOT
2011-07-30 19:11:55 +02:00
;--------------------------------------------------------------------
; open the file if program has a file path, when it was launched
cmp [ fname_buf ], byte 0
jne open_dialog.start
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
redraw_all:
2010-08-24 15:55:40 +02:00
call control_minimal_window_size
2010-03-08 18:57:35 +01:00
call draw_window_1
2006-01-03 10:43:31 +01:00
still:
2020-11-26 23:02:39 +01:00
mcall SF_WAIT_EVENT
2010-03-08 18:57:35 +01:00
cmp eax , 6
je mouse
dec al
jz redraw_all
dec al
jz key
dec al
jz button
jmp still
2010-08-24 15:55:40 +02:00
;---------------------------------------------------------------------
control_minimal_window_size:
pusha
2020-11-26 23:02:39 +01:00
mcall SF_THREAD_INFO , procinfo , - 1
2011-10-07 01:18:43 +02:00
mov eax ,[ ebx + 70 ]
2010-08-24 15:55:40 +02:00
test eax , 10b
2011-10-07 01:18:43 +02:00
jnz .end
2010-08-24 15:55:40 +02:00
test eax , 100b
2011-10-07 01:18:43 +02:00
jnz .end
2010-08-24 15:55:40 +02:00
test eax , 1b
2011-10-07 01:18:43 +02:00
jnz .end
mov esi , - 1
mov eax , procinfo
mov eax ,[ eax + 46 ]
cmp eax , 299
jae @ f
mov esi , 299
2020-11-26 23:02:39 +01:00
mcall SF_CHANGE_WINDOW , - 1 , ebx , ebx
2010-08-24 15:55:40 +02:00
@ @ :
2011-10-07 01:18:43 +02:00
mov edx , - 1
mov eax , procinfo
mov eax ,[ eax + 42 ]
cmp eax , 399
jae @ f
mov edx , 399
2020-11-26 23:02:39 +01:00
mcall SF_CHANGE_WINDOW , - 1 , ebx ,, ebx
2010-08-24 15:55:40 +02:00
@ @ :
.end:
popa
ret
;---------------------------------------------------------------------
red:
call ready_screen_buffer
2010-03-08 18:57:35 +01:00
call main_area
jmp still
2010-08-24 15:55:40 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
draw_window_1:
call start_draw
call draw_window
2013-04-07 23:51:43 +02:00
mov eax ,[ threath_buf + 70 ]
test eax , 10b
jnz .end
test eax , 100b
jnz .end
2010-03-08 18:57:35 +01:00
call show_file_size
call show_codepage
call show_insert
call ready_screen_buffer
call main_area
2013-04-07 23:51:43 +02:00
.end:
2010-03-08 18:57:35 +01:00
ret
2010-08-24 15:55:40 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
key:
2020-11-26 23:02:39 +01:00
mcall SF_GET_KEY
2010-03-08 18:57:35 +01:00
dec al
jz still
dec al
jz key.syst
cmp ah , 2
je Ctrl_B ;<3B> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
cmp ah , 3
je Ctrl_C ;copy
cmp ah , 6
je Ctrl_F ;find
cmp ah , 7
je Ctrl_G ;go to
cmp ah , 8
je BackSpace
cmp ah , 15
2010-03-12 18:39:05 +01:00
je open_dialog ;open_file ;Ctrl+O
2010-03-08 18:57:35 +01:00
cmp ah , 19
2010-03-12 18:39:05 +01:00
je open_dialog_save ;save_file ;Ctrl+S
2010-03-08 18:57:35 +01:00
cmp ah , 22
je Ctrl_V ;paste
cmp ah , 24
je Ctrl_X ;cut
cmp ah , 27
je ES C
cmp ah , 48
jb still
cmp ah , 57
jbe input_from_keyboard ;0-9
cmp ah , 65
jb still
cmp ah , 70
jbe input_from_keyboard ;A-F
cmp ah , 81
jne @ f
call Ctrl_DOWN
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 82
jne @ f
call Ctrl_UP
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 84
jne @ f
call Ctrl_HOME
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 85
je Ctrl_END
cmp ah , 96
je ch ange_codepage ;⨫줠, cp866 - cp1251
cmp ah , 97
jb still
cmp ah , 102
jbe input_from_keyboard ;a-f
cmp ah , 126
jne @ f
xor ah , ah
jmp ch ange_codepage ;Shift+~, koi8-r
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 110
je invert_byte ;n
cmp ah , 176
jne @ f
call LEFT
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 177
jne @ f
call DOWN
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 178
je UP
cmp ah , 179
je RIGHT
cmp ah , 180
jne @ f
call HOME
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 181
je END_
cmp ah , 182
je DEL
cmp ah , 183
je PGDN
cmp ah , 184
je PGUP
cmp ah , 185
je Insert
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.syst:
cmp ah , 72
cmp ah , 75
cmp ah , 77
cmp ah , 80
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
button:
2020-11-26 23:02:39 +01:00
mcall SF_GET_BUTTON
2010-03-08 18:57:35 +01:00
dec ah
jnz still
2010-10-08 09:20:01 +02:00
2010-03-08 18:57:35 +01:00
jmp cl ose_prog
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
mouse:
2020-11-26 23:02:39 +01:00
mcall SF_SYSTEM , SS F_GET_ACTIVE_WINDOW
2011-01-19 21:05:36 +01:00
cmp [ active_process ], eax
jne still
2020-11-26 23:02:39 +01:00
mcall SF_MOUSE_GET , SS F_SCROLL_DATA
2010-03-08 18:57:35 +01:00
test eax , eax
jz .menu_bar_1 ;.mouse
bt eax , 15
jc @ f ;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> ᨪ<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov ecx , eax
shl ecx , 2
.1:
call Ctrl_DOWN
loop .1
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
xor ecx , ecx
sub cx , ax
shl cx , 2
.2:
call Ctrl_UP
loop .2
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.menu_bar_1:
call .set_mouse_flag
@ @ :
push dword menu_data_1 ;mouse event for Menu 1
call [ menu_bar_mouse ]
cmp [ menu_data_1.click ], dword 1
jne .menu_bar_2
cmp [ menu_data_1.cursor_out ], dword 0
jne .analyse_out_menu_1
jmp .menu_bar_1
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.menu_bar_2:
push dword menu_data_2
call [ menu_bar_mouse ]
cmp [ menu_data_2.click ], dword 1
jne .menu_bar_3
cmp [ menu_data_2.cursor_out ], dword 0
jne .analyse_out_menu_2
jmp .menu_bar_1
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.menu_bar_3:
push dword menu_data_3
call [ menu_bar_mouse ]
cmp [ menu_data_3.click ], dword 1
jne .scroll_bar
cmp [ menu_data_3.cursor_out ], dword 0
jne .analyse_out_menu_3
jmp .menu_bar_1
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.set_mouse_flag:
xor eax , eax
inc eax
mov [ menu_data_1.get_mouse_flag ], eax
mov [ menu_data_2.get_mouse_flag ], eax
mov [ menu_data_3.get_mouse_flag ], eax
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.analyse_out_menu_1:
cmp [ menu_data_1.cursor_out ], dword 1
je open_dialog
cmp [ menu_data_1.cursor_out ], dword 2
je open_dialog_save ;save_file
cmp [ menu_data_1.cursor_out ], dword 3
je cl ose_prog
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.analyse_out_menu_2:
cmp [ menu_data_2.cursor_out ], dword 1
jne @ f
add [ byte s_per_line ], 4
jmp redraw_all
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp [ menu_data_2.cursor_out ], dword 2
jne @ f
add [ byte s_per_line ], 8
jmp redraw_all
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp [ menu_data_2.cursor_out ], dword 3
jne @ f
cmp [ byte s_per_line ], 4
je still
sub [ byte s_per_line ], 4
jmp redraw_all
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp [ menu_data_2.cursor_out ], dword 4
jne still
cmp [ byte s_per_line ], 8
jbe still
sub [ byte s_per_line ], 8
jmp redraw_all
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.analyse_out_menu_3: ;analyse result of Menu 2
cmp [ menu_data_3.cursor_out ], dword 1
jne still
call create_help_window
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.scroll_bar:
2020-11-26 23:02:39 +01:00
; mcall SF_MOUSE_GET,SSF_BUTTON
2010-03-08 18:57:35 +01:00
; test eax,eax
; jnz @f
; btr [flags],5
; btr [flags],7
; jmp still
.mouse:
.vertical:
2020-11-26 23:02:39 +01:00
mcall SF_MOUSE_GET , SS F_BUTTON
2010-03-08 18:57:35 +01:00
test eax , eax
jnz @ f
btr [ flags ], 5
btr [ flags ], 7
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
bt [ flags ], 5
jc @ f
bt [ flags ], 7
jc .horizontal_0
2020-11-26 23:02:39 +01:00
mcall SF_MOUSE_GET , SS F_WINDOW_POSITION
2010-03-08 18:57:35 +01:00
shr eax , 16
cmp ax ,[ scroll_bar_data_vertical.start_x ]
jb .horizontal
sub ax ,[ scroll_bar_data_vertical.start_x ]
cmp ax ,[ scroll_bar_data_vertical.size_x ]
jge still
@ @ :
; cmp [scroll_bar_data_vertictal.delta2],0
; jne .horizontal
; mov eax,[scroll_bar_data_vertical.max_area]
; cmp eax,[scroll_bar_data_vertical.cur_area]
; jbe .horizontal
; mouse event for Vertical ScrollBar
mov edi ,[ screen_table ]
mov edi ,[ edi ]
cmp edi ,[ file_size ]
jae still
push dword scroll_bar_data_vertical ;draw for Vertical ScrollBar
call [ scrollbar_ver_mouse ]
xor edx , edx
mov ebx ,[ scroll_bar_data_vertical.max_area ]
sub ebx ,[ scroll_bar_data_vertical.cur_area ]
mov eax ,[ file_size ]
mov esi ,[ byte s_per_line ]
mov ecx ,[ scroll_bar_data_vertical.position ]
div esi
xor edx , edx
mul ecx
div ebx
mul esi
cmp eax ,[ file_size ]
jng @ f
sub eax , esi ;[bytes_per_line]
@ @ :
mov ecx ,[ cursor ]
inc ecx
shr ecx , 1
add ecx , eax
@ @ :
cmp ecx ,[ file_size ]
jle @ f
sub ecx , esi ;[bytes_per_line]
sub eax , esi ;[bytes_per_line]
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov [ begin_offset ], eax
bts [ flags ], 5
mov eax , scroll_bar_data_vertical.redraw
xor ebx , ebx
; cmp [eax],ebx
; je @f
mov [ eax ], ebx
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;@@:
; cmp [scroll_bar_data_vertical.delta2],0
; jne still
.horizontal:
mov eax ,[ scroll_bar_data_horizontal.max_area ]
cmp eax ,[ scroll_bar_data_horizontal.cur_area ]
jbe .other
2020-11-26 23:02:39 +01:00
mcall SF_MOUSE_GET , SS F_WINDOW_POSITION
2010-03-08 18:57:35 +01:00
cmp ax ,[ scroll_bar_data_horizontal.start_y ]
jb still
sub ax ,[ scroll_bar_data_horizontal.start_y ]
cmp ax ,[ scroll_bar_data_horizontal.size_y ]
jge still
; mouse event for Horizontal ScrollBar
.horizontal_0:
2020-11-26 23:02:39 +01:00
; mcall SF_MOUSE_GET,SSF_BUTTON
2010-03-08 18:57:35 +01:00
; test eax,eax
; jnz @f
; btr [flags],5
; btr [flags],7
; jmp still
;@@:; bt [flags],7
; jc @f
2020-11-26 23:02:39 +01:00
; mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
2010-03-08 18:57:35 +01:00
; shr eax,16
; cmp ax,[scroll_bar_data_vertical.start_x]
; jb .horizontal
; sub ax,[scroll_bar_data_vertical.start_x]
; cmp ax,[scroll_bar_data_vertical.size_x]
; jge still
;@@:
; mouse event for Vertical ScrollBar
mov eax ,[ ready_screen_buffer.string_size ]
shr eax , 1
cmp eax ,[ len_str_scr ]
jle still
push dword scroll_bar_data_horizontal ;draw for Horizontal ScrollBar
call [ scrollbar_hor_mouse ]
xor edx , edx
mov eax ,[ scroll_bar_data_horizontal.position ]
mov ebx ,[ ready_screen_buffer.string_size ]
shr ebx , 1
mul ebx
mov ebx ,[ scroll_bar_data_horizontal.max_area ]
sub ebx ,[ scroll_bar_data_horizontal.cur_area ]
div ebx
mov [ beg_str_scr ], eax
add eax ,[ len_str_scr ]
mov ebx ,[ ready_screen_buffer.string_size ]
shr ebx , 1
cmp eax , ebx
jle @ f
mov eax ,[ ready_screen_buffer.string_size ]
shr eax , 1
sub eax ,[ len_str_scr ]
mov [ beg_str_scr ], eax
@ @ :
mov eax , scroll_bar_data_horizontal.redraw
xor ebx , ebx
cmp [ eax ], ebx
je .other
mov [ eax ], ebx
; call draw_window
call main_area
bts [ flags ], 7
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.other:
; cmp [scroll_bar_data_vertical.delta2],0
; jne still
; cmp [scroll_bar_data_horizontal.delta2],0
; jne still
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
ready_screen_buffer:
mov [ .fl ], 0
mov esi ,[ screen_table ]
add esi , 4
mov ecx ,[ number_strings ]
mov [ .number_strings ], cx
push [ cursor ]
pop [ .cursor ]
push [ file_size ]
pop [ .length_to_end ]
mov edi ,[ begin_offset ]
mov [ .shblock_end ], 0
mov [ .shblock_beg ], 0
bt [ flags ], 8
jnc @ f
mov eax ,[ shblock_beg ]
add eax ,[ file_buffer ]
mov [ .shblock_beg ], eax
mov eax ,[ shblock_end ]
add eax ,[ file_buffer ]
mov [ .shblock_end ], eax
@ @ :
mov [ .offset ], edi
sub [ .length_to_end ], edi
jz .pre_next_string
add edi ,[ file_buffer ]
.next_string:
mov word [ esi ], 0x2020
add esi , 2
mov eax , 0x20302030
mov dword [ esi ], eax
mov dword [ esi + 4 ], eax
mov dword [ esi + 8 ], eax
mov dword [ esi + 12 ], eax
push edi
mov ecx , 8
mov edi ,[ .offset ]
@ @ :
mov eax , edi
and eax , 0xF
cmp al , 10
sbb al , 69h
das
mov [ esi + ecx * 2 - 2 ], al
shr edi , 4
loop @ b
mov word [ esi + 16 ], 0x203a ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 稥
mov eax ,[ byte s_per_line ]
add [ .offset ], eax
mov [ .string_size ], 2 + 4 * 4 + 4 + 2
add esi , 4 * 4 + 4 + 2
pop edi
mov [ .temp ], edi
push [ .cursor ]
pop [ .cursor_temp ]
;hex <09> <> <EFBFBD> 祭<EFBFBD> <E7A5AD>
mov dword [ esi - 4 ], 0x20202020
mov edx ,[ byte s_per_line ]
.next_group:
mov ecx ,[ group_bytes ]
.next_byte:
mov al ,[ edi ]
ror ax , 4
cmp al , 10
sbb al , 69h
das
mov [ esi ], al
mov byte [ esi + 1 ], 0x20
cmp edi ,[ .shblock_end ]
ja @ f
cmp edi ,[ .shblock_beg ]
jl @ f
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
@ @ :
dec [ .cursor ]
jnz @ f
mov byte [ esi + 1 ],( 0x20 + 2 * 4 )
@ @ :
shr ax , 16 - 4
cmp al , 10
sbb al , 69h
das
mov [ esi + 2 ], al
mov byte [ esi + 3 ], 0x20
cmp edi ,[ .shblock_end ]
ja @ f
cmp edi ,[ .shblock_beg ]
jl @ f
mov byte [ esi + 3 ],( 0x20 + 3 * 4 )
@ @ :
dec [ .cursor ]
jnz @ f
mov byte [ esi + 3 ],( 0x20 + 2 * 4 )
@ @ :
mov word [ esi + 4 ], 0x2020
add [ .string_size ], 6
add esi , 6
inc edi
dec [ .length_to_end ]
jz .to_null
dec ecx
jz @ f
dec edx
jnz .next_byte
jz .ascii
@ @ :
mov word [ esi ], 0x2020
add esi , 2
add [ .string_size ], 2
dec edx
jnz .next_group ;byte
sub esi , 2
sub [ .string_size ], 2
jz .ascii
.ascii:
push edi
mov edi ,[ .temp ]
mov word [ esi ], 0x2020
mov ebx ,[ .cursor_temp ]
add esi , 2
add [ .string_size ], 2
mov ecx ,[ byte s_per_line ]
@ @ :
mov al ,[ edi ]
mov [ esi ], al
mov byte [ esi + 1 ], 0x20
dec ebx
jnz .s1
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.s1:
dec ebx
jnz .s2
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.s2:
inc edi
add esi , 2
add [ .string_size ], 2
loop @ b
pop edi
mov edx ,[ byte s_per_line ]
dec [ .number_strings ]
jnz .next_string
ret
2011-10-07 01:18:43 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.fl db 0
.fl_buf dd 0
.to_null:
dec [ .fl ]
mov [ .fl_buf ], edi
jmp .pre_next_byte0
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.pre_next_string:
mov word [ esi ], 0x2020
add esi , 2
mov eax , 0x20302030
mov dword [ esi ], eax
mov dword [ esi + 4 ], eax
mov dword [ esi + 8 ], eax
mov dword [ esi + 12 ], eax
mov ecx , 8
mov edi ,[ .offset ]
@ @ :
mov eax , edi
and eax , 0xF
cmp al , 10
sbb al , 69h
das
mov [ esi + ecx * 2 - 2 ], al
shr edi , 4
loop @ b
mov word [ esi + 16 ], 0x203a ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 稥
mov eax ,[ byte s_per_line ]
add [ .offset ], eax
mov [ .string_size ], 2 + 4 * 4 + 4 + 2
add esi , 4 * 4 + 4 + 2
push [ .cursor ]
pop [ .cursor_temp ]
;hex <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD>
mov dword [ esi - 4 ], 0x20202020
mov edx ,[ byte s_per_line ]
.pre_next_group:
mov ecx ,[ group_bytes ]
.pre_next_byte:
mov dword [ esi ], 0x20202020
dec [ .cursor ]
jnz @ f
mov byte [ esi + 1 ],( 0x20 + 2 * 4 )
@ @ :
dec [ .cursor ]
jnz @ f
mov byte [ esi + 3 ],( 0x20 + 2 * 4 )
@ @ :
mov word [ esi + 4 ], 0x2020
add [ .string_size ], 6
add esi , 6
.pre_next_byte0:
dec ecx
jz @ f
dec edx
jnz .pre_next_byte
jz .pre_ascii
@ @ :
mov word [ esi ], 0x2020
add esi , 2
add [ .string_size ], 2
dec edx
jnz .pre_next_group ;byte
sub esi , 2
sub [ .string_size ], 2
jz .pre_ascii
.pre_ascii:
mov word [ esi ], 0x2020
add esi , 2
add [ .string_size ], 2
mov ecx ,[ byte s_per_line ]
cmp [ .fl ], 0 ;<3B> <EFBFBD> ઠ 䫠<> <E4ABA0>
jne .last_ascii
mov ebx ,[ .cursor_temp ]
@ @ :
mov word [ esi ], 0x2020
dec ebx
jnz .ps1
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.ps1:
dec ebx
jnz .ps2
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.ps2:
add esi , 2
add [ .string_size ], 2
.1:
loop @ b
mov edx ,[ byte s_per_line ]
dec [ .number_strings ]
jnz .pre_next_string
ret
2011-10-07 01:18:43 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;<3B> <> <EFBFBD> ४⭮ <20> <> ࠡ<EFBFBD> <E0A0A1> 뢠<EFBFBD> <EBA2A0> 䨭<> <E4A8AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> 䠩<> <E4A0A9> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ன <20> <> ਠ⨢<E0A8A0> <E2A8A2>
.last_ascii:
mov ebx ,[ .fl_buf ]
sub ebx ,[ .temp ]
sub ecx , ebx
mov edi ,[ .temp ]
mov [ .fl ], 0
@ @ :
mov al ,[ edi ]
mov [ esi ], al
mov byte [ esi + 1 ], 0x20
dec [ .cursor_temp ]
jnz .la1
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.la1:
dec [ .cursor_temp ]
jnz .la2
mov byte [ esi + 1 ],( 0x20 + 3 * 4 )
.la2:
inc edi
add esi , 2
add [ .string_size ], 2
dec ebx
jnz @ b
inc ecx
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.string_size dd 16
.number_strings dw 0
.length_to_end dd 0
.temp dd 0
.offset dd 0
.cursor dd 0
.cursor_temp dd 0
.shblock_beg dd 0
.shblock_end dd 0
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
main_area:
mov ecx ,[ number_strings ]
mov [ .number_strings ], cx
push [ len_str_scr ]
pop [ .len_str_scr ]
mov eax ,[ ready_screen_buffer.string_size ]
shr eax , 1
mov [ .string_size ], eax
mov edi ,[ screen_table ]
mov edi ,[ edi ]
cmp [ file_size ], edi
jbe .4
xor edx , edx ;<3B> <> <EFBFBD> <EFBFBD> 㭮<EFBFBD>
mov ebx ,[ scroll_bar_data_vertical.max_area ]
sub ebx ,[ scroll_bar_data_vertical.cur_area ]
mov ecx ,[ file_size ]
mov eax ,[ current_offset ]
test eax , eax
jnz .3
inc eax
.3:
mul ebx
test ecx , ecx
jnz .5
inc ecx
.5:
div ecx
mov [ scroll_bar_data_vertical.position ], eax
2020-11-26 23:02:39 +01:00
mcall SF_MOUSE_GET , SS F_BUTTON ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ뢠<E1AEA2> <EBA2A0> ScrollBar
2010-03-08 18:57:35 +01:00
test eax , eax
jnz .4
push dword scroll_bar_data_vertical
call [ scrollbar_ver_mouse ]
push dword scroll_bar_data_vertical ;draw for Vertical ScrollBar
call [ scrollbar_ver_draw ]
; push dword scroll_bar_data_vertical ;draw for Vertical ScrollBar
; call [scrollbar_ver_draw]
; xor eax,eax
; inc eax
; mov [scroll_bar_data_vertical.all_redraw],eax
; push dword scroll_bar_data_vertical ;draw for Vertical ScrollBar
; call [scrollbar_ver_draw]
; xor eax,eax ;reset all_redraw flag
; mov [scroll_bar_data_vertical.all_redraw],eax
.4:
mov esi , 0x000001 ;梥<> <20> <20> <> <20> <> <EFBFBD> <20> <> <20> <> <EFBFBD> ᥫ<EFBFBD>
mov edx , FIRST_HEX ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> ࢮ<EFBFBD> <E0A2AE> hex
call show_current_offset
mov edi ,[ screen_table ]
add edi , 4
mov ecx ,[ beg_str_scr ]
sub [ .string_size ], ecx
shl ecx , 1
add edi , ecx
.out:
push edi
movzx ebx , byte [ edi ]
cmp bl , 128 ;<3B> <EFBFBD> ઠ <20> <> <20> ਭ<EFBFBD> <E0A8AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ७<EFBFBD> <E0A5AD> <EFBFBD> ⠡<> <E2A0A1> <EFBFBD> <EFBFBD>
jb .7
add ebx ,[ codepage_offset ]
.7:
movzx edi , byte [ edi + 1 ]
lea edi ,[( edi * 2 - 0x40 )]
add edi , palitra
shl bx , 4
add ebx , font_buffer
mov ecx , 8 * 65536 + 16
mov ebp , 0
2020-11-26 23:02:39 +01:00
mcall SF_PUT_IMAGE_EXT
2010-03-08 18:57:35 +01:00
pop edi
add edi , 2
add edx , 8 * 65536
dec [ .len_str_scr ]
jz .loop_str
dec [ .string_size ]
jz .next_string
push edi
movzx ebx , byte [ edi ]
cmp bl , 128
jb .8
add ebx ,[ codepage_offset ]
.8:
movzx edi , byte [ edi + 1 ]
lea edi ,[( edi * 2 - 0x40 )]
add edi , palitra
shl bx , 4
add ebx , font_buffer
mcall
pop edi
add edi , 2
add edx , 8 * 65536
dec [ .len_str_scr ]
jz .loop_str
dec [ .string_size ]
jnz .out
2011-10-07 01:18:43 +02:00
jz .next_string ; WTF?
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.string_size dd 0
.number_strings dw 0
.len_str_scr dd 0
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
pushad
mov ecx , edx
shl ecx , 16
mov ebx , edx
shr ebx , 16
cmp bx ,[ scroll_bar_data_vertical.start_x ]
jge .ls1
mov ax ,[ scroll_bar_data_vertical.start_x ]
sub ax , bx
shl ebx , 16
mov bx , ax
mov cx , 16
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT ,,, frgrd_color
2010-03-08 18:57:35 +01:00
.ls1:
popad
jmp @ f
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.loop_str:
bt [ flags ], 6
jc @ b
@ @ :
dec [ .string_size ]
jz .next_string
add edi , 2
add edx , 8 * 65536
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ : ;<3B> <> <EFBFBD> <EFBFBD> ⪠ 䮭<> <E4AEAD> <EFBFBD> <EFBFBD> 梥⮬ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 襭<EFBFBD> <E8A5AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⥩
pushad
ror edx , 16
mov dx , 16
mov ecx , edx
mov edx , frgrd_color
movzx ebx ,[ scroll_bar_data_vertical.start_x ]
2011-10-07 01:18:43 +02:00
mov ax ,[ scroll_bar_data_vertical.size_x ]
test ax , ax
jnz .no_inc_ebx
inc ebx
.no_inc_ebx:
2010-03-08 18:57:35 +01:00
sub ecx , 2 * 65536
mov cx , 2
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT
2010-03-08 18:57:35 +01:00
popad
pushad
mov ecx , edx
shl ecx , 16
mov ebx , edx
shr ebx , 16
cmp bx ,[ scroll_bar_data_vertical.start_x ]
jge .10
mov ax ,[ scroll_bar_data_vertical.start_x ]
sub ax , bx
shl ebx , 16
mov bx , ax
mov cx , 16
2011-10-07 01:18:43 +02:00
mov ax ,[ scroll_bar_data_vertical.size_x ]
test ax , ax
jnz .no_inc_ebx_2
inc ebx
.no_inc_ebx_2:
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT ,,, frgrd_color
2010-03-08 18:57:35 +01:00
.10:
popad
jmp @ f
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.next_string:
bt [ flags ], 6
jc @ b
@ @ :
push [ len_str_scr ]
pop [ .len_str_scr ]
mov eax ,[ ready_screen_buffer.string_size ]
shr eax , 1
mov [ .string_size ], eax ;<3B> <> <EFBFBD> ४<EFBFBD> <E0A5AA> <EFBFBD> ᬥ饭<E1ACA5> <E9A5AD> <20> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ecx ,[ beg_str_scr ]
sub [ .string_size ], ecx
sub eax , ecx
shl ecx , 1
add edi , ecx
shl eax , 19
sub edx , eax
add edx , 18
dec [ .number_strings ]
jnz .out
btr [ flags ], 6
jmp end_draw
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
show_current_offset:
pushad
push edx ;<3B> 뢮<EFBFBD> ⥪<> 饣<EFBFBD> ᬥ饭<E1ACA5> <E9A5AD> <20> 䠩<> <E4A0A9>
mov edi , palitra.5
mov eax ,[ begin_offset ]
mov ebx ,[ cursor ]
dec ebx
shr bx , 1
add ebx , eax
mov [ current_offset ], ebx
mov edx ,[ low_area ]
lea eax ,[ 8 * 8 + 8 + 8 ]
shl eax , 16
add edx , eax
mov ecx , 8
call hex_output
lea eax ,[ 8 * 8 + 14 ]
shl eax , 16
add edx , eax
push edx
;<3B> <> <EFBFBD> <EFBFBD> 筮<EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx ,[ file_buffer ]
add edx , ebx ;[current_offset]
xor eax , eax
cmp ebx ,[ file_size ]
jae @ f
mov al ,[ edx ]
@ @ :
mov bx , 2
mov ebp , 8
xor ecx , ecx
xor edx , edx
@ @ :
div bx
or cl , dl
ror ecx , 4
dec ebp
jnz @ b
mov ebx , ecx
pop edx
mov ecx , 8
call hex_output
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 筮<EFBFBD>
push edx
mov edx ,[ file_buffer ]
mov ebx ,[ current_offset ]
add edx , ebx
xor eax , eax
inc ebx
cmp ebx ,[ file_size ] ;0 <20> <20> <> <20> ࠭<EFBFBD> 楩 䠩<> <E4A0A9>
jb @ f
mov edx , D_END
@ @ :
mov al ,[ edx ]
xor ebx , ebx
; mov ebp,3
mov cl , 10
@ @ :
div cl
mov bl , ah
xor ah , ah
shl ebx , 8
test al , al
; dec ebp
jnz @ b
shr ebx , 8
cmp byte [ edx ], 100
jb .1
mov ebp , 3
jmp @ f
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.1:
mov ebp , 1
cmp byte [ edx ], 10
jb @ f
mov ebp , 2
@ @ :
mov al , bl
shr ebx , 8
cmp al , 10
sbb al , 69h
das
shl eax , 8
; test bx,bx
dec ebp
jnz @ b
mov ecx , 8 * 65536 + 16
pop edx
add edx ,( 8 * 8 + 30 ) * 65536 ;268*65536
mov edi , palitra.5
mov ebp , 0
push dword 3
@ @ :
shr eax , 8
xor ebx , ebx
mov bl , al
shl ebx , 4
add ebx , font_buffer
push eax
2020-11-26 23:02:39 +01:00
mcall SF_PUT_IMAGE_EXT
2010-03-08 18:57:35 +01:00
pop eax
sub edx , 8 * 65536
dec dword [ esp ]
jnz @ b
add esp , 4
; mov edx,[low_area] ;<3B> 뢮<EFBFBD> esp
; add edx,298*65536
; mov ebx,esp
; mov ecx,8
; call hex_output
pop edx
popad
ret
2011-10-07 01:18:43 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
hex_output: ;<3B> 뢮<EFBFBD> hex <20> <> ப<EFBFBD> <20> <> 8 ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD>
pushad
mov edi ,( hex8_string ) ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov dword [ edi ], 0x30303030
mov dword [ edi + 4 ], 0x30303030
push ecx
.1:
mov eax , ebx
and eax , 0xF
cmp al , 10
sbb al , 69h
das
mov [ edi + ecx - 1 ], al
shr ebx , 4
loop .1
mov ecx , 8 * 65536 + 16
.2:
push edi
xor ebx , ebx
mov al ,[ edi ]
shl eax , 4
add eax , font_buffer
xchg eax , ebx
mov edi , palitra.5
mov ebp , 0
2020-11-26 23:02:39 +01:00
mcall SF_PUT_IMAGE_EXT
2010-03-08 18:57:35 +01:00
add edx , 8 * 65536
pop edi
inc edi
dec dword [ esp ]
jnz .2
add esp , 4
popad
ret
;------------------------------------------------------
align 4
input_from_keyboard:
xor al , al
sub ah , 48
cmp ah , 9
jle .1
sub ah , 7
cmp ah , 15
jle .1
sub ah , 32
.1:
bt [ flags ], 1
jnc .2
mov ebx ,[ cursor ]
and bl , 1
jz .2
inc [ file_size ]
call raspred_mem
mov edi ,[ current_offset ]
add edi ,[ file_buffer ]
mov esi ,[ file_buffer ]
add esi ,[ file_size ]
dec esi
@ @ :
cmp edi , esi
ja @ f
mov bl ,[ esi ]
mov [ esi + 1 ], bl
dec esi
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
call show_file_size
mov ebx ,[ current_offset ]
add ebx ,[ file_buffer ]
mov byte [ ebx ], 0
.2:
mov ecx ,[ current_offset ]
add ecx ,[ file_buffer ]
;<3B> <> . <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> heed.asm
mov dl ,[ ecx ] ;<3B> ਣ<EFBFBD> <E0A8A3> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
mov ebx ,[ cursor ]
and bl , 1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> - ।<> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 <20> <> <EFBFBD> <EFBFBD> 訩 <20> <> <EFBFBD> 㡠<EFBFBD> <E3A1A0>
jnz .hi_half_byte ;<3B> <> <EFBFBD> - <20> <> <EFBFBD> <EFBFBD> 訩
and dl , 0xf0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> . <20> -<2D> <> <EFBFBD> <EFBFBD> <20> ਣ<EFBFBD> <E0A8A3> <EFBFBD> <EFBFBD> 쭮<EFBFBD> <ECADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
jmp .patch_byte
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.hi_half_byte: ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ६<EFBFBD> <E0A5AC> <EFBFBD> <EFBFBD> ᤢ<> <E1A4A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㦭<EFBFBD> <E3A6AD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> <20> <20> <> <20> -<2D> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> 訩
shl ax , 4
and dl , 0x0f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> 訩 <20> <> <EFBFBD> 㡠<EFBFBD> <E3A1A0> <20> <20> ਣ<EFBFBD> <E0A8A3> <EFBFBD> <EFBFBD> 쭮<EFBFBD> <ECADAE> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
.patch_byte:
or ah , dl
mov [ ecx ], ah
jmp RIGHT
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
raspred_mem:
pushad
xor edx , edx
mov ecx , 4096
mov eax ,[ file_size ]
inc eax
div ecx
cmp eax ,[ prev_f_size_bl ]
ja @ f
je .ret
cmp [ file_size ], 4096
jbe .ret
mov [ prev_f_size_bl ], eax
xor edx , edx
mul ecx
mov ecx , eax
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov [ prev_f_size_bl ], eax
xor edx , edx
mul ecx
add ecx , eax
.1:
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_REALLOC ,,[ file_buffer ]
2010-03-08 18:57:35 +01:00
.ret:
popad
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
show_file_size:
mov ebx ,[ file_size ]
mov edx ,[ low_area ] ;
mov esi , 1
mov ecx , 8
call hex_output
ret
2011-07-30 19:11:55 +02:00
;---------------------------------------------------------------------
align 4
create_title:
mov edi , title_buf
mov esi , title
cld
@ @ :
lodsb
stosb
test al , al
jne @ b
mov [ edi - 1 ], byte ' '
mov esi , fname_buf
@ @ :
lodsb
stosb
test al , al
jne @ b
ret
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
2006-01-03 10:43:31 +01:00
draw_window:
2011-07-30 19:11:55 +02:00
call create_title
2010-08-24 15:55:40 +02:00
xor esi , esi
2020-11-26 23:02:39 +01:00
mcall SF_CREATE_WINDOW , 100 * 65536 + 653 , 100 * 65536 + 360 ,(( 0x73 shl 24 ) + frgrd_color ),, title_buf ;title
mcall SF_THREAD_INFO , threath_buf , - 1
2013-04-07 23:51:43 +02:00
; cmp byte [threath_buf+70],3 ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?
; jnae @f
mov eax ,[ threath_buf + 70 ]
test eax , 10b
jnz .@d
test eax , 100b
jz @ f
2010-03-08 18:57:35 +01:00
.@d:
call end_draw
2013-04-07 23:51:43 +02:00
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp dword [ threath_buf + 66 ],( 24 * 4 ) ;<3B> <EFBFBD> ઠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 쭮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
jae @ f
mov esi , dword [ threath_buf + 46 ]
sub esi , dword [ threath_buf + 66 ]
add esi , 24 * 4
2020-11-26 23:02:39 +01:00
mcall SF_CHANGE_WINDOW , - 1 , - 1 , - 1 ,
2010-03-08 18:57:35 +01:00
jmp .@d
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp dword [ threath_buf + 62 ],( 26 * 6 ) ;<3B> <EFBFBD> ઠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 쭮<EFBFBD> <20> <> ਭ<EFBFBD>
jae @ f
mov edx , dword [ threath_buf + 42 ]
sub edx , dword [ threath_buf + 62 ]
add edx , 26 * 6
2020-11-26 23:02:39 +01:00
mcall SF_CHANGE_WINDOW , - 1 , - 1 ,, - 1
2010-03-08 18:57:35 +01:00
jmp .@d
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov eax ,[ file_size ]
mov ebx ,[ byte s_per_line ]
xor edx , edx
div ebx
mov [ scroll_bar_data_vertical.size_x ], 0
cmp eax ,[ number_strings ]
jl @ f
mov [ scroll_bar_data_vertical.size_x ], scroll_width_size
@ @ :
mov eax , dword [ threath_buf + 62 ] ;<3B> <> ਭ<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
sub ax ,[ scroll_bar_data_vertical.size_x ]
mov [ scroll_bar_data_vertical.start_x ], ax
mov eax , dword [ threath_buf + 66 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
sub eax , 24 + 24 - 11
mov [ scroll_bar_data_vertical.size_y ], ax
mov ebx , eax
push eax
add ebx , 20
mov [ scroll_bar_data_vertical.max_area ], ebx
mov ebx ,[ scroll_bar_data_vertical.btn_high ]
shl ebx , 1
add ebx , 20
mov [ scroll_bar_data_vertical.cur_area ], ebx
pop eax
sub eax , 3
mov ebx , 18
xor edx , edx
div bx
mov [ number_strings ], eax ;<3B> <> <EFBFBD> -<2D> <> hex <20> <> ப <20> <20> <> <EFBFBD> <EFBFBD>
mov ebx ,[ byte s_per_line ]
mul ebx
mov edi ,[ screen_table ] ;<3B> <> <EFBFBD> -<2D> <> <20> <> <EFBFBD> ⮢ <20> <> <EFBFBD> <20> 뢮<EFBFBD> <EBA2AE>
mov dword [ edi ], eax
push eax
mov ebx , dword [ threath_buf + 62 ]
inc ebx
mov ecx ,( FIRST_HEX - 18 )
ror ecx , 16
mov cx , 18
ror ecx , 16
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT ,,, frgrd_color ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᢥ<> <E1A2A5> <EFBFBD>
2010-03-08 18:57:35 +01:00
mcall ,, 18 , panel_clr1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-10-12 15:46:40 +02:00
dec ebx
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_LINE ,, < 18 , 18 > , panel_clr2
2010-03-08 18:57:35 +01:00
mov ecx , dword [ threath_buf + 66 ]
sub cx , 18
push cx
shl ecx , 16
pop cx
mcall ,,, panel_clr3 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2011-10-12 15:46:40 +02:00
inc ebx
2010-03-08 18:57:35 +01:00
add ecx , 1 * 65536
mov cx , 18
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT ,,, panel_clr1
2010-03-08 18:57:35 +01:00
mov eax , dword [ threath_buf + 62 ]
sub eax , scroll_width_size
shr eax , 3 ;div 8
mov [ len_str_scr ], eax
mov eax ,[ len_str_scr ]
shl eax , 1
cmp eax ,[ ready_screen_buffer.string_size ]
jae @ f
mov edi ,[ screen_table ]
mov eax ,[ byte s_per_line ]
sub dword [ edi ], eax
dec [ number_strings ]
@ @ :
shr ecx , 16
mov edx , ecx
mov ecx ,( FIRST_HEX )
shr ecx , 16
mov eax ,[ number_strings ]
lea ebx ,[ eax * 8 ] ;*18
lea ebx ,[ ebx * 2 ]
lea eax ,[ eax * 2 ]
add eax , ebx
add cx , ax
add cx , 21
sub dx , cx
shl ecx , 16
add cx , dx
sub ecx , 1 * 65536
movzx ebx , word [ scroll_bar_data_vertical.start_x ]
2011-10-07 01:18:43 +02:00
inc ebx
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT ,,, frgrd_color
2010-03-08 18:57:35 +01:00
pop eax
cmp eax ,[ file_size ]
jge @ f
; push dword scroll_bar_data_vertical
; call [scrollbar_ver_mouse]
xor eax , eax
inc eax
mov [ scroll_bar_data_vertical.all_redraw ], eax
push dword scroll_bar_data_vertical ;draw for Vertical ScrollBar
call [ scrollbar_ver_draw ]
xor eax , eax ;reset all_redraw flag
mov [ scroll_bar_data_vertical.all_redraw ], eax
@ @ :
push dword menu_data_1 ;draw for Menu 1
call [ menu_bar_draw ]
push dword menu_data_2 ;draw for Menu 2
call [ menu_bar_draw ]
push dword menu_data_3 ;draw for Menu 3
call [ menu_bar_draw ]
;;;
mov eax , dword [ threath_buf + 66 ]
add eax , 8 * 65536 - 15
mov [ low_area ], eax
mov ebx ,[ beg_str_scr ]
mov [ beg_str_scr ], 0
mov eax ,[ len_str_scr ]
shl eax , 1
cmp eax ,[ ready_screen_buffer.string_size ]
jae @ f
mov [ beg_str_scr ], ebx
movzx eax , word [ threath_buf + 66 ]
sub eax , 34
mov [ scroll_bar_data_horizontal.start_y ], ax
;cur_area/(size_x-30)=len_str_scr/string_size
mov eax , dword [ threath_buf + 62 ]
sub ax ,[ scroll_bar_data_vertical.size_x ]
mov [ scroll_bar_data_horizontal.size_x ], ax
sub eax ,[ scroll_bar_data_horizontal.btn_high ]
sub eax ,[ scroll_bar_data_horizontal.btn_high ]
mov [ scroll_bar_data_horizontal.max_area ], eax
xor edx , edx
mov ebx ,[ len_str_scr ]
mul ebx
mov ebx ,[ ready_screen_buffer.string_size ]
shr ebx , 1
div ebx
mov [ scroll_bar_data_horizontal.cur_area ], eax
push dword scroll_bar_data_horizontal ;draw for Horizontal ScrollBar
call [ scrollbar_hor_mouse ]
xor eax , eax
inc eax
mov [ scroll_bar_data_horizontal.all_redraw ], eax
push dword scroll_bar_data_horizontal ;draw for Vertical ScrollBar
call [ scrollbar_hor_draw ]
xor eax , eax ;reset all_redraw flag
mov [ scroll_bar_data_horizontal.all_redraw ], eax
@ @ :
mov eax ,[ low_area ]
mov edi ,[ screen_table ]
mov esi ,[ byte s_per_line ]
mov ecx , esi
shl ecx , 1
mov eax ,[ edi ]
mov ebx ,[ cursor ]
inc ebx
shr ebx , 1
@ @ :
cmp eax , ebx
jge @ f
add [ begin_offset ], esi
sub [ cursor ], ecx
sub ebx , esi
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
bts [ flags ], 6
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
start_draw:
2020-11-26 23:02:39 +01:00
mcall SF_REDRAW , SS F_BEGIN_DRAW
2010-03-08 18:57:35 +01:00
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
end_draw:
2020-11-26 23:02:39 +01:00
mcall SF_REDRAW , SS F_END_DRAW
2010-03-08 18:57:35 +01:00
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
close_prog:
2020-11-26 23:02:39 +01:00
mcall SF_TERMINATE_PROCESS
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
change_codepage: ;<3B> <> <EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⠡<> <E2A0A1> <EFBFBD> <EFBFBD>
test ah , ah
jnz @ f
btc [ flags ], 4
jc .1
push [ codepage_offset ]
pop [ codepage_offset_previous ]
mov [ codepage_offset ], 2 * 128
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.1:
push [ codepage_offset_previous ]
pop [ codepage_offset ]
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp [ codepage_offset ], 0
jne @ f
add [ codepage_offset ], 128
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov [ codepage_offset ], 0
.end:
call show_codepage
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
show_codepage:
mov ebp , 6
mov edx , dword [ threath_buf + 62 ]
sub edx , 73
shl edx , 16
add edx ,[ low_area ]
mov edi , string_cp866
cmp [ codepage_offset ], 0
je @ f
add edi , 6
cmp [ codepage_offset ], 128
je @ f
add edi , 6
@ @ :
mov ecx , 8 * 65536 + 16
mov esi , 1
push ebp
mov ebp , 0
@ @ :
xor ebx , ebx
push edi
mov bl ,[ edi ]
shl bx , 4
add ebx , font_buffer
mov edi , palitra.5
2020-11-26 23:02:39 +01:00
mcall SF_PUT_IMAGE_EXT
2010-03-08 18:57:35 +01:00
add edx , 8 * 65536
pop edi
inc edi
dec dword [ esp ]
jnz @ b
add esp , 4
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
show_insert: ;<3B> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <EFBFBD> ० <> <E0A5A6> <EFBFBD> <20> <> ⠢<EFBFBD> <E2A0A2> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebp , 3
mov edx , dword [ threath_buf + 62 ]
sub edx , 120
shl edx , 16 ; mov edx,428*65536+335
add edx ,[ low_area ]
mov edi , string_ins
push ebp
mov ecx , 8 * 65536 + 16
mov esi , 1
mov ebp , 0
.1:
xor ebx , ebx
push edi
bt [ flags ], 1
jnc .2
mov bl ,[ edi ]
shl bx , 4
.2:
add ebx , font_buffer
mov edi , palitra.5
2020-11-26 23:02:39 +01:00
mcall SF_PUT_IMAGE_EXT
2010-03-08 18:57:35 +01:00
add edx , 8 * 65536
pop edi
inc edi
dec dword [ esp ]
jnz .1
add esp , 4
ret
;-------------------------------------------------------------------------------
;help window
create_help_window:
pushad
2010-10-08 09:20:01 +02:00
cmp [ help_is_open_already ], 1
jne @ f
2020-11-26 23:02:39 +01:00
mov ecx , [ help_window_pid ]
mcall SF_SYSTEM , SS F_GET_THREAD_SLOT
xchg eax , ecx
mcall SF_SYSTEM , SS F_FOCUS_WINDOW
2010-10-08 09:20:01 +02:00
popad
ret
2011-10-07 01:18:43 +02:00
;---------------------------------------------------------------------
2010-10-08 09:20:01 +02:00
@ @ :
2020-11-26 23:02:39 +01:00
mcall SF_CREATE_THREAD , 1 , .thread ,( .threat_stack + 16 * 4 )
2010-10-08 09:20:01 +02:00
mov [ help_is_open_already ], 1
2020-11-26 23:02:39 +01:00
mov [ help_window_pid ], eax
2010-03-08 18:57:35 +01:00
popad
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.thread:
call .window
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.still:
2020-11-26 23:02:39 +01:00
mcall SF_WAIT_EVENT
2010-03-08 18:57:35 +01:00
dec al
jz .red
dec al
jz .key
dec al
jz .button
jmp .still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-10-08 09:20:01 +02:00
and [ help_is_open_already ], 0
2020-11-26 23:02:39 +01:00
mcall SF_TERMINATE_PROCESS
2010-03-08 18:57:35 +01:00
.button:
2020-11-26 23:02:39 +01:00
mcall SF_GET_BUTTON
2010-03-08 18:57:35 +01:00
cmp ah , 1
jne @ f
2010-10-08 09:20:01 +02:00
and [ help_is_open_already ], 0
2020-11-26 23:02:39 +01:00
mcall SF_TERMINATE_PROCESS
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 2
jne @ f
mov edi ,( help_end - help_text ) / 51
movzx eax ,[ cur_help_string ]
sub edi , 13
sub edi , eax
jz .still
inc [ cur_help_string ]
jmp .red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp ah , 3
jne .still
cmp [ cur_help_string ], 0
je .still
dec [ cur_help_string ]
jmp .red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.key:
2020-11-26 23:02:39 +01:00
mcall SF_GET_KEY
2010-03-08 18:57:35 +01:00
jmp .still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.red:
call .window
jmp .still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.window:
pushad
2020-11-26 23:02:39 +01:00
mcall SF_REDRAW , SS F_BEGIN_DRAW
mcall SF_CREATE_WINDOW , 50 * 65536 + 320 , 0x70 * 65536 + 240 , 0x13000000 ,, help_but_text
mcall SF_DEFINE_BUTTON , < 130 , 20 > , < 6 , 12 > , 2 , 0xaaaaaa
2010-03-08 18:57:35 +01:00
mcall , < 150 , 20 > ,, 3 ,
mov ebx , 8 * 65536 + 15
mov ecx , 0x00DDDDDD
xor edx , edx
movzx eax , byte [ cur_help_string ]
mov edi ,( help_end - help_text ) / 51
sub edi , eax
mov esi , 51
mul si
mov edx , help_text
add edx , eax
2020-11-26 23:02:39 +01:00
mov eax , SF_DRAW_TEXT
2010-03-08 18:57:35 +01:00
@ @ :
add ebx , 0x10
mcall
add edx , 51
dec edi
jnz @ b
2020-11-26 23:02:39 +01:00
mcall SF_REDRAW , SS F_END_DRAW
2010-03-08 18:57:35 +01:00
popad
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.threat_stack: times 16 dd 0
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
open_file:
2020-11-26 23:02:39 +01:00
mov [ func_70.Function ], SS F_GET_INFO
mov [ func_70.Position ], 0
mov [ func_70.Flags ], 0
mov [ func_70.Count ], 0
mov [ func_70.Buffer ], bufferfinfo
2010-03-08 18:57:35 +01:00
mov [ func_70.rezerv ], 0
2020-11-26 23:02:39 +01:00
mov [ func_70.FileName ], file_name
mcall SF_FILE , func_70
2010-03-08 18:57:35 +01:00
test al , al ;䠩<> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?
jz @ f
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_TEXT , 400 * 65536 + 31 , 0x80CC0000 , error_open_file_string
2010-03-08 18:57:35 +01:00
jmp open_file
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov eax , dword [ bufferfinfo + 32 ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> 㥬 ࠧ<> <E0A0A7> <EFBFBD> 䠩<> <E4A0A9>
mov [ file_size ], eax
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_FREE ,[ file_buffer ]
2010-03-08 18:57:35 +01:00
test eax , eax
jnz @ f
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 訡<EFBFBD> <E8A8A1> <20> <> <20> <> <20> <EFBFBD> <E1A2AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
@ @ :
2020-11-26 23:02:39 +01:00
mov ecx ,[ file_size ]
or ecx , ecx
jnz @ f
inc ecx ;<3B> ࠧ<> <E0A0A7> <EFBFBD> 䠩<> <E4A0A9> 0 <20> <> <EFBFBD> <EFBFBD>
@ @ :
mcall SF_SYS_MISC , SS F_MEM_ALLOC
2010-03-08 18:57:35 +01:00
mov [ file_buffer ], eax
;;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ⠡<> <E2A0A1> <EFBFBD> <EFBFBD> : [ DWORD 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> : DWORD <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ]
2020-11-26 23:02:39 +01:00
mov [ func_70.Function ], SS F_READ_FILE
mov [ func_70.Position ], 0
mov [ func_70.Flags ], 0
2010-03-08 18:57:35 +01:00
mov [ func_70.rezerv ], 0
2020-11-26 23:02:39 +01:00
mov [ func_70.FileName ], file_name
2010-03-08 18:57:35 +01:00
push dword [ file_size ] ;dword [edi+4]
2020-11-26 23:02:39 +01:00
pop dword [ func_70.Count ]
2010-03-08 18:57:35 +01:00
push dword [ file_buffer ] ;dword [edi]
2020-11-26 23:02:39 +01:00
pop dword [ func_70.Buffer ]
mcall SF_FILE , func_70
2010-03-08 18:57:35 +01:00
test eax , eax
jz @ f
;<3B> 訡<EFBFBD> <E8A8A1> <20> ⥭<EFBFBD> <E2A5AD>
@ @ :
call Ctrl_HOME
jmp redraw_all
;-------------------------------------------------------------------------------
open_dialog_save:
mov [ OpenDialog_data.type ], 1 ; Save
2010-07-01 21:17:20 +02:00
push dword OpenDialog_data
call [ OpenDialog_Start ]
; cmp [OpenDialog_data.status],2 ; OpenDialog does not start
2010-03-08 18:57:35 +01:00
cmp [ OpenDialog_data.status ], 1
jne still
mov esi , fname_buf
mov edi , file_name
cld
@ @ :
cmp byte [ esi ], 0
je @ f
movsb
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov byte [ edi ], 0
sub esi , path
mov [ edi t1.size ], esi
mov [ edi t1.pos ], esi
2010-07-01 21:17:20 +02:00
; jmp save_file
2010-03-08 18:57:35 +01:00
;-------------------------------------------------------------------------------
save_file: ;<3B> <> <EFBFBD> ࠭塞 䠩<>
2020-11-26 23:02:39 +01:00
mov [ func_70.Function ], SS F_CREATE_FILE
mov [ func_70.Position ], 0
mov [ func_70.Flags ], 0
2010-03-08 18:57:35 +01:00
push [ file_size ]
2020-11-26 23:02:39 +01:00
pop [ func_70.Count ]
2010-03-08 18:57:35 +01:00
push [ file_buffer ]
2020-11-26 23:02:39 +01:00
pop [ func_70.Buffer ]
2010-03-08 18:57:35 +01:00
mov [ func_70.rezerv ], 0
2020-11-26 23:02:39 +01:00
mov [ func_70.FileName ], file_name
mcall SF_FILE , func_70
2010-03-08 18:57:35 +01:00
cmp al , 0 ;<3B> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> 㤠筮?
je redraw_all
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_TEXT , 400 * 65536 + 31 , 0x80CC0000 , error_save_file_string
2010-03-08 18:57:35 +01:00
jmp save_file
;-------------------------------------------------------------------------------
draw_ed_box: ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> edit box'<27>
.1:
push eax ebx ecx edx
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT , 180 * 65536 + 220 , 25 * 65536 + 70 , 0xaaaaaa
2010-03-08 18:57:35 +01:00
bt [ flags ], 9
jnc @ f
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_TEXT , 246 * 65536 + 35 , 0x80ffffff , sel_text
2010-03-08 18:57:35 +01:00
@ @ :
bt [ flags ], 2
jnc @ f
push dword Option_boxs
call [ option_box_draw ]
@ @ :
bt [ flags ], 3
jnc @ f
push dword Option_boxs2
call [ option_box_draw ]
@ @ :
mov eax , ed_box_data
mov ecx ,[ eax ]
@ @ :
add eax , 4
push dword [ eax ]
call [ edi t_box_draw ]
loop @ b
pop edx ecx ebx eax
.2:
2020-11-26 23:02:39 +01:00
mcall SF_WAIT_EVENT
2010-03-08 18:57:35 +01:00
cmp al , 6
je .mouse
cmp al , 3
je .button
cmp al , 2
je .keys
cmp al , 1
jne .2
call draw_window
2013-04-07 23:51:43 +02:00
mov eax ,[ threath_buf + 70 ]
test eax , 10b
jnz .2
test eax , 100b
jnz .2
2010-03-08 18:57:35 +01:00
call main_area
bt [ flags ], 2
jnc @ f
push dword Option_boxs
call [ option_box_draw ]
@ @ :
bt [ flags ], 3
jnc @ f
push dword Option_boxs2
call [ option_box_draw ]
@ @ :
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.mouse:
bt [ flags ], 2
jnc @ f
push dword Option_boxs
call [ option_box_mouse ]
@ @ :
bt [ flags ], 3
jnc @ f
push dword Option_boxs2
call [ option_box_mouse ]
@ @ :
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.keys:
2020-11-26 23:02:39 +01:00
mcall SF_GET_KEY
2010-03-08 18:57:35 +01:00
cmp ah , 13
je .4
cmp ah , 27
je .3
bt [ flags ], 2 ;<3B> <EFBFBD> ઠ <20> <> <20> ਬ<EFBFBD> <E0A8AC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD> 0-9,a-b
jnc .eb2
.eb1:
cmp ah , 9
jne .eb1_1
push edx
mov edx ,[ option_group1 ]
cmp edx , op1
jne @ f
mov edx , op2
jmp .eb1_2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp edx , op2
jne @ f
mov edx , op3
jmp .eb1_2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov edx , op1
.eb1_2:
mov [ option_group1 ], edx
pop edx
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb1_1:
cmp ah , 48
jb .eb1_3
cmp ah , 57
jbe .eb
cmp ah , 102
jg .eb1_3
cmp ah , 97
jge .eb
.eb1_3:
cmp ah , 182
je .eb
cmp ah , 8
je .eb
cmp ah , 176
je .eb
cmp ah , 179
je .eb
dec [ edi t2.shift ]
dec [ edi t2.shift + 4 ]
push dword [ ed_box_data + 4 ] ; [esp]
call [ edi t_box_draw ]
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb2:
bt [ flags ], 3
jnc .eb3
cmp ah , 9
jne .eb2_2
push edx
mov edx ,[ option_group2 ]
cmp edx , op11
jne @ f
mov edx , op12
jmp .eb2_1
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov edx , op11
.eb2_1:
mov [ option_group2 ], edx
pop edx
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb2_2:
cmp ah , 182
je .eb
cmp ah , 8
je .eb
cmp ah , 176
je .eb
cmp ah , 179
je .eb
mov edx ,[ option_group2 ]
cmp edx , op11
jne .eb
cmp ah , 48
jb .eb2_3
cmp ah , 57
jbe .eb
cmp ah , 102
jg .eb2_3
cmp ah , 97
jge .eb
.eb2_3:
dec [ edi t3.shift ]
dec [ edi t3.shift + 4 ]
push dword [ ed_box_data + 4 ] ;[esp]
call [ edi t_box_draw ]
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb3:
bt [ flags ], 9
jnc .eb
cmp ah , 9
je .eb3_1
cmp ah , 182
je .eb3_2
cmp ah , 8
je .eb3_2
cmp ah , 176
je .eb3_2
cmp ah , 179
je .eb3_2
cmp ah , 48
jb .eb3_3
cmp ah , 57
jbe .eb3_2
cmp ah , 102
jg .eb3_3
cmp ah , 97
jge .eb3_2
.eb3_3:
push edx
mov edx ,[ edi t4.flags ]
and edx , 2
jz @ f
pop edx
dec [ edi t4.shift ]
dec [ edi t4.shift + 4 ]
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
pop edx
dec [ edi t5.shift ]
dec [ edi t5.shift + 4 ]
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb3_1:
push edx
mov edx ,[ edi t4.flags ]
and edx , 2
jz @ f
pop edx
mov [ edi t5.flags ], 2
mov [ edi t4.flags ], 0
jmp .eb3_2
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
pop edx
mov [ edi t4.flags ], 2
mov [ edi t5.flags ], 0
.eb3_2:
push dword [ ed_box_data + 4 ]
call [ edi t_box_key ]
push dword [ ed_box_data + 8 ]
call [ edi t_box_key ]
jmp .1
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.eb:
push dword [ ed_box_data + 4 ] ;[esp]
call [ edi t_box_key ]
jmp .2
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.button:
2020-11-26 23:02:39 +01:00
mcall SF_GET_BUTTON
2010-03-08 18:57:35 +01:00
cmp ah , 1
jne .2
jmp cl ose_prog
.3:
btr [ flags ], 2
btr [ flags ], 3
add esp , 4
jmp redraw_all
.4:
2020-11-26 23:02:39 +01:00
mcall SF_DRAW_RECT , 180 * 65536 + 220 , 25 * 65536 + 70 , frgrd_color
2010-03-08 18:57:35 +01:00
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
strtohex:
;enter: edi - pointer to string,ebx - pointer to size of string; exit: eax in hex
mov esi , hex8_string
@ @ :
mov ah ,[ edi + ecx - 1 ] ;<3B> <> ࠡ<EFBFBD> ⪠ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD>
sub ah , 48
cmp ah , 9
jbe .1
sub ah , 7
cmp ah , 15
jbe .1
sub ah , 32
.1:
mov [ esi + ecx - 1 ], ah
dec ecx
jnz @ b
mov ecx ,[ ebx ]
xor eax , eax
.2:
shl eax , 4
or al ,[ esi ]
inc esi
dec ecx
jnz .2
ret
Ctrl_G:
bts [ flags ], 2
mov dword [ ed_box_data ], 1
mov dword [ ed_box_data + 4 ], edi t2
call draw_ed_box
btr [ flags ], 2
mov ecx ,[ edi t2.size ]
test ecx , ecx
jz .end
cmp ecx , 8
jg Ctrl_G
mov edi , go_to_string
mov ebx , edi t2.size
call strtohex
cmp eax ,[ file_size ] ;<3B> 롮<EFBFBD> check_box'<27>
jg Ctrl_G
mov edx ,[ option_group1 ]
cmp edx , op1 ;abs
je .abs
cmp edx , op2
jne .back
add eax ,[ current_offset ] ;forward
cmp eax ,[ file_size ]
jg Ctrl_G
mov edi ,[ screen_table ]
mov edi ,[ edi ]
xor edx , edx
@ @ :
add edx , edi
cmp eax , edx
jg @ b
sub edx , edi
mov [ begin_offset ], edx
sub eax , edx
shl eax , 1
inc eax
mov [ cursor ], eax
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.back:
cmp eax ,[ current_offset ] ;back
jg Ctrl_G
mov edi ,[ screen_table ]
mov edi ,[ edi ]
mov ebx ,[ current_offset ]
sub ebx , eax
xor edx , edx
@ @ :
add edx , edi
cmp edx , ebx
jb @ b
sub edx , edi
mov [ begin_offset ], edx
sub ebx , edx
mov edx , ebx
shl edx , 1
inc edx
mov [ cursor ], edx
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.abs:
mov esi ,[ screen_table ]
mov esi ,[ esi ]
xor ebx , ebx
.3:
add ebx , esi
cmp eax , ebx
jg .3
sub ebx , esi
cmp ebx ,[ file_size ]
jg Ctrl_G
mov [ begin_offset ], ebx
sub eax , ebx
shl eax , 1
inc eax
mov [ cursor ], eax
.end:
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_B:
bts [ flags ], 9
mov dword [ ed_box_data ], 2
mov dword [ ed_box_data + 4 ], edi t4
mov dword [ ed_box_data + 8 ], edi t5
call draw_ed_box
btr [ flags ], 9
mov ecx ,[ edi t4.size ]
test ecx , ecx
jz .end
cmp ecx , 8
jg Ctrl_B
mov edi , sel1_string
mov ebx , edi t4.size
call strtohex
cmp eax ,[ file_size ]
jge Ctrl_B
push eax ;from
mov ecx ,[ edi t5.size ]
test ecx , ecx
jz .end
cmp ecx , 8
jg Ctrl_B
mov edi , sel2_string
mov ebx , edi t5.size
call strtohex
cmp eax ,[ file_size ]
jb @ f
pop eax
jmp Ctrl_B
2011-10-07 01:18:43 +02:00
2010-03-08 18:57:35 +01:00
@ @ :
pop [ shblock_beg ]
cmp eax ,[ shblock_beg ]
jae @ f
xchg eax ,[ shblock_beg ]
@ @ :
mov [ shblock_end ], eax
bts [ flags ], 8
.end:
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_F:
bts [ flags ], 3
mov dword [ ed_box_data ], 1
mov dword [ ed_box_data + 4 ], edi t3
call draw_ed_box
btr [ flags ], 3
mov ecx ,[ edi t3.size ]
test ecx , ecx
jz .end
cmp ecx , 8
jg Ctrl_F
mov edi , find_string
mov edx ,[ option_group2 ]
cmp edx , op11
jne .find
mov eax , find_string
push dword [ eax ]
push dword [ eax + 4 ]
bts [ flags ], 0
mov ebx , edi t3.size
call strtohex
mov ecx ,[ edi t3.size ]
bt cx , 0
jnc .3
inc ecx
shl eax , 4
.3:
shr ecx , 1
.4:
mov [ edi + ecx - 1 ], al
shr eax , 8
loop .4
.find:
mov esi ,[ current_offset ]
mov ebx ,[ file_size ]
mov eax , ebx
add eax ,[ file_buffer ]
add esi ,[ file_buffer ]
.5:
mov ecx ,[ edi t3.size ]
cmp edx , op11
jne .7
bt cx , 0
jnc .6
inc ecx
.6:
shr ecx , 1
.7:
cld
@ @ :
cmp esi , eax
jg .end
cmpsb
je .8
mov edi , find_string
jmp .5
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.8:
loop @ b
sub esi ,[ file_buffer ]
mov ecx ,[ edi t3.size ]
cmp edx , op11
jne .10
bt cx , 0
jnc .9
inc ecx
.9:
shr ecx , 1
.10:
sub esi , ecx
xor edx , edx
mov edi ,[ screen_table ]
mov edi ,[ edi ]
@ @ :
add edx , edi
cmp edx , esi
jb @ b
sub edx , edi
mov [ begin_offset ], edx
sub esi , edx
shl esi , 1
inc esi
mov [ cursor ], esi
.end:
bt [ flags ], 0
jnc @ f
mov eax , find_string
pop dword [ eax + 4 ]
pop dword [ eax ]
btr [ flags ], 0
@ @ :
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
invert_byte:
mov ebx ,[ current_offset ]
cmp ebx ,[ file_size ]
jae still
add ebx ,[ file_buffer ]
not byte [ ebx ]
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Insert: ;<3B> <> ४<EFBFBD> <E0A5AA> 祭<EFBFBD> <E7A5AD> ० <> <E0A5A6> <EFBFBD> <09> <> ⠢<EFBFBD> <E2A0A2> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
btc [ flags ], 1 ;not [insert_mod]
call show_insert
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
DEL:
bt [ flags ], 1
jnc still
mov edi ,[ current_offset ]
mov esi ,[ file_buffer ]
mov edx ,[ file_size ]
test edx , edx
jz still
dec edx
cmp edi , edx
jbe @ f
call LEFT
call LEFT
jmp red
@ @ :
jb @ f
call LEFT
call LEFT
@ @ :
cmp edi , edx
je @ f
mov al ,[ edi + esi + 1 ]
mov [ edi + esi ], al
inc edi
jmp @ b
@ @ :
dec [ file_size ]
call show_file_size
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
BackSpace:
bt [ flags ], 1 ;cmp [insert_mod],0
jnc still ;je still
mov edi ,[ current_offset ]
mov esi ,[ file_buffer ]
mov edx ,[ file_size ]
test edx , edx
jz still
test edi , edi
jz still
call LEFT
call LEFT
cmp [ cursor ], 2
jne @ f
cmp edx , 1
jne @ f
dec [ cursor ]
@ @ :
cmp edi , edx
jge @ f
mov al ,[ edi + esi ]
mov [ edi + esi - 1 ], al
inc edi
jmp @ b
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
dec [ file_size ]
call show_file_size
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_UP:
cmp [ begin_offset ], 0
je @ f
mov eax ,[ byte s_per_line ]
sub [ begin_offset ], eax
@ @ :
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_DOWN:
mov eax ,[ cursor ]
dec eax
shr eax , 1
add eax ,[ begin_offset ]
mov ebx ,[ byte s_per_line ]
add eax , ebx
cmp eax ,[ file_size ]
jge @ f
add [ begin_offset ], ebx
@ @ :
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
UP:
mov eax ,[ current_offset ]
cmp eax ,[ byte s_per_line ]
jb still
mov eax ,[ cursor ]
dec ax
shr ax , 1
cmp eax ,[ byte s_per_line ]
jge @ f
mov eax ,[ byte s_per_line ]
sub [ begin_offset ], eax
jmp red
@ @ :
mov eax ,[ byte s_per_line ]
shl ax , 1
sub [ cursor ], eax
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
DOWN: ;<3B> <> <09> <> ப<EFBFBD> <09> <> <EFBFBD> <EFBFBD>
mov eax ,[ current_offset ]
add eax ,[ byte s_per_line ]
bt [ flags ], 1
jnc @ f
dec eax
@ @ :
cmp eax ,[ file_size ]
jge still ;<3B> <20> <> <20> <> <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> 䠩<> <E4A0A9> , <20> <> <20> ⮯
mov eax ,[ screen_table ]
mov eax ,[ eax ]
mov edx ,[ cursor ]
dec dx
shr dx , 1
add edx ,[ byte s_per_line ]
cmp eax , edx ;<3B> <> <20> <> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> ?
jbe @ f
mov eax ,[ byte s_per_line ]
shl ax , 1
add [ cursor ], eax
ret
@ @ :
mov eax ,[ byte s_per_line ]
add [ begin_offset ], eax
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
LEFT:
cmp [ cursor ], 1
jbe @ f
dec [ cursor ]
jmp .end
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
cmp [ begin_offset ], 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <09> <> <20> <> ࢮ<EFBFBD> <20> <> ப<EFBFBD> <20> <> ᬥ饭<E1ACA5> <E9A5AD> <EFBFBD> 0?
jne @ f ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> ᬥ頥<E1ACA5> <20> <20> ப<EFBFBD> <E0AEAA> ⪮<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
; inc [cursor]
jmp .end ;still ;⮣<> <E2AEA3> <20> ⮯
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov eax ,[ byte s_per_line ]
sub [ begin_offset ], eax
shl ax , 1
dec eax
add [ cursor ], eax
.end:
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
RIGHT:
mov ecx ,[ begin_offset ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 塞 ᬥ饭<E1ACA5> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov edx ,[ cursor ] ;<3B> <> <EFBFBD> <20> <EFBFBD> ન <20> <> <EFBFBD> <EFBFBD> <EFBFBD> ⢮<EFBFBD> <E2A2AE> <EFBFBD> <EFBFBD> <EFBFBD>
shr edx , 1 ;<> <E1ABA5> <EFBFBD> 饣<EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD>
add ecx , edx
bt [ flags ], 1
jnc @ f
dec ecx ;<3B> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ࠧ<> <E0A0A7> 䠩<> <E4A0A9>
@ @ :
cmp ecx ,[ file_size ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> - <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 1 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9>
jge red
cmp [ file_size ], 0
je still
mov eax ,[ screen_table ]
mov eax ,[ eax ]
mov ecx ,[ begin_offset ]
cmp eax , edx ;<3B> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
jbe @ f
inc [ cursor ] ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD>
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
mov ecx ,[ byte s_per_line ] ;ᬥ頥<E1ACA5> <E9A0A5> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
add [ begin_offset ], ecx ;<3B> <20> ப<EFBFBD> <E0AEAA> ⪮<EFBFBD>
shl cx , 1
dec cx
sub [ cursor ], ecx
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
PGDN:
mov edi ,[ screen_table ]
mov eax ,[ edi ]
shl eax , 1
add eax ,[ begin_offset ]
cmp eax ,[ file_size ] ;<3B> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᬥ<> <E1ACA5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> ?
jg Ctrl_END
mov eax ,[ edi ]
add [ begin_offset ], eax
; mov ebx,[cursor]
; dec ebx
; xor ecx,ecx
; bt ebx,0
; jnc @f
; inc ecx
; @@: shr ebx,1
; add ebx,eax
; @@: cmp ebx,[file_size]
; jbe @f
; sub ebx,[bytes_per_line]
; jmp @b
; @@: sub ebx,eax
; shl ebx,1
; inc ebx
; add ebx,ecx
; mov [cursor],ebx
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
PGUP:
mov eax ,[ screen_table ]
mov eax ,[ eax ]
mov edx ,[ begin_offset ]
cmp eax , edx
jbe @ f
call Ctrl_HOME
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
@ @ :
sub [ begin_offset ], eax
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
HOME:
mov eax ,[ cursor ]
dec ax
shr ax , 1
mov ecx ,[ byte s_per_line ]
xor edx , edx
div ecx
shl dx , 1
sub [ cursor ], edx
bt [ cursor ], 0
jc @ f
dec [ cursor ]
@ @ :
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
END_:
mov eax ,[ cursor ]
dec ax
shr ax , 1
mov ecx ,[ byte s_per_line ]
xor edx , edx
div ecx
mov eax ,[ current_offset ]
sub eax , edx
add eax ,[ byte s_per_line ]
mov edx ,[ file_size ]
cmp eax , edx
jbe @ f
sub edx , eax
add eax , edx
@ @ :
sub eax ,[ begin_offset ]
shl eax , 1
test eax , eax
jz red
dec eax
mov [ cursor ], eax
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_HOME:
mov [ begin_offset ], 0
mov [ cursor ], 1
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_END:
mov eax ,[ file_size ]
mov ecx ,[ screen_table ]
mov ecx ,[ ecx ]
xor edx , edx
div ecx
test dx , dx
jnz @ f
test eax , eax
jz @ f
mov edx , ecx
dec eax
@ @ :
push dx
xor dx , dx
mul ecx
pop dx
shl edx , 1
cmp edx , 1
jg @ f
mov edx , 2
@ @ :
dec edx
mov [ begin_offset ], eax
mov [ cursor ], edx
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
ESC:
btr [ flags ], 8
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
copy_to_buf:
bt [ flags ], 8
jnc .1
mov eax ,[ shblock_end ]
sub eax ,[ shblock_beg ]
inc eax
mov ecx , eax
mov [ copy_len ], eax
2020-11-26 23:02:39 +01:00
mcall SF_SYS_MISC , SS F_MEM_REALLOC ,,[ copy_buf ]
2010-03-08 18:57:35 +01:00
mov esi ,[ shblock_beg ]
mov edi ,[ copy_buf ]
add esi ,[ file_buffer ]
mov ecx ,[ copy_len ]
cld
@ @ :
movsb
loop @ b
bts [ flags ], 10
xor eax , eax
ret
2011-10-07 01:18:43 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
.1:
or eax , - 1
ret
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_C:
call copy_to_buf
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
shblock_sz dd 0
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_V:
bt [ flags ], 10
jnc still
bt [ flags ], 8
jnc .past_kurs
;<3B> <> ⠢<EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <20> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov ebx ,[ shblock_end ]
sub ebx ,[ shblock_beg ]
inc ebx
mov [ shblock_sz ], ebx
mov esi ,[ copy_buf ]
mov edi ,[ file_buffer ]
add edi ,[ shblock_beg ]
mov eax ,[ copy_len ]
.1:
cld
@ @ :
movsb
dec eax
jz .del
dec ebx
jnz @ b
.add:
push esi edi eax
push [ file_size ]
add [ file_size ], eax
call raspred_mem
pop ecx
mov edi ,[ esp + 4 ]
add ecx ,[ file_buffer ]
sub ecx , edi
inc ecx
mov edi ,[ file_size ]
add edi ,[ file_buffer ]
mov esi , edi
sub esi , eax
std
@ @ :
movsb
loop @ b
pop eax edi esi
cld
@ @ :
movsb
dec eax
jnz @ b
mov eax ,[ shblock_beg ]
add eax ,[ copy_len ]
dec eax
mov [ shblock_end ], eax
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------
2010-03-08 18:57:35 +01:00
.del:
dec ebx
jz red
mov ecx ,[ file_size ]
add ecx ,[ file_buffer ]
sub ecx , edi
mov esi , edi
add esi , ebx
cld
2011-10-07 01:18:43 +02:00
@ @ :
movsb
2010-03-08 18:57:35 +01:00
loop @ b
sub [ file_size ], ebx
call raspred_mem
mov eax ,[ shblock_beg ]
add eax ,[ copy_len ]
dec eax
mov [ shblock_end ], eax
jmp red
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;<3B> <20> <> <EFBFBD> <EFBFBD> <20> <> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> , <20> <> <20> <> ⠢<EFBFBD> 塞 <20> <> <EFBFBD> <EFBFBD> <20> <> । <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
.past_kurs:
; bt [flags],1
; jnc still
; mov esi,[file_buffer]
; add esi,[current_offset]
; jmp red
jmp still
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
Ctrl_X:
bt [ flags ], 1
jnc still
call copy_to_buf
test eax , eax
jnz still
mov ecx ,[ file_size ]
sub ecx ,[ copy_len ]
sub ecx ,[ shblock_beg ]
inc ecx
mov ebx ,[ file_size ]
mov edi ,[ shblock_beg ]
mov esi ,[ shblock_end ]
inc esi
add esi ,[ file_buffer ]
add edi ,[ file_buffer ]
add ebx ,[ file_buffer ]
cld
@ @ :
cmp esi , ebx
je .1
movsb
loop @ b
.1:
mov eax ,[ file_size ]
sub eax ,[ copy_len ]
mov [ file_size ], eax
btr [ flags ], 8
mov eax ,[ shblock_beg ]
mov esi ,[ screen_table ]
mov esi ,[ esi ]
xor ebx , ebx
.3:
add ebx , esi
cmp eax , ebx
jg .3
sub ebx , esi
; cmp ebx,[file_size]
; jg Ctrl_G
mov [ begin_offset ], ebx
sub eax , ebx
shl eax , 1
inc eax
mov [ cursor ], eax
jmp red
;---------------------------------------------------------------------
open_dialog:
mov [ OpenDialog_data.type ], 0 ; Open
2010-07-01 21:17:20 +02:00
push dword OpenDialog_data
call [ OpenDialog_Start ]
; cmp [OpenDialog_data.status],2 ; OpenDialog does not start
2010-03-08 18:57:35 +01:00
cmp [ OpenDialog_data.status ], 1
jne still
2011-07-30 19:11:55 +02:00
.start:
2010-03-08 18:57:35 +01:00
mov esi , fname_buf
.load:
mov edi , file_name
cld
@ @ :
cmp byte [ esi ], 0
je @ f
movsb
jmp @ b
@ @ :
mov byte [ edi ], 0
sub esi , path
mov [ edi t1.size ], esi
mov [ edi t1.pos ], esi
jmp open_file
2010-07-01 21:17:20 +02:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;----------------------- DATA AREA------------------------
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-07-01 21:17:20 +02:00
align 4
ProcLib_import:
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
;OpenDialog__Version dd aOpenDialog_Version
dd 0
dd 0
aOpenDialog_Init db 'OpenDialog_init' , 0
aOpenDialog_Start db 'OpenDialog_start' , 0
;aOpenDialog_Version db 'Version_OpenDialog',0
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
align 4
2010-07-01 21:17:20 +02:00
Box_lib_import:
2010-03-08 18:57:35 +01:00
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
version_ed dd aVersion_ed
option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
version_op dd aVersion_op
scrollbar_ver_draw dd aScrollbar_ver_draw
scrollbar_ver_mouse dd aScrollbar_ver_mouse
scrollbar_hor_draw dd aScrollbar_hor_draw
scrollbar_hor_mouse dd aScrollbar_hor_mouse
version_scrollbar dd aVersion_scrollbar
menu_bar_draw dd aMenu_bar_draw
menu_bar_mouse dd aMenu_bar_mouse
version_menu_bar dd aVersion_menu_bar
dd 0
dd 0
aEdit_box_draw db 'edit_box' , 0
aEdit_box_key db 'edit_box_key' , 0
aEdit_box_mouse db 'edit_box_mouse' , 0
aVersion_ed db 'version_ed' , 0
aOption_box_draw db 'option_box_draw' , 0
aOption_box_mouse db 'option_box_mouse' , 0
aVersion_op db 'version_op' , 0
aScrollbar_ver_draw db 'scrollbar_v_draw' , 0
aScrollbar_ver_mouse db 'scrollbar_v_mouse' , 0
aScrollbar_hor_draw db 'scrollbar_h_draw' , 0
aScrollbar_hor_mouse db 'scrollbar_h_mouse' , 0
aVersion_scrollbar db 'version_scrollbar' , 0
aMenu_bar_draw db 'menu_bar_draw' , 0
aMenu_bar_mouse db 'menu_bar_mouse' , 0
aVersion_menu_bar db 'version_menu_bar' , 0
;---------------------------------------------------------------------
align 4
scroll_bar_data_vertical:
.x:
.size_x dw scroll_width_size ;+0
.start_x dw 565 ;+2
.y:
.size_y dw 284 ;+4
.start_y dw 19 ;+6
.btn_high dd scroll_width_size ;+8
2012-07-03 18:48:18 +02:00
.type dd 0 ;+12
2010-03-08 18:57:35 +01:00
.max_area dd 300 + 20 ;+16
.cur_area dd 50 ;+20
.position dd 0 ;+24
.bckg_col dd 0xAAAAAA ;+28
.frnt_col dd 0xCCCCCC ;+32
.line_col dd 0 ;+36
.redraw dd 0 ;+40
.delta dw 0 ;+44
.delta2 dw 0 ;+46
.run_x:
.r_size_x dw 0 ;+48
.r_start_x dw 0 ;+50
.run_y:
.r_size_y dw 0 ;+52
.r_start_y dw 0 ;+54
.m_pos dd 0 ;+56
.m_pos_2 dd 0 ;+60
.m_keys dd 0 ;+64
.run_size dd 0 ;+68
.position2 dd 0 ;+72
.work_size dd 0 ;+76
.all_redraw dd 0 ;+80
.ar_offset dd 10 ;+84
;---------------------------------------------------------------------
align 4
scroll_bar_data_horizontal:
.x:
.size_x dw 300 ;0 ;+0
.start_x dw 0 ;0 ;+2
.y:
.size_y dw scroll_width_size ;0 ;+4
.start_y dw 300 ;0 ;+6
.btn_high dd scroll_width_size ;+8
2012-07-03 18:48:18 +02:00
.type dd 0 ;+12
2010-03-08 18:57:35 +01:00
.max_area dd 300 ;+16
.cur_area dd 30 ;+20
.position dd 1 ;+24
.bckg_col dd 0xAAAAAA ;+28
.frnt_col dd 0xCCCCCC ;+32
.line_col dd 0 ;+36
.redraw dd 0 ;+40
.delta dw 0 ;+44
.delta2 dw 0 ;+46
.run_x:
.r_size_x dw 0 ;+48
.r_start_x dw 0 ;+50
.run_y:
.r_size_y dw 0 ;+52
.r_start_y dw 0 ;+54
.m_pos dd 0 ;+56
.m_pos_2 dd 0 ;+60
.m_keys dd 0 ;+64
.run_size dd 0 ;+68
.position2 dd 0 ;+72
.work_size dd 0 ;+76
.all_redraw dd 0 ;+80
.ar_offset dd 10 ;+84
;---------------------------------------------------------------------
align 4
menu_data_1:
.type: dd 0 ;+0
.x:
2010-10-08 09:20:01 +02:00
.size_x dw 40 ;+4
2010-03-08 18:57:35 +01:00
.start_x dw 2 ;+6
.y:
.size_y dw 15 ;+8
.start_y dw 2 ;+10
.text_pointer: dd menu_text_area ;0 ;+12
.pos_pointer: dd menu_text_area.1 ;0 ;+16
.text_end dd menu_text_area.end ;0 ;+20
.mouse_pos dd 0 ;+24
.mouse_keys dd 0 ;+28
.x1:
2010-10-08 09:20:01 +02:00
if lang eq ru
.size_x1 dw 4 * 2 + 9 * 6 ;+32
else
.size_x1 dw 40 ;+32
end if
2010-03-08 18:57:35 +01:00
.start_x1 dw 2 ;+34
.y1:
.size_y1 dw 100 ;+36
.start_y1 dw 18 ;+38
.bckg_col dd 0xeeeeee ;+40
.frnt_col dd 0xff ;+44
.menu_col dd 0xffffff ;+48
.select dd 0 ;+52
.out_select dd 0 ;+56
.buf_adress dd 0 ;+60
.procinfo dd 0 ;+64
.click dd 0 ;+68
.cursor dd 0 ;+72
.cursor_old dd 0 ;+76
.interval dd 16 ;+80
.cursor_max dd 0 ;+84
.extended_key dd 0 ;+88
.menu_sel_col dd 0x00cc00 ;+92
.bckg_text_col dd 0 ;+96
.frnt_text_col dd 0xffffff ;+100
.mouse_keys_old dd 0 ;+104
.font_height dd 8 ;+108
.cursor_out dd 0 ;+112
.get_mouse_flag dd 0 ;+116
menu_text_area:
2010-10-08 09:20:01 +02:00
if lang eq ru
db '<27> <> <EFBFBD> <EFBFBD> ' , 0
.1:
db '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' , 0
db '<27> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD> ' , 0
db '<27> <> 室' , 0
else
db 'File' , 0
.1:
db 'Open' , 0
db 'Save' , 0
db 'Exit' , 0
end if
2010-03-08 18:57:35 +01:00
.end:
2010-10-08 09:20:01 +02:00
db 0
2010-03-08 18:57:35 +01:00
;---------------------------------------------------------------------
align 4
menu_data_2:
.type: dd 0 ;+0
.x:
2010-10-08 09:20:01 +02:00
.size_x dw 40 ;+4
2010-03-08 18:57:35 +01:00
.start_x dw 43 ;+6
.y:
.size_y dw 15 ;+8
.start_y dw 2 ;+10
.text_pointer: dd menu_text_area_2 ;0 ;+12
.pos_pointer: dd menu_text_area_2.1 ;0 ;+16
.text_end dd menu_text_area_2.end ;0 ;+20
.mouse_pos dd 0 ;+24
.mouse_keys dd 0 ;+28
.x1:
2010-10-08 09:20:01 +02:00
.size_x1 dw 4 * 2 + 5 * 6 ;+32
2010-03-08 18:57:35 +01:00
.start_x1 dw 43 ;+34
.y1:
.size_y1 dw 100 ;+36
.start_y1 dw 18 ;+38
.bckg_col dd 0xeeeeee ;+40
.frnt_col dd 0xff ;+44
.menu_col dd 0xffffff ;+48
.select dd 0 ;+52
.out_select dd 0 ;+56
.buf_adress dd 0 ;+60
.procinfo dd 0 ;+64
.click dd 0 ;+68
.cursor dd 0 ;+72
.cursor_old dd 0 ;+76
.interval dd 16 ;+80
.cursor_max dd 0 ;+84
.extended_key dd 0 ;+88
.menu_sel_col dd 0x00cc00 ;+92
.bckg_text_col dd 0 ; +96
.frnt_text_col dd 0xffffff ;+100
.mouse_keys_old dd 0 ;+104
.font_height dd 8 ;+108
.cursor_out dd 0 ;+112
.get_mouse_flag dd 0 ;+116
menu_text_area_2:
2010-10-08 09:20:01 +02:00
if lang eq ru
db '<27> <> <EFBFBD> ' , 0
.1:
else
db 'View' , 0
.1:
end if
db 'Add 4' , 0
db 'Add 8' , 0
db 'Sub 4' , 0
db 'Sub 8' , 0
2010-03-08 18:57:35 +01:00
.end:
2010-10-08 09:20:01 +02:00
db 0
2010-03-08 18:57:35 +01:00
;---------------------------------------------------------------------
align 4
menu_data_3:
.type: dd 0 ;+0
.x:
2010-10-08 09:20:01 +02:00
if lang eq ru
.size_x dw 4 * 2 + 7 * 6 ;+32
else
.size_x dw 40 ;+4
end if
2010-03-08 18:57:35 +01:00
.start_x dw 84 ;+6
.y:
.size_y dw 15 ;+8
.start_y dw 2 ;+10
.text_pointer: dd menu_text_area_3 ;0 ;+12
.pos_pointer: dd menu_text_area_3.1 ;0 ;+16
.text_end dd menu_text_area_3.end ;0 ;+20
.mouse_pos dd 0 ;+24
.mouse_keys dd 0 ;+28
.x1:
2010-10-08 09:20:01 +02:00
if lang eq ru
.size_x1 dw 4 * 2 + 7 * 6 ;+32
else
.size_x1 dw 40 ;+32
end if
2010-03-08 18:57:35 +01:00
.start_x1 dw 84 ;+34
.y1:
.size_y1 dw 100 ;+36
.start_y1 dw 18 ;+38
.bckg_col dd 0xeeeeee ;+40
.frnt_col dd 0xff ;+44
.menu_col dd 0xffffff ;+48
.select dd 0 ;+52
.out_select dd 0 ;+56
.buf_adress dd 0 ;+60
.procinfo dd 0 ;+64
.click dd 0 ;+68
.cursor dd 0 ;+72
.cursor_old dd 0 ;+76
.interval dd 16 ;+80
.cursor_max dd 0 ;+84
.extended_key dd 0 ;+88
.menu_sel_col dd 0x00cc00 ;+92
.bckg_text_col dd 0 ; +96
.frnt_text_col dd 0xffffff ;+100
.mouse_keys_old dd 0 ;+104
.font_height dd 8 ;+108
.cursor_out dd 0 ;+112
.get_mouse_flag dd 0 ;+116
menu_text_area_3:
2010-10-08 09:20:01 +02:00
if lang eq ru
db '<27> <> ࠢ<EFBFBD> <E0A0A2> ' , 0
.1:
db '<27> <> ࠢ<EFBFBD> <E0A0A2> ' , 0
else
2010-03-08 18:57:35 +01:00
db 'Help' , 0
2010-10-08 09:20:01 +02:00
.1:
2010-03-08 18:57:35 +01:00
db 'Help' , 0
2010-10-08 09:20:01 +02:00
end if
2010-03-08 18:57:35 +01:00
.end:
db 0
;---------------------------------------------------------------------
edit1 edi t_box 200 , 190 , 27 , 0xffffff , 0x6a9480 , 0 , 0xAABBCC , 0 , 134 , cur_dir_path , ed_focus , ed_focus , 6 , 6 ;䠩<> <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> \<5C> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD>
2010-10-08 09:20:01 +02:00
edit2 edi t_box 55 , 270 , 29 , 0xeeeeee , 0x6a9480 , 0 , 0xAABBCC , 4 , 8 , go_to_string , ed_focus , ed_focus , 0 , 0 ;<3B> <> <EFBFBD> <EFBFBD> 宦<EFBFBD> <09> <> ᬥ饭<E1ACA5> <E9A5AD>
edit3 edi t_box 55 , 270 , 29 , 0xeeeeee , 0x6a9480 , 0 , 0xAABBCC , 4 , 8 , find_string , ed_focus , ed_focus , 0 , 0 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD>
2010-03-08 18:57:35 +01:00
edit4 edi t_box 55 , 220 , 49 , 0xeeeeee , 0x6a9480 , 0 , 0xAABBCC , 4 , 8 , sel1_string , ed_focus , ed_focus , 0 , 0 ;<3B> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> .ᬥ<> .
edit5 edi t_box 55 , 300 , 49 , 0xeeeeee , 0x6a9480 , 0 , 0xAABBCC , 4 , 8 , sel2_string , ed_focus , 0 , 0 , 0 ;<3B> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> .ᬥ<> .
op1 option_box option_group1 , 210 , 50 , 6 , 12 , 0xffffff , 0 , 0 , op_text.1 , op_text.e1 - op_text.1 , 1
op2 option_box option_group1 , 310 , 50 , 6 , 12 , 0xFFFFFF , 0 , 0 , op_text.2 , op_text.e2 - op_text.2
2010-10-08 09:20:01 +02:00
op3 option_box option_group1 , 310 , 65 , 6 , 12 , 0xffffff , 0 , 0 , op_text.3 , op_text.e3 - op_text.3
2010-03-08 18:57:35 +01:00
op11 option_box option_group2 , 210 , 50 , 6 , 12 , 0xffffff , 0 , 0 , op_text2.11 , op_text2.e11 - op_text2.11
op12 option_box option_group2 , 310 , 50 , 6 , 12 , 0xffffff , 0 , 0 , op_text2.21 , op_text2.e21 - op_text2.21
option_group1 dd op1 ;㪠<> <E3AAA0> ⥫<EFBFBD> , <20> <> <EFBFBD> <20> ⮡ࠦ<E2AEA1> <E0A0A6> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> 㬮<> 砭<EFBFBD> <E7A0AD> , <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> <EFBFBD> <EFBFBD>
option_group2 dd op11 ;<3B> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
Option_boxs dd op1 , op2 , op3 , 0
Option_boxs2 dd op11 , op12 , 0
op_text: ; <20> <> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> 騩 ⥪<> <E2A5AA> <20> <> <EFBFBD> 祪 <20> <> <EFBFBD> ᮢ
2010-10-08 09:20:01 +02:00
if lang eq ru
.1 db '<27> <> ᮫<EFBFBD> ⭮<EFBFBD> '
.e1:
.2 db '<27> <> <EFBFBD> ।'
.e2:
.3 db '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> '
.e3:
else
.1 db 'Absolutely'
.e1:
.2 db 'Forward'
.e2:
.3 db 'Back'
.e3:
end if
2010-03-08 18:57:35 +01:00
op_text2:
.11 db 'Hex'
.e11:
.21 db 'ASCII'
.e21:
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-07-01 21:17:20 +02:00
system_dir_Boxlib db '/sys/lib/box_lib.obj' , 0
system_dir_ProcLib db '/sys/lib/proc_lib.obj' , 0
2010-03-08 18:57:35 +01:00
2010-10-08 09:20:01 +02:00
sel_text db "From to" , 0
help_but_text = menu_text_area_3 ;db 'Help',0
2010-03-08 18:57:35 +01:00
head_f_i:
2010-10-08 09:20:01 +02:00
if lang eq ru
error_open_file_string db "<22> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> !" , 0
error_save_file_string db "<22> <> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> !" , 0
else
error_open_file_string db "Isn't found!" , 0
error_save_file_string db "Isn't saved!" , 0
end if
2010-03-08 18:57:35 +01:00
string_cp866 db ' cp866'
string_cp1251 db 'cp1251'
string_koi8r db 'koi8-r'
string_ins db 'Ins'
align 4
number_strings dd 16 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⢮ <20> <> ப <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;bytes_per_line dd 16 ;<3B> <> <EFBFBD> -<2D> <> <20> ⮫<EFBFBD> 殢
group _bytes dd 8
bytes_per_line dd 16
;blocks_counter dd 1
;blocks_table dd 0
cursor dd 1
flags dw 001000010b
;<3B> <> <EFBFBD> 0: <20> edit_box - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⨥/(<28> <> ) <09> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᨬ<> <E1A8AC> <EFBFBD> <EFBFBD> <EFBFBD>
;1: 0/1 - ० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> ⠢<EFBFBD> <E2A0A2>
;2: <09> edit_box - <20> <> ࠡ<EFBFBD> ⪠ Ctrl_G
;3: <09> edit_box - <20> <> ࠡ<EFBFBD> ⪠ Ctrl_F
;4: <09> change_codepage - <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ।<EFBFBD> <E0A5A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2>
;5: vertical_scroll_bar move
;6: <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <09> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <20> <> <EFBFBD> <EFBFBD>
;7: horizontal_scroll_bar move
;8: 1 - <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
;9: <09> edit_box - <20> <> ࠡ<EFBFBD> ⪠ Ctrl_B
;10: <09> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> "<22> <> <EFBFBD> <EFBFBD> <EFBFBD> " <> <E1AAAE> <EFBFBD> <E0AEA2> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2006-01-03 10:43:31 +01:00
help_text:
2006-08-18 15:32:18 +02:00
if lang eq ru
2010-03-08 18:57:35 +01:00
db 'Ctrl+O - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> '
db 'Ctrl+S - <20> <> <EFBFBD> ࠭<EFBFBD> <E0A0AD> <EFBFBD> '
db 'PageUp, PageDown - <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> '
db 'Ctrl+UP, Ctrl+Down - <20> ப<EFBFBD> <E0AEAA> ⪠ <20> <> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> - '
db ' <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ᬥ饭<E1ACA5> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
db 'Home,End - <20> <20> <> 砫<EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> '
db 'Ctrl+Home, Ctrl+End - <20> <20> <> 砫<EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> 䠩<> <E4A0A9> '
db 'Left, Right, UP, DN - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> ࠢ<EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> '
db 'n - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> '
db 'Ins - ० <> <E0A5A6> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> ⠢<EFBFBD> <E2A0A2> '
db ' Del - 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> '
db ' BackSpace - 㤠<> <E3A4A0> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> । <20> <> <EFBFBD> <EFBFBD> <EFBFBD> '
db '~ - ᬥ<> <E1ACA5> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> cp866,cp1251 '
db 'Shift+~ - cp866/cp1251,koi8r '
db 'Ctrl+F - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> '
db 'Ctrl+G - <20> <> <EFBFBD> <EFBFBD> 室 <20> <> ᬥ饭<E1ACA5> <E9A5AD> '
db 'Ctrl+B - <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> '
db 'ESC - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> '
db 'Ctrl+C - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <E0AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> '
db 'Ctrl+V - <20> <> ⠢<EFBFBD> <E2A0A2> <EFBFBD> <20> <20> 뤥<EFBFBD> <EBA4A5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
db 'Ctrl+X - <20> <> १<EFBFBD> <E0A5A7> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> '
2006-08-18 15:32:18 +02:00
else
2010-03-08 18:57:35 +01:00
db 'Ctrl+O - open file '
db 'Ctrl+S - save file '
db 'PageUp, PageDown - page up/down '
db 'Ctrl+UP, Ctrl+Down - scroll page by one string '
db ' up/down without cursor movement'
db 'Home,End - at the start/end of string '
db 'Ctrl+Home, Ctrl+End - at the start/end of file '
db 'Left, Right, Up, Dn - move cursor to the lft/rght..'
db 'n - invert byte '
db 'Ins - replace/past mode '
db ' Del - delete byte under cursor '
db ' BackSpace - delete byte before cursor '
db '~ - change codepages cp866,cp1251'
db 'Shift+~ - cp866/cp1251,koi8r '
db 'Ctrl+F - find '
db 'Ctrl+G - go to offset '
db 'Ctrl+B - select area '
db 'ESC - deselect area '
db 'Ctrl+C - copy area '
db 'Ctrl+V - past into area from buf '
db 'Ctrl+X - cut area into buffer '
2006-08-18 15:32:18 +02:00
end if
2006-01-03 10:43:31 +01:00
help_end:
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
;align 4096
font_buffer file 'cp866-8x16' ;ASCII+cp866 (+<2B> ,<2C> )
cp1251 file 'cp1251-8x16'
2010-10-08 09:20:01 +02:00
koi8_r file 'koi8-r-8x16'
2010-03-08 18:57:35 +01:00
title db _title
;---------------------------------------------------------------------
2010-07-01 21:17:20 +02:00
l_libs_start:
2020-11-22 14:13:45 +01:00
library 01 l_libs system_dir_Boxlib + 9 , buf_cmd_lin , system_dir_Boxlib , Box_lib_import
2010-07-01 21:17:20 +02:00
2020-11-22 14:13:45 +01:00
library 02 l_libs system_dir_ProcLib + 9 , buf_cmd_lin , system_dir_ProcLib , ProcLib_import
2010-07-01 21:17:20 +02:00
end_l_libs:
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
OpenDialog_data:
.type dd 0
.procinfo dd procinfo ;+4
.com_area_name dd communication_area_name ;+8
.com_area dd 0 ;+12
.opendir_pach dd temp_dir_pach ;+16
.dir_default_pach dd communication_area_default_pach ;+20
.start_path dd open_dialog_path ;+24
.draw_window dd draw_window_1 ;+28
.status dd 0 ;+32
.openfile_pach dd fname_buf ;+36
2010-03-19 10:46:23 +01:00
.filename_area dd filename_area ;+40
.filter_area dd Filter
2010-08-24 10:27:26 +02:00
.x:
.x_size dw 420 ;+48 ; Window X size
.x_start dw 10 ;+50 ; Window X position
.y:
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position
2010-03-08 18:57:35 +01:00
communication_area_name:
db 'FFFFFFFF_open_dialog' , 0
open_dialog_path:
2010-11-15 19:47:23 +01:00
if __nightbuild eq yes
db '/sys/MANAGERS/opendial' , 0
else
2010-03-08 18:57:35 +01:00
db '/sys/File Managers/opendial' , 0
2010-11-15 19:47:23 +01:00
end if
2010-03-08 18:57:35 +01:00
communication_area_default_pach:
db '/rd/1' , 0
Filter:
2010-03-19 10:46:23 +01:00
dd Filter.end - Filter.1
.1:
;db 'BIN',0
;db 'DAT',0
2010-03-08 18:57:35 +01:00
.end:
db 0
2010-03-19 10:46:23 +01:00
start_temp_file_name: db 'temp.bin' , 0
2010-08-24 15:55:40 +02:00
2010-03-08 18:57:35 +01:00
;---------------------------------------------------------------------
I_END:
2011-10-07 01:18:43 +02:00
;--------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
file_name:
cur_dir_path rb 4096
buf_cmd_lin rb 0
procinfo: ;opendialog
2013-04-07 23:51:43 +02:00
threath_buf:
rb 0x400
2010-03-08 18:57:35 +01:00
path:
rb 1024 + 16 ;opendialog
screen_table rd 1
begin_offset rd 1
file_buffer rd 1
copy_buf rd 1
copy_len rd 1
current_offset rd 1
; rd 1 ;<3B> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 訩 dword
codepage_offset rd 1
codepage_offset_previous rd 1
low_area rd 1 ;<3B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD>
right_table_xy rd 1
prev_f_size_bl rd 1
len_str_scr rd 1
beg_str_scr rd 1
shblock_beg rd 1 ;ᬥ饭<E1ACA5> <E9A5AD> <20> <> 砫<EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
shblock_end rd 1 ;ᬥ饭<E1ACA5> <E9A5AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
;mouse_flag rd 1
file_size rd 1
; rd 1 ;<3B> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 訩 dword
2011-01-19 21:05:36 +01:00
active_process rd 1
2010-03-08 18:57:35 +01:00
ed_box_data: rd 8 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> dword -<2D> <> <EFBFBD> -<2D> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⮢ <20> <> <EFBFBD> <20> <> ࠡ<EFBFBD> ⪨, <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> editX;
bufferfinfo rb 40
hex8_string rb 9 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> hex_output
go_to_string rb 9
find_string rb 17
sel1_string rb 9
sel2_string rb 9
cur_help_string rb 1 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ப<EFBFBD> , <20> <20> <> <EFBFBD> <EFBFBD> ன <20> 뢮<EFBFBD> <EBA2AE> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<> <E2A5AA> <20> help - <20> <> <EFBFBD> <EFBFBD>
2013-04-07 23:51:43 +02:00
help_is_open_already rb 1 ;<3B> <20> <> <EFBFBD> <EFBFBD> <20> <> ࠢ<EFBFBD> <E0A0A2> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 1
help_window_pid rd 1
2010-10-08 09:20:01 +02:00
2010-03-08 18:57:35 +01:00
func_70 f70
;---------------------------------------------------------------------
2011-07-30 19:11:55 +02:00
title_buf:
rb 4096
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
fname_buf:
rb 4096
2010-03-19 10:46:23 +01:00
;---------------------------------------------------------------------
2010-03-08 18:57:35 +01:00
temp_dir_pach:
rb 4096
;---------------------------------------------------------------------
2010-03-19 10:46:23 +01:00
filename_area:
rb 256
;---------------------------------------------------------------------
2011-10-12 15:46:40 +02:00
D_END: