2006-01-03 10:43:31 +01:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; ;
|
|
|
|
; SYSTEM X-TREE BROWSER ;
|
|
|
|
; ;
|
|
|
|
; Author: Pavlushin Evgeni waptap@mail.ru ;
|
|
|
|
; site: www.deck4.narod.ru ;
|
|
|
|
; ;
|
|
|
|
; Compile with FASM for MenuetOS ;
|
|
|
|
; ;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;Bug report +bug deleted -bug not deleted
|
|
|
|
;show/fade del notwork+
|
|
|
|
;64Ver Run file from HD bug deleted.
|
|
|
|
;65Ver The bad scroll realization
|
|
|
|
;66Ver The good scroll realization, url line anti-flick
|
|
|
|
;67Ver Url line monolith procedure
|
|
|
|
;68Ver Mini icon on left of file name
|
|
|
|
;69Ver Getimg proc size minus 900 bytes
|
|
|
|
;70Ver Del data area ramsize minus 140000 bytes
|
|
|
|
;72Ver Quick sort, ramsize minus 200000 bytes
|
|
|
|
;73Ver Url flick and out bugs delete
|
|
|
|
;74Ver scroll bug deleted
|
|
|
|
;75Ver hd partition fast change button. Add bmp,txt,exec,asm and inc icons.
|
|
|
|
; sort type in headmenu bug del
|
|
|
|
;78Ver directory extension bug fix by Asko Vuori
|
|
|
|
;79Ver Asko Vuori volume label add and "put in command line" bug fix
|
|
|
|
;80Ver prompt edit fatal bug deleted, antiflick when move list up/down
|
|
|
|
;81Ver Save Dialog bug deleted
|
|
|
|
;600000 bytes memory!
|
|
|
|
|
|
|
|
;******************************************************************************
|
|
|
|
use32
|
2006-08-18 15:32:18 +02:00
|
|
|
org 0x0
|
|
|
|
db 'MENUET01' ; 8 byte id
|
|
|
|
dd 0x01 ; header version
|
|
|
|
dd START ; program start
|
|
|
|
dd I_END ; program image size
|
|
|
|
dd RAM_END ; memory
|
|
|
|
dd RAM_END ; stack
|
|
|
|
dd param_area ,0x0 ; param,icon
|
2006-01-03 10:43:31 +01:00
|
|
|
; dd 0,0
|
|
|
|
|
|
|
|
;******************************************************************************
|
|
|
|
include 'macros.inc'
|
|
|
|
include 'ascl.inc'
|
|
|
|
include 'ascgl.inc'
|
2006-08-18 15:32:18 +02:00
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
gif_hash_offset = gif_hash
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
START: ; start of execution
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
; mov eax,58
|
|
|
|
; mov ebx,MRUfile
|
|
|
|
; int 0x40
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
mcall 18,11,1,table_area
|
|
|
|
mov edi,hdimg+62*2
|
|
|
|
cmp [table_area+2],byte 0
|
|
|
|
je no_hdpartition_on_hd0
|
|
|
|
mov esi,hdimg1
|
|
|
|
mov ecx,62
|
|
|
|
rep movsb
|
|
|
|
no_hdpartition_on_hd0:
|
|
|
|
cmp [table_area+3],byte 0
|
|
|
|
je no_hdpartition_on_hd1
|
|
|
|
mov esi,hdimg2
|
|
|
|
mov ecx,62
|
|
|
|
rep movsb
|
|
|
|
no_hdpartition_on_hd1:
|
|
|
|
cmp [table_area+4],byte 0
|
|
|
|
je no_hdpartition_on_hd2
|
|
|
|
mov esi,hdimg3
|
|
|
|
mov ecx,62
|
|
|
|
rep movsb
|
|
|
|
no_hdpartition_on_hd2:
|
|
|
|
cmp [table_area+5],byte 0
|
|
|
|
je no_hdpartition_on_hd3
|
|
|
|
mov esi,hdimg4
|
|
|
|
mov ecx,62
|
|
|
|
rep movsb
|
|
|
|
no_hdpartition_on_hd3:
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
mov eax,40
|
|
|
|
mov ebx,0100111b
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
cmp byte [param_area],0 ;test parameters line
|
2006-08-18 15:32:18 +02:00
|
|
|
jne no_brow ;it's dialog
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [browser],dword 1 ;it's browser
|
|
|
|
no_brow:
|
|
|
|
|
|
|
|
cmp [browser],dword 1
|
2006-08-18 15:32:18 +02:00
|
|
|
je no_dlg
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
mov al,byte [param_area+5]
|
|
|
|
mov [dlg_type],al
|
|
|
|
|
|
|
|
mov eax,9
|
|
|
|
mov ebx,procinfo
|
|
|
|
mov ecx,-1
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
mov eax,dword [procinfo+30]
|
|
|
|
mov edi,MYPID+4-1
|
|
|
|
mov ecx,4
|
|
|
|
mov ebx,10
|
|
|
|
cld
|
|
|
|
|
|
|
|
new_d:
|
|
|
|
xor edx,edx
|
|
|
|
div ebx
|
|
|
|
add dl,'0'
|
|
|
|
mov [edi],dl
|
|
|
|
dec edi
|
|
|
|
loop new_d
|
|
|
|
|
|
|
|
movzx eax,byte [param_area]
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+1]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+2]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+3]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
|
|
|
|
mov ecx,eax ;pid to ecx
|
|
|
|
mov eax,60
|
|
|
|
mov ebx,2
|
|
|
|
mov edx,MYPID
|
|
|
|
mov esi,4
|
|
|
|
int 0x40
|
|
|
|
no_dlg:
|
|
|
|
|
|
|
|
giftoimg but_file,tempimg
|
|
|
|
|
|
|
|
;************************
|
|
|
|
; Get images
|
|
|
|
;************************
|
|
|
|
|
|
|
|
mov eax,0 ;x
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,0 ;y
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,286 ;xs
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,16 ;ys
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,tempimg ;src
|
|
|
|
mov edx,butimg ;dest
|
|
|
|
call getimgproc
|
|
|
|
mov eax,288
|
|
|
|
mov esi,60
|
|
|
|
mov edx,logoimg ;dest
|
|
|
|
call getimgproc
|
|
|
|
mov eax,0 ;x
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,16 ;y
|
|
|
|
mov esi,51 ;xs
|
2006-01-03 10:43:31 +01:00
|
|
|
mov edi,esi ;ys
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,logoinfimg ;dest
|
2006-01-03 10:43:31 +01:00
|
|
|
call getimgproc
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,51 ;x
|
|
|
|
mov esi,8 ;xs
|
|
|
|
mov edi,9 ;ys
|
2006-01-03 10:43:31 +01:00
|
|
|
mov edx,upsb ;dest
|
|
|
|
call getimgproc
|
|
|
|
mov eax,51+8 ;x
|
|
|
|
mov edx,dnsb ;dest
|
|
|
|
call getimgproc
|
|
|
|
|
|
|
|
mov eax,51+16 ;x
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,16 ;y
|
|
|
|
mov esi,12 ;xs
|
|
|
|
mov edi,9 ;ys
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
mov ecx,tempimg ;src
|
|
|
|
mov edx,hdico ;dest
|
|
|
|
mov ebp,9
|
|
|
|
loogetimg:
|
|
|
|
call getimgproc
|
|
|
|
add edx,9*12*3+8
|
|
|
|
add eax,12
|
|
|
|
dec ebp
|
|
|
|
jnz loogetimg
|
|
|
|
jmp endgip
|
|
|
|
|
|
|
|
getimgproc:
|
|
|
|
pushad
|
|
|
|
mov dword [edx],esi ;xs
|
|
|
|
mov dword [edx+4],edi ;ys
|
|
|
|
|
|
|
|
mov ebp,eax
|
|
|
|
mov eax,dword [ecx] ;getx size
|
|
|
|
push edx
|
|
|
|
push ecx
|
|
|
|
lea ecx,[eax+2*eax]
|
|
|
|
|
|
|
|
mul ebx
|
|
|
|
add eax,ebp ;x
|
|
|
|
mov edx,ecx
|
|
|
|
lea eax,[eax+2*eax] ;eax=offset on imsrc
|
|
|
|
|
|
|
|
mov ecx,esi ;xs
|
|
|
|
mov ebx,edi ;ys
|
|
|
|
|
|
|
|
mov ebp,esi
|
|
|
|
|
|
|
|
pop edi
|
|
|
|
lea esi,[eax+8+edi]
|
|
|
|
|
|
|
|
pop edi
|
|
|
|
add edi,8
|
|
|
|
|
|
|
|
cld
|
|
|
|
cyc:
|
|
|
|
movsw
|
|
|
|
movsb
|
|
|
|
dec ecx
|
|
|
|
jne cyc
|
|
|
|
add esi,edx
|
|
|
|
mov ecx,ebp ;xs
|
|
|
|
sub esi,ecx
|
|
|
|
sub esi,ecx
|
|
|
|
sub esi,ecx
|
|
|
|
dec ebx
|
|
|
|
jne cyc
|
|
|
|
|
|
|
|
popad
|
|
|
|
ret
|
|
|
|
|
|
|
|
endgip:
|
|
|
|
|
|
|
|
call read_directory
|
|
|
|
; call convertation
|
|
|
|
red:
|
2006-08-18 15:32:18 +02:00
|
|
|
call draw_window ; at first, draw the window
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
still:
|
|
|
|
mov eax,9
|
|
|
|
mov ebx,procinfo
|
|
|
|
mov ecx,-1
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
wtevent red,key,button
|
|
|
|
|
|
|
|
scrolltest:
|
|
|
|
mov eax,37
|
|
|
|
mov ebx,2
|
|
|
|
int 0x40
|
|
|
|
cmp eax,1
|
|
|
|
jne still
|
|
|
|
|
|
|
|
scrl:
|
|
|
|
mov eax,37
|
|
|
|
mov ebx,1
|
|
|
|
int 0x40
|
|
|
|
mov ebx,eax
|
2006-08-18 15:32:18 +02:00
|
|
|
shr eax,16 ;x
|
2006-01-03 10:43:31 +01:00
|
|
|
and ebx,0xffff ;y
|
|
|
|
|
|
|
|
mov ebp,eax
|
|
|
|
sub ebp,[listx] ;[procinfo.x_size]
|
|
|
|
sub ebp,[listxsize]
|
|
|
|
add ebp,[scrollsize]
|
|
|
|
cmp ebp,dword [scrollsize] ;8
|
|
|
|
ja menu_test ; still
|
|
|
|
|
|
|
|
mov ebp,ebx
|
|
|
|
sub ebp,[listy] ;76 ;up scroll
|
|
|
|
sub ebp,[scrollbutsize]
|
|
|
|
cmp ebp,0
|
2006-08-18 15:32:18 +02:00
|
|
|
jl menu_test
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [mousey],ebp
|
|
|
|
|
|
|
|
push eax ebx edx
|
|
|
|
mov edx,0
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,2
|
|
|
|
mov ebx,dword 10
|
|
|
|
div ebx
|
|
|
|
|
|
|
|
mov [filelistsize],eax
|
|
|
|
mov ebx,eax
|
|
|
|
cmp ebx,[listsize] ;filelistsize in ebx
|
2006-08-18 15:32:18 +02:00
|
|
|
ja notusescrl
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
mov edx,0
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,[scrollbutsize]
|
|
|
|
sub eax,[scrollbutsize]
|
|
|
|
|
|
|
|
shl eax,16+6
|
|
|
|
div dword [listsize]
|
|
|
|
mul ebx
|
|
|
|
shr eax,16+6
|
|
|
|
|
|
|
|
mov ebp,eax ; in ebp ysize of scroll
|
|
|
|
|
|
|
|
mov edx,0
|
|
|
|
mov eax,[listsize]
|
|
|
|
|
|
|
|
mov ebx,[listysize]
|
|
|
|
sub ebx,[scrollbutsize]
|
|
|
|
sub ebx,[scrollbutsize]
|
|
|
|
shl eax,16
|
|
|
|
div ebx ;dword [listsize]
|
|
|
|
mul [mousey]
|
|
|
|
shr eax,16
|
|
|
|
|
|
|
|
mov ebx,[listsize]
|
|
|
|
sub ebx,[filelistsize]
|
|
|
|
cmp eax,ebx
|
|
|
|
jnae no_cor
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,[listsize] ;correction for full dirs (1000 files)
|
2006-01-03 10:43:31 +01:00
|
|
|
sub eax,[filelistsize]
|
|
|
|
no_cor:
|
|
|
|
mov [filecursor],eax
|
|
|
|
|
|
|
|
jmp usescrl
|
|
|
|
notusescrl:
|
|
|
|
mov [filecursor],0 ;ebp
|
|
|
|
usescrl:
|
|
|
|
|
|
|
|
pop edx ebx eax
|
|
|
|
|
|
|
|
mov esi,[listy];[procinfo.y_size]
|
|
|
|
add esi,[listysize]
|
|
|
|
sub esi,[scrollbutsize]
|
|
|
|
|
|
|
|
cmp ebx,esi
|
|
|
|
jna oks ;menu_test ;still
|
|
|
|
|
|
|
|
sub esi,ebp
|
|
|
|
inc esi ;correction
|
|
|
|
cmp ebx,esi
|
2006-08-18 15:32:18 +02:00
|
|
|
ja menu_test ;still
|
2006-01-03 10:43:31 +01:00
|
|
|
oks:
|
|
|
|
|
|
|
|
mov [flick],1
|
|
|
|
jmp anti_flick ;red
|
|
|
|
|
|
|
|
menu_test:
|
|
|
|
cmp [pmenu_draw],1 ;if menu is show, update all
|
|
|
|
jne still
|
|
|
|
mov [pmenu_draw],0
|
2006-08-18 15:32:18 +02:00
|
|
|
jmp red ;update all window
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;this function not use in dialog when poup menu's is not used
|
|
|
|
;in dialog's
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; Test keyboard
|
|
|
|
;===================
|
2006-08-18 15:32:18 +02:00
|
|
|
key: ; key
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,2
|
|
|
|
int 0x40
|
|
|
|
cmp dword [focus],0
|
|
|
|
jne con_edit
|
|
|
|
cmp ah,key_Up
|
|
|
|
jne no_upk
|
|
|
|
mov ebx,1
|
|
|
|
jmp up
|
|
|
|
no_upk:
|
|
|
|
cmp ah,key_Down
|
|
|
|
jne no_downk
|
|
|
|
mov ebx,1
|
|
|
|
jmp down
|
|
|
|
no_downk:
|
|
|
|
cmp ah,key_PgUp
|
|
|
|
jne no_pgup
|
|
|
|
mov ebx,10
|
|
|
|
jmp up
|
|
|
|
no_pgup:
|
|
|
|
cmp ah,key_PgDown
|
|
|
|
jne no_pgdown
|
|
|
|
mov ebx,10
|
|
|
|
jmp down
|
|
|
|
no_pgdown:
|
|
|
|
cmp ah,key_Enter
|
|
|
|
jne no_k_ent
|
|
|
|
jmp kfad
|
|
|
|
no_k_ent:
|
|
|
|
cmp ah,key_Bspace
|
2006-08-18 15:32:18 +02:00
|
|
|
je back
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F2
|
2006-08-18 15:32:18 +02:00
|
|
|
je viewset
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F3
|
2006-08-18 15:32:18 +02:00
|
|
|
je textopen
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F5
|
2006-08-18 15:32:18 +02:00
|
|
|
je copy_to_clip
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F6
|
2006-08-18 15:32:18 +02:00
|
|
|
je paste_from_clip
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F11
|
2006-08-18 15:32:18 +02:00
|
|
|
je edit_prompt
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,key_F12
|
2006-08-18 15:32:18 +02:00
|
|
|
je update
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp still
|
|
|
|
|
|
|
|
; test input string
|
|
|
|
con_edit:
|
|
|
|
cmp ah,key_Enter
|
|
|
|
jne no_con_ent
|
|
|
|
not [focus]
|
|
|
|
jmp savetest
|
|
|
|
jmp update
|
|
|
|
no_con_ent:
|
|
|
|
cmp ah,key_Left
|
|
|
|
jne no_con_left
|
|
|
|
dec [cursor]
|
|
|
|
mov [flick],2
|
|
|
|
jmp anti_flick ;red
|
|
|
|
no_con_left:
|
|
|
|
cmp ah,key_Right
|
|
|
|
jne no_con_right
|
|
|
|
inc [cursor]
|
|
|
|
mov [flick],2
|
|
|
|
jmp anti_flick ;red
|
|
|
|
no_con_right:
|
|
|
|
cmp ah,key_Bspace
|
|
|
|
jne no_con_bspace
|
|
|
|
|
|
|
|
mov ecx,[cursor]
|
|
|
|
cmp ecx,0
|
2006-08-18 15:32:18 +02:00
|
|
|
je still
|
2006-01-03 10:43:31 +01:00
|
|
|
dec ecx
|
|
|
|
mov ebp,[cursor]
|
|
|
|
lobsp:
|
|
|
|
mov bl,byte [path+ebp]
|
|
|
|
mov byte [path+ebp-1],bl
|
|
|
|
inc ebp
|
|
|
|
cmp ebp,100
|
|
|
|
jne lobsp
|
|
|
|
dec [cursor]
|
|
|
|
mov [flick],2
|
|
|
|
jmp anti_flick ;red
|
|
|
|
no_con_bspace:
|
|
|
|
|
|
|
|
mov ecx,[cursor]
|
|
|
|
dec ecx
|
|
|
|
mov ebp,100 ;[cursor]
|
|
|
|
losx:
|
|
|
|
mov bl,byte [path+ebp]
|
|
|
|
mov byte [path+ebp+1],bl
|
|
|
|
dec ebp
|
|
|
|
cmp ebp,ecx ;100
|
|
|
|
jne losx
|
|
|
|
|
|
|
|
mov ebp, [cursor]
|
|
|
|
cmp ebp,100
|
2006-08-18 15:32:18 +02:00
|
|
|
ja still
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
mov byte [path+ebp],ah
|
|
|
|
inc dword [cursor]
|
|
|
|
|
|
|
|
mov [flick],2
|
|
|
|
jmp anti_flick
|
|
|
|
|
|
|
|
|
|
|
|
;----------------------------
|
|
|
|
;Test on mouse button
|
|
|
|
;-----------------------------
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
button: ; button
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,17
|
|
|
|
int 0x40
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,2 ;Edit prompt line?
|
|
|
|
je edit_prompt
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,4
|
|
|
|
jne no_filelist
|
|
|
|
|
|
|
|
mousetest:
|
|
|
|
mov eax,37
|
|
|
|
mov ebx,1
|
|
|
|
int 0x40
|
|
|
|
mov ebx,eax
|
2006-08-18 15:32:18 +02:00
|
|
|
shr eax,16 ;x
|
2006-01-03 10:43:31 +01:00
|
|
|
and ebx,0xffff ;y
|
|
|
|
|
|
|
|
sub ebx,[listy] ;80
|
|
|
|
mov [mousey],ebx
|
|
|
|
|
|
|
|
mov ecx,[listx]
|
|
|
|
cmp eax,ecx
|
2006-08-18 15:32:18 +02:00
|
|
|
jl still
|
2006-01-03 10:43:31 +01:00
|
|
|
add ecx,[listxsize]
|
|
|
|
cmp eax,ecx
|
2006-08-18 15:32:18 +02:00
|
|
|
jg still
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
filexadd:
|
|
|
|
|
|
|
|
; Enter in directory
|
|
|
|
file_add:
|
|
|
|
mov edx,0 ;for div correct work div
|
|
|
|
mov eax,dword [mousey]
|
|
|
|
mov ebx,10
|
|
|
|
div ebx
|
|
|
|
|
|
|
|
add eax,[filecursor]
|
|
|
|
jmp no_kfad
|
|
|
|
kfad:
|
|
|
|
mov eax,[filecursor]
|
|
|
|
no_kfad:
|
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
mov ebp,eax
|
|
|
|
|
|
|
|
mov edi,paramtest ;clear param string
|
|
|
|
mov ecx,256
|
|
|
|
mov al,0
|
|
|
|
rep stosb
|
|
|
|
|
|
|
|
|
|
|
|
mov esi,0
|
|
|
|
lll2:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte 0 ;' '; '/'
|
2006-08-18 15:32:18 +02:00
|
|
|
je fis2
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp al,byte ' '; '/'
|
2006-08-18 15:32:18 +02:00
|
|
|
je fis2
|
2006-01-03 10:43:31 +01:00
|
|
|
inc esi
|
|
|
|
cmp esi,100
|
|
|
|
jna lll2
|
|
|
|
jmp fis2
|
|
|
|
|
|
|
|
fis2:
|
|
|
|
mov edi,ebp
|
|
|
|
cmp [convinfo+edi+26],dword 'FOL '
|
|
|
|
jne openf
|
|
|
|
mov [path+esi],byte '/'
|
|
|
|
inc esi
|
|
|
|
mov ebp,8
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
los: ;directory extension bug fix
|
2006-01-03 10:43:31 +01:00
|
|
|
mov al,[convinfo+edi]
|
|
|
|
cmp al,' '
|
2006-08-18 15:32:18 +02:00
|
|
|
jz skip_name_space
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [path+esi],al
|
|
|
|
inc esi
|
|
|
|
skip_name_space:
|
|
|
|
inc edi
|
|
|
|
dec ebp
|
|
|
|
jnz los
|
|
|
|
|
|
|
|
cmp byte [convinfo+edi],'.'
|
|
|
|
jnz dir_name_end
|
|
|
|
cmp byte [convinfo+edi+1],' '
|
2006-08-18 15:32:18 +02:00
|
|
|
jz dir_name_end
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ebp,4
|
|
|
|
dir_ext_char:
|
|
|
|
mov al,[convinfo+edi]
|
|
|
|
cmp al,' '
|
2006-08-18 15:32:18 +02:00
|
|
|
jz dir_name_end
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [path+esi],al
|
|
|
|
inc esi
|
|
|
|
inc edi
|
|
|
|
dec ebp
|
|
|
|
jnz dir_ext_char
|
|
|
|
dir_name_end:
|
|
|
|
mov [filecursor],0
|
|
|
|
|
|
|
|
;los:
|
|
|
|
; mov al,[convinfo+edi]
|
|
|
|
; mov [path+esi],al
|
|
|
|
; inc esi
|
|
|
|
; inc edi
|
|
|
|
; dec ebp
|
|
|
|
; jnz los
|
|
|
|
; mov [filecursor],0
|
|
|
|
; cmp byte [dlg_type],'S'
|
|
|
|
; je savetest
|
|
|
|
;no_save:
|
|
|
|
|
|
|
|
call read_directory
|
|
|
|
;; call convertation
|
|
|
|
call draw_window
|
|
|
|
; jmp still
|
|
|
|
|
|
|
|
;Savetest
|
|
|
|
savetest:
|
|
|
|
cmp byte [dlg_type],'S'
|
2006-08-18 15:32:18 +02:00
|
|
|
je savetest_yes
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp still
|
|
|
|
savetest_yes:
|
|
|
|
mov ecx,100
|
|
|
|
savetestloop:
|
|
|
|
cmp [path+ecx],byte 0
|
2006-08-18 15:32:18 +02:00
|
|
|
je next_byte
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [path+ecx],byte 32
|
2006-08-18 15:32:18 +02:00
|
|
|
je next_byte
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [path+ecx],byte '.'
|
2006-08-18 15:32:18 +02:00
|
|
|
je openf ;it's file
|
2006-01-03 10:43:31 +01:00
|
|
|
; cmp [path+ecx],byte '/'
|
|
|
|
; je no_save ;it's dir
|
|
|
|
next_byte:
|
|
|
|
dec ecx
|
|
|
|
jnz savetestloop
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
;Open/Run file
|
|
|
|
|
|
|
|
openf:
|
|
|
|
mov ecx,100
|
|
|
|
lopt:
|
|
|
|
mov al,[path+ecx]
|
|
|
|
mov [paramtest+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns lopt
|
|
|
|
|
|
|
|
; mov ebp,100
|
|
|
|
;loow:
|
|
|
|
; cmp [paramtest+ebp],byte '.'
|
|
|
|
; je file_set
|
|
|
|
; dec ebp
|
|
|
|
; jnz loow ;is file set not file add
|
|
|
|
|
|
|
|
cmp dword [focus],0 ;if prompt line with focus no add file name from frame
|
|
|
|
jne file_set
|
|
|
|
|
|
|
|
mov [paramtest+esi],byte '/'
|
|
|
|
inc esi
|
|
|
|
mov ebp,8+4
|
|
|
|
mov edx,edi
|
|
|
|
losf:
|
|
|
|
mov al,[convinfo+edi]
|
|
|
|
mov [paramtest+esi],al
|
|
|
|
inc esi
|
|
|
|
inc edi
|
|
|
|
dec ebp
|
|
|
|
jnz losf
|
|
|
|
file_set:
|
|
|
|
|
|
|
|
cmp [browser],0
|
|
|
|
jne is_brow
|
|
|
|
|
|
|
|
movzx eax,byte [param_area]
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+1]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+2]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
imul eax,10
|
|
|
|
movzx ebx,byte [param_area+3]
|
|
|
|
add eax,ebx
|
|
|
|
sub eax,48
|
|
|
|
|
|
|
|
mov ecx,eax ;pid to ecx
|
|
|
|
mov eax,60
|
|
|
|
mov ebx,2
|
|
|
|
mov edx,paramtest
|
|
|
|
mov esi,100
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
jmp exit
|
|
|
|
|
|
|
|
is_brow:
|
|
|
|
|
|
|
|
; cmp [convinfo+edi+26],dword 'Fvol'
|
|
|
|
; je edit
|
|
|
|
|
|
|
|
mov eax,dword [convinfo+edx+8]
|
|
|
|
cmp eax,'. '
|
|
|
|
jne noexecute
|
|
|
|
mov ebx,0
|
|
|
|
jmp execute
|
|
|
|
noexecute:
|
|
|
|
|
|
|
|
cmp eax,'.JPG'
|
|
|
|
jne nojv
|
|
|
|
jpg_jpe:
|
|
|
|
mov ebx,jpgview
|
|
|
|
jmp run
|
|
|
|
nojv:
|
|
|
|
cmp eax,'.JPE'
|
2006-08-18 15:32:18 +02:00
|
|
|
je jpg_jpe
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,'.GIF'
|
|
|
|
jne nojv1
|
|
|
|
mov ebx,gifview
|
|
|
|
jmp run
|
|
|
|
nojv1:
|
|
|
|
cmp eax,'.WAV'
|
|
|
|
jne nojv12
|
|
|
|
mov ebx,ac97wav
|
|
|
|
jmp run
|
|
|
|
nojv12:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp eax,'.MID'
|
|
|
|
jne nojv13
|
|
|
|
mov ebx,midamp
|
|
|
|
jmp run
|
|
|
|
nojv13:
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,'.BMP'
|
|
|
|
jne nobv
|
|
|
|
mov ebx,bmpview
|
|
|
|
jmp run
|
|
|
|
nobv:
|
|
|
|
; //// Willow
|
|
|
|
cmp eax,'.PNG'
|
|
|
|
jne nopngv
|
|
|
|
mov ebx,pngview
|
|
|
|
jmp run
|
|
|
|
nopngv:
|
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp eax,'.RTF'
|
|
|
|
jne nortf
|
|
|
|
mov ebx,rtfread
|
|
|
|
jmp run
|
|
|
|
nortf:
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,'.ASM'
|
|
|
|
je edit
|
|
|
|
cmp eax,'.TXT'
|
|
|
|
je edit
|
|
|
|
cmp eax,'.INC'
|
|
|
|
je edit
|
|
|
|
jmp still
|
|
|
|
edit:
|
|
|
|
mov ebx,editor
|
|
|
|
jmp run
|
|
|
|
|
|
|
|
execute:
|
|
|
|
mov ecx,0 ;200
|
|
|
|
loexe:
|
|
|
|
mov al,[paramtest+ecx]
|
|
|
|
; cmp al,0
|
|
|
|
; je setzr
|
|
|
|
; cmp al,' '
|
|
|
|
; je setzr
|
|
|
|
; je badl
|
|
|
|
cmp al,'.'
|
|
|
|
je setzr
|
|
|
|
; je badl
|
|
|
|
; jmp okl
|
|
|
|
;badl:
|
|
|
|
; mov al,0
|
|
|
|
okl:
|
|
|
|
mov [open_path+ecx],al
|
|
|
|
inc ecx
|
|
|
|
cmp ecx,200
|
|
|
|
jnae loexe
|
|
|
|
|
|
|
|
setzr:
|
|
|
|
; add ecx,3
|
|
|
|
; mov al,0
|
|
|
|
mov [open_path+ecx],byte 0 ;al
|
|
|
|
|
|
|
|
mov eax,58
|
|
|
|
mov ebx,fileinfo_start
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
run:
|
|
|
|
mov ecx,paramtest
|
|
|
|
mov eax,19
|
|
|
|
int 0x40
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
no_filelist:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,5 ;OPEN/SAVE button
|
|
|
|
je kfad
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,6 ;Scroll up
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_scrlup
|
|
|
|
mov ebx,1
|
|
|
|
jmp up
|
|
|
|
no_scrlup:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,7 ;Scroll down
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_scrldown
|
|
|
|
mov ebx,1
|
|
|
|
jmp down
|
|
|
|
no_scrldown:
|
|
|
|
|
|
|
|
cmp ah,8
|
|
|
|
jne no_update
|
|
|
|
update:
|
|
|
|
call read_directory
|
|
|
|
; call convertation
|
|
|
|
; mov [filecursor],0
|
|
|
|
call draw_window
|
|
|
|
no_update:
|
|
|
|
|
|
|
|
cmp ah,9
|
|
|
|
jne no_textopen
|
|
|
|
textopen:
|
|
|
|
mov esi,0
|
|
|
|
xlll2:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte '/'
|
|
|
|
jne xfis2
|
|
|
|
inc esi
|
|
|
|
cmp esi,12*20
|
|
|
|
jnae xlll2
|
|
|
|
jmp still
|
|
|
|
xfis2:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte ' '
|
2006-08-18 15:32:18 +02:00
|
|
|
je xaa2
|
2006-01-03 10:43:31 +01:00
|
|
|
inc esi
|
|
|
|
cmp esi,12*20
|
|
|
|
jnae xfis2
|
|
|
|
jmp still
|
|
|
|
xaa2:
|
|
|
|
mov eax,[filecursor]
|
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
mov edi,eax
|
|
|
|
cmp [convinfo+edi+26],dword 'FOL '
|
2006-08-18 15:32:18 +02:00
|
|
|
je still
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,12*20
|
|
|
|
xlopt:
|
|
|
|
mov al,[path+ecx]
|
|
|
|
mov [paramtest+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns xlopt
|
|
|
|
mov [paramtest+esi],byte '/'
|
|
|
|
inc esi
|
|
|
|
mov ebp,8+4
|
|
|
|
mov edx,edi
|
|
|
|
xlosf:
|
|
|
|
mov al,[convinfo+edi]
|
|
|
|
mov [paramtest+esi],al
|
|
|
|
inc esi
|
|
|
|
inc edi
|
|
|
|
dec ebp
|
|
|
|
jnz xlosf
|
|
|
|
mov [paramtest+esi],byte 0
|
|
|
|
mov ebx,editor
|
|
|
|
mov ecx,paramtest
|
|
|
|
mov eax,19
|
|
|
|
int 0x40
|
|
|
|
jmp red ;still
|
|
|
|
|
|
|
|
no_textopen:
|
|
|
|
|
|
|
|
cmp ah,11
|
|
|
|
jne no_view
|
|
|
|
viewset:
|
|
|
|
; not dword [delflag]
|
|
|
|
inc dword [viewmode]
|
|
|
|
cmp dword [viewmode],8
|
|
|
|
jnae not_cm
|
|
|
|
mov [viewmode],0
|
|
|
|
not_cm:
|
|
|
|
call read_directory
|
|
|
|
; call convertation
|
|
|
|
mov [filecursor],0
|
|
|
|
call draw_window
|
|
|
|
jmp still
|
|
|
|
no_view:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,12 ;move back
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_back
|
|
|
|
back:
|
|
|
|
mov esi,12*20
|
|
|
|
lll:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte ' '
|
|
|
|
jne findsl
|
|
|
|
dec esi
|
|
|
|
jnz lll
|
|
|
|
jmp still
|
|
|
|
findsl:
|
|
|
|
dec esi
|
|
|
|
fis:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte '/'
|
2006-08-18 15:32:18 +02:00
|
|
|
je aa
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [path+esi],byte 0 ;' '
|
|
|
|
dec esi
|
|
|
|
jnz fis
|
|
|
|
aa:
|
|
|
|
mov [path+esi],byte 0 ;' '
|
|
|
|
|
|
|
|
mov [filecursor],0
|
|
|
|
call read_directory
|
|
|
|
; call convertation
|
|
|
|
call draw_window
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
no_back:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,13 ;string up?
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_up
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,1 ;step
|
2006-01-03 10:43:31 +01:00
|
|
|
up:
|
|
|
|
mov [downstop],0
|
|
|
|
sub [filecursor],ebx
|
|
|
|
cmp [filecursor],0
|
|
|
|
jnl cr_ok
|
|
|
|
mov [filecursor],0
|
|
|
|
cr_ok:
|
|
|
|
jmp draw_wd
|
|
|
|
no_up:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,14 ;string down?
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_dn
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,1 ;step
|
2006-01-03 10:43:31 +01:00
|
|
|
down:
|
|
|
|
cmp [downstop],1
|
2006-08-18 15:32:18 +02:00
|
|
|
je no_dn
|
2006-01-03 10:43:31 +01:00
|
|
|
add [filecursor],ebx
|
|
|
|
jmp draw_wd
|
|
|
|
no_dn:
|
|
|
|
|
|
|
|
cmp ah,15
|
2006-08-18 15:32:18 +02:00
|
|
|
jne no_copyclip ;copy to clipboard
|
2006-01-03 10:43:31 +01:00
|
|
|
copy_to_clip:
|
|
|
|
mov ebx,param_area ;clipfilp
|
|
|
|
mov eax,32
|
|
|
|
int 0x40
|
|
|
|
mov esi,0
|
|
|
|
wlll2:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte '/'
|
|
|
|
jne wfis2
|
|
|
|
inc esi
|
|
|
|
cmp esi,12*20
|
|
|
|
jnae wlll2
|
|
|
|
jmp still
|
|
|
|
wfis2:
|
|
|
|
mov al,byte [path+esi]
|
|
|
|
cmp al,byte ' '
|
2006-08-18 15:32:18 +02:00
|
|
|
je waa2
|
2006-01-03 10:43:31 +01:00
|
|
|
inc esi
|
|
|
|
cmp esi,12*20
|
|
|
|
jnae wfis2
|
|
|
|
jmp still
|
|
|
|
waa2:
|
|
|
|
mov eax,[filecursor]
|
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
mov edi,eax
|
|
|
|
cmp [convinfo+edi+26],dword 'FOL '
|
2006-08-18 15:32:18 +02:00
|
|
|
je still
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,12*20
|
|
|
|
wlopt:
|
|
|
|
mov al,[path+ecx]
|
|
|
|
mov [paramtest+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns wlopt
|
|
|
|
mov [paramtest+esi],byte '/'
|
|
|
|
inc esi
|
|
|
|
mov ebp,8+4
|
|
|
|
mov edx,edi
|
|
|
|
wlosf:
|
|
|
|
mov al,[convinfo+edi]
|
|
|
|
mov [paramtest+esi],al
|
|
|
|
inc esi
|
|
|
|
inc edi
|
|
|
|
dec ebp
|
|
|
|
jnz wlosf
|
|
|
|
mov [paramtest+esi],byte 0
|
|
|
|
mov ebx,param_area ;clipfile
|
|
|
|
mov ecx,paramtest
|
|
|
|
mov edx,100
|
|
|
|
mov esi,0
|
|
|
|
mov eax,33
|
|
|
|
int 0x40
|
|
|
|
jmp still
|
|
|
|
no_copyclip:
|
|
|
|
|
|
|
|
cmp ah,16
|
|
|
|
jne no_clippaste
|
|
|
|
paste_from_clip:
|
|
|
|
mov ebx,param_area ;clipfile
|
|
|
|
mov ecx,0
|
|
|
|
mov edx,-1
|
|
|
|
mov esi,sourcepath
|
|
|
|
mov eax,6
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
mov ecx,99
|
|
|
|
cdestp:
|
|
|
|
mov al,[path+ecx]
|
|
|
|
mov [destpath+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns cdestp
|
|
|
|
|
|
|
|
mov esi,0
|
|
|
|
zlll2:
|
|
|
|
mov al,byte [destpath+esi]
|
|
|
|
cmp al,byte '/'
|
|
|
|
jne zfis2
|
|
|
|
inc esi
|
|
|
|
cmp esi,100
|
|
|
|
jnae zlll2
|
|
|
|
jmp still
|
|
|
|
zfis2:
|
|
|
|
mov al,byte [destpath+esi]
|
|
|
|
cmp al,byte ' '
|
2006-08-18 15:32:18 +02:00
|
|
|
je zaa2
|
2006-01-03 10:43:31 +01:00
|
|
|
inc esi
|
|
|
|
cmp esi,100
|
|
|
|
jnae zfis2
|
|
|
|
jmp still
|
|
|
|
zaa2:
|
|
|
|
mov byte [destpath+esi],'/'
|
|
|
|
inc esi
|
|
|
|
|
|
|
|
mov edi,0
|
|
|
|
qlll2:
|
|
|
|
mov al,byte [sourcepath+edi]
|
|
|
|
cmp al,byte '.'
|
2006-08-18 15:32:18 +02:00
|
|
|
je qfis2
|
2006-01-03 10:43:31 +01:00
|
|
|
inc edi
|
|
|
|
cmp edi,100
|
|
|
|
jnae qlll2
|
|
|
|
jmp still
|
|
|
|
qfis2:
|
|
|
|
sub edi,8 ;.-8=start of file name
|
|
|
|
|
|
|
|
mov ecx,11 ;11 sybols
|
|
|
|
cfname:
|
|
|
|
mov al,[sourcepath+edi]
|
|
|
|
cmp al,byte ' '
|
2006-08-18 15:32:18 +02:00
|
|
|
je dar
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [destpath+esi],al
|
|
|
|
inc esi
|
|
|
|
dar:
|
|
|
|
inc edi
|
|
|
|
dec ecx
|
|
|
|
jns cfname
|
|
|
|
|
|
|
|
; mov [destpath+esi],byte 0
|
|
|
|
|
|
|
|
mov ecx,199
|
|
|
|
cdestjp:
|
|
|
|
mov al,[sourcepath+ecx]
|
|
|
|
cmp al,byte 0
|
|
|
|
jne nor
|
|
|
|
mov al,byte 32
|
|
|
|
nor:
|
|
|
|
mov [sourcepath+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns cdestjp
|
|
|
|
|
|
|
|
cmp [browser],dword 1
|
|
|
|
jne no_outpath
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,4 ; function 4 : write text to window
|
|
|
|
mov ebx,10*65536+67 ; [x start] *65536 + [y start]
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,sourcepath ; pointer to text beginning
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,100 ;12*20 ; text length
|
|
|
|
int 0x40
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,250*65536+67 ; [x start] *65536 + [y start]
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,destpath ; pointer to text beginning
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,100 ;12*20 ; text length
|
|
|
|
int 0x40
|
|
|
|
no_outpath:
|
|
|
|
|
|
|
|
mov ebx,copyrfile
|
|
|
|
mov ecx,sourcepath
|
|
|
|
mov eax,19
|
|
|
|
int 0x40
|
|
|
|
delay 50 ;wait recoed file
|
|
|
|
jmp update ;still
|
|
|
|
no_clippaste:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,19 ;Delete from floppy
|
2006-01-03 10:43:31 +01:00
|
|
|
delete_file:
|
|
|
|
jne no_delt
|
|
|
|
cmp dword [path],'/RD/'
|
|
|
|
jne no_delt
|
|
|
|
cmp byte [path+4],'1'
|
|
|
|
jne no_delt
|
|
|
|
|
|
|
|
mov eax,[filecursor]
|
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
mov edi,eax
|
|
|
|
add edi,convinfo
|
|
|
|
mov ebp,edi
|
|
|
|
mov eax,dword [edi]
|
|
|
|
mov dword [paramtest],eax
|
|
|
|
mov eax,dword [edi+4]
|
|
|
|
mov dword [paramtest+4],eax
|
|
|
|
mov eax,dword [edi+4+4+1]
|
|
|
|
mov dword [paramtest+4+4],eax
|
|
|
|
|
|
|
|
mov ebx,paramtest
|
|
|
|
mov eax,32
|
|
|
|
int 0x40
|
|
|
|
jmp update
|
|
|
|
no_delt:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,20 ;I - Help
|
|
|
|
je help_scr
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,22
|
|
|
|
jne no_headfile
|
|
|
|
mov [drawhf],1
|
|
|
|
call draw_window
|
|
|
|
mov [drawhf],0
|
|
|
|
mov [pmenu_draw],1
|
|
|
|
jmp still
|
|
|
|
no_headfile:
|
|
|
|
|
|
|
|
cmp ah,23
|
|
|
|
jne no_headview
|
|
|
|
mov [drawhv],1
|
|
|
|
call draw_window
|
|
|
|
mov [drawhv],0
|
|
|
|
mov [pmenu_draw],1
|
|
|
|
jmp still
|
|
|
|
no_headview:
|
|
|
|
|
|
|
|
cmp ah,24
|
|
|
|
jne no_headinfo
|
|
|
|
mov [drawhi],1
|
|
|
|
call draw_window
|
|
|
|
mov [drawhi],0
|
|
|
|
mov [pmenu_draw],1
|
|
|
|
jmp still
|
|
|
|
no_headinfo:
|
|
|
|
|
|
|
|
;FILE MENU
|
|
|
|
cmp ah,30
|
|
|
|
je kfad
|
|
|
|
|
|
|
|
cmp ah,31
|
2006-08-18 15:32:18 +02:00
|
|
|
je copy_to_clip ;Copy
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,32
|
2006-08-18 15:32:18 +02:00
|
|
|
je paste_from_clip ;Paste
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,33
|
2006-08-18 15:32:18 +02:00
|
|
|
je delete_file ;Delte
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,34
|
2006-08-18 15:32:18 +02:00
|
|
|
je textopen ;Edit in Tinypad
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,37
|
2006-08-18 15:32:18 +02:00
|
|
|
je exit
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;VIEW MENU
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,40 ;Sort by name show del
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_sn
|
|
|
|
; mov dword [viewmode],0
|
|
|
|
and dword [viewmode],100b
|
|
|
|
jmp update
|
|
|
|
no_sn:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,41 ;Sort by extension show del
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_se
|
|
|
|
and dword [viewmode],1101b
|
2006-08-18 15:32:18 +02:00
|
|
|
or dword [viewmode],0001b
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp update
|
|
|
|
no_se:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,42 ;Sort by size show del
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_ss
|
|
|
|
and dword [viewmode],1110b
|
2006-08-18 15:32:18 +02:00
|
|
|
or dword [viewmode],0010b
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp update
|
|
|
|
no_ss:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,43 ;Sort by date show del
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_sd
|
2006-08-18 15:32:18 +02:00
|
|
|
or dword [viewmode],0011b
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp update
|
|
|
|
no_sd:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,44 ;Show del files
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_ds
|
2006-08-18 15:32:18 +02:00
|
|
|
or dword [viewmode],0100b
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp update
|
|
|
|
no_ds:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,45 ;Fade del files
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_df
|
|
|
|
and dword [viewmode],11111011b
|
|
|
|
jmp update
|
|
|
|
no_df:
|
|
|
|
|
|
|
|
;HELP MENU
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,50 ;Help?
|
|
|
|
je help_scr
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,51 ;Info?
|
|
|
|
je info_scr
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp ah,83
|
2006-08-18 15:32:18 +02:00
|
|
|
ja no_hd_part
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ah,80
|
2006-08-18 15:32:18 +02:00
|
|
|
jb no_hd_part
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,0
|
|
|
|
sub ah,80
|
|
|
|
inc ah
|
|
|
|
mov cl,ah
|
|
|
|
mov eax,21
|
|
|
|
mov ebx,8 ;7
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
no_hd_part:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ah,1 ; test on exit button
|
|
|
|
je exit
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
exit:
|
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
; mov eax,58
|
|
|
|
; mov ebx,MRUfile
|
|
|
|
; mov dword[ebx+8],255
|
|
|
|
; inc dword[ebx]
|
|
|
|
; int 0x40
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
mov eax,-1
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
draw_wd:
|
|
|
|
; call draw_window
|
|
|
|
; jmp still
|
|
|
|
mov [flick],1
|
|
|
|
jmp anti_flick
|
|
|
|
|
|
|
|
edit_prompt:
|
|
|
|
not [focus]
|
|
|
|
jmp red
|
|
|
|
|
|
|
|
help_scr:
|
|
|
|
mov esi,14
|
|
|
|
mov ebp,help_text
|
|
|
|
jmp screen
|
|
|
|
|
|
|
|
info_scr:
|
|
|
|
mov esi,6
|
|
|
|
mov ebp,info_text
|
|
|
|
jmp screen
|
|
|
|
|
|
|
|
screen:
|
|
|
|
cmp [browser],dword 1 ;it's browser?
|
|
|
|
jne dialogscr
|
|
|
|
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,90
|
|
|
|
drawfbox 40,76,300,eax,0x00000000
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,92
|
|
|
|
drawfbox 41,77,298,eax,0x00ffffff
|
|
|
|
mov edi,esi ;14
|
|
|
|
mov ebx,(41+26)*65536+(77+20)
|
|
|
|
mov ecx,cl_Black
|
|
|
|
mov edx,ebp ;help_text
|
|
|
|
jmp outlab
|
|
|
|
|
|
|
|
dialogscr:
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,84
|
|
|
|
drawfbox 16,54,270,eax,0x00000000
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,86
|
|
|
|
drawfbox 17,55,268,eax,0x00ffffff
|
|
|
|
mov edi,esi ;14
|
|
|
|
mov ebx,(17+10)*65536+(55+1)
|
|
|
|
mov ecx,cl_Black
|
|
|
|
mov edx,ebp ;help_text
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
outlab: ;out labels
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,4
|
|
|
|
mov esi,40
|
|
|
|
helploo:
|
|
|
|
int 0x40
|
|
|
|
add ebx,11
|
|
|
|
add edx,40
|
|
|
|
dec edi
|
|
|
|
jnz helploo
|
|
|
|
|
|
|
|
setimg 48,84,logoinfimg
|
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
;HELP TEXT
|
|
|
|
help_text:
|
|
|
|
;0123456789012345678901234567890123456789
|
|
|
|
db ' ~~~~~ SYSTEM X-TREE ~~~~~ '
|
|
|
|
db ' HELP '
|
|
|
|
db ' '
|
|
|
|
db ' '
|
|
|
|
db 'F2 - CHANGE SORTMODE (name,ext,size,dat)'
|
|
|
|
db 'F3 - VIEW file in tinypad '
|
|
|
|
|
|
|
|
db 'F5 - COPY FILE to clipboard '
|
|
|
|
db 'F6 - PASTE FILE from clipboard '
|
|
|
|
db 'F11- EDIT PROMPT string '
|
|
|
|
db 'F12- UPDATE directory sources '
|
|
|
|
db ' '
|
|
|
|
|
|
|
|
db 'Enter - input to directory '
|
|
|
|
db 'Backspace - back to previos directory '
|
|
|
|
db 'PageDn/PageUp, Up/Down - move cursor '
|
|
|
|
|
|
|
|
info_text:
|
|
|
|
db ' ~~~~~ SYSTEM X-TREE ~~~~~ '
|
|
|
|
db ' INFO 81 Ver '
|
|
|
|
db ' '
|
|
|
|
db ' Create by Pavlushin Evgeni '
|
|
|
|
db ' with ASCL libary special for Menuet OS '
|
|
|
|
db ' www.deck4.narod.ru waptap@mail.ru '
|
|
|
|
|
|
|
|
|
|
|
|
; *********************************************
|
|
|
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
|
|
|
; ******** FILE BROWSER / DIALOG *********
|
|
|
|
|
|
|
|
;draw_browser_window:
|
|
|
|
|
|
|
|
draw_window:
|
|
|
|
|
|
|
|
; mov eax,9
|
|
|
|
; mov ebx,procinfo
|
|
|
|
; mov ecx,-1
|
|
|
|
; int 0x40
|
|
|
|
; mov eax,[procinfo.x_size]
|
|
|
|
; cmp eax,66
|
|
|
|
; jg temp12345
|
|
|
|
; ret
|
|
|
|
; temp12345:
|
|
|
|
mov eax,48
|
|
|
|
mov ebx,3
|
|
|
|
mov ecx,sc
|
|
|
|
mov edx,sizeof.system_colors
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
mov eax,[sc.work_button]
|
|
|
|
mov [b_color],eax
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,12 ; function 12:tell os about windowdraw
|
|
|
|
mov ebx,1 ; 1, start of draw
|
2006-01-03 10:43:31 +01:00
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Window
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
xor eax,eax ; function 0 : define and draw window
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob1
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,140*65536+400 ; [x start] *65536 + [x size]
|
|
|
|
mov ecx,160*65536+280 ; [y start] *65536 + [y size]
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp isb1
|
|
|
|
nob1:
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ebx,140*65536+320 ; [x start] *65536 + [x size]
|
|
|
|
mov ecx,260*65536+240 ; [y start] *65536 + [y size]
|
2006-01-03 10:43:31 +01:00
|
|
|
isb1:
|
|
|
|
; mov edx,[sc.work] ; color of work area RRGGBB
|
2006-08-18 15:32:18 +02:00
|
|
|
or edx,0x03ffffff;000000
|
2006-01-03 10:43:31 +01:00
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Get proc info
|
|
|
|
mov eax,9
|
|
|
|
mov ebx,procinfo
|
|
|
|
mov ecx,-1
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
cmp eax,66
|
2006-08-18 15:32:18 +02:00
|
|
|
jg temp12345
|
2006-01-03 10:43:31 +01:00
|
|
|
ret
|
|
|
|
temp12345:
|
|
|
|
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob9
|
|
|
|
mov [listx],120
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,[listx]
|
|
|
|
sub eax,7
|
|
|
|
mov [listxsize],eax
|
|
|
|
mov [listy],73
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,[listy]
|
|
|
|
sub eax,7
|
|
|
|
mov [listysize],eax
|
|
|
|
jmp isb9
|
|
|
|
nob9:
|
|
|
|
mov [listx],10
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,[listx]
|
|
|
|
sub eax,7
|
|
|
|
mov [listxsize],eax
|
|
|
|
mov [listy],54
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,[listy]
|
|
|
|
sub eax,34
|
|
|
|
mov [listysize],eax
|
|
|
|
isb9:
|
|
|
|
|
|
|
|
|
|
|
|
;Draw only browser components
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob2
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,[sc.grab_text] ; color of text RRGGBB
|
|
|
|
or eax,0x10000000
|
|
|
|
glabel 8,8,'SYSTEM X-TREE FILE BROWSER',eax
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;Draw buttons headers
|
|
|
|
mov eax,8
|
|
|
|
mov ebx,8*65536+(6*8-1) ;start pos x
|
|
|
|
mov ecx,23*65536+10 ;start pos y
|
|
|
|
mov edx,22;+1000000000000000000000000000000b ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,3 ;draw 13 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,0x00339933
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
nexthbut:
|
|
|
|
add ebx,(6*8)*65536
|
|
|
|
inc edx
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
jnz nexthbut
|
|
|
|
|
|
|
|
;DRAW PARTITION BUTTONS
|
|
|
|
mov eax,8
|
|
|
|
mov ebx,340*65536+5 ;start pos x
|
|
|
|
mov ecx,24*65536+8 ;start pos y
|
|
|
|
mov edx,80;+1000000000000000000000000000000b ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,4 ;draw 13 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,0x00339933
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
nextpbut:
|
|
|
|
add ebx,6*65536
|
|
|
|
inc edx
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
jnz nextpbut
|
|
|
|
|
|
|
|
;DRAW PARTITON TEXT
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 341,25,'1234',cl_White;Black
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;File STRING
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 8,25,' FILE VIEW INFO ', ;cl_White ;Black
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;BlackLine
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,10
|
|
|
|
drawfbox 5,35, eax, 1, cl_Black
|
|
|
|
|
|
|
|
;BlackLine2
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,10
|
|
|
|
drawfbox 5,68, eax, 1, cl_Black
|
|
|
|
|
|
|
|
;BlackLine2 vertical
|
|
|
|
; mov eax,[procinfo.y_size]
|
|
|
|
; sub eax,69+4
|
|
|
|
; drawfbox 115, 69, 1, eax, cl_Black
|
|
|
|
|
|
|
|
;Set logo img
|
|
|
|
setimg 34,88,logoinfimg
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 20,165,'SYSTEM X-TREE',cl_Black
|
2006-01-03 10:43:31 +01:00
|
|
|
add ebx,10
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel ,,'FOR MENUETOS',
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
add ebx,9*65536+20
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel ,,'welcome to',cl_Green
|
2006-01-03 10:43:31 +01:00
|
|
|
add ebx,-15*65536+10
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel ,,'www.menuetos.org',cl_Green
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
; glabel ,,'Create by',cl_Green
|
2006-01-03 10:43:31 +01:00
|
|
|
; add ebx,10
|
2006-08-18 15:32:18 +02:00
|
|
|
; glabel ,,' Pavlushin',
|
2006-01-03 10:43:31 +01:00
|
|
|
; add ebx,10
|
2006-08-18 15:32:18 +02:00
|
|
|
; glabel ,,' Evgeni',
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
;Draw head->file buttons
|
|
|
|
cmp [drawhf],1
|
|
|
|
jne no_drawhf
|
|
|
|
mov ebx,8*65536+6*12 ;start pos x
|
|
|
|
mov ecx,35*65536+10 ;start pos y
|
|
|
|
mov edx,30 ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,8 ;draw 4 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,cl_Grey
|
|
|
|
call menubutton
|
|
|
|
no_drawhf:
|
|
|
|
|
|
|
|
;Draw head->view buttons
|
|
|
|
cmp [drawhv],1
|
|
|
|
jne no_drawhv
|
|
|
|
mov ebx,(8+6*8)*65536+6*12 ;start pos x
|
|
|
|
mov ecx,35*65536+10 ;start pos y
|
|
|
|
mov edx,40 ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,6 ;draw 4 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,cl_Grey
|
|
|
|
call menubutton
|
|
|
|
no_drawhv:
|
|
|
|
|
|
|
|
;Draw head->info buttons
|
|
|
|
cmp [drawhi],1
|
|
|
|
jne no_drawhi
|
|
|
|
mov ebx,(8+12*8)*65536+6*12 ;start pos x
|
|
|
|
mov ecx,35*65536+10 ;start pos y
|
|
|
|
mov edx,50 ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,2 ;draw 2 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,cl_Grey
|
|
|
|
call menubutton
|
|
|
|
no_drawhi:
|
|
|
|
|
|
|
|
nob2:
|
|
|
|
|
|
|
|
;Draw buttons instruments
|
|
|
|
mov eax,8
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob3
|
|
|
|
mov ebx,10*65536+16+5 ;start pos x
|
|
|
|
mov ecx,37*65536+15 ;start pos y
|
|
|
|
jmp isb3
|
|
|
|
nob3:
|
|
|
|
mov ebx,16*65536+16+5 ;start pos x
|
|
|
|
mov ecx,29*65536+15 ;start pos y
|
|
|
|
isb3:
|
|
|
|
mov edx,8;+1000000000000000000000000000000b ;spoke butt
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edi,13 ;draw 13 button's
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,cl_Grey
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
nextbut:
|
|
|
|
add ebx,(16+6)*65536
|
|
|
|
inc edx
|
|
|
|
int 0x40
|
|
|
|
dec edi
|
|
|
|
jnz nextbut
|
|
|
|
|
|
|
|
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob4
|
|
|
|
;But img browser
|
|
|
|
setimg 10,37,butimg
|
|
|
|
;left logo
|
|
|
|
add eax,[procinfo.x_size]
|
|
|
|
sub eax,80
|
|
|
|
mov [temp],eax
|
|
|
|
setimg [temp],37,logoimg
|
|
|
|
jmp isb4
|
|
|
|
nob4:
|
|
|
|
;But img dialog
|
|
|
|
setimg 16,29,butimg
|
|
|
|
isb4:
|
|
|
|
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob5
|
|
|
|
|
|
|
|
mov [urlx],48
|
|
|
|
mov [urly],55
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,48+10
|
|
|
|
mov [urlxsize],eax
|
|
|
|
mov [urlysize],12
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 20,57,"URL:",cl_Black
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;Out view mode info
|
|
|
|
mov eax,[viewmode]
|
|
|
|
mov ebx,16
|
|
|
|
mul ebx
|
|
|
|
mov edx,eax
|
|
|
|
mov eax,4
|
|
|
|
mov ebx,180*65536+25
|
|
|
|
mov ecx,cl_Black
|
|
|
|
add edx,modetext
|
|
|
|
mov esi,16
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;List size
|
|
|
|
outcount [listsize],294,25,cl_Black,4*65536
|
|
|
|
jmp isb5
|
|
|
|
|
|
|
|
head_dlg: db 'OPEN FILE'
|
2006-08-18 15:32:18 +02:00
|
|
|
db 'SAVE FILE'
|
2006-01-03 10:43:31 +01:00
|
|
|
but_dlg: db 'OPEN'
|
2006-08-18 15:32:18 +02:00
|
|
|
db 'SAVE'
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
nob5:
|
|
|
|
|
|
|
|
mov [urlx],10
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,24
|
|
|
|
mov [urly],eax
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,80
|
|
|
|
mov [urlxsize],eax
|
|
|
|
mov [urlysize],12
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp byte [dlg_type],'O' ;if byte O - is Open dialog
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_openh
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,head_dlg ;draw in head OPEN FILE
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp out_laby
|
|
|
|
no_openh:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp byte [dlg_type],'S' ;if byte S - is Save dialog
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_saveh
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,head_dlg+9 ;draw in head SAVE FILE
|
2006-01-03 10:43:31 +01:00
|
|
|
out_laby:
|
|
|
|
mov ebx,8*65536+8
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ecx,[sc.grab_text] ; color of text RRGGBB
|
|
|
|
or ecx,0x10000000
|
2006-01-03 10:43:31 +01:00
|
|
|
mov esi,9
|
|
|
|
mov eax,4
|
|
|
|
int 0x40
|
|
|
|
no_saveh:
|
|
|
|
|
|
|
|
|
|
|
|
;Draw OPEN\SAVE button
|
|
|
|
mov ebx,0*65536+50
|
|
|
|
mov ecx,0*65536+12
|
|
|
|
mov eax,[procinfo.x_size]
|
|
|
|
sub eax,63
|
|
|
|
shl eax,16
|
|
|
|
add ebx,eax
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,25
|
|
|
|
shl eax,16
|
|
|
|
add ecx,eax
|
|
|
|
mov eax,8
|
|
|
|
mov edx,5 ;button ID
|
|
|
|
mov esi,0x006699aa ;gradient!!!
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
; label OPEN or SAVE
|
|
|
|
mov ebx,[procinfo.x_size]
|
|
|
|
sub ebx,48
|
|
|
|
mov eax,[procinfo.y_size]
|
|
|
|
sub eax,22
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,eax
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp byte [dlg_type],'O' ;if byte O - is Open dialog
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_openb
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,but_dlg ;draw in head OPEN FILE
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp out_labx
|
|
|
|
no_openb:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp byte [dlg_type],'S' ;if byte S - is Save dialog
|
2006-01-03 10:43:31 +01:00
|
|
|
jne no_saveb
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,but_dlg+4 ;draw in head SAVE FILE
|
2006-01-03 10:43:31 +01:00
|
|
|
out_labx:
|
|
|
|
mov ecx,cl_White
|
|
|
|
mov esi,4
|
|
|
|
mov eax,4
|
|
|
|
int 0x40
|
|
|
|
no_saveb:
|
|
|
|
|
|
|
|
isb5:
|
|
|
|
|
|
|
|
anti_flick:
|
|
|
|
|
|
|
|
cmp [flick],2
|
|
|
|
je draw_url
|
|
|
|
cmp [flick],0
|
|
|
|
jne no_flick_url
|
|
|
|
|
|
|
|
;***************************
|
|
|
|
; DRAW URL LINE
|
|
|
|
;***************************
|
|
|
|
draw_url:
|
|
|
|
|
|
|
|
;Draw URL focus button
|
|
|
|
mov ebx,[urlx]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,[urlxsize]
|
|
|
|
mov ecx,[urly]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[urlysize]
|
|
|
|
dec ebx
|
|
|
|
dec ecx
|
|
|
|
mov eax,8
|
|
|
|
mov edx,2 ;button ID
|
|
|
|
mov esi,0x00aaaaaa ;gradient!!!
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Draw URL String
|
|
|
|
mov eax,13
|
|
|
|
mov edx,cl_Black
|
|
|
|
int 0x40
|
|
|
|
add ebx,1*65536-2+1
|
|
|
|
add ecx,1*65536-2+1
|
|
|
|
mov edx,cl_White
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Draw URL Cursor
|
|
|
|
mov eax,6
|
|
|
|
mul [cursor]
|
|
|
|
mov ebx,[urlx]
|
|
|
|
add ebx,eax
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,2*65536+1
|
|
|
|
mov ecx,[urly]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[urlysize]
|
|
|
|
add ecx,2*65536-4
|
|
|
|
mov eax,13
|
|
|
|
mov edx,cl_Black
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
; OUT TEXT
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,[urlxsize] ;calculating text leight
|
2006-01-03 10:43:31 +01:00
|
|
|
sub eax,8
|
|
|
|
mov ebx,6
|
|
|
|
div ebx
|
|
|
|
mov esi,eax
|
|
|
|
|
|
|
|
mov ebx,[urlx]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,[urly]
|
|
|
|
add ebx,3*65536+2
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,4 ; function 4 : write text to window
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,0x00000000 ;[sc.grab_text] ; color of text RRGGBB
|
2006-08-18 15:32:18 +02:00
|
|
|
mov edx,path ; pointer to text beginning
|
2006-01-03 10:43:31 +01:00
|
|
|
int 0x40
|
|
|
|
|
|
|
|
cmp [flick],2
|
|
|
|
jne no_flick_url
|
|
|
|
mov [flick],0
|
|
|
|
jmp still
|
|
|
|
no_flick_url:
|
|
|
|
|
|
|
|
|
|
|
|
;***************************
|
|
|
|
; DRAW FILE LIST
|
|
|
|
;***************************
|
|
|
|
|
|
|
|
;Draw Scroll Line
|
|
|
|
mov eax,13
|
|
|
|
|
|
|
|
mov ebx,[listx]
|
|
|
|
add ebx,[listxsize]
|
|
|
|
sub ebx,[scrollsize]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,dword [scrollsize]
|
|
|
|
mov ecx,[listy]
|
|
|
|
add ecx,[scrollbutsize]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[listysize]
|
|
|
|
sub ecx,[scrollbutsize]
|
|
|
|
sub ecx,[scrollbutsize]
|
|
|
|
mov edx,[scrollcolor] ;0x00006600
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Draw Scroll Box
|
|
|
|
mov edx,0
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,2
|
|
|
|
mov ebx,dword 10
|
|
|
|
div ebx
|
|
|
|
|
|
|
|
mov edx,0
|
|
|
|
mov ebx,eax
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp ebx,[listsize] ;filelistsize in ebx
|
|
|
|
ja notusescroll
|
2006-01-03 10:43:31 +01:00
|
|
|
;usescroll
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,[scrollbutsize]
|
|
|
|
sub eax,[scrollbutsize]
|
|
|
|
shl eax,16
|
|
|
|
div dword [listsize]
|
|
|
|
mul ebx
|
|
|
|
shr eax,16
|
|
|
|
mov esi,[mousey]
|
|
|
|
shl esi,16
|
|
|
|
add esi,eax
|
|
|
|
|
|
|
|
mov eax,13
|
|
|
|
mov ebx,[listx]
|
|
|
|
add ebx,[listxsize]
|
|
|
|
sub ebx,[scrollsize]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,dword [scrollsize]
|
|
|
|
mov ecx,[listy]
|
|
|
|
add ecx,[scrollbutsize]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,esi
|
|
|
|
mov edx,[scrollboxcol]
|
|
|
|
int 0x40
|
|
|
|
notusescroll:
|
|
|
|
|
|
|
|
|
|
|
|
;Draw list button for get file name
|
|
|
|
mov ebx,[listx]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,[listxsize]
|
2006-08-18 15:32:18 +02:00
|
|
|
sub ebx,15 ;right free zone
|
2006-01-03 10:43:31 +01:00
|
|
|
sub ebx,[scrollsize]
|
|
|
|
mov ecx,[listy]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[listysize]
|
|
|
|
|
|
|
|
mov eax,8
|
|
|
|
mov edx,4+1000000000000000000000000000000b ;spoke butt
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
add ebx,15
|
|
|
|
mov eax,13
|
|
|
|
mov edx,[listcolor] ;ffffff
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
;Draw up/down buttons
|
|
|
|
mov ebx,[listx]
|
|
|
|
add ebx,[listxsize]
|
|
|
|
sub ebx,[scrollsize]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,[scrollsize]
|
|
|
|
mov ecx,[listy]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[scrollbutsize]
|
2006-08-18 15:32:18 +02:00
|
|
|
dec ecx ;correction
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,8
|
|
|
|
mov edx,6+1000000000000000000000000000000b ;spoke butt
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
inc ecx
|
|
|
|
mov eax,13
|
|
|
|
mov edx,[scrollbutcol] ;ffffff
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
; Draw image on up button
|
|
|
|
pushad
|
|
|
|
shr ebx,16
|
|
|
|
mov edx,ebx
|
|
|
|
shl edx,16
|
|
|
|
shr ecx,16
|
|
|
|
add edx,ecx
|
|
|
|
mov ecx,8*65536+9
|
|
|
|
mov ebx,upsb+8
|
|
|
|
mov eax,7
|
|
|
|
int 0x40
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
dec ecx ;correction
|
2006-01-03 10:43:31 +01:00
|
|
|
mov edx,7+1000000000000000000000000000000b ;spoke butt
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,[scrollbutsize]
|
|
|
|
shl eax,16
|
|
|
|
add ecx,eax
|
|
|
|
|
|
|
|
mov eax,8
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
inc ecx
|
|
|
|
mov eax,13
|
|
|
|
mov edx,[scrollbutcol] ;ffffff
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
; Draw image on down button
|
|
|
|
pushad
|
|
|
|
shr ebx,16
|
|
|
|
mov edx,ebx
|
|
|
|
shl edx,16
|
|
|
|
shr ecx,16
|
|
|
|
add edx,ecx
|
|
|
|
mov ecx,8*65536+9
|
|
|
|
mov ebx,dnsb+8
|
|
|
|
mov eax,7
|
|
|
|
int 0x40
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
|
|
; Draw text in file list
|
|
|
|
|
|
|
|
mov eax,[listxsize]
|
|
|
|
sub eax,40*6 ;leight of string
|
|
|
|
shr eax,1
|
|
|
|
add eax,[listx]
|
|
|
|
shl eax,16
|
|
|
|
add eax,[listy]
|
|
|
|
add eax,2
|
|
|
|
|
|
|
|
mov [filelistxy],eax ;dword 19*65536+58
|
|
|
|
|
|
|
|
mov edx,0
|
|
|
|
mov eax,[listysize]
|
|
|
|
sub eax,2
|
|
|
|
mov ebx,dword 10
|
|
|
|
div ebx
|
|
|
|
mov [filelistsize],eax ;dword 40
|
|
|
|
|
|
|
|
; OUT FILE DATA
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,[filecursor] ;calc cursor position
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
|
|
|
|
;OUT TEXT
|
|
|
|
mov ebp,4096 ; 16 ;out strings process
|
|
|
|
sub ebp,[filecursor]
|
|
|
|
mov edx,convinfo ;fileinfo+11
|
|
|
|
add edx,eax
|
|
|
|
mov ebx,dword [filelistxy]
|
|
|
|
loo:
|
|
|
|
mov ecx,0x00888888 ;for another file's color white
|
|
|
|
cmp [edx+26],dword 'FOL ' ;folder yellow
|
|
|
|
jne nb
|
|
|
|
mov ecx,0x00006666
|
|
|
|
jmp cset1
|
|
|
|
nb:
|
|
|
|
mov eax,[edx+8]
|
|
|
|
;Color set
|
|
|
|
cmp eax,dword '.TXT' ;text's blue
|
2006-08-18 15:32:18 +02:00
|
|
|
je itx
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,dword '.INC'
|
2006-08-18 15:32:18 +02:00
|
|
|
je itx
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,dword '.ASM'
|
2006-08-18 15:32:18 +02:00
|
|
|
je itx
|
|
|
|
cmp eax,dword '.RTF'
|
|
|
|
je itx
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp nt
|
|
|
|
itx:
|
|
|
|
mov ecx,0x00446666
|
|
|
|
jmp cset
|
|
|
|
nt:
|
|
|
|
cmp eax,dword '.BMP' ;picture's pure
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,dword '.JPG'
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,dword '.JPE'
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp eax,dword '.GIF'
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
cmp eax,dword '.PNG'
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
cmp eax,dword '.WAV'
|
2006-08-18 15:32:18 +02:00
|
|
|
je ipic
|
|
|
|
cmp eax,dword '.MID'
|
|
|
|
je ipic
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp np
|
|
|
|
ipic:
|
|
|
|
mov ecx,0x00226688
|
|
|
|
jmp cset
|
|
|
|
np:
|
|
|
|
cmp eax,dword '. ' ;execute's green
|
|
|
|
jne nexec
|
|
|
|
mov ecx,0x00008866
|
|
|
|
jmp cset
|
|
|
|
nexec:
|
|
|
|
cset:
|
|
|
|
|
|
|
|
cset1:
|
|
|
|
mov esi,40 ;symbols out 62 ;32
|
|
|
|
mov eax,4
|
|
|
|
pushad
|
|
|
|
int 0x40
|
|
|
|
; popad
|
|
|
|
|
|
|
|
; pushad
|
|
|
|
cmp [edx+26],dword 'Fvol' ;volume label
|
|
|
|
jne no_volico
|
|
|
|
push hdico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_volico:
|
|
|
|
cmp [edx+26],dword 'FOL '
|
|
|
|
jne no_folico
|
|
|
|
cmp [edx+9],dword 'HARD'
|
|
|
|
jne no_hdico
|
|
|
|
push hdico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_hdico:
|
|
|
|
cmp [edx+9],dword 'RAMD'
|
|
|
|
jne no_rdico
|
|
|
|
push rdico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_rdico:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp [edx+9],dword 'FLOP'
|
|
|
|
jne no_fdico
|
|
|
|
push rdico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_fdico:
|
2006-01-03 10:43:31 +01:00
|
|
|
push folico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_folico:
|
|
|
|
cmp [edx+8],dword '.BMP'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+8],dword '.JPG'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+8],dword '.JPE'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+8],dword '.GIF'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
cmp [edx+8],dword '.PNG'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
cmp [edx+8],dword '.WAV'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_imgico
|
|
|
|
cmp [edx+8],dword '.MID'
|
|
|
|
je is_imgico
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp no_imgico
|
|
|
|
is_imgico:
|
|
|
|
push imgico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_imgico:
|
|
|
|
cmp [edx+8],dword '.ASM'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_asmincico
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+8],dword '.INC'
|
2006-08-18 15:32:18 +02:00
|
|
|
je is_asmincico
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp no_asmincico
|
|
|
|
is_asmincico:
|
|
|
|
push asmincico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_asmincico:
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp [edx+8],dword '.RTF'
|
|
|
|
je @f
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+8],dword '.TXT'
|
|
|
|
jne no_txtico
|
2006-08-18 15:32:18 +02:00
|
|
|
@@:
|
2006-01-03 10:43:31 +01:00
|
|
|
push txtico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_txtico:
|
|
|
|
cmp [edx+8],dword '. '
|
|
|
|
jne no_execico
|
|
|
|
push execico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_execico:
|
|
|
|
cmp [edx+26],dword 'DAT '
|
|
|
|
jne no_datico
|
|
|
|
push datico+8
|
|
|
|
jmp out_ico
|
|
|
|
no_datico:
|
|
|
|
cmp [edx+26],dword 'DEL '
|
|
|
|
jne no_out_ico
|
|
|
|
push delico+8
|
|
|
|
jmp out_ico
|
|
|
|
out_ico:
|
|
|
|
|
|
|
|
mov edx,ebx
|
|
|
|
sub edx,14*65536+1
|
|
|
|
mov ecx,12*65536+9
|
|
|
|
; mov ebx,upsb+8
|
|
|
|
pop ebx
|
|
|
|
mov eax,7
|
|
|
|
int 0x40
|
|
|
|
no_out_ico:
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
|
|
add ebx,10
|
|
|
|
noout:
|
|
|
|
add edx,62
|
|
|
|
|
|
|
|
dec [filelistsize]
|
|
|
|
cmp [filelistsize],dword 0
|
2006-08-18 15:32:18 +02:00
|
|
|
je extloo
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
dec ebp
|
|
|
|
jnz loo
|
|
|
|
dext:
|
|
|
|
mov [downstop],1
|
|
|
|
|
|
|
|
extloo:
|
|
|
|
|
|
|
|
cmp [browser],dword 1 ;it's browser
|
|
|
|
jne nob8
|
|
|
|
|
|
|
|
;Draw text for head->file buttons
|
|
|
|
cmp [drawhf],1
|
|
|
|
jne no_drawhftext
|
|
|
|
drawfbox 8,35,(6*12)+1,11*8,0x00000000
|
|
|
|
drawfbox 9,36,(6*12)-1,(11*8)-2,0x00ffffff
|
|
|
|
|
|
|
|
mov edi,8
|
|
|
|
mov ebx,9*65536+37
|
|
|
|
mov ecx,cl_Black
|
|
|
|
mov edx,file_text_label
|
|
|
|
call drawmenu
|
|
|
|
jmp no_drawhftext
|
|
|
|
|
|
|
|
file_text_label:
|
2006-08-18 15:32:18 +02:00
|
|
|
db ' Open '
|
|
|
|
db ' Copy '
|
|
|
|
db ' Paste '
|
|
|
|
db ' Delete '
|
|
|
|
db ' Tinypad '
|
|
|
|
db ' Edit '
|
|
|
|
db ' '
|
|
|
|
db ' Exit '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
no_drawhftext:
|
|
|
|
|
|
|
|
;Draw text for head->view buttons
|
|
|
|
cmp [drawhv],1
|
|
|
|
jne no_drawhvtext
|
|
|
|
drawfbox (8+6*8),35,(6*12)+1,(11*6),0x00000000
|
|
|
|
drawfbox (9+6*8),36,(6*12)-1,(11*6)-2,0x00ffffff
|
|
|
|
|
|
|
|
mov edi,6 ;4
|
|
|
|
mov ebx,(9+6*8)*65536+37
|
|
|
|
mov ecx,cl_Black
|
|
|
|
mov edx,view_text_label
|
|
|
|
call drawmenu
|
|
|
|
jmp no_drawhvtext
|
|
|
|
|
|
|
|
view_text_label:
|
2006-08-18 15:32:18 +02:00
|
|
|
db ' Name sort '
|
|
|
|
db ' Ext. sort '
|
|
|
|
db ' Size sort '
|
|
|
|
db ' Date sort '
|
|
|
|
db ' Show DEL '
|
|
|
|
db ' Fade DEL '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
no_drawhvtext:
|
|
|
|
|
|
|
|
;Draw text for head->info buttons
|
|
|
|
cmp [drawhi],1
|
|
|
|
jne no_drawhitext
|
|
|
|
drawfbox (8+12*8),35,(6*12)+1,(11*2),0x00000000
|
|
|
|
drawfbox (9+12*8),36,(6*12)-1,(11*2)-2,0x00ffffff
|
|
|
|
|
|
|
|
mov edi,2
|
|
|
|
mov eax,4
|
|
|
|
mov ebx,(9+12*8)*65536+37
|
|
|
|
mov ecx,cl_Black
|
|
|
|
mov edx,info_text_label
|
|
|
|
call drawmenu
|
|
|
|
jmp no_drawhitext
|
|
|
|
|
|
|
|
info_text_label:
|
2006-08-18 15:32:18 +02:00
|
|
|
db ' Help '
|
|
|
|
db ' About '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
no_drawhitext:
|
|
|
|
|
|
|
|
nob8:
|
|
|
|
cmp [flick],1
|
|
|
|
jne no_flick
|
|
|
|
mov [flick],0
|
|
|
|
jmp still
|
|
|
|
no_flick:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,12 ; function 12:tell os about windowdraw
|
|
|
|
mov ebx,2 ; 2, end of draw
|
2006-01-03 10:43:31 +01:00
|
|
|
int 0x40
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
;FILE LIST PARAMETRS
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
listx dd 15
|
|
|
|
listy dd 72
|
2006-01-03 10:43:31 +01:00
|
|
|
listxsize dd 350
|
|
|
|
listysize dd 41
|
|
|
|
|
|
|
|
filelistxy dd 0
|
|
|
|
filelistsize dd 0
|
|
|
|
scrollsize dd 8
|
|
|
|
listcolor dd 0xffffff ;0xeeeeee
|
|
|
|
scrollcolor dd 0x778877
|
|
|
|
scrollboxcol dd 0x335533
|
|
|
|
scrollbutcol dd 0x224422
|
|
|
|
scrollbutsize dd 9
|
|
|
|
usescroll dd 1
|
|
|
|
|
|
|
|
;URL LINE PARAMETRS
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
urlx dd 10
|
|
|
|
urly dd 20
|
2006-01-03 10:43:31 +01:00
|
|
|
urlxsize dd 350
|
|
|
|
urlysize dd 12
|
|
|
|
|
|
|
|
|
|
|
|
drawmenu:
|
|
|
|
mov eax,4
|
|
|
|
mov esi,12
|
|
|
|
menuloo:
|
|
|
|
int 0x40
|
|
|
|
add ebx,11
|
|
|
|
add edx,12
|
|
|
|
dec edi
|
|
|
|
jnz menuloo
|
|
|
|
ret
|
|
|
|
|
|
|
|
menubutton:
|
|
|
|
mov eax,8
|
|
|
|
nextmenubut:
|
|
|
|
int 0x40
|
|
|
|
add ecx,11*65536
|
|
|
|
inc edx
|
|
|
|
dec edi
|
|
|
|
jnz nextmenubut
|
|
|
|
ret
|
|
|
|
|
|
|
|
;*****************************
|
|
|
|
; READ FILE STRUCTURE PROC
|
|
|
|
;*****************************
|
|
|
|
|
|
|
|
read_directory:
|
|
|
|
|
|
|
|
; STEP 0 SEt TYPE OF SORT
|
|
|
|
|
|
|
|
mov eax,[viewmode]
|
|
|
|
;with no show del files
|
|
|
|
and eax,0FFFFFFFBh
|
|
|
|
cmp eax,0
|
|
|
|
jnz no_sort_by_name
|
|
|
|
mov [start],0
|
|
|
|
mov [x0],12
|
|
|
|
mov [x1],99
|
|
|
|
mov [x2],99
|
|
|
|
mov [x3],99
|
|
|
|
jmp sortset
|
|
|
|
|
|
|
|
no_sort_by_name:
|
|
|
|
dec eax
|
|
|
|
jnz no_sort_by_ext
|
|
|
|
mov [start],9
|
|
|
|
mov [x0],9
|
|
|
|
mov [x1],99
|
|
|
|
mov [x2],99
|
|
|
|
mov [x3],12
|
|
|
|
jmp sortset
|
|
|
|
|
|
|
|
no_sort_by_ext:
|
|
|
|
dec eax
|
|
|
|
jnz no_sort_by_size
|
|
|
|
mov [start],30
|
|
|
|
mov [x0],12
|
|
|
|
mov [x1],99
|
|
|
|
mov [x2],99
|
|
|
|
mov [x3],38
|
|
|
|
jmp sortset
|
|
|
|
|
|
|
|
no_sort_by_size:
|
|
|
|
dec eax
|
|
|
|
mov [start],21
|
|
|
|
mov [x0],12
|
|
|
|
mov [x1],17
|
|
|
|
mov [x2],20
|
|
|
|
mov [x3],26
|
|
|
|
jmp sortset ;sort by date
|
|
|
|
|
|
|
|
;SORT VARILE
|
|
|
|
start dd 0
|
|
|
|
x0 dd 0
|
|
|
|
x1 dd 0
|
|
|
|
x2 dd 0
|
|
|
|
x3 dd 0
|
|
|
|
|
|
|
|
sortset:
|
|
|
|
|
|
|
|
;STEP 1 CLEAR CONVINFO
|
|
|
|
mov edi,convinfo
|
|
|
|
mov al,255
|
|
|
|
mov ecx,4096*62 ;512
|
|
|
|
cld
|
|
|
|
rep stosb
|
|
|
|
|
|
|
|
;STEP 2 TEST ON HD OR PARTITION
|
|
|
|
cmp [path],byte '/'
|
|
|
|
je nstep
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ecx,61+62*5
|
2006-01-03 10:43:31 +01:00
|
|
|
loxhd:
|
|
|
|
mov al,[hdimg+ecx]
|
|
|
|
mov [convinfo+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns loxhd
|
|
|
|
mov [listsize],0
|
|
|
|
ret
|
|
|
|
nstep:
|
|
|
|
cmp [path+3],byte '/'
|
|
|
|
je nstep2
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp [path+4],byte '/'
|
|
|
|
je nstep2
|
|
|
|
cmp [path+1],word 'RD'
|
|
|
|
jne nostep_RD
|
|
|
|
mov ecx,61
|
|
|
|
jmp loxpt
|
|
|
|
nostep_RD:
|
|
|
|
cmp [path+1],word 'FD'
|
|
|
|
jne nostep_FD
|
2006-01-03 10:43:31 +01:00
|
|
|
mov ecx,61+62
|
2006-08-18 15:32:18 +02:00
|
|
|
jmp loxpt
|
|
|
|
nostep_FD:
|
|
|
|
cmp [path+1],dword 'HD0'
|
|
|
|
jne nostep_HD0
|
|
|
|
mov cl,[table_area+2]
|
|
|
|
movzx ecx,cl
|
|
|
|
imul ecx,62
|
|
|
|
dec ecx
|
|
|
|
jmp loxpt
|
|
|
|
nostep_HD0:
|
|
|
|
cmp [path+1],dword 'HD1'
|
|
|
|
jne nostep_HD1
|
|
|
|
mov cl,[table_area+3]
|
|
|
|
movzx ecx,cl
|
|
|
|
imul ecx,62
|
|
|
|
dec ecx
|
|
|
|
jmp loxpt
|
|
|
|
nostep_HD1:
|
|
|
|
cmp [path+1],dword 'HD2'
|
|
|
|
jne nostep_HD2
|
|
|
|
mov cl,[table_area+4]
|
|
|
|
movzx ecx,cl
|
|
|
|
imul ecx,62
|
|
|
|
dec ecx
|
|
|
|
jmp loxpt
|
|
|
|
nostep_HD2:
|
|
|
|
cmp [path+1],dword 'HD3'
|
|
|
|
jne nostep_HD3
|
|
|
|
mov cl,[table_area+5]
|
|
|
|
movzx ecx,cl
|
|
|
|
imul ecx,62
|
|
|
|
dec ecx
|
|
|
|
jmp loxpt
|
|
|
|
nostep_HD3:
|
|
|
|
|
|
|
|
mov ecx,61+62 ;+496
|
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
loxpt:
|
|
|
|
mov al,[ptimg+ecx]
|
|
|
|
mov [convinfo+ecx],al
|
|
|
|
dec ecx
|
|
|
|
jns loxpt
|
|
|
|
mov [listsize],0
|
|
|
|
ret
|
|
|
|
nstep2:
|
|
|
|
|
|
|
|
;STEP 3 CLEAR OUTINFO
|
|
|
|
mov edi,outinfo ;0x14000 ;0x20000
|
|
|
|
xor eax,eax
|
|
|
|
mov ecx,4096*32 ;512
|
|
|
|
cld
|
|
|
|
rep stosb
|
|
|
|
|
|
|
|
;STEP 4 READ DATA FROM HD
|
|
|
|
mov dword [farea],outinfo
|
|
|
|
mov dword [readblock],0
|
|
|
|
|
|
|
|
loorhd:
|
|
|
|
mov eax,[readblock]
|
|
|
|
mov [fileinfoblock+4],eax
|
|
|
|
mov eax,58
|
|
|
|
mov ebx,fileinfoblock
|
|
|
|
int 0x40
|
|
|
|
cmp eax,0
|
|
|
|
jne hd_err
|
|
|
|
add dword [farea],512
|
|
|
|
inc dword [readblock]
|
|
|
|
cmp dword [readblock],4096/16
|
|
|
|
jna loorhd
|
|
|
|
|
|
|
|
hd_err:
|
|
|
|
mov ebx,dword [readblock]
|
|
|
|
shl ebx,4
|
|
|
|
mov dword [blocksread],ebx ; for quick resorting
|
|
|
|
|
|
|
|
cmp eax,5
|
2006-08-18 15:32:18 +02:00
|
|
|
je end_of_dir
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
; It's erorr's test is poor code
|
|
|
|
|
|
|
|
cmp eax,1
|
|
|
|
jne no_inv_part
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 10,10,'Invalid partition or hd base',cl_Red+font_Big
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp end_of_dir
|
|
|
|
no_inv_part:
|
|
|
|
cmp eax,3
|
|
|
|
jne no_unk_fs
|
2006-08-18 15:32:18 +02:00
|
|
|
glabel 10,10,'Unknow file system',cl_Red+font_Big
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp end_of_dir
|
|
|
|
no_unk_fs:
|
|
|
|
|
|
|
|
end_of_dir:
|
|
|
|
mov [dirlen],ebx
|
|
|
|
|
|
|
|
; command succesful
|
|
|
|
|
|
|
|
mov esi,outinfo ;data_area+1024
|
|
|
|
; mov edi,fileinfo+11
|
|
|
|
mov edx,0 ;4096 ;16
|
|
|
|
|
|
|
|
newlineb:
|
|
|
|
|
|
|
|
mov edi,fileinfo+11
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
pushad ; clear
|
2006-01-03 10:43:31 +01:00
|
|
|
mov al,32
|
|
|
|
mov ecx,58
|
|
|
|
sub edi,11
|
|
|
|
cld
|
|
|
|
rep stosb
|
|
|
|
popad
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov cl,[esi] ; end of entries ?
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp cl,6
|
|
|
|
jnz noib0
|
|
|
|
|
|
|
|
mov [edi+26],dword 'EOE '
|
|
|
|
add esi,32
|
|
|
|
; add edi,62
|
|
|
|
jmp inf
|
|
|
|
|
|
|
|
noib0:
|
|
|
|
|
|
|
|
mov cl,[esi+0]
|
|
|
|
cmp cl,0xe5
|
2006-08-18 15:32:18 +02:00
|
|
|
je yesdelfil
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov cl,[esi+11] ; long fat32 name ?
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp cl,0xf
|
|
|
|
jnz noib1
|
|
|
|
|
|
|
|
mov [edi+26],dword 'F32 '
|
|
|
|
add esi,32
|
|
|
|
; add edi,62
|
|
|
|
jmp inf
|
|
|
|
|
|
|
|
noib1:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov eax,'DAT ' ; data or .. ?
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov cl,[esi+0] ; deleted file
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp cl,0xe5
|
2006-08-18 15:32:18 +02:00
|
|
|
je yesdelfil
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp cl,0x0
|
2006-08-18 15:32:18 +02:00
|
|
|
je yesdelfil
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp nodelfil
|
|
|
|
yesdelfil:
|
|
|
|
mov eax,'DEL '
|
|
|
|
jmp ffile
|
|
|
|
|
|
|
|
nodelfil:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov cl,[esi+11] ; folder
|
2006-01-03 10:43:31 +01:00
|
|
|
and cl,0x10
|
2006-08-18 15:32:18 +02:00
|
|
|
jz ffile
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,'FOL '
|
|
|
|
mov [edi+26],eax
|
|
|
|
jmp nosize
|
|
|
|
ffile:
|
|
|
|
|
|
|
|
; Asko patch for v79
|
2006-08-18 15:32:18 +02:00
|
|
|
mov cl,[esi+11] ; fold
|
2006-01-03 10:43:31 +01:00
|
|
|
and cl,0xf
|
2006-08-18 15:32:18 +02:00
|
|
|
cmp cl,0xf ; skip long filename
|
|
|
|
jz novol
|
|
|
|
test cl,0x8 ; is it fold label?
|
|
|
|
jz novol ; no
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,'Fvol'
|
|
|
|
mov [edi+26],eax
|
|
|
|
jmp nosize
|
|
|
|
novol:
|
|
|
|
|
|
|
|
mov [edi+26],eax
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
pusha ; size
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,[esi+28]
|
|
|
|
mov esi,edi
|
|
|
|
add esi,37
|
|
|
|
mov ebx,10
|
|
|
|
mov ecx,8
|
|
|
|
newnum:
|
|
|
|
xor edx,edx
|
|
|
|
div ebx
|
|
|
|
add dl,48
|
|
|
|
mov [esi],dl
|
|
|
|
test eax,eax
|
2006-08-18 15:32:18 +02:00
|
|
|
jz zernum
|
2006-01-03 10:43:31 +01:00
|
|
|
dec esi
|
|
|
|
loop newnum
|
|
|
|
zernum:
|
|
|
|
popa
|
|
|
|
nosize:
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
pusha ; date
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [edi+17],dword '. .'
|
|
|
|
|
|
|
|
movzx eax,word [esi+24]
|
2006-08-18 15:32:18 +02:00
|
|
|
shr eax,9 ; year
|
2006-01-03 10:43:31 +01:00
|
|
|
add eax,1980
|
|
|
|
mov ecx,4
|
|
|
|
newdel1:
|
|
|
|
dec ecx
|
|
|
|
xor edx,edx
|
|
|
|
mov ebx,10
|
|
|
|
div ebx
|
|
|
|
add edx,48
|
|
|
|
mov [edi+ecx+21],dl
|
|
|
|
test ecx,ecx
|
|
|
|
jnz newdel1
|
|
|
|
|
|
|
|
movzx eax,word [esi+24]
|
2006-08-18 15:32:18 +02:00
|
|
|
shr eax,5 ; month
|
2006-01-03 10:43:31 +01:00
|
|
|
and eax,0x0f
|
|
|
|
mov ecx,2
|
|
|
|
newdel2:
|
|
|
|
dec ecx
|
|
|
|
xor edx,edx
|
|
|
|
mov ebx,10
|
|
|
|
div ebx
|
|
|
|
add edx,48
|
|
|
|
mov [edi+ecx+18],dl
|
|
|
|
test ecx,ecx
|
|
|
|
jnz newdel2
|
|
|
|
|
|
|
|
movzx eax,word [esi+24]
|
|
|
|
and eax,0x1f ; day
|
|
|
|
mov ecx,2
|
|
|
|
newdel3:
|
|
|
|
dec ecx
|
|
|
|
xor edx,edx
|
|
|
|
mov ebx,10
|
|
|
|
div ebx
|
|
|
|
add edx,48
|
|
|
|
mov [edi+ecx+15],dl
|
|
|
|
test ecx,ecx
|
|
|
|
jnz newdel3
|
|
|
|
|
|
|
|
popa
|
|
|
|
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
pusha ; number
|
2006-01-03 10:43:31 +01:00
|
|
|
mov eax,edx
|
|
|
|
sub eax,4096
|
|
|
|
neg eax
|
|
|
|
|
|
|
|
xor edx,edx
|
|
|
|
mov ebx,10
|
|
|
|
div ebx
|
|
|
|
add dl,48
|
2006-08-18 15:32:18 +02:00
|
|
|
mov [edi+43],dl ;0001
|
2006-01-03 10:43:31 +01:00
|
|
|
xor edx,edx
|
|
|
|
div ebx
|
|
|
|
add dl,48
|
2006-08-18 15:32:18 +02:00
|
|
|
mov [edi+42],dl ;0010
|
2006-01-03 10:43:31 +01:00
|
|
|
xor edx,edx
|
|
|
|
div ebx
|
|
|
|
add al,48
|
|
|
|
add dl,48
|
2006-08-18 15:32:18 +02:00
|
|
|
mov [edi+41],dl ;0100
|
2006-01-03 10:43:31 +01:00
|
|
|
mov [edi+40],byte 0 ;1000
|
|
|
|
popa
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ecx,8 ; first 8
|
2006-01-03 10:43:31 +01:00
|
|
|
cld
|
|
|
|
rep movsb
|
|
|
|
mov [edi],byte '.'
|
|
|
|
inc edi
|
2006-08-18 15:32:18 +02:00
|
|
|
mov ecx,3 ; last 3
|
2006-01-03 10:43:31 +01:00
|
|
|
cld
|
|
|
|
rep movsb
|
|
|
|
|
|
|
|
add esi,(32-11)
|
|
|
|
; add edi,(60-12+2)
|
|
|
|
|
|
|
|
inf:
|
|
|
|
|
|
|
|
pushad
|
|
|
|
|
|
|
|
;STEP 5 Test on WRITE OR NOTWRITE
|
|
|
|
mov edx,fileinfo+11
|
|
|
|
looo:
|
|
|
|
|
|
|
|
; Delete del, eoe, f32 and another head-names
|
|
|
|
cmp [viewmode],3 ;0-3 no outdel
|
2006-08-18 15:32:18 +02:00
|
|
|
ja del_out
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx+26],dword 'DEL '
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
del_out:
|
|
|
|
cmp [edx+26],dword 'DEL '
|
|
|
|
jne no_del
|
|
|
|
cmp [edx],dword 0 ;431 ;435 ;484 +10% speed
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
no_del:
|
|
|
|
cmp [edx+26],dword 'EOE '
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
|
|
|
cmp [edx+26],dword 'F32 ' ;F32 not useles
|
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx],dword '. '
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx],dword '.. '
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp [edx],dword 'FIRS'
|
2006-08-18 15:32:18 +02:00
|
|
|
je nextfl
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
; ---------_______-------_______ --------_________-----------
|
|
|
|
; SORT by name and del deletet files or f32 headers from list
|
|
|
|
; _________-------_______ --------_______---------___________
|
|
|
|
|
|
|
|
; STEP 6 UNIVERSAL SORT ALGORYTHM
|
|
|
|
|
|
|
|
xxx:
|
|
|
|
mov esi,0 ;[tekfilename] ;0
|
|
|
|
mov ebx,[start] ; 0
|
|
|
|
|
|
|
|
; At first Fold after Dat and Del
|
|
|
|
|
|
|
|
ftestname:
|
|
|
|
cmp byte [fileinfo+11+26],'F'
|
2006-08-18 15:32:18 +02:00
|
|
|
je F
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp byte [fileinfo+11+26],'D'
|
2006-08-18 15:32:18 +02:00
|
|
|
je D
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp add_element
|
|
|
|
D: cmp byte [convinfo+esi+26],'D'
|
2006-08-18 15:32:18 +02:00
|
|
|
je add_element
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp byte [convinfo+esi+26],'F'
|
2006-08-18 15:32:18 +02:00
|
|
|
je skipfile
|
2006-01-03 10:43:31 +01:00
|
|
|
jmp add_element
|
|
|
|
F: cmp byte [convinfo+esi+26],'D'
|
|
|
|
je writenow
|
|
|
|
; cmp byte [convinfo+esi+26],'F'
|
|
|
|
; je add_element
|
|
|
|
; jmp add_element
|
|
|
|
|
|
|
|
add_element:
|
|
|
|
mov al,[fileinfo+ebx+11]
|
|
|
|
cmp al,[convinfo+esi+ebx]
|
2006-08-18 15:32:18 +02:00
|
|
|
je equal
|
|
|
|
jb writenow
|
2006-01-03 10:43:31 +01:00
|
|
|
skipfile:
|
|
|
|
add esi,62
|
|
|
|
mov ebx,[start] ;0
|
|
|
|
jmp ftestname
|
|
|
|
|
|
|
|
equal:
|
|
|
|
inc ebx
|
|
|
|
cmp ebx,[x0]
|
2006-08-18 15:32:18 +02:00
|
|
|
je writefile
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ebx,[x1]
|
2006-08-18 15:32:18 +02:00
|
|
|
je x1p
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ebx,[x2]
|
2006-08-18 15:32:18 +02:00
|
|
|
je x2p
|
2006-01-03 10:43:31 +01:00
|
|
|
cmp ebx,[x3]
|
|
|
|
jae x3p
|
|
|
|
jmp add_element
|
|
|
|
|
|
|
|
x1p:
|
|
|
|
mov ebx,18
|
|
|
|
jmp add_element
|
|
|
|
x2p:
|
|
|
|
mov ebx,15
|
|
|
|
jmp add_element
|
|
|
|
x3p:
|
|
|
|
mov ebx,0
|
|
|
|
jmp add_element
|
|
|
|
|
|
|
|
writenow:
|
|
|
|
mov ecx,4096*62
|
|
|
|
sub ecx,esi
|
|
|
|
ldloop:
|
|
|
|
mov al,[convinfo+ecx+esi]
|
|
|
|
mov [convinfo+ecx+esi+62],al
|
|
|
|
dec ecx
|
|
|
|
jns ldloop
|
|
|
|
|
|
|
|
|
|
|
|
writefile:
|
|
|
|
mov ecx,61
|
|
|
|
wfloop:
|
|
|
|
mov al,[fileinfo+ecx+11]
|
|
|
|
mov [convinfo+ecx+esi],al
|
|
|
|
dec ecx
|
|
|
|
jns wfloop
|
|
|
|
|
|
|
|
nextfile:
|
|
|
|
|
|
|
|
nextfl:
|
|
|
|
; popad
|
|
|
|
; pushad
|
|
|
|
mov eax,edx
|
|
|
|
shl eax,26
|
|
|
|
cmp eax,0
|
|
|
|
jne no_outcnt
|
|
|
|
push edx
|
|
|
|
drawfbox 294,25,(4*6),10,cl_White
|
|
|
|
pop ebp
|
|
|
|
outcount ebp,294,25,cl_Black,4*65536
|
|
|
|
no_outcnt:
|
|
|
|
popad
|
|
|
|
|
|
|
|
inc edx
|
|
|
|
cmp edx,4096
|
|
|
|
jnae newlineb
|
|
|
|
|
|
|
|
|
|
|
|
;STEP 8 GET SIZE OF RESORTING LIST
|
|
|
|
mov ecx,0
|
|
|
|
mov edi,0
|
|
|
|
mov eax,[blocksread]
|
|
|
|
mov ebx,62
|
|
|
|
mul ebx
|
|
|
|
mov edx,eax
|
|
|
|
loogs:
|
|
|
|
mov eax,dword [convinfo+edi+26]
|
|
|
|
cmp eax,dword 0xffffffff
|
|
|
|
je endgs
|
|
|
|
add edi,62
|
|
|
|
inc ecx
|
|
|
|
cmp edi,edx ;4096*62
|
|
|
|
jnae loogs
|
|
|
|
endgs:
|
|
|
|
mov [listsize],ecx
|
|
|
|
ret
|
|
|
|
|
|
|
|
;******************************************************************************
|
|
|
|
|
|
|
|
; DATA AREA
|
|
|
|
pmenu_draw dd 0 ;if poup menu is draw,update all window
|
2006-08-18 15:32:18 +02:00
|
|
|
flick dd 0 ;anti flick on ?
|
|
|
|
drawhf dd 0 ;draw file menu?
|
|
|
|
drawhv dd 0 ;draw view menu?
|
|
|
|
drawhi dd 0 ;draw info menu?
|
2006-01-03 10:43:31 +01:00
|
|
|
browser dd 0 ;0-dialog, 1-browser
|
2006-08-18 15:32:18 +02:00
|
|
|
cursor dd 0 ;cursor in prompt line
|
|
|
|
focus dd 0 ;prompt edit or window?
|
2006-01-03 10:43:31 +01:00
|
|
|
viewmode dd 0 ;folder sort & not del
|
|
|
|
downstop dd 0
|
|
|
|
filecursor dd 0
|
2006-08-18 15:32:18 +02:00
|
|
|
mousex dd 0
|
|
|
|
mousey dd 0
|
2006-01-03 10:43:31 +01:00
|
|
|
blocksread dd 0
|
|
|
|
listsize dd 0 ;num of files in directory
|
2006-08-18 15:32:18 +02:00
|
|
|
temp dd 0
|
2006-01-03 10:43:31 +01:00
|
|
|
readblock dd 1
|
|
|
|
dlg_type db 0 ;S-save O-open
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
hdimg1 db 'HD0 HARDDISK FOL '
|
|
|
|
hdimg2 db 'HD1 HARDDISK FOL '
|
|
|
|
hdimg3 db 'HD2 HARDDISK FOL '
|
|
|
|
hdimg4 db 'HD3 HARDDISK FOL '
|
|
|
|
|
|
|
|
;01234567890123456789012345678901234567890123456789012345678912
|
|
|
|
hdimg db 'RD RAMDISK FOL '
|
|
|
|
db 'FD FLOPPYDISK FOL '
|
|
|
|
db ' '
|
|
|
|
db ' '
|
|
|
|
db ' '
|
|
|
|
db ' '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
ptimg db '1 FIRST PARTITION FOL '
|
|
|
|
db '2 SECOND PARTITION FOL '
|
2006-08-18 15:32:18 +02:00
|
|
|
db '3 NEXT PARTITION FOL '
|
|
|
|
db '4 NEXT PARTITION FOL '
|
|
|
|
db '5 NEXT PARTITION FOL '
|
|
|
|
db '6 NEXT PARTITION FOL '
|
|
|
|
db '7 NEXT PARTITION FOL '
|
|
|
|
db '8 NEXT PARTITION FOL '
|
|
|
|
db '9 NEXT PARTITION FOL '
|
|
|
|
db '10 NEXT PARTITION FOL '
|
|
|
|
db '11 NEXT PARTITION FOL '
|
|
|
|
db '12 NEXT PARTITION FOL '
|
|
|
|
db '13 NEXT PARTITION FOL '
|
|
|
|
db '14 NEXT PARTITION FOL '
|
|
|
|
db '15 NEXT PARTITION FOL '
|
|
|
|
db '16 NEXT PARTITION FOL '
|
|
|
|
db '17 NEXT PARTITION FOL '
|
|
|
|
db '18 NEXT PARTITION FOL '
|
|
|
|
db '19 NEXT PARTITION FOL '
|
|
|
|
db '20 NEXT PARTITION FOL '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
modetext:
|
|
|
|
;0123456789012345
|
|
|
|
db 'SORT BY NAME 0'
|
|
|
|
db 'SORT BY EXT. 1'
|
|
|
|
db 'SORT BY SIZE 2' ;type sort
|
|
|
|
db 'SORT BY DATE 3'
|
|
|
|
db 'DEL SORT NAME 4'
|
|
|
|
db 'DEL SORT EXT. 5'
|
|
|
|
db 'DEL SORT SIZE 6' ;type sort
|
|
|
|
db 'DEL SORT DATE 7'
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
dirlen dd 0x1
|
2006-01-03 10:43:31 +01:00
|
|
|
b_color dd 0x6677cc
|
|
|
|
|
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
;MRUfile:
|
|
|
|
; dd 0x0
|
|
|
|
; dd 0x0
|
|
|
|
; dd 0x1
|
|
|
|
; dd path
|
|
|
|
; dd tempzone
|
|
|
|
; db '/RD/1/MRU.LST',0
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
|
|
|
|
;Name of programs
|
2006-08-18 15:32:18 +02:00
|
|
|
editor db 'TINYPAD '
|
2006-01-03 10:43:31 +01:00
|
|
|
bmpview db 'MV '
|
|
|
|
jpgview db 'JPEGVIEW '
|
|
|
|
gifview db 'GIFVIEW '
|
|
|
|
ac97wav db 'AC97WAV '
|
|
|
|
copyrfile db 'COPYR '
|
2006-08-18 15:32:18 +02:00
|
|
|
rtfread db 'RTFREAD '
|
2006-01-03 10:43:31 +01:00
|
|
|
; //// Willow
|
|
|
|
pngview db '@RCHER '
|
|
|
|
; //// Willow
|
2006-08-18 15:32:18 +02:00
|
|
|
midamp db 'MIDAMP '
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
fileinfo_start:
|
|
|
|
dd 16
|
|
|
|
dd 0
|
|
|
|
dd 0 ;tempzone+1000;
|
|
|
|
dd 0
|
|
|
|
dd tempzone ;0x10000
|
|
|
|
open_path:
|
2006-08-18 15:32:18 +02:00
|
|
|
times 256 db 0 ;run app path
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
fileinfoblock:
|
2006-08-18 15:32:18 +02:00
|
|
|
dd 0x0 ; read
|
|
|
|
dd 0x0 ; first block
|
|
|
|
dd 0x1 ; number of blocks to read
|
2006-01-03 10:43:31 +01:00
|
|
|
farea:
|
2006-08-18 15:32:18 +02:00
|
|
|
dd outinfo ; ret offset
|
|
|
|
dd tempzone ; work size of sytemram
|
2006-01-03 10:43:31 +01:00
|
|
|
path:
|
2006-08-18 15:32:18 +02:00
|
|
|
times 256 db 0 ;path
|
|
|
|
|
|
|
|
table_area:
|
|
|
|
rb 10
|
|
|
|
|
2006-01-03 10:43:31 +01:00
|
|
|
;rb 256
|
|
|
|
but_file:
|
|
|
|
file 'systr12.GIF'
|
|
|
|
butimg:
|
2006-08-18 15:32:18 +02:00
|
|
|
rb 400*16*3+8 ;buttons (left pice of picture)
|
2006-01-03 10:43:31 +01:00
|
|
|
logoimg:
|
2006-08-18 15:32:18 +02:00
|
|
|
rb 70*16*3+8 ;logo (right pice of picture)
|
2006-01-03 10:43:31 +01:00
|
|
|
logoinfimg:
|
2006-08-18 15:32:18 +02:00
|
|
|
rb 60*60*3+8 ;logoinfo (right pice of picture)
|
2006-01-03 10:43:31 +01:00
|
|
|
upsb:
|
2006-08-18 15:32:18 +02:00
|
|
|
rb 8*9*3+8 ;up scroll button
|
2006-01-03 10:43:31 +01:00
|
|
|
dnsb:
|
2006-08-18 15:32:18 +02:00
|
|
|
rb 8*9*3+8 ;down scroll button
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
;ICONS RESERVE AREA
|
|
|
|
hdico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
rdico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
folico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
datico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
delico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
imgico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
txtico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
asmincico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
execico:
|
|
|
|
rb 12*9*3+8
|
|
|
|
|
2006-08-18 15:32:18 +02:00
|
|
|
tempimg: ;reserve ram for images
|
|
|
|
rb 400*100*3+8 ;for picture
|
2006-01-03 10:43:31 +01:00
|
|
|
rb 8000
|
|
|
|
|
|
|
|
gif_hash:
|
|
|
|
rd 4096
|
|
|
|
tempzone: ;temp zone for 58 function
|
|
|
|
rb 4000
|
|
|
|
|
|
|
|
sourcepath rb 100
|
|
|
|
destpath rb 100
|
|
|
|
|
|
|
|
MYPID:
|
|
|
|
rd 8
|
|
|
|
|
|
|
|
I_END:
|
|
|
|
|
|
|
|
param_area:
|
|
|
|
rb 256
|
|
|
|
paramtest:
|
|
|
|
rb 256
|
|
|
|
filedir:
|
|
|
|
rb 256
|
|
|
|
|
|
|
|
procinfo process_information
|
|
|
|
sc system_colors
|
|
|
|
|
|
|
|
fileinfo:
|
|
|
|
rb 200 ;4096*62+1024
|
|
|
|
|
|
|
|
outinfo:
|
|
|
|
rb 4096*34+1024
|
|
|
|
|
|
|
|
convinfo:
|
|
|
|
rb 4096*62+1024
|
|
|
|
|
|
|
|
RAM_END:
|