move programs to /other/outdated folder: copy2, imgview, mv, dictionary

upload correct mfar sources

git-svn-id: svn://kolibrios.org@7649 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2019-05-12 08:52:09 +00:00
parent b831f200eb
commit 0b5dbe568e
44 changed files with 274 additions and 47 deletions

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix en >lang.inc @echo lang fix en >lang.inc
@fasm mfar.asm mfar @fasm mfar.asm mfar
@erase lang.inc
@pause @pause

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix ru >lang.inc @echo lang fix ru >lang.inc
@fasm mfar.asm mfar @fasm mfar.asm mfar
@erase lang.inc
@pause @pause

View File

@ -0,0 +1,227 @@
; 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
}
; language for programs
lang fix ru ; ru en fr ge fi
; 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

View File

@ -137,16 +137,17 @@ MF_SOUND = 55
SND_PLAYBLOCK = 1 SND_PLAYBLOCK = 1
SND_SETFORMAT = 2 SND_SETFORMAT = 2
SF_SETLENGTH = 1 SF_SETLENGTH = 1
MF_HDWRITEFILE = 56 ;MF_HDWRITEFILE = 56
MF_HDDELFILE = 57 ;MF_HDDELFILE = 57
MF_FSACCESS = 58 MF_FSACCESS = 70
FS_READ = 0 FS_READ = 999999
FS_WRITE = 1 FS_READ_FILE = 0
FS_DELETE = 2 FS_READ_FOLDER = 1
FS_WRITE_FILE = 2
FS_APPEND = 3 FS_APPEND = 3
FS_LBAREAD = 8 FS_EXECUTE = 7
FS_LBAWRITE = 9 FS_DELETE = 8
FS_EXECUTE = 16 FS_CREATE_FOL = 9
MF_SYSTRACE = 59 MF_SYSTRACE = 59
ST_GETEVENTS = 0 ST_GETEVENTS = 0
MF_IPC = 60 MF_IPC = 60

View File

@ -2,7 +2,7 @@
;///// COPYING //////////////////////////////////////////////////////////////// ;///// COPYING ////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func copy_file func copy_file
pushad pushad
cmp [active_panel],0 cmp [active_panel],0
@ -126,7 +126,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_window_copy_main func draw_window_copy_main
mcall2 MF_FILLRECT,oX+tW*2,tW*76,oY+tH*7,tH*8,0x00C0C0C0 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 esi,oX+tW*4+2,oX+tW*75+3
@ -168,7 +168,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_copy_input func draw_copy_input
mcall2 MF_FILLRECT,oX+tW*6,tW*68,oY+tH*10,tH,0x00008080 mcall2 MF_FILLRECT,oX+tW*6,tW*68,oY+tH*10,tH,0x00008080
mov edx,fc_info.path mov edx,fc_info.path

View File

@ -11,7 +11,7 @@ align 4
dd compare_by_extension dd compare_by_extension
; AL = panel ; AL = panel
__func mfar_sort func mfar_sort
pusha pusha
cmp al,0 cmp al,0
jne ._00 jne ._00
@ -69,7 +69,7 @@ endf
; ESI = pointer to 1st file info ; ESI = pointer to 1st file info
; EDI = pointer to 2nd file info ; EDI = pointer to 2nd file info
__func compare_by_name func compare_by_name
mov ecx,11 mov ecx,11
push edi esi push edi esi
repe cmpsb repe cmpsb
@ -102,7 +102,7 @@ endf
; ESI = pointer to 1st file info ; ESI = pointer to 1st file info
; EDI = pointer to 2nd file info ; EDI = pointer to 2nd file info
__func compare_by_extension func compare_by_extension
push edi esi push edi esi
mov ecx,3 mov ecx,3
add esi,8 add esi,8
@ -137,4 +137,4 @@ __func compare_by_extension
popfd popfd
._05: ._05:
ret ret
endf endf

View File

@ -26,7 +26,6 @@ org 0
; +0004C300:FFFB3CFF - dinamically allocated for copy, view, edit etc. ; +0004C300:FFFB3CFF - dinamically allocated for copy, view, edit etc.
; ;
include 'lang.inc'
include 'macros.inc' include 'macros.inc'
include 'menuet.inc' include 'menuet.inc'
include 'mfar.inc' include 'mfar.inc'
@ -290,14 +289,14 @@ still:
;///// DRAW WINDOW //////////////////////////////////////////////////////////// ;///// DRAW WINDOW ////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_window func draw_window
mcall MF_WINPROPS,WP_GETSYSCLRS,sc,sizeof.system_colors mcall MF_WINPROPS,WP_GETSYSCLRS,sc,sizeof.system_colors
mcall MF_WNDDRAW,WD_BEGINDRAW mcall MF_WNDDRAW,WD_BEGINDRAW
mov edx,[fc.background] mov edx,[fc.background]
or edx,WS_SKINNED or edx,$14000000
mov edi,caption
mcall2 MF_DEFWINDOW,90,oX+tW*80+4,45,oY+tH*25+4 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 esi,oX+2,oX+tW*39+2
mmov edi,oY+3,oY+tH*22+3 mmov edi,oY+3,oY+tH*22+3
@ -340,7 +339,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_window_full func draw_window_full
call draw_window call draw_window
mov edx,1 mov edx,1
call get_files_data call get_files_data
@ -360,7 +359,7 @@ endf
align 4 align 4
len dd ? len dd ?
__func get_normal_path func get_normal_path
pusha pusha
mov ecx,5 mov ecx,5
rep movsb rep movsb
@ -394,7 +393,7 @@ endf
; EAX = length needed ; EAX = length needed
; ECX = current length ; ECX = current length
; EDI = path string ; EDI = path string
__func get_path_ellipses func get_path_ellipses
cmp ecx,eax cmp ecx,eax
jbe @f jbe @f
pushad pushad
@ -416,7 +415,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_path func draw_path
pushad pushad
cmp [active_panel],0 cmp [active_panel],0
jne ._00 jne ._00
@ -444,7 +443,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; AL = panel ; AL = panel
__func draw_files func draw_files
push eax push eax
mmov ecx,oY+tH*2-1,tH*FPC mmov ecx,oY+tH*2-1,tH*FPC
mov edx,[fc.background] mov edx,[fc.background]
@ -519,7 +518,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func draw_bottom_keys func draw_bottom_keys
pushad pushad
mcall2 MF_FILLRECT,oX-1,tW*80+1,oY+tH*24-1,tH+1,[fc.pathbg] mcall2 MF_FILLRECT,oX-1,tW*80+1,oY+tH*24-1,tH+1,[fc.pathbg]
dec ecx dec ecx
@ -551,7 +550,7 @@ endf
; ESI = X1*65536+X2 ; ESI = X1*65536+X2
; EDI = Y1*65536+Y2 ; EDI = Y1*65536+Y2
; EDX = color ; EDX = color
__func draw_frame func draw_frame
mov ecx,edi mov ecx,edi
mov ebx,edi mov ebx,edi
shr ebx,16 shr ebx,16
@ -578,7 +577,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; EDX = pointer to file data ; EDX = pointer to file data
__func get_file_color func get_file_color
push esi push esi
mov cl,[edx+11] mov cl,[edx+11]
test cl,(FA_HIDDEN or FA_SYSTEM) test cl,(FA_HIDDEN or FA_SYSTEM)
@ -632,7 +631,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; EDI = color ; EDI = color
__func draw_sel func draw_sel
pushad pushad
cmp [active_panel],0 cmp [active_panel],0
jne ._00 jne ._00
@ -715,7 +714,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; AL = panel ; AL = panel
__func draw_file_info func draw_file_info
push eax push eax
mmov ecx,oY+tH*21,tH mmov ecx,oY+tH*21,tH
mov edx,[fc.background] mov edx,[fc.background]
@ -790,7 +789,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func get_file_name func get_file_name
pushad pushad
mov eax,[esi+0] mov eax,[esi+0]
mov [f_name+0],eax mov [f_name+0],eax
@ -810,7 +809,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ESI = pointer to file data ; ESI = pointer to file data
__func get_file_info func get_file_info
pushad pushad
mov eax,[esi+12] mov eax,[esi+12]
mov dword[f_info],FS_READ mov dword[f_info],FS_READ
@ -888,7 +887,7 @@ endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; DL = panel ; DL = panel
__func get_files_data func get_files_data
pushad pushad
mov [d_tcnt],0 mov [d_tcnt],0
mov [d_ttsz],0 mov [d_ttsz],0
@ -985,7 +984,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func execute_current_file func execute_current_file
pushad pushad
cmp [active_panel],0 cmp [active_panel],0
jne ._00 jne ._00
@ -1080,7 +1079,7 @@ endf
;////////////////////////////////////////////////////////////////////////////// ;//////////////////////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
__func delete_current_file func delete_current_file
pushad pushad
popad popad
ret ret
@ -1124,12 +1123,12 @@ f_info:
dd read_area dd read_area
dd MEM_FOR_OS dd MEM_FOR_OS
.path: .path:
rb 200 rb 255
f_plen0 dd 5 f_plen0 dd 5
f_plen1 dd 5 f_plen1 dd 5
sz caption,'MFAR : PRE-ALPHA-8.1' sz caption,'MFAR : PRE-ALPHA-8.1',0
sz fcfile,'MFAR DAT' sz fcfile,'MFAR DAT'
sz p_hd,'/HD/1',0 sz p_hd,'/HD/1',0
sz p_rd,'/RD/1',0 sz p_rd,'/RD/1',0

View File

@ -27,7 +27,7 @@
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' ; very useful stuff for MeOS include '..\..\..\..\macros.inc' ; very useful stuff for MeOS
STRLEN = 48 ; maximal length of filename STRLEN = 48 ; maximal length of filename

View File

@ -11,12 +11,12 @@ use32 ;
dd 0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨. dd 0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
dd 0;pathprog ;¯ãâì ¨ ¨¬ï ¯à®£¨ dd 0;pathprog ;¯ãâì ¨ ¨¬ï ¯à®£¨
include "../../macros.inc" include "../../../macros.inc"
include "../../proc32.inc" include "../../../proc32.inc"
include "API.INC" include "API.INC"
include "../../dll.inc" include "../../../dll.inc"
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../develop/libraries/box_lib/load_lib.mac' include '../../../develop/libraries/box_lib/load_lib.mac'
start: start:
mcall 68,11 ;¨­¨æ¨ «¨§¨à㥬 ªãçã mcall 68,11 ;¨­¨æ¨ «¨§¨à㥬 ªãçã

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -35,8 +35,8 @@
dd temp_area , 0x0 ; I_Param , I_Icon dd temp_area , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\..\macros.inc'
include '..\..\..\develop\examples\editbox\trunk\editbox.inc' include '..\..\..\..\develop\examples\editbox\trunk\editbox.inc'
;include 'macros.inc' ;include 'macros.inc'
;include 'EDITBOX.INC' ;include 'EDITBOX.INC'
use_edit_box use_edit_box