Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 204 → Rev 205

/programs/fs/rdfdel/trunk/build_ru.bat
File deleted
\ No newline at end of file
/programs/fs/rdfdel/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/fs/rdfdel/trunk/rdfdel.asm
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/fs/rdfdel/trunk/build_en.bat
File deleted
\ No newline at end of file
/programs/fs/hexhd/trunk/build_en.bat
File deleted
\ No newline at end of file
/programs/fs/hexhd/trunk/build_ru.bat
File deleted
\ No newline at end of file
/programs/fs/hexhd/trunk/macros.inc
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/fs/hexhd/trunk/hexhd.asm
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/fs/copyr/trunk/macros.inc
143,9 → 143,6
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
177,7 → 174,7
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
221,7 → 218,13
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
dw ? ; +52 - reserved
.client_left dd ? ; +54
.client_top dd ? ; +58
.client_width dd ? ; +62
.client_height dd ? ; +66
.wnd_state db ? ; +70
rb (1024-71)
}
struct process_information
 
/programs/fs/kfar/trunk/kfar.asm
3596,12 → 3596,14
dd aJpg, jpegview
dd aJpeg, jpegview
dd aGif, gifview
dd aWav, ac97wav
dd aMp3, ac97wav
dd aWav, ac97
dd aMp3, ac97
dd aMid, midamp
dd aBmp, mv
dd aPng, archer
dd aRtf, rtfread
dd a3ds, view3ds
dd aLif, life2
associations_end:
 
aAsm db 'asm',0
3618,7 → 3620,7
 
aWav db 'wav',0
aMp3 db 'mp3',0
ac97wav db '/rd/1/AC97WAV',0
ac97 db '/rd/1/AC97SND',0
 
aMid db 'mid',0
midamp db '/rd/1/MIDAMP',0
3632,6 → 3634,12
aRtf db 'rtf',0
rtfread db '/rd/1/RtfRead',0
 
a3ds db '3ds',0
view3ds db '/rd/1/3d/view3ds',0
 
aLif db 'lif',0
life2 db '/rd/1/demos/life2',0
 
bConfirmDelete db 1
 
; ‡¤¥áì § ª ­ç¨¢ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥
/programs/fs/sysxtree/trunk/macros.inc
1,15 → 1,3
; language for programs
lang fix en ; ru en fr ge fi
 
@^ fix macro comment {
^@ fix }
 
 
macro m2m dest,src {
push src
pop dest
}
 
; new application structure
macro meos_app_start
{
89,72 → 77,35
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
name db data
.size = $-name
label name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
forward
if used name
label name
forward
if lang eq lng
db data
end if
common
if used name
.size = $-name
end if
}
 
macro szc name,elsz,[data] { ; from MFAR [mike.dld]
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
local s,m
m = 0
if used name
label name
virtual at 0
db data
s = $
end virtual
d#elsz s
if m < s
m = s
end if
forward
if (used name)&(lang eq lng)
db data
.size = $-name
.maxl = m
end if
}
 
macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld]
common
local s,m,c
m = 0
c = 0
if used name
label name
forward
if lang eq lng
virtual at 0
db data
s = $
end virtual
d#elsz s
if m < s
m = s
end if
db data
c = c+1
end if
common
.size = $-name
.maxl = m
.count = c
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
172,12 → 123,6
end if
}
 
;macro __mov reg,a { ; mike.dld
; if ~a eq
; mov reg,a
; end if
;}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
197,72 → 142,7
}
 
 
; -------------------------
macro header a,[b] {
common
use32
org 0
db 'MENUET',a
forward
if b eq
dd 0
else
dd b
end if }
macro section name { align 16
label name }
macro func name {
if ~used name
display 'FUNC NOT USED: ',`name,13,10
else
align 4
name:
;pushad
;pushfd
;dps `name
;newline
;mcall 5,1
;popfd
;popad
}
macro endf { end if }
 
macro diff16 title,l1,l2
{
local s,d
s = l2-l1
display title,': 0x'
repeat 8
d = '0' + s shr ((8-%) shl 2) and $0F
if d > '9'
d = d + 'A'-'9'-1
end if
display d
end repeat
display 13,10
}
 
macro diff10 title,l1,l2
{
local s,d,z,m
s = l2-l1
z = 0
m = 1000000000
display title,': '
repeat 10
d = '0' + s / m
s = s - (s/m)*m
m = m / 10
if d <> '0'
z = 1
end if
if z <> 0
display d
end if
end repeat
display 13,10
}
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
294,7 → 174,7
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
314,230 → 194,54
}
 
 
macro RGB [a] {
common
match (r=,g=,b),a \{
\dd ((r) shl 16) or ((g) shl 8) or (b)
\}
}
 
 
struc POINT _t,_dx,_dy {
.x _t _dx
.y _t _dy
}
 
 
; Macroinstructions for defining data structures
 
macro struct name
{ fields@struct equ name
match child parent, name \{ fields@struct equ child,fields@\#parent \}
sub@struct equ
struc db [val] \{ \common fields@struct equ fields@struct,.,db,<val> \}
struc dw [val] \{ \common fields@struct equ fields@struct,.,dw,<val> \}
struc du [val] \{ \common fields@struct equ fields@struct,.,du,<val> \}
struc dd [val] \{ \common fields@struct equ fields@struct,.,dd,<val> \}
struc dp [val] \{ \common fields@struct equ fields@struct,.,dp,<val> \}
struc dq [val] \{ \common fields@struct equ fields@struct,.,dq,<val> \}
struc dt [val] \{ \common fields@struct equ fields@struct,.,dt,<val> \}
struc rb count \{ fields@struct equ fields@struct,.,db,count dup (?) \}
struc rw count \{ fields@struct equ fields@struct,.,dw,count dup (?) \}
struc rd count \{ fields@struct equ fields@struct,.,dd,count dup (?) \}
struc rp count \{ fields@struct equ fields@struct,.,dp,count dup (?) \}
struc rq count \{ fields@struct equ fields@struct,.,dq,count dup (?) \}
struc rt count \{ fields@struct equ fields@struct,.,dt,count dup (?) \}
macro db [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,db,<val> \}
macro dw [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,dw,<val> \}
macro du [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,du,<val> \}
macro dd [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,dd,<val> \}
macro dp [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,dp,<val> \}
macro dq [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,dq,<val> \}
macro dt [val] \{ \common \local anonymous
fields@struct equ fields@struct,anonymous,dt,<val> \}
macro rb count \{ \local anonymous
fields@struct equ fields@struct,anonymous,db,count dup (?) \}
macro rw count \{ \local anonymous
fields@struct equ fields@struct,anonymous,dw,count dup (?) \}
macro rd count \{ \local anonymous
fields@struct equ fields@struct,anonymous,dd,count dup (?) \}
macro rp count \{ \local anonymous
fields@struct equ fields@struct,anonymous,dp,count dup (?) \}
macro rq count \{ \local anonymous
fields@struct equ fields@struct,anonymous,dq,count dup (?) \}
macro rt count \{ \local anonymous
fields@struct equ fields@struct,anonymous,dt,count dup (?) \}
macro union \{ fields@struct equ fields@struct,,union,<
sub@struct equ union \}
macro struct \{ fields@struct equ fields@struct,,substruct,<
sub@struct equ substruct \}
virtual at 0 }
 
macro ends
{ match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt
restruc rb,rw,rd,rp,rq,rt
purge db,dw,du,dd,dp,dq,dt
purge rb,rw,rd,rp,rq,rt
purge union,struct
match name=,fields,fields@struct \\{ fields@struct equ
make@struct name,fields
fields@\\#name equ fields \\}
end virtual \}
match any, sub@struct \{ fields@struct equ fields@struct> \}
restore sub@struct }
 
macro make@struct name,[field,type,def]
{ common
if $
display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah
err
end if
local define
define equ name
forward
local sub
match , field \{ make@substruct type,name,sub def
define equ define,.,sub, \}
match any, field \{ define equ define,.#field,type,<def> \}
common
match fields, define \{ define@struct fields \} }
 
macro define@struct name,[field,type,def]
{ common
local list
list equ
forward
if ~ field eq .
name#field type def
sizeof.#name#field = $ - name#field
else
rb sizeof.#type
end if
local value
match any, list \{ list equ list, \}
list equ list <value>
common
sizeof.#name = $
restruc name
match values, list \{
struc name value \\{
match any, fields@struct \\\{ fields@struct equ fields@struct,.,name,<values> \\\}
match , fields@struct \\\{ label .
forward
match , value \\\\{ field type def \\\\}
match any, value \\\\{ field type value
if ~ field eq .
rb sizeof.#name#field - ($-field)
end if \\\\}
common \\\} \\} \} }
 
macro enable@substruct
{ macro make@substruct substruct,parent,name,[field,type,def]
\{ \common
\local define
define equ parent,name
\forward
\local sub
match , field \\{ match any, type \\\{ enable@substruct
make@substruct type,name,sub def
purge make@substruct
define equ define,.,sub, \\\} \\}
match any, field \\{ define equ define,.\#field,type,<def> \\}
\common
match fields, define \\{ define@\#substruct fields \\} \} }
 
enable@substruct
 
macro define@union parent,name,[field,type,def]
{ common
{
virtual at 0
forward
if ~ field eq .
virtual at 0
parent#field type def
sizeof.#parent#field = $ - parent#field
name name
sizeof.#name = $ - name
end virtual
if sizeof.#parent#field > $
rb sizeof.#parent#field - $
end if
else if sizeof.#type > $
rb sizeof.#type - $
end if
common
sizeof.#name = $
end virtual
struc name [value] \{ \common
label .\#name
last@union equ
forward
match any, last@union \\{ virtual at .\#name
field type def
end virtual \\}
match , last@union \\{ match , value \\\{ field type def \\\}
match any, value \\\{ field type value \\\} \\}
last@union equ field
common rb sizeof.#name - ($ - .\#name) \} }
}
 
macro define@substruct parent,name,[field,type,def]
{ common
virtual at 0
forward
if ~ field eq .
parent#field type def
sizeof.#parent#field = $ - parent#field
else
rb sizeof.#type
end if
local value
common
sizeof.#name = $
end virtual
struc name value \{
label .\#name
forward
match , value \\{ field type def \\}
match any, value \\{ field type value
if ~ field eq .
rb sizeof.#parent#field - ($-field)
end if \\}
common \} }
 
; 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
dw ? ; +52 - reserved
.client_left dd ? ; +54
.client_top dd ? ; +58
.client_width dd ? ; +62
.client_height dd ? ; +66
.wnd_state db ? ; +70
rb (1024-71)
}
struct 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)
ends
 
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
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 ?
ends
 
 
; constants
/programs/fs/sysxtree/trunk/sysxtree.asm
607,9 → 607,11
mov ebx, gifview
cmp ecx, 'GIF'
jz run
mov ebx, ac97wav
mov ebx, ac97
cmp ecx, 'WAV'
jz run
cmp ecx, 'MP3'
jz run
mov ebx, midamp
cmp ecx, 'MID'
jz run
631,6 → 633,12
jz run
cmp ecx, 'INC'
jz run
mov ebx, life2
cmp ecx, 'LIF'
jz run
mov ebx, view3ds
cmp ecx, '3DS' and not 0x20202020
jz run
jmp still
 
execute:
2540,12 → 2548,14
bmpview db '/RD/1/MV',0
jpgview db '/RD/1/JPEGVIEW',0
gifview db '/RD/1/GIFVIEW',0
ac97wav db '/RD/1/AC97WAV',0
ac97 db '/RD/1/AC97SND',0
rtfread db '/RD/1/RTFREAD',0
; //// Willow
pngview db '/RD/1/@RCHER',0
; //// Willow
midamp db '/RD/1/MIDAMP',0
view3ds db '/RD/1/3D/VIEW3DS',0
life2 db '/RD/1/DEMOS/LIFE2',0
 
more_char db 10h