* small changes

This commit is contained in:
marco 2003-05-30 19:37:14 +00:00
parent 0357f71e14
commit 031693de28
4 changed files with 137 additions and 7 deletions

View File

@ -230,7 +230,7 @@ GRAPHDIR=$(INC)/graph
ifndef USELIBGGI ifndef USELIBGGI
USELIBGGI=NO USELIBGGI=NO
endif endif
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings baseunix $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx charset ucomplex getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants types systhrds sysctl override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings baseunix $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx charset ucomplex getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard serial variants types systhrds sysctl
override TARGET_LOADERS+=prt0 cprt0 override TARGET_LOADERS+=prt0 cprt0
override TARGET_RSTS+=math varutils typinfo override TARGET_RSTS+=math varutils typinfo
override INSTALL_FPCPACKAGE=y y override INSTALL_FPCPACKAGE=y y
@ -1314,7 +1314,7 @@ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\ $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
$(SYSTEMUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
baseunix$(PPUEXT) : $(UNIXINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \ baseunix$(PPUEXT) : $(BSDINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \ signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \ $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
$(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \ $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \

View File

@ -131,7 +131,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
# System Dependent Units # System Dependent Units
# #
baseunix$(PPUEXT) : $(UNIXINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \ baseunix$(PPUEXT) : $(BSDINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \ signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \ $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
$(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \ $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \

View File

@ -30,7 +30,131 @@
For now I do them in assembler, which makes it easier to test them (copy and For now I do them in assembler, which makes it easier to test them (copy and
paste to and AS source). Ultimately I hope to design something like this} paste to and AS source). Ultimately I hope to design something like this}
{$i cpusys.inc }
procedure actualsyscall; assembler; {inline requires a dummy push IIRC}
asm
int $0x80
jb .LErrorcode
xor %ebx,%ebx
ret
.LErrorcode:
mov %eax,%ebx
mov $-1,%eax
end;
function Do_SysCall(sysnr:LONGINT):longint; assembler;
asm
movl sysnr,%eax
call actualsyscall
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1:longint):longint; assembler;
asm
movl sysnr,%eax
pushl Param1
call actualsyscall
addl $4,%esp
movw %bx,Errno
end;
{
function Do_SysCall(sysnr,param1:integer):longint; assembler;
asm
movl sysnr,%eax
pushw Param1
call actualsyscall
add $2,%esp
movw %bx,Errno
end;
}
function Do_SysCall(sysnr,param1,param2:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param2
pushl Param1
call actualsyscall
addl $8,%esp
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1,param2,param3:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param3
pushl param2
pushl Param1
call actualsyscall
addl $12,%esp
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1,param2,param3,param4:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param4
pushl param3
pushl param2
pushl Param1
call actualsyscall
addl $16,%esp
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1,param2,param3,param4,param5:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param5
pushl param4
pushl param3
pushl param2
pushl Param1
call actualsyscall
addl $20,%esp
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1,param2,param3,param4,param5,param6:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param6
pushl param5
pushl param4
pushl param3
pushl param2
pushl Param1
call actualsyscall
addl $24,%esp
movw %bx,Errno
end;
function Do_SysCall(sysnr,param1,param2,param3,param4,param5,param6,param7:LONGINT):longint; assembler;
asm
movl sysnr,%eax
pushl param7
pushl param6
pushl param5
pushl param4
pushl param3
pushl param2
pushl Param1
call actualsyscall
addl $28,%esp
movw %bx,Errno
end;
Function Sys_Time:longint; Function Sys_Time:longint;
@ -343,7 +467,10 @@ end;
{ {
$Log$ $Log$
Revision 1.3 2003-01-21 15:39:45 marco Revision 1.4 2003-05-30 19:37:14 marco
* small changes
Revision 1.3 2003/01/21 15:39:45 marco
* NetBSD first rtl. Still not 100%, but close * NetBSD first rtl. Still not 100%, but close
Revision 1.2 2003/01/17 22:13:47 marco Revision 1.2 2003/01/17 22:13:47 marco

View File

@ -161,7 +161,7 @@ Type
{$ifdef bsd} {$ifdef bsd}
function Do_SysCall(sysnr:longint):longint; function Do_SysCall(sysnr:longint):longint;
function Do_Syscall(sysnr,param1:integer):longint; //function Do_Syscall(sysnr,param1:integer):longint;
function Do_SysCall(sysnr,param1:LONGINT):longint; function Do_SysCall(sysnr,param1:LONGINT):longint;
function Do_SysCall(sysnr,param1,param2:LONGINT):longint; function Do_SysCall(sysnr,param1,param2:LONGINT):longint;
function Do_SysCall(sysnr,param1,param2,param3:LONGINT):longint; function Do_SysCall(sysnr,param1,param2,param3:LONGINT):longint;
@ -3032,7 +3032,10 @@ End.
{ {
$Log$ $Log$
Revision 1.28 2003-03-11 08:26:50 michael Revision 1.29 2003-05-30 19:37:14 marco
* small changes
Revision 1.28 2003/03/11 08:26:50 michael
* stringtoppchar should use tabs instead of backspace as delimiter * stringtoppchar should use tabs instead of backspace as delimiter
Revision 1.27 2003/01/05 19:11:32 marco Revision 1.27 2003/01/05 19:11:32 marco