*kernel - fixes in 15.2 by Mario79 and 67 by mike.dld

updated sysfunc.txt
*programs 
         new icons and logo for CPUID and ICON
         added new version of @ICON and ICONMNGR
         fixes in iconedit and calendar from DedOK
         new algoritm of fill background in pic4
         all apps (fasm-writen only) rewriten to use common macros.inc for easy recompile in fastcall mode (there is a bug in https; run need rewrite to use common macros.inc)
         small fixes in build_all.bat script
         

git-svn-id: svn://kolibrios.org@485 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
heavyiron
2007-05-10 13:48:35 +00:00
parent 0f7aa4d574
commit 4daae89053
545 changed files with 31819 additions and 34012 deletions
+18 -17
View File
@@ -32,6 +32,7 @@ use32
dd params,0x0 ; parameters,icon
include 'lang.inc'
include '..\..\..\macros.inc'
include 'fasm.inc'
center fix true
@@ -90,7 +91,7 @@ red: ; Redraw
still:
push 10 ; Wait here for event
pop eax
int 40h
mcall
dec eax
je red ; Redraw request
dec eax
@@ -98,18 +99,18 @@ still:
key: ; Key
mov al,2 ; Read it and ignore
int 0x40
mcall
jmp still
button: ; Button in Window
mov al,17
int 0x40
mcall
cmp ah,1
jne noclose
or eax,-1
int 0x40
mcall
noclose:
cmp ah,2 ; Start compiling
@@ -150,13 +151,13 @@ draw_window:
mov ecx,50*65536+250
mov edx,[sc.work]
or edx,0x33000000
mov edi,header ; Draw Window Label Text
int 0x40
mov edi,title ; Draw Window Label Text
mcall
mcall 9,PROCESSINFO,-1
mpack ecx,1,1
mov ebx,[pinfo.x_size]
mov ebx,[pinfo.box.left]
sub ebx,10
push ecx
@@ -189,7 +190,7 @@ draw_window:
madd ecx, 14,0
mcall ,,,0x4000000D ; Button: Enter Path
mpack ebx,[pinfo.x_size],MAGIC1
mpack ebx,[pinfo.box.left],MAGIC1
msub ebx,MAGIC1+10+1,0
mpack ecx,0, 14*3/2-1
madd ecx,1,0
@@ -204,13 +205,13 @@ draw_window:
mov esi,text.line_size
mov eax,4
newline:
int 0x40
mcall
add ebx, 14
add edx,text.line_size
cmp byte[edx],'x'
jne newline
mov ebx,[pinfo.x_size]
mov ebx,[pinfo.box.left]
sub ebx,MAGIC1+10+1-9
shl ebx,16
add ebx,1+( 14*3/2-1)/2-3
@@ -220,7 +221,7 @@ draw_window:
mpack ebx,MAGIC1+6,0
add ebx,1+ 14/2-3+ 14*0
mov esi,[pinfo.x_size]
mov esi,[pinfo.box.left]
sub esi,MAGIC1*2+5*2+6+3
mov eax,esi
mov cl,6
@@ -246,16 +247,16 @@ bottom_right dd ?
draw_messages:
mov eax,13 ; clear work area
mpack ebx,7-2,[pinfo.x_size]
mpack ebx,7-2,[pinfo.box.left]
sub ebx,5*2+7*2-1-2*2
mpack ecx,0,[pinfo.y_size]
mpack ecx,0,[pinfo.box.top]
madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25)
mov word[bottom_right+2],bx
mov word[bottom_right],cx
msub [bottom_right],7,11
add [bottom_right],7 shl 16 + 53
mov edx,[sc.work]
int 0x40
mcall
_cy = 0
_sy = 2
_cx = 4
@@ -360,7 +361,7 @@ f11:mcall 10
print_text:
mpack ebx,MAGIC1+6,[pinfo.x_size]
mpack ebx,MAGIC1+6,[pinfo.box.left]
sub ebx,MAGIC1*2+19
movzx esi,bx
mov ecx,[ya-2]
@@ -487,7 +488,7 @@ start:
mov eax,70
mov ebx,file_info_start
xor ecx,ecx
int 0x40
mcall
@@:
jmp exit_program
@@ -503,7 +504,7 @@ include 'formats.inc'
include 'x86_64.inc'
include 'tables.inc'
header db appname,VERSION_STRING,0
title db appname,VERSION_STRING,0
_logo db 'flat assembler version ',VERSION_STRING,13,10,0
-94
View File
@@ -18,64 +18,6 @@ macro draw_caption _edx,_esi {
call __draw_caption
}
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
macro __mov reg,a,b {
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b 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 0x40
}
macro sz name,[data] {
if used name
common
label name
forward
db data
common
.size = $-name
end if
}
macro lsz name,[lng,data] {
if used name
common
label name
forward
if lang eq lng
db data
end if
common
.size = $-name
end if
}
macro mmov reg,a1,a2 {
mov reg,(a1) shl 16 + (a2)
}
@@ -109,39 +51,3 @@ macro endf {
@^ fix macro comment {
^@ fix }
; structure definition helper
;include '%fasminc%struct.inc'
include 'struct.inc'
; structures used in MeOS
struct process_information
cpu_usage dd ? ; +0
window_stack_position dw ? ; +4
window_stack_value dw ? ; +6
not_used1 dw ? ; +8
process_name db 12 dup(?) ; +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
not_used2 db 1024-52 dup(?)
ends
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
+6 -6
View File
@@ -63,7 +63,7 @@ exit_program:
cmp [_mode],NORMAL_MODE
je still
or eax,-1
int 0x40
mcall
make_timestamp:
push ebx
@@ -144,7 +144,7 @@ open:
mov dword [ebx+16], fileinfo
mov eax, 70
push ebx
int 0x40
mcall
pop ebx
test eax, eax
jnz .fail
@@ -172,7 +172,7 @@ read:
mov [ebx+16], edx
push ebx
mov eax, 70
int 0x40
mcall
xchg eax, [esp]
add [eax+4], ebx
adc [eax+8], dword 0
@@ -201,7 +201,7 @@ write:
; mov [filesize],edx
; mov eax,58
; mov ebx,file_info_write
; int 0x40
; mcall
; popa
; ret
@@ -209,7 +209,7 @@ write:
mov [ebx+16], edx
push ebx
mov eax, 70
int 0x40
mcall
xchg eax, [esp]
add [eax+4], ebx
adc [eax+8], dword 0
@@ -344,7 +344,7 @@ dc1:
mov eax,63
mov ebx,1
mov cl,dl
int 0x40
mcall
popa
ret