NPROC=1
objtype=386
</$objtype/mkfile
#
# BUG: should set errstr
#
install:V:
SYS=`{sed '/^#define._X[123]/d; s/#define.([A-Z0-9_]*).*/\1/' sys.h}
for(I in $SYS) {
i=`{echo $I|tr A-Z a-z}
n=`{sed -n '/[ ]'$I'[ ]/s/.* //p' sys.h}
base=`{echo $i | sed 's/.*(.......................)/\1/'}
if(~ $i exits) i=_exits
{
echo TEXT $i'(SB)', 1, '$0'
echo MOVL '$'$n, AX
echo 'MOVL a+0(FP), BX'
echo 'MOVL b+4(FP), CX'
echo 'MOVL c+8(FP), DX'
echo 'MOVL d+12(FP), SI'
echo 'MOVL e+16(FP), DI'
echo 'INT $0x80'
echo RET
} > $base.s
$AS $base.s
}
ar vu ../../libc.a *.$O
rm -f *.$O *.s
nuke clean:V:
rm -f *.[$OS]
|