several fixes
This commit is contained in:
parent
66430b1900
commit
33b7bac870
4 changed files with 105 additions and 78 deletions
|
@ -120,18 +120,30 @@ The following suffices exist:
|
||||||
no arguments
|
no arguments
|
||||||
.PT .l
|
.PT .l
|
||||||
16-bit argument
|
16-bit argument
|
||||||
|
.PT .L
|
||||||
|
32-bit argument
|
||||||
.PT .u
|
.PT .u
|
||||||
16-bit unsigned argument
|
16-bit unsigned argument
|
||||||
.PT .lw
|
.PT .lw
|
||||||
16-bit argument divided by the wordsize
|
16-bit argument divided by the wordsize
|
||||||
|
.PT .Lw
|
||||||
|
32-bit argument divided by the wordsize
|
||||||
.PT .p
|
.PT .p
|
||||||
positive 16-bit argument
|
positive 16-bit argument
|
||||||
|
.PT .P
|
||||||
|
positive 32-bit argument
|
||||||
.PT .pw
|
.PT .pw
|
||||||
positive 16-bit argument divided by the wordsize
|
positive 16-bit argument divided by the wordsize
|
||||||
|
.PT .Pw
|
||||||
|
positive 32-bit argument divided by the wordsize
|
||||||
.PT .n
|
.PT .n
|
||||||
negative 16-bit argument
|
negative 16-bit argument
|
||||||
|
.PT .N
|
||||||
|
negative 32-bit argument
|
||||||
.PT .nw
|
.PT .nw
|
||||||
negative 16-bit argument divided by the wordsize
|
negative 16-bit argument divided by the wordsize
|
||||||
|
.PT .Nw
|
||||||
|
negative 32-bit argument divided by the wordsize
|
||||||
.PT .s<num>
|
.PT .s<num>
|
||||||
shortie with <num> as high order argument byte
|
shortie with <num> as high order argument byte
|
||||||
.PT .w<num>
|
.PT .w<num>
|
||||||
|
|
|
@ -462,7 +462,7 @@ Common Table for Neutral State and Arguments
|
||||||
.TS
|
.TS
|
||||||
tab(:);
|
tab(:);
|
||||||
c c s c
|
c c s c
|
||||||
l8 l l8 l.
|
l4 l l4 l.
|
||||||
class:bytes:description
|
class:bytes:description
|
||||||
|
|
||||||
<ilb>:240:b1:Instruction label b1 (Not used for branches)
|
<ilb>:240:b1:Instruction label b1 (Not used for branches)
|
||||||
|
@ -515,7 +515,7 @@ an <end> byte if the trailing argument is not present.
|
||||||
tab(|);
|
tab(|);
|
||||||
l s l
|
l s l
|
||||||
l s s
|
l s s
|
||||||
l 2 lw(46) l.
|
l 2 lw(30) l.
|
||||||
Example ASCII|Example compact
|
Example ASCII|Example compact
|
||||||
(LOC = 69, BRA = 18 here):
|
(LOC = 69, BRA = 18 here):
|
||||||
|
|
||||||
|
|
|
@ -120,8 +120,8 @@ The result name 'e' is reserved for the error code.
|
||||||
.N 1
|
.N 1
|
||||||
List of monitor calls.
|
List of monitor calls.
|
||||||
.DS B
|
.DS B
|
||||||
.ta 2n 8n 16n 32n 48n
|
.ta 4n 13n 29n 52n
|
||||||
number name parameters results function
|
nr name parameters results function
|
||||||
|
|
||||||
1 Exit status:int Terminate this process
|
1 Exit status:int Terminate this process
|
||||||
2 Fork e,flag,pid:int Spawn new process
|
2 Fork e,flag,pid:int Spawn new process
|
||||||
|
@ -174,10 +174,10 @@ number name parameters results function
|
||||||
e:int Send signal to a process
|
e:int Send signal to a process
|
||||||
41 Dup fildes,newfildes:int
|
41 Dup fildes,newfildes:int
|
||||||
e,fildes:int Duplicate a file descriptor
|
e,fildes:int Duplicate a file descriptor
|
||||||
42 Pipe e,w_des,r_des:int
|
42 Pipe e,w_des,r_des:int Create a pipe
|
||||||
Create a pipe
|
|
||||||
43 Times buffer:ptr Get process times
|
43 Times buffer:ptr Get process times
|
||||||
44 Profil buff:ptr;bufsiz,offset,scale:intp Execution time profile
|
44 Profil buff:ptr;bufsiz,offset,scale:intp
|
||||||
|
Execution time profile
|
||||||
46 Setgid gid:int2 e:int Set group ID
|
46 Setgid gid:int2 e:int Set group ID
|
||||||
47 Getgid e_gid,r_gid:int Get group ID
|
47 Getgid e_gid,r_gid:int Get group ID
|
||||||
48 Sigtrp trapno,signo:int
|
48 Sigtrp trapno,signo:int
|
||||||
|
@ -189,7 +189,7 @@ number name parameters results function
|
||||||
56 Mpxcall cmd:int;vec:ptr e:int Multiplexed file handling
|
56 Mpxcall cmd:int;vec:ptr e:int Multiplexed file handling
|
||||||
59 Exece name,argv,envp:ptr
|
59 Exece name,argv,envp:ptr
|
||||||
e:int Execute a file
|
e:int Execute a file
|
||||||
60 Umask complmode:int2 oldmask:int2 Set file creation mode mask
|
60 Umask mask:int2 oldmask:int2 Set file creation mode mask
|
||||||
61 Chroot string:ptr e:int Change root directory
|
61 Chroot string:ptr e:int Change root directory
|
||||||
.DE 1
|
.DE 1
|
||||||
Codes 0, 11, 13, 17, 31, 32, 38, 39, 40, 45, 49, 50, 52,
|
Codes 0, 11, 13, 17, 31, 32, 38, 39, 40, 45, 49, 50, 52,
|
||||||
|
|
|
@ -227,15 +227,15 @@ int decflag(str) char *str ; {
|
||||||
/* ----------- checking --------------*/
|
/* ----------- checking --------------*/
|
||||||
|
|
||||||
int ecodes[256],codes[256],lcodes[256] ;
|
int ecodes[256],codes[256],lcodes[256] ;
|
||||||
char eflags[256], flags[256];
|
char eflags[256], flags[256], lflags[256] ;
|
||||||
int elows[256], lows[256];
|
int elows[256], lows[256], llows[256];
|
||||||
|
|
||||||
#define NMNEM (sp_lmnem-sp_fmnem+1)
|
#define NMNEM (sp_lmnem-sp_fmnem+1)
|
||||||
#define MUST 1
|
#define MUST 1
|
||||||
#define MAY 2
|
#define MAY 2
|
||||||
#define FORB 3
|
#define FORB 3
|
||||||
|
|
||||||
char negc[NMNEM], zc[NMNEM], posc[NMNEM] ;
|
char negc[NMNEM], zc[NMNEM], posc[NMNEM], lnegc[NMNEM], lposc[NMNEM] ;
|
||||||
|
|
||||||
checkall() {
|
checkall() {
|
||||||
register i,flag ;
|
register i,flag ;
|
||||||
|
@ -274,9 +274,13 @@ checkall() {
|
||||||
else if ( flag&OP_POS )
|
else if ( flag&OP_POS )
|
||||||
posc[opc]++ ;
|
posc[opc]++ ;
|
||||||
break ;
|
break ;
|
||||||
case OP16U :
|
|
||||||
case OP32 :
|
case OP32 :
|
||||||
case OP64 :
|
if ( flag&OP_NEG )
|
||||||
|
lnegc[opc]++ ;
|
||||||
|
else if ( flag&OP_POS )
|
||||||
|
lposc[opc]++ ;
|
||||||
|
break ;
|
||||||
|
case OP16U :
|
||||||
break ;
|
break ;
|
||||||
default :
|
default :
|
||||||
error("Illegal type") ;
|
error("Illegal type") ;
|
||||||
|
@ -345,9 +349,11 @@ chkc(flag,icode,emc,low) {
|
||||||
case OP64:
|
case OP64:
|
||||||
if ( lcodes[icode]!=-1 ) {
|
if ( lcodes[icode]!=-1 ) {
|
||||||
mess("Long opcode %d used by %s and %s",
|
mess("Long opcode %d used by %s and %s",
|
||||||
icode,ename(emc),ename(codes[icode])) ;
|
icode,ename(emc),ename(lcodes[icode])) ;
|
||||||
}
|
}
|
||||||
lcodes[icode]=emc;
|
lcodes[icode]=emc;
|
||||||
|
lflags[icode]=flag;
|
||||||
|
llows[icode]=low;
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,6 +362,8 @@ ckop(emc,zf,pf,nf) {
|
||||||
if ( zc[emc]>1 ) mess("More then one OPNO for %s",ename(emc)) ;
|
if ( zc[emc]>1 ) mess("More then one OPNO for %s",ename(emc)) ;
|
||||||
if ( posc[emc]>1 ) mess("More then one OP16(pos) for %s",ename(emc)) ;
|
if ( posc[emc]>1 ) mess("More then one OP16(pos) for %s",ename(emc)) ;
|
||||||
if ( negc[emc]>1 ) mess("More then one OP16(neg) for %s",ename(emc)) ;
|
if ( negc[emc]>1 ) mess("More then one OP16(neg) for %s",ename(emc)) ;
|
||||||
|
if ( lposc[emc]>1 ) mess("More then one OP32(pos) for %s",ename(emc)) ;
|
||||||
|
if ( lnegc[emc]>1 ) mess("More then one OP32(neg) for %s",ename(emc)) ;
|
||||||
switch(zf) {
|
switch(zf) {
|
||||||
case MUST:
|
case MUST:
|
||||||
if ( zc[emc]==0 ) mess("No OPNO for %s",ename(emc)) ;
|
if ( zc[emc]==0 ) mess("No OPNO for %s",ename(emc)) ;
|
||||||
|
@ -439,6 +447,7 @@ writeout() {
|
||||||
while (lcodes[i] != -1) {
|
while (lcodes[i] != -1) {
|
||||||
if (!(i % 8)) printf("\n%d", i);
|
if (!(i % 8)) printf("\n%d", i);
|
||||||
printf("\t%s", ename(lcodes[i]));
|
printf("\t%s", ename(lcodes[i]));
|
||||||
|
prx(lflags[i],llows[i],i);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
while (i++ % 8) putchar('\t');
|
while (i++ % 8) putchar('\t');
|
||||||
|
@ -464,6 +473,12 @@ prx(flg,low,opc)
|
||||||
else putchar('l');
|
else putchar('l');
|
||||||
if (flg&OPWORD) putchar('w');
|
if (flg&OPWORD) putchar('w');
|
||||||
break;
|
break;
|
||||||
|
case OP32:
|
||||||
|
if (flg&OP_POS) putchar('P');
|
||||||
|
else if (flg&OP_NEG) putchar('N');
|
||||||
|
else putchar('L');
|
||||||
|
if (flg&OPWORD) putchar('w');
|
||||||
|
break;
|
||||||
case OPSHORT:
|
case OPSHORT:
|
||||||
if (flg & OPWORD) putchar('w');
|
if (flg & OPWORD) putchar('w');
|
||||||
else putchar('s');
|
else putchar('s');
|
||||||
|
|
Loading…
Add table
Reference in a new issue