*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
+1
View File
@@ -1,4 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@fasm cmd.asm cmd
@erase lang.inc
@pause
+1
View File
@@ -1,4 +1,5 @@
@erase lang.inc
@echo lang fix de >lang.inc
@fasm cmd.asm cmd
@erase lang.inc
@pause
+66 -67
View File
@@ -18,7 +18,7 @@ use32
dd 0x0
dd 0x0
include "macros.inc"
include "..\..\..\macros.inc"
include "lang.inc"
START:
@@ -33,7 +33,7 @@ START:
still:
mov eax,10
int 0x40
mcall
cmp eax,1
je re
@@ -46,7 +46,7 @@ still:
button:
mov eax,17
int 0x40
mcall
cmp ah,1
jne noclose
@@ -84,7 +84,7 @@ loop1:
mov edx,tic_table
add edx,dword [linev]
mov esi,81
int 0x40
mcall
add dword [xpos],10
add dword [linev],81
pop ecx
@@ -101,7 +101,7 @@ no_red:
key:
mov eax,2
int 0x40
mcall
cmp ah,27
jne no_escape
@@ -287,7 +287,7 @@ clear:
shl ecx,16
add ecx,9
mov edx,0
int 0x40
mcall
add dword [ypos],6
ret
@@ -295,18 +295,18 @@ draw:
mov eax,12
mov ebx,1
int 0x40
mcall
mov eax,0
mov ebx,100*65536+492
mov ecx,100*65536+280
mov edx,0x13000000
mov edi,title
int 0x40
mcall
mov eax,12
mov ebx,2
int 0x40
mcall
ret
@@ -318,7 +318,7 @@ print:
mov ecx,0x00ddeeff
mov edx,smb
mov esi,1
int 0x40
mcall
mov edi,tic_table
add edi,dword [linen]
@@ -337,7 +337,7 @@ cursor:
mov ecx,0x00ddeeff
mov edx,smb_cursor
mov esi,1
int 0x40
mcall
mov edi,tic_table
mov esi,smb_cursor
@@ -356,7 +356,7 @@ ppr:
mov ecx,0x00ddeeff
mov edx,prompt
mov esi,5
int 0x40
mcall
mov dword [ypos],42
cld
@@ -471,7 +471,7 @@ loopls:
mov eax, 70
mov ebx, dirinfo
int 0x40
mcall
inc dword [dirinfo+4]
cmp ebx, 1
jnz ls_end
@@ -542,7 +542,7 @@ ls_print:
mov edx,filename
mov ecx,0x00ddeeff
mov esi,12
int 0x40
mcall
cld
mov ecx,12
@@ -618,7 +618,7 @@ chdot:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile
@@ -647,7 +647,7 @@ chnodot:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile
@@ -667,7 +667,7 @@ lschok:
mov edx,tic_table+400
mov esi,12
mov ecx,0x00ddeeff
int 0x40
mcall
cld
mov ecx,12
@@ -701,7 +701,7 @@ ps:
mov eax,9
mov ebx,tic_table
mov ecx,1
int 0x40
mcall
mov dword [count2],eax
@@ -710,7 +710,7 @@ ll1:
mov eax,9
mov ebx,tic_table
mov ecx,[pn]
int 0x40
mcall
mov ebx,[tic_table+30]
mov dword [fnumb],4
@@ -741,7 +741,7 @@ ll1:
add ebx,[xpos]
mov ecx,0x00ddeeff
mov esi,12
int 0x40
mcall
cld
mov ecx,11
@@ -838,7 +838,7 @@ printn:
shl edx,16
add edx,[xpos]
mov esi,0x00ddeeff
int 0x40
mcall
ret
pause2:
@@ -847,7 +847,7 @@ pause2:
call printf
mov eax,10
int 0x40
mcall
red3:
cmp eax,2
@@ -859,19 +859,19 @@ red3:
call red
mov eax,10
int 0x40
mcall
jmp red3
back:
mov eax,2
int 0x40
mcall
cmp ah,27
je checmd
ret
exit:
mov eax,-1
int 0x40
mcall
checmd:
cmp byte [callp],1
@@ -894,7 +894,7 @@ err:
add ebx,[xpos]
mov ecx,0x00ddeeff
mov esi,33
int 0x40
mcall
cld
mov ecx,27
@@ -1046,7 +1046,7 @@ gocp1:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile
@@ -1125,7 +1125,7 @@ gocp2:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
jne alreadyexist
@@ -1135,7 +1135,7 @@ gocp2:
mov ecx,tic_table+25000
mov edx,dword [filesize]
mov esi,0
int 0x40
mcall
cmp eax,0
jne no_ok
@@ -1145,7 +1145,7 @@ gocp2:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je no_ok
@@ -1289,7 +1289,7 @@ gorn1:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile
@@ -1366,7 +1366,7 @@ gorn2:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
jne alreadyexist
@@ -1376,7 +1376,7 @@ gorn2:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
mov dword [filesize],eax
@@ -1385,7 +1385,7 @@ gorn2:
mov ecx,tic_table+25000
mov edx,dword [filesize]
mov esi,0
int 0x40
mcall
cmp eax,0
jne no_ok1
@@ -1395,14 +1395,14 @@ gorn2:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je no_ok1
mov eax,32
mov ebx,tic_table+9000
int 0x40
mcall
call newline
mov edx,mess14
@@ -1504,14 +1504,14 @@ godel:
mov ecx,0
mov edx,-1
mov esi,tic_table+25000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile2
mov eax,32
mov ebx,tic_table+400
int 0x40
mcall
call newline
mov edx,mess6
@@ -1562,7 +1562,7 @@ autoexec:
mov ecx,0
mov edx,-1
mov esi,tic_table+15000
int 0x40
mcall
cmp eax,4294967295
je noaxfile
@@ -1620,7 +1620,7 @@ strup7:
mov ecx,0
mov edx,-1
mov esi,tic_table+15000
int 0x40
mcall
cmp eax,4294967295
je nosuchfile3
@@ -1755,7 +1755,7 @@ go4:
mov ecx,0x00ddeeff
mov edx,tic_table+200
mov esi,dword [fnumb]
int 0x40
mcall
ret
@@ -1795,7 +1795,7 @@ kill:
mov eax,9
mov ebx,tic_table
int 0x40
mcall
cmp eax,ecx
jb nosuchprocess
@@ -1803,7 +1803,7 @@ kill:
mov eax,18
mov ebx,2
mov edx,0
int 0x40
mcall
call clearsum
call newline
@@ -1868,7 +1868,7 @@ gonext13:
mov edx,tic_table+300
mov ecx,0x00ddeeff
mov esi,dword [count]
int 0x40
mcall
cld
mov ecx,dword [count]
@@ -1895,7 +1895,7 @@ printf:
add ebx,[xpos]
mov ecx,0x00ddeeff
mov esi,45
int 0x40
mcall
cld
mov ecx,45
@@ -1918,7 +1918,7 @@ printipc:
add ebx,[xpos]
mov ecx,0x00ddeeff
mov esi,79
int 0x40
mcall
cld
mov ecx,79
@@ -2078,7 +2078,7 @@ cls1:
mov ebx,6*65536+483
mov ecx,24*65536+250
mov edx,0
int 0x40
mcall
ret
cls2:
@@ -2290,11 +2290,11 @@ no_cls:
mov eax,18
mov ebx,1
int 0x40
mcall
mov eax,5
mov ebx,200
int 0x40
mcall
no_shutdown:
cmp word [tic_table+600],'ps'
@@ -2454,17 +2454,17 @@ cmd_ok:
mov ebx,1
mov ecx,ipcb
mov edx,118
int 0x40
mcall
call clearipc
mov eax,40
mov ebx,01000111b
int 0x40
mcall
mov eax,23
mov ebx,10
int 0x40
mcall
cmp eax,7
jne noipc
@@ -2478,7 +2478,7 @@ ipccontinue:
mov eax,9
mov ebx,tic_table+100000
mov ecx,-1
int 0x40
mcall
mov ecx,eax
loopfindipc:
@@ -2486,7 +2486,7 @@ loopfindipc:
mov eax,9
mov ebx,tic_table+100000
int 0x40
mcall
mov bl,[tic_table+600]
cmp byte [tic_table+100000+10],bl
@@ -2548,7 +2548,7 @@ ipcfinished:
mov ecx,dword [ipcpid]
mov edx,ddot
mov esi,1
int 0x40
mcall
call newline
call clearipc
@@ -2576,7 +2576,7 @@ printcmd:
mov edx,tic_table+600
mov ecx,0x00ddeeff
mov esi,dword [count]
int 0x40
mcall
cld
mov ecx,dword [count]
@@ -2605,10 +2605,10 @@ cmd_ok2:
waitipc:
mov eax,40
mov ebx,01000111b
int 0x40
mcall
mov eax,10
int 0x40
mcall
cmp eax,7
je ipcok
@@ -2623,7 +2623,7 @@ waitipc:
keyipc:
mov eax,2
int 0x40
mcall
jmp waitipc
@@ -2662,7 +2662,7 @@ reipc2:
ipckey:
mov eax,10
int 0x40
mcall
cmp eax,1
je reipc2
@@ -2675,7 +2675,7 @@ ipckey:
ipckeypressed:
mov eax,2
int 0x40
mcall
mov byte [ipckeyvalue],ah
@@ -2684,7 +2684,7 @@ ipckeypressed:
mov ecx,dword [ipcpid]
mov edx,ipckeyvalue
mov esi,1
int 0x40
mcall
call clearipc
jmp waitipc
@@ -2717,7 +2717,7 @@ cmdexist:
mov eax,9
mov ebx,tic_table
mov ecx,-1
int 0x40
mcall
mov ecx,eax
loopex:
@@ -2725,7 +2725,7 @@ loopex:
mov eax,9
mov ebx,I_END
int 0x40
mcall
cmp word [I_END+10],'CM'
jne no_cmd
@@ -2764,7 +2764,7 @@ start_rd_app:
mov eax, 70
mov ebx, fileinfo_start
mov [ebx+8], ecx
int 0x40
mcall
ret
fileinfo_start:
dd 7
@@ -2775,8 +2775,7 @@ fileinfo_start:
db 0
dd fileinfo_buffer
title:
db 'CMD - Command line interpreter',0
title db 'CMD - Command line interpreter',0
smb_cursor db '|'
+18 -18
View File
@@ -1,10 +1,10 @@
include "macros.inc"
include "..\..\..\macros.inc"
initipc:
mov eax,9
mov ebx,prc
mov ecx,-1
int 0x40
mcall
mov ecx,eax
loop1:
@@ -12,7 +12,7 @@ loop1:
mov eax,9
mov ebx,prc
int 0x40
mcall
cmp word [prc+10],'CM'
jne no_cmd
@@ -39,18 +39,18 @@ no_exit:
mov ecx,dword [cmdpid]
mov edx,printf
mov esi,4
int 0x40
mcall
call initcmd
waitcmdinit:
mov eax,40
mov ebx,01000000b
int 0x40
mcall
mov eax,23
mov ebx,100
int 0x40
mcall
cmp eax,7
je cmd_ok
@@ -64,19 +64,19 @@ cmd_ok:
mov eax,18
mov ebx,3
mov ecx,dword [cmdnumb]
int 0x40
mcall
ret
pause1:
mov eax,5
mov ebx,1
int 0x40
mcall
ret
exit:
mov eax,-1
int 0x40
or eax,-1
mcall
cls:
mov eax,60
@@ -84,7 +84,7 @@ cls:
mov ecx,dword [cmdpid]
mov edx,ipccls
mov esi,4
int 0x40
mcall
call pause1
@@ -120,7 +120,7 @@ loopprt:
mov ecx,dword [cmdpid]
mov edx,stripc
mov esi,84
int 0x40
mcall
call pause1
@@ -132,7 +132,7 @@ eol:
mov ecx,dword [cmdpid]
mov edx,ipceol
mov esi,4
int 0x40
mcall
call pause1
@@ -144,13 +144,13 @@ initcmd:
mov ecx,dword [cmdpid]
mov edx,ipckey
mov esi,4
int 0x40
mcall
mov eax,60
mov ebx,1
mov ecx,ipcb
mov edx,28
int 0x40
mcall
cld
mov ecx,28
@@ -166,10 +166,10 @@ getkey:
waitagain:
mov eax,40
mov ebx,01000000b
int 0x40
mcall
mov eax,10
int 0x40
mcall
cmp eax,7
jne waitagain
@@ -186,7 +186,7 @@ endipc:
mov ecx,dword [cmdpid]
mov edx,ipcend
mov esi,4
int 0x40
mcall
jmp exit
-269
View File
@@ -1,269 +0,0 @@
; 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
}
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
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] { ; from MFAR [mike.dld]
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
}
; easy system call macro
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 { ; mike.dld
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 { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
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 __regs) & ((arg2 eqtype 0) | (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
}
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
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
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