diff --git a/util/ass/.distr b/util/ass/.distr index 257dc5136..a38db649f 100644 --- a/util/ass/.distr +++ b/util/ass/.distr @@ -13,7 +13,6 @@ assda.c assex.h assrl.c ip_spec.h -ip_spec.t maktab.c asprint.p em_ass.6 diff --git a/util/ass/Makefile b/util/ass/Makefile index 5f526c1f7..d93c2586c 100644 --- a/util/ass/Makefile +++ b/util/ass/Makefile @@ -68,8 +68,8 @@ asscm.o: ass00.h asstb.o: asstb.c -asstb.c: maktab ip_spec.t - maktab ip_spec.t asstb.c +asstb.c: maktab $d/etc/ip_spec.t + maktab $d/etc/ip_spec.t asstb.c maktab: maktab.c $h/em_spec.h ip_spec.h $h/em_flag.h \ $l/em_data.a @@ -83,4 +83,4 @@ opr: pr: @(pr ass00.h assex.h ip_spec.h ass?0.c ass[rcd]?.c \ - maktab.c ; pr -3 ip_spec.t) + maktab.c) diff --git a/util/ass/ass30.c b/util/ass/ass30.c index 253580218..2bcbf9778 100644 --- a/util/ass/ass30.c +++ b/util/ass/ass30.c @@ -210,14 +210,10 @@ int i_flag,flag,number ; cons_t val ; { case OPSHORT : if ( val<0 ) val = -1-val ; return val>=0 && val=0 && val<=65535L && + ( i_flag!=PAR_G || val<=maxadr ) ; case OP16 : - /* Commented out for the time being. This must be in - ip_spec.t ... - if ( i_flag==PAR_G ) { - return val>=0 && - val<=maxadr && val <= 65535L; - } - */ return val>= -32768 && val<=32767 ; case OP32 : return TRUE ; @@ -237,6 +233,7 @@ int oplength(flag) int flag ; { case OPMINI : break ; case OP8 : case OPSHORT : cnt++ ; break ; + case OP16U: case OP16 : cnt+=2 ; break ; case OP32 : cnt+=5 ; break ; case OP64 : cnt+=9 ; break ; diff --git a/util/ass/ass50.c b/util/ass/ass50.c index 71c83af13..63b6e1807 100644 --- a/util/ass/ass50.c +++ b/util/ass/ass50.c @@ -149,6 +149,7 @@ genop(startc,value,i_flag) char *startc ; cons_t value ; int i_flag ; { put8((char)value) ; break ; case OP16: + case OP16U: put16(int_cast value) ; break ; case OP32: diff --git a/util/ass/ip_spec.h b/util/ass/ip_spec.h index 72940f5eb..6c5d86dc3 100644 --- a/util/ass/ip_spec.h +++ b/util/ass/ip_spec.h @@ -15,6 +15,7 @@ #define OP16 4 /* 2 2-byte signed operand */ #define OP32 5 /* 4 4-byte signed operand */ #define OP64 6 /* 8 8-byte signed operand */ +#define OP16U 7 /* u 2-byte unsigned operand */ #define OPESC 010 /* e escaped opcode */ #define OPWORD 020 /* w operand is word multiple */ diff --git a/util/ass/maktab.c b/util/ass/maktab.c index fd6e044a9..ace94233b 100644 --- a/util/ass/maktab.c +++ b/util/ass/maktab.c @@ -182,6 +182,8 @@ int decflag(str) char *str ; { check(type) ; type=OP32 ; break ; case '8' : check(type) ; type=OP64 ; break ; + case 'u': + check(type) ; type=OP16U ; break ; case 'e' : check(escape) ; escape=0 ; break ; case 'N' : @@ -202,6 +204,7 @@ int decflag(str) char *str ; { if ( escape!=ILLGL ) error("Conflicting escapes") ; escape=ILLGL ; case OP16 : + case OP16U : case OP8 : case OPSHORT : case OPNO : @@ -284,6 +287,7 @@ int oplength(a) struct opform *a ; { case OPMINI : break ; case OP8 : case OPSHORT : cnt++ ; break ; + case OP16U : case OP16 : cnt+=2 ; break ; case OP32 : cnt+=5 ; break ; case OP64 : cnt+=9 ; break ; @@ -339,6 +343,7 @@ checkall() { else if ( flag&OP_POS ) posc[opc]++ ; break ; + case OP16U : case OP32 : case OP64 : break ;