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
|
||||
}
|
||||
|
||||
__CPU_type equ p5
|
||||
SYSENTER_VAR equ 0
|
||||
__CPU_type equ p6
|
||||
SYSENTER_VAR equ 0
|
||||
|
||||
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 ebx,b
|
||||
__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
|
||||
|
||||
if __CPU_type eq p5
|
||||
int 0x40
|
||||
int 0x40
|
||||
else
|
||||
if __CPU_type eq p6
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
push ..ret_point ; it may be 2 or 5 byte
|
||||
sysenter
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
push ..ret_point ; it may be 2 or 5 byte
|
||||
sysenter
|
||||
..ret_point:
|
||||
pop edx
|
||||
pop ecx
|
||||
pop edx
|
||||
pop ecx
|
||||
|
||||
else
|
||||
if __CPU_type eq k6
|
||||
push ecx
|
||||
syscall
|
||||
pop ecx
|
||||
push ecx
|
||||
syscall
|
||||
pop ecx
|
||||
else
|
||||
display 'ERROR : unknown CPU type'
|
||||
int 0x40
|
||||
display 'ERROR : unknown CPU type'
|
||||
int 0x40
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
|
@ -1,6 +1,7 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm kfar.asm kfar
|
||||
mtappack kfar
|
||||
@erase lang.inc
|
||||
@kpack kfar
|
||||
@pause
|
Loading…
Reference in New Issue
Block a user