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
|
||||
.PT .l
|
||||
16-bit argument
|
||||
.PT .L
|
||||
32-bit argument
|
||||
.PT .u
|
||||
16-bit unsigned argument
|
||||
.PT .lw
|
||||
16-bit argument divided by the wordsize
|
||||
.PT .Lw
|
||||
32-bit argument divided by the wordsize
|
||||
.PT .p
|
||||
positive 16-bit argument
|
||||
.PT .P
|
||||
positive 32-bit argument
|
||||
.PT .pw
|
||||
positive 16-bit argument divided by the wordsize
|
||||
.PT .Pw
|
||||
positive 32-bit argument divided by the wordsize
|
||||
.PT .n
|
||||
negative 16-bit argument
|
||||
.PT .N
|
||||
negative 32-bit argument
|
||||
.PT .nw
|
||||
negative 16-bit argument divided by the wordsize
|
||||
.PT .Nw
|
||||
negative 32-bit argument divided by the wordsize
|
||||
.PT .s<num>
|
||||
shortie with <num> as high order argument byte
|
||||
.PT .w<num>
|
||||
|
|
|
@ -462,7 +462,7 @@ Common Table for Neutral State and Arguments
|
|||
.TS
|
||||
tab(:);
|
||||
c c s c
|
||||
l8 l l8 l.
|
||||
l4 l l4 l.
|
||||
class:bytes:description
|
||||
|
||||
<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(|);
|
||||
l s l
|
||||
l s s
|
||||
l 2 lw(46) l.
|
||||
l 2 lw(30) l.
|
||||
Example ASCII|Example compact
|
||||
(LOC = 69, BRA = 18 here):
|
||||
|
||||
|
|
|
@ -120,8 +120,8 @@ The result name 'e' is reserved for the error code.
|
|||
.N 1
|
||||
List of monitor calls.
|
||||
.DS B
|
||||
.ta 2n 8n 16n 32n 48n
|
||||
number name parameters results function
|
||||
.ta 4n 13n 29n 52n
|
||||
nr name parameters results function
|
||||
|
||||
1 Exit status:int Terminate this 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
|
||||
41 Dup fildes,newfildes:int
|
||||
e,fildes:int Duplicate a file descriptor
|
||||
42 Pipe e,w_des,r_des:int
|
||||
Create a pipe
|
||||
42 Pipe e,w_des,r_des:int Create a pipe
|
||||
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
|
||||
47 Getgid e_gid,r_gid:int Get group ID
|
||||
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
|
||||
59 Exece name,argv,envp:ptr
|
||||
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
|
||||
.DE 1
|
||||
Codes 0, 11, 13, 17, 31, 32, 38, 39, 40, 45, 49, 50, 52,
|
||||
|
|
|
@ -227,15 +227,15 @@ int decflag(str) char *str ; {
|
|||
/* ----------- checking --------------*/
|
||||
|
||||
int ecodes[256],codes[256],lcodes[256] ;
|
||||
char eflags[256], flags[256];
|
||||
int elows[256], lows[256];
|
||||
char eflags[256], flags[256], lflags[256] ;
|
||||
int elows[256], lows[256], llows[256];
|
||||
|
||||
#define NMNEM (sp_lmnem-sp_fmnem+1)
|
||||
#define MUST 1
|
||||
#define MAY 2
|
||||
#define FORB 3
|
||||
|
||||
char negc[NMNEM], zc[NMNEM], posc[NMNEM] ;
|
||||
char negc[NMNEM], zc[NMNEM], posc[NMNEM], lnegc[NMNEM], lposc[NMNEM] ;
|
||||
|
||||
checkall() {
|
||||
register i,flag ;
|
||||
|
@ -274,9 +274,13 @@ checkall() {
|
|||
else if ( flag&OP_POS )
|
||||
posc[opc]++ ;
|
||||
break ;
|
||||
case OP16U :
|
||||
case OP32 :
|
||||
case OP64 :
|
||||
if ( flag&OP_NEG )
|
||||
lnegc[opc]++ ;
|
||||
else if ( flag&OP_POS )
|
||||
lposc[opc]++ ;
|
||||
break ;
|
||||
case OP16U :
|
||||
break ;
|
||||
default :
|
||||
error("Illegal type") ;
|
||||
|
@ -345,9 +349,11 @@ chkc(flag,icode,emc,low) {
|
|||
case OP64:
|
||||
if ( lcodes[icode]!=-1 ) {
|
||||
mess("Long opcode %d used by %s and %s",
|
||||
icode,ename(emc),ename(codes[icode])) ;
|
||||
icode,ename(emc),ename(lcodes[icode])) ;
|
||||
}
|
||||
lcodes[icode]=emc;
|
||||
lflags[icode]=flag;
|
||||
llows[icode]=low;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
@ -356,6 +362,8 @@ ckop(emc,zf,pf,nf) {
|
|||
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 ( 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) {
|
||||
case MUST:
|
||||
if ( zc[emc]==0 ) mess("No OPNO for %s",ename(emc)) ;
|
||||
|
@ -439,6 +447,7 @@ writeout() {
|
|||
while (lcodes[i] != -1) {
|
||||
if (!(i % 8)) printf("\n%d", i);
|
||||
printf("\t%s", ename(lcodes[i]));
|
||||
prx(lflags[i],llows[i],i);
|
||||
i++;
|
||||
}
|
||||
while (i++ % 8) putchar('\t');
|
||||
|
@ -464,6 +473,12 @@ prx(flg,low,opc)
|
|||
else putchar('l');
|
||||
if (flg&OPWORD) putchar('w');
|
||||
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:
|
||||
if (flg & OPWORD) putchar('w');
|
||||
else putchar('s');
|
||||
|
|
Loading…
Reference in a new issue