STATUS: 33%

0000 T _sureg		compatible
    00e8 T _estabur		functional compatible:
    				uses different temp. reg.
    01ae T _sestabur		compatible
    0296 T _segureg		not existent
    0438 T _ldsdr		not existent
    0548 T _prmmu		not existent
This commit is contained in:
Oliver Lehmann 2008-05-26 18:39:02 +00:00
parent 644c7746a5
commit 8127d47985
1 changed files with 15 additions and 9 deletions

View File

@ -96,31 +96,37 @@ register unsigned nt, nd, ns;
sestabur(nt, nd, ns, sep) sestabur(nt, nd, ns, sep)
register unsigned nt; register unsigned nt;
char nd;
register unsigned ns; register unsigned ns;
register unsigned sep; register unsigned sep;
{ {
int foo2; int stakseg;
if(nt > 0x100) { if(nt > 256) {
u.u_error = ENOMEM; u.u_error = ENOMEM;
return(-1); return(-1);
} }
foo2 = nd&LONGMASK; stackseg = nd&LONGMASK;
if(sep>0x0080) { if(sep > 128) {
u.u_error = ENOEXEC; u.u_error = ENOEXEC;
return(-1); return(-1);
} }
if(foo2 == u.u_stakseg) { if(stackseg == u.u_stakseg) {
u.u_segmts[NUSEGS-1].sg_limit = (!nt?0:-nt+0x100); u.u_segmts[NUSEGS-1].sg_limit = (!nt?0:-nt+256);
u.u_segmts[NUSEGS-1].sg_attr = (!nt?0x20:-nt+0x14); u.u_segmts[NUSEGS-1].sg_attr = (!nt?32:-nt+20);
return(0); return(0);
} }
u.u_segmts[ns].sg_limit = (!nt?0:nt-1);
/*FIXME: and now the whole thing is missing.... */ if(nd&128) {
u.u_segmts[ns].sg_attr = (!nt?20:sep);
} else {
u.u_segmts[ns].sg_attr = (!nt?20:0);
}
return(0); return(0);
} }