Commit de0d762a authored by Russ Cox's avatar Russ Cox

accept CALL $(constant) to call absolute PC

R=ken
OCL=34845
CL=34845
parent 11e313ae
...@@ -285,6 +285,7 @@ rom: ...@@ -285,6 +285,7 @@ rom:
} }
| reg | reg
| omem | omem
| imm
rim: rim:
rem rem
......
...@@ -193,6 +193,7 @@ enum ...@@ -193,6 +193,7 @@ enum
Z_rp, Z_rp,
Zbr, Zbr,
Zcall, Zcall,
Zcallcon,
Zib_, Zib_,
Zib_rp, Zib_rp,
Zibo_m, Zibo_m,
......
...@@ -260,7 +260,8 @@ uchar yloop[] = ...@@ -260,7 +260,8 @@ uchar yloop[] =
uchar ycall[] = uchar ycall[] =
{ {
Ynone, Yml, Zo_m, 2, Ynone, Yml, Zo_m, 2,
Ynone, Ybr, Zcall, 1, Ynone, Ybr, Zcall, 0,
Ynone, Yi32, Zcallcon, 1,
0 0
}; };
uchar yjmp[] = uchar yjmp[] =
......
...@@ -105,7 +105,7 @@ start: ...@@ -105,7 +105,7 @@ start:
textsize = c; textsize = c;
n++; n++;
}while(again); }while(again);
if(INITRND) { if(INITRND) {
INITDAT = rnd(c, INITRND); INITDAT = rnd(c, INITRND);
if(INITDAT != idat) { if(INITDAT != idat) {
...@@ -1109,6 +1109,15 @@ found: ...@@ -1109,6 +1109,15 @@ found:
} }
break; break;
case Zcallcon:
v = p->to.offset - p->pc - 5;
*andptr++ = op;
*andptr++ = v;
*andptr++ = v>>8;
*andptr++ = v>>16;
*andptr++ = v>>24;
break;
case Zjmp: case Zjmp:
q = p->pcond; q = p->pcond;
if(q) { if(q) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment