forked from KolibriOS/kolibrios
add library and example on C--
git-svn-id: svn://kolibrios.org@805 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
19c4a500e9
commit
0ce1599841
@ -129,11 +129,11 @@ macro __mov reg,a { ; mike.dld
|
|||||||
end if
|
end if
|
||||||
}
|
}
|
||||||
|
|
||||||
__CPU_type equ p5
|
__CPU_type equ p6
|
||||||
SYSENTER_VAR equ 0
|
SYSENTER_VAR equ 0
|
||||||
|
|
||||||
macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls
|
macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls
|
||||||
local ..ret_point
|
local ..ret_point
|
||||||
__mov eax,a
|
__mov eax,a
|
||||||
__mov ebx,b
|
__mov ebx,b
|
||||||
__mov ecx,c
|
__mov ecx,c
|
||||||
@ -142,25 +142,25 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls
|
|||||||
__mov edi,f
|
__mov edi,f
|
||||||
|
|
||||||
if __CPU_type eq p5
|
if __CPU_type eq p5
|
||||||
int 0x40
|
int 0x40
|
||||||
else
|
else
|
||||||
if __CPU_type eq p6
|
if __CPU_type eq p6
|
||||||
push ebp
|
push ebp
|
||||||
mov ebp, esp
|
mov ebp, esp
|
||||||
push ..ret_point ; it may be 2 or 5 byte
|
push ..ret_point ; it may be 2 or 5 byte
|
||||||
sysenter
|
sysenter
|
||||||
..ret_point:
|
..ret_point:
|
||||||
pop edx
|
pop edx
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
else
|
else
|
||||||
if __CPU_type eq k6
|
if __CPU_type eq k6
|
||||||
push ecx
|
push ecx
|
||||||
syscall
|
syscall
|
||||||
pop ecx
|
pop ecx
|
||||||
else
|
else
|
||||||
display 'ERROR : unknown CPU type'
|
display 'ERROR : unknown CPU type'
|
||||||
int 0x40
|
int 0x40
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru >lang.inc
|
||||||
@fasm kfar.asm kfar
|
@fasm kfar.asm kfar
|
||||||
|
mtappack kfar
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@kpack kfar
|
@kpack kfar
|
||||||
@pause
|
@pause
|
Loading…
Reference in New Issue
Block a user