Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 108 → Rev 109

/programs/filemngrs/mfar/trunk/build_en.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix en >lang.inc
@fasm mfar.asm mfar
@pause
/programs/filemngrs/mfar/trunk/build_ru.bat
0,0 → 1,4
@erase lang.inc
@echo lang fix ru >lang.inc
@fasm mfar.asm mfar
@pause
/programs/filemngrs/mfar/trunk/macros.inc
0,0 → 1,226
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
 
 
 
; code profiling
macro STARTTIMER
{
push ecx
push ebx
rdtsc
push edx
push eax
}
 
macro STOPTIMER ;edx:eax = cpu cycles ellapsed
{
rdtsc
pop ebx
pop ecx
clc
sbb eax,ebx
sbb edx,ecx
pop ebx
pop ecx
}
 
 
; optimize the code for size
macro add arg1,arg2
{
if arg1 in <eax,ebx,ecx,edx,esi,edi,ebp,esp>
if arg2 eqtype 0
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if arg2 eqtype 0
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if arg1 in <eax,ebx,ecx,edx,esi,edi,ebp,esp>
if arg2 eqtype 0
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/menuet.inc
0,0 → 1,180
;------------------------------------------------------------------------------
;///// SYSTEM FUNCTIONS ///////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
MF_TERMINATE = -1
MF_DEFWINDOW = 0
WS_GRADIENT = $80000000
WS_NOSIZE = $00000000
WS_TRANSP = $01000000
WS_NORMAL = $02000000
WS_SKINNED = $03000000
MF_PUTPIXEL = 1
MF_GETKEY = 2
MF_GETTIME = 3
MF_DRAWTEXT = 4
DT_FIXED = $00000000
DT_VARIABLE = $10000000
MF_DELAY = 5
MF_RDREADFILE = 6
MF_PUTIMAGE = 7
MF_DEFBUTTON = 8
DB_ADD = $00000000
DB_DELETE = $80000000
BS_HIDDEN = $40000000
MF_PRINFO = 9
PI_SELF = $FFFFFFFF
MF_WAITEVENT = 10
MF_CHKEVENT = 11
MF_WNDDRAW = 12
WD_BEGINDRAW = 1
WD_ENDDRAW = 2
MF_FILLRECT = 13
FR_GRADIENT = $80000000
MF_GETSCRDIM = 14
MF_SETBKGND = 15
BG_SETSIZE = 1
BG_PUTPIXEL = 2
BG_REDRAW = 3
BG_SETSTYLE = 4
BGS_TILE = 1
BGS_STRETCH = 2
BG_SETIMAGE = 5
MF_RAM2FLOP = 16
R2F_ALL = 1
MF_GETPRSDBTNID = 17
MF_SYSSERV = 18
SYS_QUIT = 1
SYS_KILLPR = 2
SYS_SETFOCUS = 3
SYS_GETIDLE = 4
SYS_SETSPEED = 5
SYS_RAM2HARD = 6
MF_STARTPRG = 19
MF_MIDI = 20
MIDI_RESET = 1
MIDI_OUTPUT = 2
MF_DEVSETUP = 21
DEV_MIDI = 1
DEV_KEYB = 2
DEV_CD = 3
DEV_SB16 = 4
DEV_LANG = 5
DEV_WSS = 6
DEV_HD = 7
DEV_HDPART = 8
DEV_DMA = 10
DEV_LOWHDACC = 11
DEV_PCIACC = 12
DEV_VIDEODRV = 13
MF_WAITEVWTO = 23
MF_CDAUDIO = 24
CDA_PLAY = 1
CDA_GETPLIST = 2
CDA_STOP = 3
MF_SB16M1 = 25
SB_SETMAINVOL = 1
SB_SETCDVOL = 2
MF_GETDEVPREF = 26
DEV_GETTICKS = 9
MF_SOUNDPROPS = 27
MF_SB16M2 = 28
MF_GETDATE = 29
MF_HDREADFILE = 30
MF_HDSTARTPRG = 31
MF_RDDELFILE = 32
MF_RDWRITEFILE = 33
MF_RDREADDIR = 34
MF_GETPIXEL = 35
MF_MOUSEINFO = 37
MI_SCREENCRD = 0
MI_CLIENTCRD = 1
MI_BUTTONS = 2
MB_NONE = 0
MB_LEFT = 1
MB_RIGHT = 2
MB_BOTH = 3
MF_DRAWLINE = 38
MF_GETBKGND = 39
GB_SIZE = 1
GB_PIXEL = 2
GB_STYLE = 4
MF_SETEVMASK = 40
MF_GETIRQOWNER = 41
MF_GETIRQDATA = 42
MF_PORTIO = 43
MF_SETIRQTABLE = 44
MF_MANAGEIRQS = 45
IRQ_RESERVE = 0
IRQ_RELEASE = 1
MF_MANAGEPORTS = 46
PORT_RESERVE = 0
PORT_RELEASE = 1
MF_DRAWNUMBER = 47
DN_NUMBER = $00000000
DN_POINTER = $00000001
DN_DEC = $00000000
DN_HEX = $00000100
DN_BIN = $00000200
MF_WINPROPS = 48
WP_REDRAW = 0
WPR_DESKTOP = 0
WP_SETBTNSTYLE = 1
BS_FLAT = 0
BS_3D = 1
WP_SETSYSCLRS = 2
WP_GETSYSCLRS = 3
WP_GETSKINH = 4
MF_WINFREEFORM = 50
FF_SETSHAPE = 0
FF_SETSCALE = 1
MF_THREAD = 51
TH_CREATE = 1
MF_STACK = 52
MF_SOCKET = 53
MF_SOUND = 55
SND_LOADBLOCK = 0
SND_PLAYBLOCK = 1
SND_SETFORMAT = 2
SF_SETLENGTH = 1
MF_HDWRITEFILE = 56
MF_HDDELFILE = 57
MF_FSACCESS = 58
FS_READ = 0
FS_WRITE = 1
FS_DELETE = 2
FS_APPEND = 3
FS_LBAREAD = 8
FS_LBAWRITE = 9
FS_EXECUTE = 16
MF_SYSTRACE = 59
ST_GETEVENTS = 0
MF_IPC = 60
IPC_SETAREA = 1
IPC_SENDMSG = 2
MF_GRAPHPROPS = 61
GP_PERMIT = 1
GP_GETBPP = 2
GP_GETBPS = 3
MF_PCI = 62
MF_DEBUGBRD = 63
DBG_WRITE = 1
DBG_READ = 2
MF_MEMRESIZE = 64
MR_SETSIZE = 1
MF_UTF = 65
MF_KEYBMODE = 66
KM_SETMODE = 1
KM_GETMODE = 2
 
;------------------------------------------------------------------------------
;///// ERROR CODES ////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
ERR_SUCCESS = 0
 
ERR_FS_FIRST = 1
ERR_FS_LAST = 6
 
ERR_IRQ_NODATA = 1
ERR_IRQ_BADOWNER = 2
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/mf-copy.inc
0,0 → 1,204
;------------------------------------------------------------------------------
;///// COPYING ////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func copy_file
pushad
 
cmp [active_panel],0
jne ._00
push f_path0
push [f_plen0]
mov eax,[d_lpos]
shl eax,4
add eax,lstart
push eax
mov esi,f_path1
mov eax,[f_plen1]
jmp @f
._00:
push f_path1
push [f_plen1]
mov eax,[d_rpos]
shl eax,4
add eax,rstart
push eax
mov esi,f_path0
mov eax,[f_plen0]
@@:
mov ebx,[esp]
test byte[ebx+11],FA_FOLDER
jz @f
add esp,3*4
stc
jmp .close
@@:
mov edi,fc_info.path
call get_normal_path
mov eax,[len]
mov byte[edi+eax-1],'/'
mov [fc_len2],eax
 
pop esi
call get_file_info
mov eax,[f_size]
mov [fc_size],eax
 
pop eax
pop esi
mov edi,f_info.path
call get_normal_path
mov eax,[len]
mov byte[edi+eax-1],'/'
mov [fc_len1],eax
 
jmp .redraw_copy
 
.redraw:
call draw_window_full
.redraw_copy:
call draw_window_copy_main
.still:
mcall MF_WAITEVENT
jmpe al,.still,\
EV_REDRAW,.redraw,\
EV_KEY,.key,\
EV_BUTTON,.button
 
.key:
mcall MF_GETKEY
 
jmpe ah,.still,\
VK_ESCAPE,._close,\
VK_RETURN,.copy
 
.button:
jmp .still
 
.copy:
mov ecx,[fc_size]
shr ecx,9
inc ecx
push ecx
shl ecx,9
add ecx,MEM_USED
mcall MF_MEMRESIZE,MR_SETSIZE
or eax,eax
jnz .close
 
mov edi,file_info
mov al,' '
mov ecx,13
repne scasb
sub ecx,12
neg ecx
push ecx
mov esi,file_info
mov edi,f_info.path
add edi,[fc_len1]
rep movsb
mov byte[edi],0
pop ecx
mov esi,file_info
mov edi,fc_info.path
add edi,[fc_len2]
rep movsb
mov byte[edi],0
 
xor eax,eax ; FS_READ
mov [f_info],eax
mov [f_info+4],eax
pop eax
mov [f_info+8],eax
mov dword[f_info+12],MEM_USED
mcall MF_FSACCESS,f_info
mov eax,[fc_size]
mov [fc_info+8],eax
mcall MF_FSACCESS,fc_info
 
mcall MF_MEMRESIZE,MR_SETSIZE,MEM_USED
._close:
clc
.close:
popad
ret
endf
 
;------------------------------------------------------------------------------
 
func draw_window_copy_main
mcall2 MF_FILLRECT,oX+tW*2,tW*76,oY+tH*7,tH*8,0x00C0C0C0
 
mmov esi,oX+tW*4+2,oX+tW*75+3
mmov edi,oY+tH*8+3,oY+tH*13+5
xor edx,edx
call draw_frame
mmov esi,oX+tW*4+4,oX+tW*75+1
mmov edi,oY+tH*8+5,oY+tH*13+3
call draw_frame
 
mcall2 MF_DRAWLINE,oX+tW*4+4,oX+tW*75+1,oY+tH*11+3,oY+tH*11+3,0
 
mcall2 MF_FILLRECT,oX+tW*40-(sz_copy.size-2)*tW/2-tW,sz_copy.size*tW,\
oY+tH*8+3,3,0x00C0C0C0
mcall1 MF_DRAWTEXT,oX+tW*40-(sz_copy.size-2)*tW/2,oY+tH*8,\
0x00000000,sz_copy,sz_copy.size-2
 
mcall1 ,oX+tW*6,oY+tH*9,,,sz_copy.size
 
mov edi,file_info
mov al,' '
mov ecx,13
repne scasb
 
madd ebx,(sz_copy.size)*tW,0
mov esi,ecx
sub esi,12
neg esi
mcall MF_DRAWTEXT,,,file_info
imul esi,tW
shl esi,16
add ebx,esi
mcall ,,,sz_copyto,sz_copyto.size
 
call draw_copy_input
 
ret
endf
 
;------------------------------------------------------------------------------
 
func draw_copy_input
mcall2 MF_FILLRECT,oX+tW*6,tW*68,oY+tH*10,tH,0x00008080
 
mov edx,fc_info.path
mov esi,[fc_len2]
cmp esi,68
jb @f
sub esi,68
lea edx,[edx+esi+1]
mov esi,67
@@:
mcall1 MF_DRAWTEXT,oX+tW*6,oY+tH*10+1,0x00000000
ret
endf
 
;------------------------------------------------------------------------------
 
;fc_pst db 0
;fc_cur db 0
 
align 4
 
fc_size dd ?
fc_len1 dd 0
fc_len2 dd 0
 
fc_info:
dd 1
dd 0
dd ?
dd MEM_USED
dd MEM_FOR_OS
.path:
rb 200
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/mf-lang.inc
0,0 → 1,39
;------------------------------------------------------------------------------
;///// LOCALIZED STRINGS //////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
lsz lname,\
ru,'ˆ¬ï',\
en,'Name',\
fr,'Nom',\
ge,'Name'
lsz sort_kind,\
ru,'¨à',\
en,'nx',\
fr,'ne',\
ge,'ne'
lsz btmkeys,\
ru,'®¬®éì ®«ì§Œ à®á¬ ¥¤ ªâ Š®¯¨à ',\
ru,'¥à¥­  ¯ª  “¤ «¥­ Š®­äŒ­ ‚ë室',\
en,'Help UserMn View Edit Copy ',\
en,'RenMov MkFold Delete ConfMn Quit',\
fr,'Aide UserMn Vue Editer Copier ',\
fr,'RenDep CrÎeRp Efface ConfMn Quitter',\
ge,'Hilfe Menà Anzeig Bearb. Kopie ',\
ge,'UmbBew MkDir LÂsche Funkt. Ende'
lsz sz_cancel,\
ru,'Žâ¬¥­ ',\
en,'Cancel',\
fr,'Annuler',\
ge,'Beenden'
;---------- COPY DIALOG ----------
lsz sz_copy,\
ru,'Š®¯¨à®¢ âì "',\
en,'Copy "',\
fr,'Copier "',\
ge,'Kopiere "'
lsz sz_copyto,\
ru,'" ¢:',\
en,'" to:',\
fr,'" vers:',\
ge,'" nach:'
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/mf-sort.inc
0,0 → 1,140
;------------------------------------------------------------------------------
;///// SORTING ////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
r_sort db 1
l_sort db 1
 
align 4
compare_table:
dd compare_by_name
dd compare_by_extension
 
; AL = panel
func mfar_sort
pusha
cmp al,0
jne ._00
mov eax,[d_lcnt]
mov edi,lstart
movzx edx,[l_sort]
jmp @f
._00:
mov eax,[d_rcnt]
mov edi,rstart
movzx edx,[r_sort]
@@:
mov edx,[edx*4+compare_table]
cmp eax,2
jbe .exit
dec eax
shl eax,4
add eax,edi
cmp word[edi],'..'
jne @f
add edi,16
@@:
push edi
mov esi,edi
add edi,16
.next_file:
call edx
add edi,16
cmp edi,eax
jbe .next_file
 
mov ebx,12
@@:
mov ecx,[ebx+eax]
xchg [ebx+esi],ecx
mov [ebx+eax],ecx
sub ebx,4
jge @b
 
mov esi,[esp]
mov edi,esi
add edi,16
 
sub eax,16
cmp eax,edi
jge .next_file
pop edi
 
.exit:
popad
ret
endf
 
;------------------------------------------------------------------------------
 
; ESI = pointer to 1st file info
; EDI = pointer to 2nd file info
func compare_by_name
mov ecx,11
push edi esi
repe cmpsb
pop esi edi
pushfd
test byte[esi+11],FA_FOLDER
jnz ._00
test byte[edi+11],FA_FOLDER
jz ._01
jmp ._03
._00:
test byte[edi+11],FA_FOLDER
jz ._02
._01:
popfd
jg ._04
mov esi,edi
ret
._02:
popfd
mov esi,edi
ret
._03:
popfd
._04:
ret
endf
 
;------------------------------------------------------------------------------
 
; ESI = pointer to 1st file info
; EDI = pointer to 2nd file info
func compare_by_extension
push edi esi
mov ecx,3
add esi,8
add edi,8
repe cmpsb
jne ._00
mov esi,[esp]
mov edi,[esp+4]
mov ecx,8
repe cmpsb
._00:
pop esi edi
pushfd
test byte[esi+11],FA_FOLDER
jnz ._01
test byte[edi+11],FA_FOLDER
jz ._02
jmp ._04
._01:
test byte[edi+11],FA_FOLDER
jz ._03
._02:
popfd
jg ._05
mov esi,edi
ret
._03:
popfd
mov esi,edi
ret
._04:
popfd
._05:
ret
endf
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/mfar.asm
0,0 → 1,1181
 
; MENUET FAR [MFAR] PRE-ALPHA-8.1
; 2003-2004 (C) Mike Semenyako aka mike.dld
; Compile with FASM for Menuet
 
use32
org 0
 
db 'MENUET01' ; 8 byte id
dd $01 ; header version
dd START ; start of code
dd I_END ; size of image
dd MEM_USED ; memory for app
dd $007FF0 ; esp
dd $00,$00 ; I_Param , I_Icon
 
;
; START:SIZE
;
; +00000000:00007FF0 - image
; +00007FF0:00007FF0 - stack
; +00008000:00000300 - path strings buffer
; +00008300:0003FD00 - files data
; +00048000:00000300 - temporary file read area
; +00048300:00004000 - memory for OS (read/write buffer)
; +0004C300:FFFB3CFF - dinamically allocated for copy, view, edit etc.
;
 
include 'lang.inc'
include 'macros.inc'
include 'menuet.inc'
include 'mfar.inc'
 
START:
 
mcall MF_RDREADFILE,fcfile,0,-1,fc ; read user colors
 
mov esi,p_rd ; left panel = RD
mov edi,f_path0
mov ecx,p_rd.size
rep movsb
mov esi,p_hd ; right panel = HD
mov edi,f_path1
mov ecx,p_hd.size
rep movsb
 
redraw_all:
call draw_window_full
jmp still
redraw_files:
call draw_files
still:
mcall MF_WAITEVWTO,100 ; waiting 1 sec
jmpe al,,\
EV_REDRAW,redraw_all,\
EV_KEY,key,\
EV_BUTTON,button
 
; after every 1 second [when no other events occur] updating files info
; eg. requesting ACTIVE panel files data and drawing it
;; timed redraw {
mov dl,[active_panel]
cmp dl,0
jne ._00
push [d_ltsz]
jmp @f
._00:
push [d_rtsz]
@@:
call get_files_data
pop eax
cmp dl,0
jne ._01
cmp eax,[d_ltsz]
jmp @f
._01:
cmp eax,[d_rtsz]
@@:
je still ; nothing happened, waiting again
mov al,dl
jmp redraw_files
;; }
 
; key pressed event
key:
mcall MF_GETKEY ; get key-code
 
movzx ecx,[active_panel]
 
jmpe ah,k_directional,\
VK_RETURN,k_return,\ ; execute something
VK_TAB,k_tab,\ ; change active panel
VK_F5,k_f5,\ ; copy
VK_F10,mfar_exit,\ ; terminate
VK_CTRLF3,k_ctrl_f3,\ ; sort by name
VK_CTRLF4,k_ctrl_f4 ; sort by extension
;------------------------------------------------------------------------------
k_return:
call execute_current_file
jmp still
;------------------------------------------------------------------------------
k_tab:
mov edi,[fc.background]
call draw_sel ; hide current file selection
xor [active_panel],1 ; changing active panel
call draw_path ; drawing path of new panel
mov dl,[active_panel]
call get_files_data ; requesting panel files info
mov edi,sel_color
call draw_sel ; show current file
mov al,[active_panel]
call draw_file_info ; and its info (size,date)
jmp still
;------------------------------------------------------------------------------
k_f5:
call copy_file
jc still
jmp redraw_all
;------------------------------------------------------------------------------
k_ctrl_f3:
jecxz ._00
cmp [r_sort],0
je still
mov [r_sort],0
jmp @f
._00:
cmp [l_sort],0
je still
mov [l_sort],0
@@:
mov al,cl
call mfar_sort
jmp redraw_files
;------------------------------------------------------------------------------
k_ctrl_f4:
jecxz ._00
cmp [r_sort],1
je still
mov [r_sort],1
jmp @f
._00:
cmp [l_sort],1
je still
mov [l_sort],1
@@:
mov al,al
call mfar_sort
jmp redraw_files
;------------------------------------------------------------------------------
k_directional:
cmp ah,VK_LEFT ; non-directional keys ?
jb still ; ignore them
cmp ah,VK_END
ja still
jecxz ._00
mov edx,[d_rpos]
mov ebx,[d_rtop]
mov esi,[d_rcnt]
jmp @f
._00:
mov edx,[d_lpos]
mov ebx,[d_ltop]
mov esi,[d_lcnt]
@@:
xor ebp,ebp ; redraw whole panel [0-no, 1-yes]
;------------------------------------------------------------------------------
jmpe ah,show_cur,\
VK_LEFT,k_left,\
VK_DOWN,k_down,\
VK_UP,k_up,\
VK_RIGHT,k_right,\
VK_HOME,k_home,\
VK_END,k_end
k_left:
cmp edx,0
je still
sub edx,FPC
jge @f
xor edx,edx
@@:
mov eax,edx
sub eax,ebx
jge show_cur
inc ebp
sub ebx,FPC
jge show_cur
xor ebx,ebx
jmp show_cur
;------------------------------------------------------------------------------
k_down:
lea eax,[esi-1]
cmp edx,eax
je still
inc edx
mov eax,edx
sub eax,ebx
cmp eax,FPC*3-1
jle show_cur
inc ebp
inc ebx
jmp show_cur
;------------------------------------------------------------------------------
k_up:
cmp edx,0
je still
dec edx
mov eax,ebx
cmp edx,eax
jge show_cur
inc ebp
dec ebx
jmp show_cur
;------------------------------------------------------------------------------
k_right:
lea eax,[esi-1]
cmp edx,eax
je still
add edx,FPC
cmp edx,eax
jle @f
mov edx,eax
@@:
mov eax,edx
sub eax,ebx
cmp eax,FPC*3-1
jle show_cur
inc ebp
add ebx,FPC
jmp show_cur
;------------------------------------------------------------------------------
k_home:
cmp edx,0
je still
inc ebp
xor edx,edx
xor ebx,ebx
jmp show_cur
;------------------------------------------------------------------------------
k_end:
lea eax,[esi-1]
cmp edx,eax
je still
mov edx,eax
mov edi,eax
sub edi,ebx
cmp edi,FPC*3-1
jle show_cur
inc ebp
sub eax,FPC*3-1
mov ebx,eax
;------------------------------------------------------------------------------
 
show_cur:
 
mov edi,[fc.background]
call draw_sel
 
jecxz ._00
mov [d_rpos],edx
mov [d_rtop],ebx
jmp @f
._00:
mov [d_lpos],edx
mov [d_ltop],ebx
@@:
 
cmp ebp,0
mov al,cl
jne redraw_files
 
mov edi,[fc.selection]
call draw_sel
call draw_file_info
jmp still
 
button:
mcall MF_GETPRSDBTNID
cmp ah,1
jne noclose
 
mfar_exit:
mcall MF_RDDELFILE,fcfile ; delete existing mfar.dat
mcall MF_RDWRITEFILE,fcfile,fc,12*4,0 ; create new mfar.dat
 
mcall MF_TERMINATE ; close program
noclose:
jmp still
 
;------------------------------------------------------------------------------
;///// DRAW WINDOW ////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func draw_window
mcall MF_WINPROPS,WP_GETSYSCLRS,sc,sizeof.system_colors
 
mcall MF_WNDDRAW,WD_BEGINDRAW
mov edx,[fc.background]
or edx,WS_SKINNED
mcall2 MF_DEFWINDOW,90,oX+tW*80+4,45,oY+tH*25+4
mcall1 MF_DRAWTEXT,8,8,[sc.grab_text],caption,caption.size
 
mmov esi,oX+2,oX+tW*39+2
mmov edi,oY+3,oY+tH*22+3
mov edx,[fc.default]
call draw_frame
mmov esi,oX+tW*40+2,oX+tW*79+2
call draw_frame
 
mcall2 MF_DRAWLINE,oX+tW*13+2,oX+tW*13+2,oY+tH,oY+tH*20+3
madd ebx,tW*13,tW*13
mcall
mcall2 ,oX+3,oX+tW*39+1,oY+tH*20+3,oY+tH*20+3
mcall2 ,oX+tW*53+2,oX+tW*53+2,oY+tH,oY+tH*20+3
madd ebx,tW*13,tW*13
mcall
mcall2 ,oX+tW*40+3,oX+tW*79+1,oY+tH*20+3,oY+tH*20+3
 
mcall1 MF_DRAWTEXT,oX+tW*5,oY+tH,$00ffff00,lname,lname.size
mcall1 ,oX+tW*18,oY+tH
mcall1 ,oX+tW*31,oY+tH
mcall1 ,oX+tW*45,oY+tH
mcall1 ,oX+tW*58,oY+tH
mcall1 ,oX+tW*71,oY+tH
 
movzx edi,[l_sort]
lea edx,[edi+sort_kind]
mcall1 ,oX+tW,oY+tH,$00ffff00,,1
movzx edi,[r_sort]
lea edx,[edi+sort_kind]
mcall1 ,oX+tW*41,oY+tH
 
call draw_path
call draw_bottom_keys
 
mcall MF_WNDDRAW,WD_ENDDRAW
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func draw_window_full
call draw_window
mov edx,1
call get_files_data
mov al,1
call draw_files
mov edx,0
call get_files_data
mov al,0
call draw_files
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
align 4
len dd ?
 
func get_normal_path
pusha
mov ecx,5
rep movsb
dec esi
dec edi
mov ecx,5
push eax
@@:
dec dword[esp]
jz @f
lodsb
cmp al,0
je @b
cmp al,' '
je @b
stosb
inc ecx
jmp @b
@@:
pop eax
mov byte[edi],'>'
mov [len],ecx
popa
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; EAX = length needed
; ECX = current length
; EDI = path string
func get_path_ellipses
cmp ecx,eax
jbe @f
pushad
lea esi,[edi+ecx+3+6] ; ... + /??/?/
sub esi,eax
add ecx,edi
sub ecx,esi
mov dword[edi+6],'... '
add edi,9
cld
rep movsb
mov [len],eax
popad
@@:
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func draw_path
pushad
cmp [active_panel],0
jne ._00
mov esi,f_path0
mov eax,[f_plen0]
jmp @f
._00:
mov esi,f_path1
mov eax,[f_plen1]
@@:
mov edi,f_pathn
call get_normal_path
mov eax,39
mov ecx,[len]
mov edi,f_pathn
call get_path_ellipses
mcall2 MF_FILLRECT,oX-1,tW*80+1,oY+tH*23-1,tH,[fc.pathbg]
mcall1 MF_DRAWTEXT,oX,oY+tH*23,[fc.path],f_pathn,[len]
popad
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; AL = panel
func draw_files
push eax
mmov ecx,oY+tH*2-1,tH*FPC
mov edx,[fc.background]
cmp al,0
mov eax,MF_FILLRECT
jne ._00
mcall1 ,oX+tW-2,tW*12+3
mcall1 ,oX+tW*14-2,tW*12+3
mcall1 ,oX+tW*27-2,tW*12+3
mmov ebx,oX+tW,oY+tH*2
mov edx,[d_ltop]
shl edx,4
add edx,lstart
mov edi,[d_lcnt]
mov esi,edi
sub edi,[d_ltop]
jmp @f
._00:
mcall1 ,oX+tW*41-2,tW*12+3
mcall1 ,oX+tW*54-2,tW*12+3
mcall1 ,oX+tW*67-2,tW*12+3
mmov ebx,oX+tW*41,oY+tH*2
mov edx,[d_rtop]
shl edx,4
add edx,rstart
mov edi,[d_rcnt]
mov esi,edi
sub edi,[d_rtop]
@@:
cmp esi,0
je .exit_nok ; no files
 
mov ecx,3
.next_col:
push ecx
mov ecx,FPC
.next_row:
dec edi
jge @f
pop eax
jmp .exit_ok
@@:
push ecx
call get_file_color
mov esi,edx
call get_file_name
push edx
mcall 4,,,f_name,12 ; draw file name
pop edx ecx
add ebx,tH
 
add edx,16
dec ecx
jnz .next_row
pop ecx
dec ecx
jz .exit_ok
madd ebx,tW*13,0
mov bx,oY+tH*2
jmp .next_col
 
.exit_ok:
mov edi,sel_color
call draw_sel
.exit_nok:
pop eax
call draw_file_info
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func draw_bottom_keys
pushad
mcall2 MF_FILLRECT,oX-1,tW*80+1,oY+tH*24-1,tH+1,[fc.pathbg]
dec ecx
mcall1 ,oX+tW-1,tW*6+1,,[fc.keysbg]
mov esi,7
@@:
madd ebx,tW*8,0
mcall
dec esi
jge @b
mcall1 ,oX+tW*73-1,tW*7+1
mcall MF_DRAWNUMBER,$00010100,1,oX*65536+(oY+tH*24),[fc.path]
sub edx,$00010000
@@:
inc cl
madd edx,tW*8,0
mcall
cmp cl,10
jb @b
mcall1 MF_DRAWTEXT,oX+tW,oY+tH*24,[fc.keys],btmkeys,btmkeys.size
popad
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; ESI = X1*65536+X2
; EDI = Y1*65536+Y2
; EDX = color
func draw_frame
mov ecx,edi
mov ebx,edi
shr ebx,16
mov cx,bx
mcall MF_DRAWLINE,esi
mov ecx,edi
shl ecx,16
mov cx,di
mcall
mov ebx,esi
mov ecx,esi
shr ecx,16
mov bx,cx
mcall ,,edi
mov ebx,esi
shl ebx,16
mov bx,si
mcall
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; EDX = pointer to file data
func get_file_color
push esi
mov cl,[edx+11]
test cl,(FA_HIDDEN or FA_SYSTEM)
jz @f
mov ecx,[fc.system]
jmp .exit
@@:
test cl,FA_FOLDER
jz @f
mov ecx,[fc.folder]
jmp .exit
@@:
mov ecx,[edx+7]
and ecx,$ffffff00
or ecx,$00000020
 
mov esi,ext0-4
@@:
lodsd
or eax,eax
jz @f
cmp ecx,eax
jne @b
mov ecx,[fc.executable]
jmp .exit
@@:
lodsd
or eax,eax
jz @f
cmp ecx,eax
jne @b
mov ecx,[fc.bitmap]
jmp .exit
@@:
lodsd
or eax,eax
je @f
cmp ecx,eax
jne @b
mov ecx,[fc.source]
jmp .exit
@@:
mov ecx,[fc.default]
.exit:
pop esi
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; EDI = color
func draw_sel
pushad
cmp [active_panel],0
jne ._00
mov eax,[d_lpos]
sub eax,[d_ltop]
mov esi,[d_lcnt]
jmp @f
._00:
mov eax,[d_rpos]
sub eax,[d_rtop]
mov esi,[d_rcnt]
@@:
cmp esi,0
je .exit
mov cl,FPC
div cl
mov bp,ax
and eax,$000000FF
mov cl,tW*13
mul cl
add ax,oX+tW-2
push eax
shl eax,16
mov ax,tW*12+3
mov ebx,eax
mov ax,bp
shr eax,8
and eax,$000000FF
mov cl,tH
mul cl
add ax,oY+tH*2-1
push eax
shl eax,16
mov ax,tH
mov ecx,eax
mov edx,edi
cmp [active_panel],0
je @f
madd ebx,(40*6),0
@@:
mcall MF_FILLRECT
 
pop eax
movzx ebx,ax
inc bx
pop eax
add ax,2
shl eax,16
or ebx,eax
cmp [active_panel],0
jne ._01
mov edx,[d_lpos]
shl edx,4
add edx,lstart
jmp @f
._01:
mov edx,[d_rpos]
shl edx,4
add edx,rstart
@@:
mov esi,edx
call get_file_name
call get_file_color
cmp ecx,edi
jne @f
xor ecx,ecx
@@:
cmp [active_panel],0
je @f
madd ebx,tW*40,0
@@:
mcall MF_DRAWTEXT,,,f_name,12
.exit:
popad
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; AL = panel
func draw_file_info
push eax
mmov ecx,oY+tH*21,tH
mov edx,[fc.background]
cmp al,0
mov eax,MF_FILLRECT
jne ._00
mcall1 ,oX+tW,tW*38+1
mov esi,[d_lpos]
shl esi,4
add esi,lstart
mov edi,[d_lcnt]
jmp @f
._00:
mcall1 ,oX+tW*41,tW*38+1
mov esi,[d_rpos]
shl esi,4
add esi,rstart
mov edi,[d_rcnt]
@@:
cmp edi,0
jne @f
pop eax
ret
@@:
call get_file_info
mov dword[file_info+17],' '
mov word[file_info+15],' '
test byte[esi+11],FA_FOLDER
jz @f
mov dword[file_info+21],' DIR'
jmp .no_size
@@:
mov dword[file_info+21],' '
mov eax,[f_size]
mov esi,file_info+24
mov ebx,10
mov ecx,ebx
@@:
xor edx,edx
div ebx
add dl,'0'
mov [esi],dl
or eax,eax
jz .no_size
dec esi
loop @b
.no_size:
pop eax
mmov edx,oX+tW*35,oY+tH*21
mmov ebx,oX+tW,oY+tH*21
cmp al,0
je @f
madd edx,tW*40,0
madd ebx,tW*40,0
@@:
push edx
mcall MF_DRAWTEXT,,[fc.default],file_info,34
pop edx
mov esi,ecx
mov cx,[f_year]
mcall MF_DRAWNUMBER,$00040000
sub edx,$00240000 ; 6*6 = $24
movzx ecx,[f_day]
mcall ,$00020000
add edx,$00120000
mov cl,[f_mnth]
mcall
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func get_file_name
pushad
mov eax,[esi+0]
mov [f_name+0],eax
mov eax,[esi+4]
mov [f_name+4],eax
mov eax,[esi+8]
shl eax,8
and eax,$FFFFFF00
or al,$00000020
mov [f_name+8],eax
popad
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; ESI = pointer to file data
func get_file_info
pushad
mov eax,[esi+12]
mov dword[f_info],FS_READ
mov [f_info+4],eax
mov dword[f_info+12],read_area
mcall MF_FSACCESS,f_info
cmp eax,ERR_SUCCESS
je @f
cmp eax,ERR_FS_LAST
ja @f
popad
stc
ret
@@:
mov eax,read_area
mov ecx,16
.next_file:
mov edx,[esi+0]
cmp [eax+0],edx
jne @f
mov edx,[esi+4]
cmp [eax+4],edx
jne @f
mov edx,[esi+8]
cmp [eax+8],edx
jne @f
mov esi,eax
jmp .found
@@:
add eax,32
loop .next_file
.found:
push esi
mov eax,' '
mov ecx,3
mov edi,file_info
rep stosd
mov edi,file_info
mov ecx,2
rep movsd
mov edi,file_info
@@:
cmp byte[edi],' '
jbe @f
inc edi
jmp @b
@@:
mov eax,[esi]
shl eax,8
mov al,'.'
cmp eax,'. '
je @f
mov [edi],eax
@@:
pop esi
mov eax,[esi+28]
mov [f_size],eax
mov eax,[esi+24]
mov [f_day],al
and [f_day],00011111b
shr eax,5
mov [f_mnth],al
and [f_mnth],00001111b
shr eax,4
mov [f_year],ax
and [f_year],01111111b
add [f_year],1980
popad
clc
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
; DL = panel
func get_files_data
pushad
mov [d_tcnt],0
mov [d_ttsz],0
cmp dl,0
jne ._00
mov esi,f_path0
mov ecx,[f_plen0]
jmp @f
._00:
mov esi,f_path1
mov ecx,[f_plen1]
@@:
push edi
mov edi,f_info.path
mov byte[edi+ecx],0
rep movsb
pop edi
cmp dl,0
jne ._01
mov edi,lstart
jmp @f
._01:
mov edi,rstart
@@:
push edx
xor ebp,ebp
mov dword[f_info],FS_READ ; read
mov dword[f_info+8],1 ; 1 block
mov dword[f_info+12],read_area ; to read_area
.next_block:
mov dword[f_info+4],ebp ; starting from block #ebp
mcall MF_FSACCESS,f_info
cmp eax,ERR_SUCCESS
je @f
cmp eax,ERR_FS_LAST
ja @f
jmp .exit
@@:
mov esi,read_area
mov ecx,16
.next_file:
cmp word[esi],0 ; end of entries
je .exit
cmp word[esi],'. ' ; self-pointer
je .skip
test byte[esi+11],FA_LABEL ; disk label
jnz .skip
cmp byte[esi+11],$0F ; fat32
je .skip
cmp byte[esi],$E5 ; erased
je .skip
mov eax,[esi+28] ; add file size
add [d_ttsz],eax ; to folder size
push ecx
mov ecx,3
rep movsd ; copy name, attriputes
mov [edi],ebp ; and block number
add edi,4
add esi,20
inc [d_tcnt] ; increase folder files counter
; cmp [d_tcnt],max_cnt
; je .exit
pop ecx
jmp @f
.skip:
add esi,32
@@:
loop .next_file
 
cmp [d_tcnt],max_cnt
je .exit
inc ebp
jmp .next_block
.exit:
pop edx
push [d_ttsz]
mov eax,[d_tcnt]
cmp dl,0
jne ._02
mov [d_lcnt],eax
pop [d_ltsz]
jmp @f
._02:
mov [d_rcnt],eax
pop [d_rtsz]
@@:
popad
mov al,dl
call mfar_sort
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func execute_current_file
pushad
cmp [active_panel],0
jne ._00
mov esi,[d_lpos]
shl esi,4
add esi,lstart
mov edi,f_path0
mov ecx,f_plen0
jmp @f
._00:
mov esi,[d_rpos]
shl esi,4
add esi,rstart
mov edi,f_path1
mov ecx,f_plen1
@@:
call get_file_info
test byte[esi+11],FA_FOLDER
jz .file
cmp word[esi],'..'
jne .enter_dir
add edi,[ecx]
dec edi
@@:
dec [f_plen1]
cmp byte[edi],'/'
je @f
dec edi
jmp @b
@@:
mov dword[edi],0
jmp @f
.enter_dir:
add edi,[ecx]
push ecx edi
mov byte[edi],'/'
inc edi
mov esi,file_info
mov ecx,3
cld
rep movsd
mov dword[edi],0
pop esi ecx
sub edi,esi
add dword[ecx],edi
mov [d_rpos],0
mov [d_rtop],0
@@:
mov dl,[active_panel]
call get_files_data
call draw_path
mov al,dl
call draw_files
jmp .exit
.file:
mov eax,[esi+8]
shl eax,8
and eax,$FFFFFF00
or eax,$00000020
cmp eax,' '
jne .exit
 
mov esi,edi
mov eax,[ecx]
mov edi,f_pathn
call get_normal_path
mov esi,f_pathn
mov ecx,[len]
dec ecx
mov edi,f_info.path
rep movsb
mov byte[edi],'/'
inc edi
mov esi,file_info
@@:
movsb
cmp byte[esi],0
je @f
cmp byte[esi],' '
jne @b
@@:
mov byte[edi],0
mov dword[f_info],FS_EXECUTE
mov dword[f_info+12],0
mcall MF_FSACCESS,f_info
.exit:
popad
ret
endf
 
;------------------------------------------------------------------------------
;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
func delete_current_file
pushad
popad
ret
endf
 
;------------------------------------------------------------------------------
;///// INCLUDES ///////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
include 'mf-copy.inc'
include 'mf-sort.inc'
 
;------------------------------------------------------------------------------
;///// DATA ///////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
align 4
 
f_size dd ?
f_day db ?
f_mnth db ?
f_year dw ?
 
d_lpos dd 0
d_ltop dd 0
d_lcnt dd 0
d_ltsz dd 0
d_rpos dd 0
d_rtop dd 0
d_rcnt dd 0
d_rtsz dd 0
d_tpos dd ?
d_ttop dd ?
d_tcnt dd ?
d_ttsz dd ?
 
f_info:
dd 0
dd 0
dd ?
dd read_area
dd MEM_FOR_OS
.path:
rb 200
 
f_plen0 dd 5
f_plen1 dd 5
 
sz caption,'MFAR : PRE-ALPHA-8.1'
sz fcfile,'MFAR DAT'
sz p_hd,'/HD/1',0
sz p_rd,'/RD/1',0
ext0:
db ' EXE COM BAT CMD'
dd 0
ext1:
db ' BMP GIF JPG PNG WMF'
dd 0
ext2:
db ' ASM INC'
dd 0
 
;----- LANGUAGE-SPECIFIC STRINGS -----
include 'mf-lang.inc'
;-------------------------------------
 
f_name: rb 12
file_info: db ' . .'
active_panel db 0
;---------------------------------
 
sel_color = $00008080
 
FPC = 18
 
MEM_FOR_OS = $48300
MEM_USED = $4C300
read_area = $48000
fdata_size = $40000-$300
max_cnt = fdata_size/32
lstart = $8000+$300
rstart = lstart+max_cnt*16
 
f_path0 = $8000
f_path1 = $8000+$100
f_pathn = $8000+$200
 
align 4
 
sc system_colors
fc mfar_colors
 
I_END:
; 16 bytes per entry:
; -> 8 bytes - name
; -> 3 bytes - extension
; -> 1 byte - attributes
; -> 4 bytes - block number
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/mfar.inc
0,0 → 1,147
oX = 6
oY = 22+3
tW = 6
tH = 9
 
VK_TAB = 9
VK_RETURN = 13
VK_ESCAPE = 27
VK_F10 = 49
VK_F5 = 54
VK_LEFT = 176
VK_DOWN = 177
VK_UP = 178
VK_RIGHT = 179
VK_HOME = 180
VK_END = 181
VK_PGDOWN = 183
VK_PGUP = 184
 
VK_CTRLF3 = 212
VK_CTRLF4 = 213
 
FA_READONLY = 00000001b
FA_HIDDEN = 00000010b
FA_SYSTEM = 00000100b
FA_LABEL = 00001000b
FA_FOLDER = 00010000b
FA_ARCHIVED = 00100000b
 
struc mfar_colors {
.background dd $00000080
.default dd $0000FFFF
.system dd $00008080
.selection dd $00009090
.folder dd $00FFFFFF
.executable dd $0000FF00
.bitmap dd $00FF00FF
.source dd $00FF0000
.path dd $00C0C0C0
.pathbg dd $00000000
.keys dd $00000000
.keysbg dd $00008080
}
struct mfar_colors
 
macro __mov reg,a {
if ~a eq
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f {
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int $40
}
 
macro mcall1 a,b1,b2,c,d,e,f {
__mov eax,a
if (~b1 eq)|(~b2 eq)
mov ebx,(b1)*65536+(b2)
end if
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int $40
}
 
macro mcall2 a,b1,b2,c1,c2,d,e,f {
__mov eax,a
if (~b1 eq)|(~b2 eq)
mov ebx,(b1)*65536+(b2)
end if
if (~c1 eq)|(~c2 eq)
mov ecx,(c1)*65536+(c2)
end if
__mov edx,d
__mov esi,e
__mov edi,f
int $40
}
 
macro sz name,[data] {
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] {
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
macro mmov reg,a1,a2 {
mov reg,(a1)*65536+a2
}
 
macro madd reg,a1,a2 {
add reg,(a1)*65536+a2
}
 
macro msub reg,a1,a2 {
sub reg,(a1)*65536+a2
}
 
macro jmpe reg,def,[val,lab] {
forward
cmp reg,val
je lab
common
if ~def eq
jmp def
end if
}
 
macro func name {
if used name
label name
}
 
macro endf {
end if
}
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/programs/filemngrs/mfar/trunk/readme.txt
0,0 → 1,80
 
; MFAR pre-alpha 8.1
; 2003-2004 (C) Semenyako Mike a.k.a. mike.dld
; e-mail: mike.dld@tut.by
 
;------------------------------------------------------------------------------
;///// ENGLISH ////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
---[ ATTENTION ]---------------------------------------------------------------
This MFAR version is far from being RELEASE!
So, use it carefully, paying special attention to the new features.
 
---[ ABOUT ]-------------------------------------------------------------------
MFAR was intended as SYSTREE-alternative & at the same time as file-manager
with well-known & handy interface for MenuetOS. It'll be look like FAR
(farmanager.com) which i really like BTW.
 
---[ FEATURES ]----------------------------------------------------------------
- displaying RD (left) & HD (right) file structure
- color highlighting for files (depending on their extensions)
- sotring (by name or extension)
- selected file info: date, size
- MeOS apps execution
 
---[ TODO ]--------------------------------------------------------------------
- copying (moving), deleting files
- disk selection
- other sort types
- not only apps execution
- ...
 
---[ HOTKEYS ]-----------------------------------------------------------------
Up, Down, Left, Right, Home, End - if you worked in any DOS-based file-
manager (NC, VC, DN, ...), even a few minutes, you may know that this
keys direct the caret (light pen)
F5 - copy !FILE! from one panel to another (in development)
F10 - exit program
Ctrl+F3 - sort by name
Ctrl+F4 - sort by extension
 
;------------------------------------------------------------------------------
;///// “‘‘Šˆ‰ ////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
 
---[ ‚­¨¬ ­¨¥ ]----------------------------------------------------------------
âã ¢¥àá¨î MFAR ­¨ª ª ­¥«ì§ï áç¨â âì ५¨§®¬!
à®£à ¬¬  ­ å®¤¨âáï ¢ ࠧࠡ®âª¥ ¨ ï ®ç¥­ì ᮦ «¥î ® ⮬, çâ® ­¥ ¢ ᨫ å
¯®ª  çâ® ¯à¥¤áâ ¢¨âì ‚ ¬ ¯®«­®æ¥­­ë© ä ©«-¬¥­¥¤¦¥à, å®âï ¡ë ¯à¨¡«¨§¨â¥«ì­®
áà ¢­¨¬ë© ¯® ä㭪樮­ «ì­ë¬ ¢®§¬®¦­®áâï¬ á  ­ «®£¨ç­ë¬¨ ¯à®¥ªâ ¬¨ ¯®¤ *nix
¨ *dows.
 
---[ Ž ¯à®£à ¬¬¥ ]-------------------------------------------------------------
MFAR ¡ë« § ¤ã¬ ­ ª ª  «ìâ¥à­ â¨¢  SYSTREE ¨ ®¤­®¢à¥¬¥­­® ª ª ä ©«-¬¥­¥¤¦¥à
á® §­ ª®¬ë¬ ¨ 㤮¡­ë¬ ¨­â¥à䥩ᮬ ¯®¤ MenuetOS. ˆ§ ­ §¢ ­¨ï ¬®¦­® ¤®£ ¤ âìáï,
çâ® ¢­¥è­¨© ¢¨¤ ¯à®£à ¬¬ë ¡ã¤¥â ­¥ ®á®¡® ®â«¨ç âìáï ®â FAR'  (farmanager.com),
®ç¥­ì, ªáâ â¨, ¬­®î «î¡¨¬®£® ¨ 㢠¦ ¥¬®£® ¯à®¥ªâ .
 
---[ —â® ᤥ« ­® ]-------------------------------------------------------------
- ®â®¡à ¦¥­¨¥ ä ©«®¢®© áâàãªâãàë ®¡à §  (á«¥¢ ) ¨ †„ (á¯à ¢ )
- ¯®¤á¢¥âª  ¨¬¥­ ä ©«®¢ à §­ë¬¨ 梥⠬¨ (¢ § ¢¨á¨¬®á⨠®â ä®à¬ â )
- á®àâ¨à®¢ª  (¯® ¨¬¥­¨ ¨«¨ à áè¨à¥­¨î)
- à §¬¥à ¨ ¤ â  ᮧ¤ ­¨ï (¨§¬¥­¥­¨ï) ¤«ï ¢ë¤¥«¥­­®£® ä ©« 
- § ¯ã᪠¨á¯®«­ï¥¬ëå ä ©«®¢
 
---[ —â® å®â¥«®áì ¡ë ᤥ« âì ]-------------------------------------------------
- ª®¯¨à®¢ ­¨¥ (¯¥à¥¬¥é¥­¨¥), 㤠«¥­¨¥ ä ©«®¢
- ¢ë¡®à  ªâ¨¢­®£® ¤¨áª  ¤«ï ¯ ­¥«¥©
- ¤à㣨¥ ¢¨¤ë á®àâ¨à®¢®ª
- § ¯ã᪠­¥ ⮫쪮 ¨á¯®«­ï¥¬ëå ä ©«®¢
- ...
 
---[ ‘®ç¥â ­¨ï ª« ¢¨è ]--------------------------------------------------------
Up, Down, Left, Right, Home, End - ªâ® å®âï ¡ë à § à ¡®â « ¢ „Ž‘®¢áª®¬
ä ©«-¬¥­¥¤¦¥à¥ (NC, VC, DN, ...) §­ ¥â, çâ® á ¯®¬®éìî íâ¨å ª« ¢¨è ¬®¦­®
ã¯à ¢«ïâì ¯®«®¦¥­¨¥¬ ªãàá®à  (ᢥ⮢®£® ¯¥à )
F5 - ª®¯¨à®¢ âì ä ©« ¨§ ®¤­®© ¯ ­¥«¨ ¢ ¤àã£ãî (¢ ࠧࠡ®âª¥)
F10 - ¢ë室 ¨§ ¯à®£à ¬¬ë
Ctrl+F3 - á®àâ¨à®¢ âì ¯® ¨¬¥­¨
Ctrl+F4 - á®àâ¨à®¢ âì ¯® à áè¨à¥­¨î
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property