Model 3 (Intelligent Calls) implemented (Remco Feenstra & Peter Boersma);
a few bugs fixed
This commit is contained in:
parent
c7c79e9b42
commit
4355b05597
|
@ -1,3 +1,10 @@
|
|||
21-Jun-90 Ceriel Jacobs (ceriel) at ceriel
|
||||
fixed bug in FEF: did not work on 0.0
|
||||
|
||||
20-Jun-90 Remco Feenstra & Peter Boersma
|
||||
Implemented model 3 (intelligent calls)
|
||||
Fixed bug in INN and SET
|
||||
|
||||
31-Jan-90 Ceriel Jacobs (ceriel) at ceriel
|
||||
Fixed getpid() version of MON.
|
||||
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
- Reduction of repetetivity in the code
|
||||
Before making any major changes to the interpreter, it would be good to
|
||||
implement Model 3 (Intelligent Calls), as described in the interpreter
|
||||
documentation. This will reduce the bulk of the code considerably, since then
|
||||
there will be only one routine for each instruction. Now identical changes
|
||||
have to be made in n places.
|
||||
|
||||
|
||||
- Shadow bytes with internal values
|
||||
The biggest problem with the interpreter is that undefinedness is not
|
||||
transitive. A warning is given if an undefined value is used, but then the
|
||||
|
|
|
@ -18,86 +18,30 @@
|
|||
|
||||
PRIVATE arr();
|
||||
|
||||
DoLARl2(arg)
|
||||
DoLAR(arg)
|
||||
size arg;
|
||||
{
|
||||
/* LAR w: Load array element, descriptor contains integers of size w */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@A6 DoLARl2(%ld)", l));
|
||||
arr(LAR, arg_wi(l));
|
||||
}
|
||||
|
||||
DoLARm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* LAR w: Load array element, descriptor contains integers of size w */
|
||||
LOG(("@A6 DoLARm(%ld)", arg));
|
||||
LOG(("@A6 DoLAR(%ld)", arg));
|
||||
arr(LAR, arg_wi(arg));
|
||||
}
|
||||
|
||||
DoLARz()
|
||||
{
|
||||
/* LAR w: Load array element, descriptor contains integers of size w */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@A6 DoLARz(%ld)", l));
|
||||
arr(LAR, arg_wi(l));
|
||||
}
|
||||
|
||||
DoSARl2(arg)
|
||||
DoSAR(arg)
|
||||
size arg;
|
||||
{
|
||||
/* SAR w: Store array element */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@A6 DoSARl2(%ld)", l));
|
||||
arr(SAR, arg_wi(l));
|
||||
}
|
||||
|
||||
DoSARm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* SAR w: Store array element */
|
||||
LOG(("@A6 DoSARm(%ld)", arg));
|
||||
LOG(("@A6 DoSAR(%ld)", arg));
|
||||
arr(SAR, arg_wi(arg));
|
||||
}
|
||||
|
||||
DoSARz()
|
||||
{
|
||||
/* SAR w: Store array element */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@A6 DoSARz(%ld)", l));
|
||||
arr(SAR, arg_wi(l));
|
||||
}
|
||||
|
||||
DoAARl2(arg)
|
||||
DoAAR(arg)
|
||||
size arg;
|
||||
{
|
||||
/* AAR w: Load address of array element */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@A6 DoAARl2(%ld)", l));
|
||||
arr(AAR, arg_wi(l));
|
||||
}
|
||||
|
||||
DoAARm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* AAR w: Load address of array element */
|
||||
LOG(("@A6 DoAARm(%ld)", arg));
|
||||
LOG(("@A6 DoAAR(%ld)", arg));
|
||||
arr(AAR, arg_wi(arg));
|
||||
}
|
||||
|
||||
DoAARz()
|
||||
{
|
||||
/* AAR w: Load address of array element */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@A6 DoAARz(%ld)", l));
|
||||
arr(AAR, arg_wi(l));
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
* Array arithmetic *
|
||||
|
|
|
@ -21,494 +21,148 @@
|
|||
|
||||
#define do_jump(j) { newPC(PC + (j)); }
|
||||
|
||||
DoBRAl2(arg)
|
||||
long arg;
|
||||
DoBRA(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BRA b: Branch unconditionally to label b */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoBRAl2(%ld)", jump));
|
||||
LOG(("@B6 DoBRA(%ld)", jump));
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBRAl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BRA b: Branch unconditionally to label b */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoBRAl4(%ld)", jump));
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBRAs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BRA b: Branch unconditionally to label b */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoBRAs(%ld)", jump));
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLTl2(arg)
|
||||
long arg;
|
||||
DoBLT(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BLT b: Branch less (pop 2 words, branch if top > second) */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLTl2(%ld)", jump));
|
||||
LOG(("@B6 DoBLT(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLTl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BLT b: Branch less (pop 2 words, branch if top > second) */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLTl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLTs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BLT b: Branch less (pop 2 words, branch if top > second) */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLTs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLEl2(arg)
|
||||
long arg;
|
||||
DoBLE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BLE b: Branch less or equal */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLEl2(%ld)", jump));
|
||||
LOG(("@B6 DoBLE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BLE b: Branch less or equal */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBLEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BLE b: Branch less or equal */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBLEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBEQl2(arg)
|
||||
long arg;
|
||||
DoBEQ(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BEQ b: Branch equal */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBEQl2(%ld)", jump));
|
||||
LOG(("@B6 DoBEQ(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t == wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBEQl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BEQ b: Branch equal */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBEQl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t == wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBEQs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BEQ b: Branch equal */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBEQs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t == wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBNEl2(arg)
|
||||
long arg;
|
||||
DoBNE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BNE b: Branch not equal */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBNEl2(%ld)", jump));
|
||||
LOG(("@B6 DoBNE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t != wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBNEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BNE b: Branch not equal */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBNEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t != wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBNEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BNE b: Branch not equal */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBNEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (t != wpop())
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGEl2(arg)
|
||||
long arg;
|
||||
DoBGE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BGE b: Branch greater or equal */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGEl2(%ld)", jump));
|
||||
LOG(("@B6 DoBGE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BGE b: Branch greater or equal */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BGE b: Branch greater or equal */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGTl2(arg)
|
||||
long arg;
|
||||
DoBGT(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* BGT b: Branch greater */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGTl2(%ld)", jump));
|
||||
LOG(("@B6 DoBGT(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGTl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* BGT b: Branch greater */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGTl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoBGTs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BGT b: Branch greater */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
register long t = wpop();
|
||||
|
||||
LOG(("@B6 DoBGTs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > t)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLTl2(arg)
|
||||
long arg;
|
||||
DoZLT(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZLT b: Branch less than zero (pop 1 word, branch negative) */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZLTl2(%ld)", jump));
|
||||
LOG(("@B6 DoZLT(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLTl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZLT b: Branch less than zero (pop 1 word, branch negative) */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZLTl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLTs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZLT b: Branch less than zero (pop 1 word, branch negative) */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZLTs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() < 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLEl2(arg)
|
||||
long arg;
|
||||
DoZLE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZLE b: Branch less or equal to zero */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZLEl2(%ld)", jump));
|
||||
LOG(("@B6 DoZLE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZLE b: Branch less or equal to zero */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZLEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZLEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZLE b: Branch less or equal to zero */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZLEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() <= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZEQl2(arg)
|
||||
long arg;
|
||||
DoZEQ(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZEQ b: Branch equal zero */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZEQl2(%ld)", jump));
|
||||
LOG(("@B6 DoZEQ(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() == 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZEQl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZEQ b: Branch equal zero */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZEQl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() == 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZEQs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZEQ b: Branch equal zero */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZEQs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() == 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZNEl2(arg)
|
||||
long arg;
|
||||
DoZNE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZNE b: Branch not zero */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZNEl2(%ld)", jump));
|
||||
LOG(("@B6 DoZNE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() != 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZNEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZNE b: Branch not zero */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZNEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() != 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZNEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZNE b: Branch not zero */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZNEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() != 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGEl2(arg)
|
||||
long arg;
|
||||
DoZGE(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZGE b: Branch greater or equal zero */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZGEl2(%ld)", jump));
|
||||
LOG(("@B6 DoZGE(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZGE b: Branch greater or equal zero */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZGEl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZGE b: Branch greater or equal zero */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZGEs(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() >= 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGTl2(arg)
|
||||
long arg;
|
||||
DoZGT(jump)
|
||||
register long jump;
|
||||
{
|
||||
/* ZGT b: Branch greater than zero */
|
||||
register long jump = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@B6 DoZGTl2(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGTl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZGT b: Branch greater than zero */
|
||||
register long jump = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@B6 DoZGTl4(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > 0)
|
||||
do_jump(arg_c(jump));
|
||||
}
|
||||
|
||||
DoZGTs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZGT b: Branch greater than zero */
|
||||
register long jump = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@B6 DoZGTs(%ld)", jump));
|
||||
LOG(("@B6 DoZGT(%ld)", jump));
|
||||
spoilFRA();
|
||||
if (wpop() > 0)
|
||||
do_jump(arg_c(jump));
|
||||
|
|
|
@ -22,91 +22,27 @@ extern double fpop();
|
|||
|
||||
PRIVATE compare_obj();
|
||||
|
||||
DoCMIl2(arg)
|
||||
size arg;
|
||||
DoCMI(l)
|
||||
register size l;
|
||||
{
|
||||
/* CMI w: Compare w byte integers, Push negative, zero, positive for <, = or > */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
register long s = spop(l);
|
||||
|
||||
LOG(("@T6 DoCMIl2(%ld)", l));
|
||||
LOG(("@T6 DoCMI(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoCMIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* CMI w: Compare w byte integers, Push negative, zero, positive for <, = or > */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
register long s = spop(l);
|
||||
|
||||
LOG(("@T6 DoCMIm(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoCMIz()
|
||||
{
|
||||
/* CMI w: Compare w byte integers, Push negative, zero, positive for <, = or > */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
register long s = spop(l);
|
||||
|
||||
LOG(("@T6 DoCMIz(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoCMFl2(arg)
|
||||
size arg;
|
||||
DoCMF(l)
|
||||
register size l;
|
||||
{
|
||||
/* CMF w: Compare w byte reals */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
double s = fpop(l);
|
||||
|
||||
LOG(("@T6 DoCMFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCMFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* CMF w: Compare w byte reals */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
double t = fpop(arg_wf(l));
|
||||
double s = fpop(l);
|
||||
|
||||
LOG(("@T6 DoCMFs(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
#else NOFLOAT
|
||||
hob = hob;
|
||||
wfac = wfac;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCMFz()
|
||||
{
|
||||
/* CMF w: Compare w byte reals */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
double s = fpop(l);
|
||||
|
||||
LOG(("@T6 DoCMFz(%ld)", l));
|
||||
LOG(("@T6 DoCMF(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
#else NOFLOAT
|
||||
|
@ -114,120 +50,84 @@ DoCMFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCMUl2(arg)
|
||||
size arg;
|
||||
DoCMU(l)
|
||||
register size l;
|
||||
{
|
||||
/* CMU w: Compare w byte unsigneds */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
register unsigned long s = upop(l);
|
||||
|
||||
LOG(("@T6 DoCMUl2(%ld)", l));
|
||||
LOG(("@T6 DoCMU(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoCMUz()
|
||||
{
|
||||
/* CMU w: Compare w byte unsigneds */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
register unsigned long s = upop(l);
|
||||
|
||||
LOG(("@T6 DoCMUz(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoCMSl2(arg)
|
||||
size arg;
|
||||
DoCMS(l)
|
||||
register size l;
|
||||
{
|
||||
/* CMS w: Compare w byte values, can only be used for bit for bit equality test */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@T6 DoCMSl2(%ld)", l));
|
||||
LOG(("@T6 DoCMS(%ld)", l));
|
||||
spoilFRA();
|
||||
compare_obj(arg_w(l));
|
||||
}
|
||||
|
||||
DoCMSs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* CMS w: Compare w byte values, can only be used for bit for bit equality test */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@T6 DoCMSs(%ld)", l));
|
||||
spoilFRA();
|
||||
compare_obj(arg_w(l));
|
||||
}
|
||||
|
||||
DoCMSz()
|
||||
{
|
||||
/* CMS w: Compare w byte values, can only be used for bit for bit equality test */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@T6 DoCMSz(%ld)", l));
|
||||
spoilFRA();
|
||||
compare_obj(arg_w(l));
|
||||
}
|
||||
|
||||
DoCMPz()
|
||||
DoCMP()
|
||||
{
|
||||
/* CMP -: Compare pointers */
|
||||
register ptr t, s;
|
||||
|
||||
LOG(("@T6 DoCMPz()"));
|
||||
LOG(("@T6 DoCMP()"));
|
||||
spoilFRA();
|
||||
t = dppop();
|
||||
s = dppop();
|
||||
wpush((long)(t < s ? 1 : t > s ? -1 : 0));
|
||||
}
|
||||
|
||||
DoTLTz()
|
||||
DoTLT()
|
||||
{
|
||||
/* TLT -: True if less, i.e. iff top of stack < 0 */
|
||||
LOG(("@T6 DoTLTz()"));
|
||||
LOG(("@T6 DoTLT()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() < 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
DoTLEz()
|
||||
DoTLE()
|
||||
{
|
||||
/* TLE -: True if less or equal, i.e. iff top of stack <= 0 */
|
||||
LOG(("@T6 DoTLEz()"));
|
||||
LOG(("@T6 DoTLE()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() <= 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
DoTEQz()
|
||||
DoTEQ()
|
||||
{
|
||||
/* TEQ -: True if equal, i.e. iff top of stack = 0 */
|
||||
LOG(("@T6 DoTEQz()"));
|
||||
LOG(("@T6 DoTEQ()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() == 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
DoTNEz()
|
||||
DoTNE()
|
||||
{
|
||||
/* TNE -: True if not equal, i.e. iff top of stack non zero */
|
||||
LOG(("@T6 DoTNEz()"));
|
||||
LOG(("@T6 DoTNE()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() != 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
DoTGEz()
|
||||
DoTGE()
|
||||
{
|
||||
/* TGE -: True if greater or equal, i.e. iff top of stack >= 0 */
|
||||
LOG(("@T6 DoTGEz()"));
|
||||
LOG(("@T6 DoTGE()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() >= 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
DoTGTz()
|
||||
DoTGT()
|
||||
{
|
||||
/* TGT -: True if greater, i.e. iff top of stack > 0 */
|
||||
LOG(("@T6 DoTGTz()"));
|
||||
LOG(("@T6 DoTGT()"));
|
||||
spoilFRA();
|
||||
wpush((long)(wpop() > 0 ? 1 : 0));
|
||||
}
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
extern double fpop();
|
||||
#endif NOFLOAT
|
||||
|
||||
DoCIIz()
|
||||
DoCII()
|
||||
{
|
||||
/* CII -: Convert integer to integer (*) */
|
||||
register int newsize = swpop();
|
||||
register long s;
|
||||
|
||||
LOG(("@C6 DoCIIz()"));
|
||||
LOG(("@C6 DoCII()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 12:
|
||||
|
@ -62,13 +62,13 @@ DoCIIz()
|
|||
}
|
||||
}
|
||||
|
||||
DoCUIz()
|
||||
DoCUI()
|
||||
{
|
||||
/* CUI -: Convert unsigned to integer (*) */
|
||||
register int newsize = swpop();
|
||||
register unsigned long u;
|
||||
|
||||
LOG(("@C6 DoCUIz()"));
|
||||
LOG(("@C6 DoCUI()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 22:
|
||||
|
@ -112,14 +112,14 @@ DoCUIz()
|
|||
}
|
||||
}
|
||||
|
||||
DoCFIz()
|
||||
DoCFI()
|
||||
{
|
||||
/* CFI -: Convert floating to integer (*) */
|
||||
#ifndef NOFLOAT
|
||||
register int newsize = swpop();
|
||||
double f;
|
||||
|
||||
LOG(("@C6 DoCFIz()"));
|
||||
LOG(("@C6 DoCFI()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 42:
|
||||
|
@ -168,13 +168,13 @@ DoCFIz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCIFz()
|
||||
DoCIF()
|
||||
{
|
||||
/* CIF -: Convert integer to floating (*) */
|
||||
#ifndef NOFLOAT
|
||||
register int newsize = swpop();
|
||||
|
||||
LOG(("@C6 DoCIFz()"));
|
||||
LOG(("@C6 DoCIF()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 24:
|
||||
|
@ -203,14 +203,14 @@ DoCIFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCUFz()
|
||||
DoCUF()
|
||||
{
|
||||
/* CUF -: Convert unsigned to floating (*) */
|
||||
#ifndef NOFLOAT
|
||||
register int newsize = swpop();
|
||||
register unsigned long u;
|
||||
|
||||
LOG(("@C6 DoCUFz()"));
|
||||
LOG(("@C6 DoCUF()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 24:
|
||||
|
@ -249,13 +249,13 @@ DoCUFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCFFz()
|
||||
DoCFF()
|
||||
{
|
||||
/* CFF -: Convert floating to floating (*) */
|
||||
#ifndef NOFLOAT
|
||||
register int newsize = swpop();
|
||||
|
||||
LOG(("@C6 DoCFFz()"));
|
||||
LOG(("@C6 DoCFF()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 44:
|
||||
|
@ -276,13 +276,13 @@ DoCFFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoCIUz()
|
||||
DoCIU()
|
||||
{
|
||||
/* CIU -: Convert integer to unsigned */
|
||||
register int newsize = swpop();
|
||||
register long u;
|
||||
|
||||
LOG(("@C6 DoCIUz()"));
|
||||
LOG(("@C6 DoCIU()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 22:
|
||||
|
@ -310,12 +310,12 @@ DoCIUz()
|
|||
}
|
||||
}
|
||||
|
||||
DoCUUz()
|
||||
DoCUU()
|
||||
{
|
||||
/* CUU -: Convert unsigned to unsigned */
|
||||
register int newsize = swpop();
|
||||
|
||||
LOG(("@C6 DoCUUz()"));
|
||||
LOG(("@C6 DoCUU()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 22:
|
||||
|
@ -342,14 +342,14 @@ DoCUUz()
|
|||
}
|
||||
}
|
||||
|
||||
DoCFUz()
|
||||
DoCFU()
|
||||
{
|
||||
/* CFU -: Convert floating to unsigned */
|
||||
#ifndef NOFLOAT
|
||||
register int newsize = swpop();
|
||||
double f;
|
||||
|
||||
LOG(("@C6 DoCFUz()"));
|
||||
LOG(("@C6 DoCFU()"));
|
||||
spoilFRA();
|
||||
switch ((int)(10 * swpop() + newsize)) {
|
||||
case 42:
|
||||
|
|
|
@ -28,50 +28,14 @@ PRIVATE fef(), fif();
|
|||
|
||||
#endif NOFLOAT
|
||||
|
||||
DoADFl2(arg)
|
||||
size arg;
|
||||
DoADF(l)
|
||||
register size l;
|
||||
{
|
||||
/* ADF w: Floating add (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoADFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(adf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoADFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ADF w: Floating add (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoADFs(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(adf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
hob = hob;
|
||||
wfac = wfac;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoADFz()
|
||||
{
|
||||
/* ADF w: Floating add (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoADFz(%ld)", l));
|
||||
LOG(("@F6 DoADF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(adf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
|
@ -79,50 +43,14 @@ DoADFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoSBFl2(arg)
|
||||
size arg;
|
||||
DoSBF(l)
|
||||
register size l;
|
||||
{
|
||||
/* SBF w: Floating subtract (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoSBFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(sbf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoSBFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* SBF w: Floating subtract (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoSBFs(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(sbf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
hob = hob;
|
||||
wfac = wfac;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoSBFz()
|
||||
{
|
||||
/* SBF w: Floating subtract (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoSBFz(%ld)", l));
|
||||
LOG(("@F6 DoSBF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(sbf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
|
@ -130,50 +58,14 @@ DoSBFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoMLFl2(arg)
|
||||
size arg;
|
||||
DoMLF(l)
|
||||
register size l;
|
||||
{
|
||||
/* MLF w: Floating multiply (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoMLFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(mlf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoMLFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* MLF w: Floating multiply (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoMLFs(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(mlf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
hob = hob;
|
||||
wfac = wfac;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoMLFz()
|
||||
{
|
||||
/* MLF w: Floating multiply (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoMLFz(%ld)", l));
|
||||
LOG(("@F6 DoMLF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(mlf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
|
@ -181,50 +73,14 @@ DoMLFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoDVFl2(arg)
|
||||
size arg;
|
||||
DoDVF(l)
|
||||
register size l;
|
||||
{
|
||||
/* DVF w: Floating divide (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoDVFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(dvf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoDVFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* DVF w: Floating divide (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoDVFs(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(dvf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
hob = hob;
|
||||
wfac = wfac;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoDVFz()
|
||||
{
|
||||
/* DVF w: Floating divide (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoDVFz(%ld)", l));
|
||||
LOG(("@F6 DoDVF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(dvf(fpop(l), t), l);
|
||||
#else NOFLOAT
|
||||
|
@ -232,31 +88,14 @@ DoDVFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoNGFl2(arg)
|
||||
size arg;
|
||||
DoNGF(l)
|
||||
register size l;
|
||||
{
|
||||
/* NGF w: Floating negate (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoNGFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(-t, l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoNGFz()
|
||||
{
|
||||
/* NGF w: Floating negate (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoNGFz(%ld)", l));
|
||||
LOG(("@F6 DoNGF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(-t, l);
|
||||
#else NOFLOAT
|
||||
|
@ -264,31 +103,14 @@ DoNGFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoFIFl2(arg)
|
||||
size arg;
|
||||
DoFIF(l)
|
||||
register size l;
|
||||
{
|
||||
/* FIF w: Floating multiply and split integer and fraction part (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoFIFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fif(fpop(l), t, l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoFIFz()
|
||||
{
|
||||
/* FIF w: Floating multiply and split integer and fraction part (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
double t = fpop(arg_wf(l));
|
||||
|
||||
LOG(("@F6 DoFIFz(%ld)", l));
|
||||
LOG(("@F6 DoFIF(%ld)", l));
|
||||
spoilFRA();
|
||||
fif(fpop(l), t, l);
|
||||
#else NOFLOAT
|
||||
|
@ -296,29 +118,12 @@ DoFIFz()
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoFEFl2(arg)
|
||||
size arg;
|
||||
DoFEF(l)
|
||||
register size l;
|
||||
{
|
||||
/* FEF w: Split floating number in exponent and fraction part (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@F6 DoFEFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
fef(fpop(arg_wf(l)), l);
|
||||
#else NOFLOAT
|
||||
arg = arg;
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoFEFz()
|
||||
{
|
||||
/* FEF w: Split floating number in exponent and fraction part (*) */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@F6 DoFEFz(%ld)", l));
|
||||
LOG(("@F6 DoFEF(%ld)", l));
|
||||
spoilFRA();
|
||||
fef(fpop(arg_wf(l)), l);
|
||||
#else NOFLOAT
|
||||
|
@ -454,6 +259,12 @@ PRIVATE fef(f, n)
|
|||
{
|
||||
register long exponent, sign = (long) (f < 0.0);
|
||||
|
||||
if (f == 0.0) {
|
||||
fpush(f, n);
|
||||
wpush(0L);
|
||||
return;
|
||||
}
|
||||
|
||||
for (f = fabs(f), exponent = 0; f >= 1.0; exponent++)
|
||||
f /= 2.0;
|
||||
|
||||
|
|
|
@ -16,365 +16,99 @@
|
|||
|
||||
PRIVATE long inc(), dec();
|
||||
|
||||
DoINCz()
|
||||
DoINC()
|
||||
{
|
||||
/* INC -: Increment word on top of stack by 1 (*) */
|
||||
LOG(("@Z6 DoINCz()"));
|
||||
LOG(("@Z6 DoINC()"));
|
||||
spoilFRA();
|
||||
wpush(inc(swpop()));
|
||||
}
|
||||
|
||||
DoINLm(arg)
|
||||
long arg;
|
||||
DoINL(l)
|
||||
register long l;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = arg_l(arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLm(%ld)", l));
|
||||
LOG(("@Z6 DoINL(%ld)", l));
|
||||
spoilFRA();
|
||||
p = loc_addr(l);
|
||||
p = loc_addr(arg_l(l));
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINLn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = (N_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLn2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = (N_arg_4() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = (P_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = (P_arg_4() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* INL l: Increment local or parameter (*) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoINLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, inc(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINEl2(arg)
|
||||
long arg;
|
||||
DoINE(arg)
|
||||
register long arg;
|
||||
{
|
||||
/* INE g: Increment external (*) */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@Z6 DoINEl2(%lu)", p));
|
||||
LOG(("@Z6 DoINE(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, inc(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* INE g: Increment external (*) */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@Z6 DoINEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, inc(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoINEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* INE g: Increment external (*) */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Z6 DoINEs(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, inc(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDECz()
|
||||
DoDEC()
|
||||
{
|
||||
/* DEC -: Decrement word on top of stack by 1 (*) */
|
||||
LOG(("@Z6 DoDECz()"));
|
||||
LOG(("@Z6 DoDEC()"));
|
||||
spoilFRA();
|
||||
wpush(dec(swpop()));
|
||||
}
|
||||
|
||||
DoDELn2(arg)
|
||||
long arg;
|
||||
DoDEL(l)
|
||||
register long l;
|
||||
{
|
||||
/* DEL l: Decrement local or parameter (*) */
|
||||
register long l = (N_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoDELn2(%ld)", l));
|
||||
LOG(("@Z6 DoDEL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, dec(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDELn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* DEL l: Decrement local or parameter (*) */
|
||||
register long l = (N_arg_4() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoDELn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, dec(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDELp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* DEL l: Decrement local or parameter (*) */
|
||||
register long l = (P_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoDELp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, dec(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDELp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* DEL l: Decrement local or parameter (*) */
|
||||
register long l = (P_arg_4() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoDELp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, dec(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDELs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* DEL l: Decrement local or parameter (*) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@Z6 DoDELs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
p = loc_addr(l);
|
||||
st_stw(p, dec(st_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDEEl2(arg)
|
||||
long arg;
|
||||
DoDEE(arg)
|
||||
register long arg;
|
||||
{
|
||||
/* DEE g: Decrement external (*) */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@Z6 DoDEEl2(%lu)", p));
|
||||
LOG(("@Z6 DoDEE(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, dec(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDEEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* DEE g: Decrement external (*) */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@Z6 DoDEEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, dec(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoDEEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* DEE g: Decrement external (*) */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Z6 DoDEEs(%lu)", p));
|
||||
spoilFRA();
|
||||
p = arg_g(p);
|
||||
dt_stw(p, dec(dt_ldsw(p)));
|
||||
}
|
||||
|
||||
DoZRLm(arg)
|
||||
long arg;
|
||||
DoZRL(l)
|
||||
register long l;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@Z6 DoZRLm(%ld)", l));
|
||||
spoilFRA();
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZRLn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@Z6 DoZRLn2(%ld)", l));
|
||||
LOG(("@Z6 DoZRL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZRLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@Z6 DoZRLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZRLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@Z6 DoZRLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZRLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@Z6 DoZRLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZRLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZRL l: Zero local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Z6 DoZRLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
st_stw(loc_addr(l), 0L);
|
||||
}
|
||||
|
||||
DoZREl2(arg)
|
||||
long arg;
|
||||
DoZRE(arg)
|
||||
register long arg;
|
||||
{
|
||||
/* ZRE g: Zero external */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@Z6 DoZREl2(%lu)", p));
|
||||
LOG(("@Z6 DoZRE(%lu)", p));
|
||||
spoilFRA();
|
||||
dt_stw(arg_g(p), 0L);
|
||||
}
|
||||
|
||||
DoZREl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ZRE g: Zero external */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@Z6 DoZREl4(%lu)", p));
|
||||
spoilFRA();
|
||||
dt_stw(arg_g(p), 0L);
|
||||
}
|
||||
|
||||
DoZREs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZRE g: Zero external */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Z6 DoZREs(%lu)", p));
|
||||
spoilFRA();
|
||||
dt_stw(arg_g(p), 0L);
|
||||
}
|
||||
|
||||
DoZRFl2(arg)
|
||||
size arg;
|
||||
DoZRF(l)
|
||||
register size l;
|
||||
{
|
||||
/* ZRF w: Load a floating zero of size w */
|
||||
#ifndef NOFLOAT
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@Z6 DoZRFl2(%ld)", l));
|
||||
LOG(("@Z6 DoZRF(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(0.0, arg_wf(l));
|
||||
#else NOFLOAT
|
||||
|
@ -383,54 +117,20 @@ DoZRFl2(arg)
|
|||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoZRFz()
|
||||
{
|
||||
/* ZRF w: Load a floating zero of size w */
|
||||
#ifndef NOFLOAT
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@Z6 DoZRFz(%ld)", l));
|
||||
spoilFRA();
|
||||
fpush(0.0, arg_wf(l));
|
||||
#else NOFLOAT
|
||||
nofloat();
|
||||
#endif NOFLOAT
|
||||
}
|
||||
|
||||
DoZERl2(arg)
|
||||
size arg;
|
||||
DoZER(l)
|
||||
register size l;
|
||||
{
|
||||
/* ZER w: Load w zero bytes */
|
||||
register size i, l = (L_arg_2() * arg);
|
||||
register size i;
|
||||
|
||||
LOG(("@Z6 DoZERl2(%ld)", l));
|
||||
spoilFRA();
|
||||
for (i = arg_w(l); i; i -= wsize)
|
||||
wpush(0L);
|
||||
}
|
||||
|
||||
DoZERs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ZER w: Load w zero bytes */
|
||||
register size i, l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Z6 DoZERs(%ld)", l));
|
||||
spoilFRA();
|
||||
for (i = arg_w(l); i; i -= wsize)
|
||||
wpush(0L);
|
||||
}
|
||||
|
||||
DoZERz()
|
||||
{
|
||||
/* ZER w: Load w zero bytes */
|
||||
register size i, l = swpop();
|
||||
|
||||
LOG(("@Z6 DoZERz(%ld)", l));
|
||||
LOG(("@Z6 DoZER(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(0L, arg_w(l));
|
||||
|
||||
/*
|
||||
for (i = arg_w(l); i; i -= wsize)
|
||||
wpush(0L);
|
||||
*/
|
||||
}
|
||||
|
||||
PRIVATE long inc(l)
|
||||
|
|
|
@ -16,261 +16,91 @@
|
|||
|
||||
PRIVATE long adi(), sbi(), dvi(), mli(), rmi(), ngi(), sli(), sri();
|
||||
|
||||
DoADIl2(arg)
|
||||
size arg;
|
||||
DoADI(l)
|
||||
register size l;
|
||||
{
|
||||
/* ADI w: Addition (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoADIl2(%ld)", l));
|
||||
LOG(("@I6 DoADI(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(adi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoADIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* ADI w: Addition (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
|
||||
LOG(("@I6 DoADIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(adi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoADIz() /* argument on top of stack */
|
||||
{
|
||||
/* ADI w: Addition (*) */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoADIz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(adi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSBIl2(arg)
|
||||
size arg;
|
||||
DoSBI(l)
|
||||
register size l;
|
||||
{
|
||||
/* SBI w: Subtraction (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoSBIl2(%ld)", l));
|
||||
LOG(("@I6 DoSBI(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(sbi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSBIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* SBI w: Subtraction (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
|
||||
LOG(("@I6 DoSBIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(sbi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSBIz() /* arg on top of stack */
|
||||
{
|
||||
/* SBI w: Subtraction (*) */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoSBIz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(sbi(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoMLIl2(arg)
|
||||
size arg;
|
||||
DoMLI(l)
|
||||
register size l;
|
||||
{
|
||||
/* MLI w: Multiplication (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoMLIl2(%ld)", l));
|
||||
LOG(("@I6 DoMLI(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(mli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoMLIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* MLI w: Multiplication (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
|
||||
LOG(("@I6 DoMLIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(mli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoMLIz() /* arg on top of stack */
|
||||
{
|
||||
/* MLI w: Multiplication (*) */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoMLIz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(mli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoDVIl2(arg)
|
||||
size arg;
|
||||
DoDVI(l)
|
||||
register size l;
|
||||
{
|
||||
/* DVI w: Division (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoDVIl2(%ld)", l));
|
||||
LOG(("@I6 DoDVI(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(dvi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoDVIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* DVI w: Division (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
|
||||
LOG(("@I6 DoDVIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(dvi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoDVIz() /* arg on top of stack */
|
||||
{
|
||||
/* DVI w: Division (*) */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoDVIz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(dvi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoRMIl2(arg)
|
||||
size arg;
|
||||
DoRMI(l)
|
||||
register size l;
|
||||
{
|
||||
/* RMI w: Remainder (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoRMIl2(%ld)", l));
|
||||
LOG(("@I6 DoRMI(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(rmi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoRMIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* RMI w: Remainder (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = spop(l);
|
||||
|
||||
LOG(("@I6 DoRMIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(rmi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoRMIz() /* arg on top of stack */
|
||||
{
|
||||
/* RMI w: Remainder (*) */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
|
||||
LOG(("@I6 DoRMIz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(rmi(spop(l), t), l);
|
||||
}
|
||||
|
||||
DoNGIl2(arg)
|
||||
size arg;
|
||||
DoNGI(l)
|
||||
register size l;
|
||||
{
|
||||
/* NGI w: Negate (two's complement) (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@I6 DoNGIl2(%ld)", l));
|
||||
LOG(("@I6 DoNGI(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(ngi(spop(l), l), l);
|
||||
}
|
||||
|
||||
DoNGIz()
|
||||
{
|
||||
/* NGI w: Negate (two's complement) (*) */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@I6 DoNGIz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(ngi(spop(l), l), l);
|
||||
}
|
||||
|
||||
DoSLIl2(arg)
|
||||
size arg;
|
||||
DoSLI(l)
|
||||
register size l;
|
||||
{
|
||||
/* SLI w: Shift left (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = swpop();
|
||||
|
||||
LOG(("@I6 DoSLIl2(%ld)", l));
|
||||
LOG(("@I6 DoSLI(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(sli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSLIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* SLI w: Shift left (*) */
|
||||
register size l = arg_wi(arg);
|
||||
register long t = swpop();
|
||||
|
||||
LOG(("@I6 DoSLIm(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(sli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSLIz()
|
||||
{
|
||||
/* SLI w: Shift left (*) */
|
||||
register size l = uwpop();
|
||||
register long t = swpop();
|
||||
|
||||
LOG(("@I6 DoSLIz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(sli(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSRIl2(arg)
|
||||
size arg;
|
||||
DoSRI(l)
|
||||
register size l;
|
||||
{
|
||||
/* SRI w: Shift right (*) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = swpop();
|
||||
|
||||
LOG(("@I6 DoSRIl2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(sri(spop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSRIz()
|
||||
{
|
||||
/* SRI w: Shift right (*) */
|
||||
register size l = uwpop();
|
||||
register long t = swpop();
|
||||
|
||||
LOG(("@I6 DoSRIz(%ld)", l));
|
||||
LOG(("@I6 DoSRI(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush(sri(spop(l), t, l), l);
|
||||
|
|
|
@ -16,528 +16,138 @@
|
|||
|
||||
PRIVATE ptr lexback_LB();
|
||||
|
||||
DoLOCl2(arg)
|
||||
long arg;
|
||||
DoLOC(l)
|
||||
register long l;
|
||||
{
|
||||
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
||||
register long l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLOCl2(%ld)", l));
|
||||
LOG(("@L6 DoLOC(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush(arg_c(l));
|
||||
}
|
||||
|
||||
DoLOCl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
||||
register long l = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLOCl4(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush(arg_c(l));
|
||||
}
|
||||
|
||||
DoLOCm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
||||
long l = arg_c(arg);
|
||||
|
||||
LOG(("@L6 DoLOCm(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush(l);
|
||||
}
|
||||
|
||||
DoLOCs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLOCs(%ld)", l));
|
||||
spoilFRA();
|
||||
wpush(arg_c(l));
|
||||
}
|
||||
|
||||
DoLDCl2(arg)
|
||||
long arg;
|
||||
DoLDC(l)
|
||||
register long l;
|
||||
{
|
||||
/* LDC d: Load double constant ( push two words ) */
|
||||
register long l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLDCl2(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(arg_d(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDCl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDC d: Load double constant ( push two words ) */
|
||||
register long l = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLDCl4(%ld)", l));
|
||||
spoilFRA();
|
||||
npush(arg_d(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDCm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDC d: Load double constant ( push two words ) */
|
||||
register long l = arg_d(arg);
|
||||
|
||||
LOG(("@L6 DoLDCm(%ld)", l));
|
||||
LOG(("@L6 DoLDC(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_d(l);
|
||||
npush(l, dwsize);
|
||||
}
|
||||
|
||||
DoLOLm(arg)
|
||||
long arg;
|
||||
DoLOL(l)
|
||||
register long l;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@L6 DoLOLm(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOLn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLOLn2(%ld)", l));
|
||||
LOG(("@L6 DoLOL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLOLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLOLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLOLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LOL l: Load word at l-th local (l<0) or parameter (l>=0) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLOLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLOEl2(arg)
|
||||
long arg;
|
||||
DoLOE(arg)
|
||||
register long arg;
|
||||
{
|
||||
/* LOE g: Load external word g */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@L6 DoLOEl2(%lu)", p));
|
||||
LOG(("@L6 DoLOE(%lu)", p));
|
||||
spoilFRA();
|
||||
pushw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoLOEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOE g: Load external word g */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLOEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
pushw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoLOEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LOE g: Load external word g */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLOEs(%lu)", p));
|
||||
spoilFRA();
|
||||
pushw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoLILm(arg)
|
||||
long arg;
|
||||
DoLIL(l)
|
||||
register long l;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@L6 DoLILm(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLILn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLILn2(%ld)", l));
|
||||
LOG(("@L6 DoLIL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLILn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLILn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLILp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLILp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLILp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLILp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLILs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LIL l: Load word pointed to by l-th local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLILs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pushw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoLOFl2(arg)
|
||||
long arg;
|
||||
DoLOF(l)
|
||||
register long l;
|
||||
{
|
||||
/* LOF f: Load offsetted (top of stack + f yield address) */
|
||||
register long l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOFl2(%ld)", l));
|
||||
LOG(("@L6 DoLOF(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoLOFl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOF f: Load offsetted (top of stack + f yield address) */
|
||||
register long l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOFl4(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoLOFm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LOF f: Load offsetted (top of stack + f yield address) */
|
||||
register long l = arg;
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOFm(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoLOFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LOF f: Load offsetted (top of stack + f yield address) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOFs(%ld)", l));
|
||||
spoilFRA();
|
||||
pushw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoLALm(arg)
|
||||
long arg;
|
||||
DoLAL(l)
|
||||
register long l;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@L6 DoLALm(%ld)", l));
|
||||
spoilFRA();
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLALn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLALn2(%ld)", l));
|
||||
LOG(("@L6 DoLAL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLALn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLALn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLALp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLALp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLALp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLALp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLALs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LAL l: Load address of local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLALs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
dppush(loc_addr(l));
|
||||
}
|
||||
|
||||
DoLAEu(arg)
|
||||
long arg;
|
||||
DoLAE(arg)
|
||||
register unsigned long arg;
|
||||
{
|
||||
/* LAE g: Load address of external */
|
||||
register ptr p = i2p(U_arg() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@L6 DoLAEu(%lu)", p));
|
||||
LOG(("@L6 DoLAE(%lu)", p));
|
||||
spoilFRA();
|
||||
dppush(arg_lae(p));
|
||||
}
|
||||
|
||||
DoLAEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LAE g: Load address of external */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLAEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
dppush(arg_lae(p));
|
||||
}
|
||||
|
||||
DoLAEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LAE g: Load address of external */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLAEs(%lu)", p));
|
||||
spoilFRA();
|
||||
dppush(arg_lae(p));
|
||||
}
|
||||
|
||||
DoLXLl2(arg)
|
||||
unsigned long arg;
|
||||
DoLXL(l)
|
||||
register unsigned long l;
|
||||
{
|
||||
/* LXL n: Load lexical (address of LB n static levels back) */
|
||||
register unsigned long l = (L_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLXLl2(%lu)", l));
|
||||
LOG(("@L6 DoLXL(%lu)", l));
|
||||
spoilFRA();
|
||||
l = arg_n(l);
|
||||
p = lexback_LB(l);
|
||||
dppush(p);
|
||||
}
|
||||
|
||||
DoLXLm(arg)
|
||||
unsigned long arg;
|
||||
{
|
||||
/* LXL n: Load lexical (address of LB n static levels back) */
|
||||
register unsigned long l = arg_n(arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLXLm(%lu)", l));
|
||||
spoilFRA();
|
||||
p = lexback_LB(l);
|
||||
dppush(p);
|
||||
}
|
||||
|
||||
DoLXAl2(arg)
|
||||
unsigned long arg;
|
||||
DoLXA(l)
|
||||
register unsigned long l;
|
||||
{
|
||||
/* LXA n: Load lexical (address of AB n static levels back) */
|
||||
register unsigned long l = (P_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLXAl2(%lu)", l));
|
||||
LOG(("@L6 DoLXA(%lu)", l));
|
||||
spoilFRA();
|
||||
l = arg_n(l);
|
||||
p = lexback_LB(l);
|
||||
dppush(p + rsbsize);
|
||||
}
|
||||
|
||||
DoLXAm(arg)
|
||||
unsigned long arg;
|
||||
{
|
||||
/* LXA n: Load lexical (address of AB n static levels back) */
|
||||
register unsigned long l = arg_n(arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLXAm(%lu)", l));
|
||||
spoilFRA();
|
||||
p = lexback_LB(l);
|
||||
dppush(p + rsbsize);
|
||||
}
|
||||
|
||||
DoLOIl2(arg)
|
||||
size arg;
|
||||
DoLOI(l)
|
||||
register size l;
|
||||
{
|
||||
/* LOI o: Load indirect o bytes (address is popped from the stack) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOIl2(%ld)", l));
|
||||
spoilFRA();
|
||||
push_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoLOIl4(arg)
|
||||
size arg;
|
||||
{
|
||||
/* LOI o: Load indirect o bytes (address is popped from the stack) */
|
||||
register size l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOIl4(%ld)", l));
|
||||
spoilFRA();
|
||||
push_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoLOIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* LOI o: Load indirect o bytes (address is popped from the stack) */
|
||||
register size l = arg_o(arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOIm(%ld)", l));
|
||||
LOG(("@L6 DoLOI(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_o(l);
|
||||
push_m(p, l);
|
||||
}
|
||||
|
||||
DoLOIs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LOI o: Load indirect o bytes (address is popped from the stack) */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLOIs(%ld)", l));
|
||||
spoilFRA();
|
||||
push_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoLOSl2(arg)
|
||||
size arg;
|
||||
DoLOS(l)
|
||||
register size l;
|
||||
{
|
||||
/* LOS w: Load indirect, w-byte integer on top of stack gives object size */
|
||||
register size l = (P_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLOSl2(%ld)", l));
|
||||
LOG(("@L6 DoLOS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
l = upop(l);
|
||||
|
@ -545,169 +155,45 @@ DoLOSl2(arg)
|
|||
push_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoLOSz()
|
||||
{
|
||||
/* LOS w: Load indirect, w-byte integer on top of stack gives object size */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@L6 DoLOSz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
l = upop(l);
|
||||
p = dppop();
|
||||
push_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoLDLm(arg)
|
||||
long arg;
|
||||
DoLDL(l)
|
||||
register long l;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@L6 DoLDLm(%ld)", l));
|
||||
spoilFRA();
|
||||
push_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDLn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLDLn2(%ld)", l));
|
||||
LOG(("@L6 DoLDL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
push_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLDLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
push_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLDLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
push_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLDLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
push_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LDL l: Load double local or parameter (two consecutive words are stacked) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLDLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
push_st(loc_addr(l), dwsize);
|
||||
|
||||
}
|
||||
|
||||
DoLDEl2(arg)
|
||||
long arg;
|
||||
DoLDE(arg)
|
||||
register long arg;
|
||||
{
|
||||
/* LDE g: Load double external (two consecutive externals are stacked) */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@L6 DoLDEl2(%lu)", p));
|
||||
LOG(("@L6 DoLDE(%lu)", p));
|
||||
spoilFRA();
|
||||
push_m(arg_g(p), dwsize);
|
||||
}
|
||||
|
||||
DoLDEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDE g: Load double external (two consecutive externals are stacked) */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLDEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
push_m(arg_g(p), dwsize);
|
||||
}
|
||||
|
||||
DoLDEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LDE g: Load double external (two consecutive externals are stacked) */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@L6 DoLDEs(%lu)", p));
|
||||
spoilFRA();
|
||||
push_m(arg_g(p), dwsize);
|
||||
}
|
||||
|
||||
DoLDFl2(arg)
|
||||
long arg;
|
||||
DoLDF(l)
|
||||
register long l;
|
||||
{
|
||||
/* LDF f: Load double offsetted (top of stack + f yield address) */
|
||||
register long l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLDFl2(%ld)", l));
|
||||
LOG(("@L6 DoLDF(%ld)", l));
|
||||
spoilFRA();
|
||||
push_m(p + arg_f(l), dwsize);
|
||||
}
|
||||
|
||||
DoLDFl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LDF f: Load double offsetted (top of stack + f yield address) */
|
||||
register long l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@L6 DoLDFl4(%ld)", l));
|
||||
spoilFRA();
|
||||
push_m(p + arg_f(l), dwsize);
|
||||
}
|
||||
|
||||
DoLPIl2(arg)
|
||||
long arg;
|
||||
DoLPI(pi)
|
||||
register long pi;
|
||||
{
|
||||
/* LPI p: Load procedure identifier */
|
||||
register long pi = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@L6 DoLPIl2(%ld)", pi));
|
||||
spoilFRA();
|
||||
npush(arg_p(pi), psize);
|
||||
}
|
||||
|
||||
DoLPIl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LPI p: Load procedure identifier */
|
||||
register long pi = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@L6 DoLPIl4(%ld)", pi));
|
||||
LOG(("@L6 DoLPI(%ld)", pi));
|
||||
spoilFRA();
|
||||
npush(arg_p(pi), psize);
|
||||
}
|
||||
|
|
|
@ -25,47 +25,14 @@ extern int must_test;
|
|||
#define check_def(p,l)
|
||||
#endif LOGGING
|
||||
|
||||
DoANDl2(arg)
|
||||
size arg;
|
||||
{
|
||||
/* AND w: Boolean and on two groups of w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoANDl2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) &= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoANDm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* AND w: Boolean and on two groups of w bytes */
|
||||
register size l = arg_w(arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoANDm(%ld)", l));
|
||||
spoilFRA();
|
||||
for (p = SP; p < (SP + l); p ++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) &= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoANDz()
|
||||
DoAND(l)
|
||||
register size l;
|
||||
{
|
||||
/* AND w: Boolean and on two groups of w bytes */
|
||||
/* size of objects to be compared (in bytes) on top of stack */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoANDz(%ld)", l));
|
||||
LOG(("@X6 DoAND(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
|
@ -75,14 +42,13 @@ DoANDz()
|
|||
st_dec(l);
|
||||
}
|
||||
|
||||
DoIORl2(arg)
|
||||
size arg;
|
||||
DoIOR(l)
|
||||
register size l;
|
||||
{
|
||||
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoIORl2(%ld)", l));
|
||||
LOG(("@X6 DoIOR(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
|
@ -92,64 +58,13 @@ DoIORl2(arg)
|
|||
st_dec(l);
|
||||
}
|
||||
|
||||
DoIORm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
||||
register size l = arg_w(arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoIORm(%ld)", l));
|
||||
spoilFRA();
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) |= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoIORs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoIORs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) |= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoIORz()
|
||||
{
|
||||
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoIORz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) |= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoXORl2(arg)
|
||||
size arg;
|
||||
DoXOR(l)
|
||||
register size l;
|
||||
{
|
||||
/* XOR w: Boolean exclusive or on two groups of w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoXORl2(%ld)", l));
|
||||
LOG(("@X6 DoXOR(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
|
@ -159,30 +74,13 @@ DoXORl2(arg)
|
|||
st_dec(l);
|
||||
}
|
||||
|
||||
DoXORz()
|
||||
{
|
||||
/* XOR w: Boolean exclusive or on two groups of w bytes */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoXORz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, l);
|
||||
stack_loc(p + l) ^= stack_loc(p);
|
||||
}
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoCOMl2(arg)
|
||||
size arg;
|
||||
DoCOM(l)
|
||||
register size l;
|
||||
{
|
||||
/* COM w: Complement (one's complement of top w bytes) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoCOMl2(%ld)", l));
|
||||
LOG(("@X6 DoCOM(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
|
@ -191,30 +89,14 @@ DoCOMl2(arg)
|
|||
}
|
||||
}
|
||||
|
||||
DoCOMz()
|
||||
{
|
||||
/* COM w: Complement (one's complement of top w bytes) */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@X6 DoCOMz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_w(l);
|
||||
for (p = SP; p < (SP + l); p++) {
|
||||
check_def(p, 0);
|
||||
stack_loc(p) = ~stack_loc(p);
|
||||
}
|
||||
}
|
||||
|
||||
DoROLl2(arg)
|
||||
size arg;
|
||||
DoROL(l)
|
||||
register size l;
|
||||
{
|
||||
/* ROL w: Rotate left a group of w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long s, t = uwpop();
|
||||
register long signbit;
|
||||
|
||||
LOG(("@X6 DoROLl2(%ld)", l));
|
||||
LOG(("@X6 DoROL(%ld)", l));
|
||||
spoilFRA();
|
||||
signbit = (arg_wi(l) == 2) ? SIGNBIT2 : SIGNBIT4;
|
||||
s = upop(l);
|
||||
|
@ -240,84 +122,14 @@ DoROLl2(arg)
|
|||
npush(s, l);
|
||||
}
|
||||
|
||||
DoROLz()
|
||||
{
|
||||
/* ROL w: Rotate left a group of w bytes */
|
||||
register size l = uwpop();
|
||||
register long s, t = uwpop();
|
||||
register long signbit;
|
||||
|
||||
LOG(("@X6 DoROLz(%ld)", l));
|
||||
spoilFRA();
|
||||
signbit = (arg_wi(l) == 2) ? SIGNBIT2 : SIGNBIT4;
|
||||
s = upop(l);
|
||||
|
||||
#ifdef LOGGING
|
||||
if (must_test) {
|
||||
/* check shift distance */
|
||||
if (t < 0) {
|
||||
warning(WSHNEG);
|
||||
t = 0;
|
||||
}
|
||||
if (t >= l*8) {
|
||||
warning(WSHLARGE);
|
||||
t = l*8 - 1;
|
||||
}
|
||||
}
|
||||
#endif LOGGING
|
||||
|
||||
/* calculate result */
|
||||
while (t--) {
|
||||
s = (s & signbit) ? ((s<<1) | BIT(0)) : (s<<1);
|
||||
}
|
||||
npush(s, l);
|
||||
}
|
||||
|
||||
DoRORl2(arg)
|
||||
size arg;
|
||||
DoROR(l)
|
||||
register size l;
|
||||
{
|
||||
/* ROR w: Rotate right a group of w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long s, t = uwpop();
|
||||
register long signbit;
|
||||
|
||||
LOG(("@X6 DoRORl2(%ld)", l));
|
||||
spoilFRA();
|
||||
signbit = (l == 2) ? SIGNBIT2 : SIGNBIT4;
|
||||
s = upop(arg_wi(l));
|
||||
|
||||
#ifdef LOGGING
|
||||
if (must_test) {
|
||||
/* check shift distance */
|
||||
if (t < 0) {
|
||||
warning(WSHNEG);
|
||||
t = 0;
|
||||
}
|
||||
if (t >= l*8) {
|
||||
warning(WSHLARGE);
|
||||
t = l*8 - 1;
|
||||
}
|
||||
}
|
||||
#endif LOGGING
|
||||
|
||||
/* calculate result */
|
||||
while (t--) {
|
||||
/* the >> in C does sign extension, the ROR does not */
|
||||
if (s & BIT(0))
|
||||
s = (s >> 1) | signbit;
|
||||
else s = (s >> 1) & ~signbit;
|
||||
}
|
||||
npush(s, l);
|
||||
}
|
||||
|
||||
DoRORz()
|
||||
{
|
||||
/* ROR w: Rotate right a group of w bytes */
|
||||
register size l = uwpop();
|
||||
register long s, t = uwpop();
|
||||
register long signbit;
|
||||
|
||||
LOG(("@X6 DoRORz(%ld)", l));
|
||||
LOG(("@X6 DoROR(%ld)", l));
|
||||
spoilFRA();
|
||||
signbit = (arg_wi(l) == 2) ? SIGNBIT2 : SIGNBIT4;
|
||||
s = upop(l);
|
||||
|
|
|
@ -30,65 +30,21 @@ PRIVATE gto();
|
|||
|
||||
#define asp(l) newSP(SP + arg_f(l))
|
||||
|
||||
DoASPl2(arg)
|
||||
long arg;
|
||||
DoASP(l)
|
||||
register long l;
|
||||
{
|
||||
/* ASP f: Adjust the stack pointer by f */
|
||||
register long l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoASPl2(%ld)", l));
|
||||
LOG(("@M6 DoASP(%ld)", l));
|
||||
asp(l);
|
||||
}
|
||||
|
||||
DoASPl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ASP f: Adjust the stack pointer by f */
|
||||
register long l = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@M6 DoASPl4(%ld)", l));
|
||||
asp(l);
|
||||
}
|
||||
|
||||
DoASPm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ASP f: Adjust the stack pointer by f */
|
||||
register long l = arg;
|
||||
|
||||
LOG(("@M6 DoASPm(%ld)", l));
|
||||
asp(l);
|
||||
}
|
||||
|
||||
DoASPs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ASP f: Adjust the stack pointer by f */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@M6 DoASPs(%ld)", l));
|
||||
asp(l);
|
||||
}
|
||||
|
||||
DoASSl2(arg)
|
||||
size arg;
|
||||
DoASS(l)
|
||||
register size l;
|
||||
{
|
||||
/* ASS w: Adjust the stack pointer by w-byte integer */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoASSl2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = spop(arg_wi(l));
|
||||
asp(l);
|
||||
}
|
||||
|
||||
DoASSz()
|
||||
{
|
||||
/* ASS w: Adjust the stack pointer by w-byte integer */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@M6 DoASSz(%ld)", l));
|
||||
LOG(("@M6 DoASS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = spop(arg_wi(l));
|
||||
asp(l);
|
||||
|
@ -101,57 +57,26 @@ DoASSz()
|
|||
else { if (in_stack(a2)) dt_mvs(a1, a2, n); \
|
||||
else dt_mvd(a1, a2, n); }
|
||||
|
||||
DoBLMl2(arg)
|
||||
size arg;
|
||||
DoBLM(l)
|
||||
register size l;
|
||||
{
|
||||
/* BLM z: Block move z bytes; first pop destination addr, then source addr */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr dp1, dp2; /* Destination Pointers */
|
||||
|
||||
LOG(("@M6 DoBLMl2(%ld)", l));
|
||||
LOG(("@M6 DoBLM(%ld)", l));
|
||||
spoilFRA();
|
||||
dp1 = dppop();
|
||||
dp2 = dppop();
|
||||
block_move(dp1, dp2, arg_z(l));
|
||||
}
|
||||
|
||||
DoBLMl4(arg)
|
||||
size arg;
|
||||
{
|
||||
/* BLM z: Block move z bytes; first pop destination addr, then source addr */
|
||||
register size l = (L_arg_4() * arg);
|
||||
register ptr dp1, dp2; /* Destination Pointer */
|
||||
|
||||
LOG(("@M6 DoBLMl4(%ld)", l));
|
||||
spoilFRA();
|
||||
dp1 = dppop();
|
||||
dp2 = dppop();
|
||||
block_move(dp1, dp2, arg_z(l));
|
||||
}
|
||||
|
||||
DoBLMs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* BLM z: Block move z bytes; first pop destination addr, then source addr */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
register ptr dp1, dp2; /* Destination Pointer */
|
||||
|
||||
LOG(("@M6 DoBLMs(%ld)", l));
|
||||
spoilFRA();
|
||||
dp1 = dppop();
|
||||
dp2 = dppop();
|
||||
block_move(dp1, dp2, arg_z(l));
|
||||
}
|
||||
|
||||
DoBLSl2(arg)
|
||||
size arg;
|
||||
DoBLS(l)
|
||||
register size l;
|
||||
{
|
||||
/* BLS w: Block move, size is in w-byte integer on top of stack */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr dp1, dp2;
|
||||
|
||||
LOG(("@M6 DoBLSl2(%ld)", l));
|
||||
LOG(("@M6 DoBLS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
dp1 = dppop();
|
||||
|
@ -159,86 +84,32 @@ DoBLSl2(arg)
|
|||
block_move(dp1, dp2, arg_z(l));
|
||||
}
|
||||
|
||||
DoBLSz()
|
||||
{
|
||||
/* BLS w: Block move, size is in w-byte integer on top of stack */
|
||||
register size l = uwpop();
|
||||
register ptr dp1, dp2;
|
||||
|
||||
LOG(("@M6 DoBLSz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
dp1 = dppop();
|
||||
dp2 = dppop();
|
||||
block_move(dp1, dp2, arg_z(l));
|
||||
}
|
||||
|
||||
DoCSAl2(arg)
|
||||
size arg;
|
||||
DoCSA(l)
|
||||
register size l;
|
||||
{
|
||||
/* CSA w: Case jump; address of jump table at top of stack */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoCSAl2(%ld)", l));
|
||||
LOG(("@M6 DoCSA(%ld)", l));
|
||||
spoilFRA();
|
||||
index_jump(arg_wi(l));
|
||||
}
|
||||
|
||||
DoCSAm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* CSA w: Case jump; address of jump table at top of stack */
|
||||
LOG(("@M6 DoCSAm(%ld)", arg));
|
||||
spoilFRA();
|
||||
index_jump(arg_wi(arg));
|
||||
}
|
||||
|
||||
DoCSAz()
|
||||
{
|
||||
/* CSA w: Case jump; address of jump table at top of stack */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@M6 DoCSAz(%ld)", l));
|
||||
spoilFRA();
|
||||
index_jump(arg_wi(l));
|
||||
}
|
||||
|
||||
DoCSBl2(arg)
|
||||
size arg;
|
||||
DoCSB(l)
|
||||
register size l;
|
||||
{
|
||||
/* CSB w: Table lookup jump; address of jump table at top of stack */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoCSBl2(%ld)", l));
|
||||
LOG(("@M6 DoCSB(%ld)", l));
|
||||
spoilFRA();
|
||||
search_jump(arg_wi(l));
|
||||
}
|
||||
|
||||
DoCSBm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* CSB w: Table lookup jump; address of jump table at top of stack */
|
||||
LOG(("@M6 DoCSBm(%ld)", arg));
|
||||
spoilFRA();
|
||||
search_jump(arg_wi(arg));
|
||||
}
|
||||
|
||||
DoCSBz()
|
||||
{
|
||||
/* CSB w: Table lookup jump; address of jump table at top of stack */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@M6 DoCSBz(%ld)", l));
|
||||
spoilFRA();
|
||||
search_jump(arg_wi(l));
|
||||
}
|
||||
|
||||
DoDCHz()
|
||||
DoDCH()
|
||||
{
|
||||
/* DCH -: Follow dynamic chain, convert LB to LB of caller */
|
||||
register ptr lb;
|
||||
|
||||
LOG(("@M6 DoDCHz()"));
|
||||
LOG(("@M6 DoDCH()"));
|
||||
spoilFRA();
|
||||
lb = dppop();
|
||||
if (!is_LB(lb)) {
|
||||
|
@ -247,39 +118,25 @@ DoDCHz()
|
|||
dppush(st_lddp(lb + rsb_LB));
|
||||
}
|
||||
|
||||
DoDUPl2(arg)
|
||||
size arg;
|
||||
{
|
||||
/* DUP s: Duplicate top s bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr oldSP = SP;
|
||||
|
||||
LOG(("@M6 DoDUPl2(%ld)", l));
|
||||
spoilFRA();
|
||||
st_inc(arg_s(l));
|
||||
st_mvs(SP, oldSP, l);
|
||||
}
|
||||
|
||||
DoDUPm(arg)
|
||||
DoDUP(arg)
|
||||
size arg;
|
||||
{
|
||||
/* DUP s: Duplicate top s bytes */
|
||||
register ptr oldSP = SP;
|
||||
|
||||
LOG(("@M6 DoDUPm(%ld)", arg));
|
||||
LOG(("@M6 DoDUP(%ld)", arg));
|
||||
spoilFRA();
|
||||
st_inc(arg_s(arg));
|
||||
st_mvs(SP, oldSP, arg);
|
||||
}
|
||||
|
||||
DoDUSl2(arg)
|
||||
size arg;
|
||||
DoDUS(l)
|
||||
register size l;
|
||||
{
|
||||
/* DUS w: Duplicate top w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr oldSP;
|
||||
|
||||
LOG(("@M6 DoDUSl2(%ld)", l));
|
||||
LOG(("@M6 DoDUS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
oldSP = SP;
|
||||
|
@ -287,28 +144,13 @@ DoDUSl2(arg)
|
|||
st_mvs(SP, oldSP, l);
|
||||
}
|
||||
|
||||
DoDUSz()
|
||||
{
|
||||
/* DUS w: Duplicate top w bytes */
|
||||
register size l = uwpop();
|
||||
register ptr oldSP;
|
||||
|
||||
LOG(("@M6 DoDUSz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
oldSP = SP;
|
||||
st_inc(arg_s(l));
|
||||
st_mvs(SP, oldSP, l);
|
||||
}
|
||||
|
||||
DoEXGl2(arg)
|
||||
size arg;
|
||||
DoEXG(l)
|
||||
register size l;
|
||||
{
|
||||
/* EXG w: Exchange top w bytes */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr oldSP = SP;
|
||||
|
||||
LOG(("@M6 DoEXGl2(%ld)", l));
|
||||
LOG(("@M6 DoEXG(%ld)", l));
|
||||
spoilFRA();
|
||||
st_inc(arg_w(l));
|
||||
st_mvs(SP, oldSP, l);
|
||||
|
@ -317,45 +159,13 @@ DoEXGl2(arg)
|
|||
st_dec(l);
|
||||
}
|
||||
|
||||
DoEXGs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* EXG w: Exchange top w bytes */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
register ptr oldSP = SP;
|
||||
|
||||
LOG(("@M6 DoEXGs(%ld)", l));
|
||||
spoilFRA();
|
||||
st_inc(arg_w(l));
|
||||
st_mvs(SP, oldSP, l);
|
||||
st_mvs(oldSP, oldSP + l, l);
|
||||
st_mvs(oldSP + l, SP, l);
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoEXGz()
|
||||
{
|
||||
/* EXG w: Exchange top w bytes */
|
||||
register size l = uwpop();
|
||||
register ptr oldSP = SP;
|
||||
|
||||
LOG(("@M6 DoEXGz(%ld)", l));
|
||||
spoilFRA();
|
||||
st_inc(arg_w(l));
|
||||
st_mvs(SP, oldSP, l);
|
||||
st_mvs(oldSP, oldSP + l, l);
|
||||
st_mvs(oldSP + l, SP, l);
|
||||
st_dec(l);
|
||||
}
|
||||
|
||||
DoFILu(arg)
|
||||
long arg;
|
||||
DoFIL(arg)
|
||||
register unsigned long arg;
|
||||
{
|
||||
/* FIL g: File name (external 4 := g) */
|
||||
register ptr p = i2p(U_arg() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@M6 DoFILu(%lu)", p));
|
||||
LOG(("@M6 DoFIL(%lu)", p));
|
||||
spoilFRA();
|
||||
if (p > HB) {
|
||||
wtrap(WILLFIL, EILLINS);
|
||||
|
@ -363,98 +173,48 @@ DoFILu(arg)
|
|||
putFIL(arg_g(p));
|
||||
}
|
||||
|
||||
DoFILl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* FIL g: File name (external 4 := g) */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@M6 DoFILl4(%lu)", p));
|
||||
spoilFRA();
|
||||
if (p > HB) {
|
||||
wtrap(WILLFIL, EILLINS);
|
||||
}
|
||||
putFIL(arg_g(p));
|
||||
}
|
||||
|
||||
DoGTOu(arg)
|
||||
long arg;
|
||||
DoGTO(arg)
|
||||
register unsigned long arg;
|
||||
{
|
||||
/* GTO g: Non-local goto, descriptor at g */
|
||||
register ptr p = i2p(U_arg() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@M6 DoGTOu(%lu)", p));
|
||||
LOG(("@M6 DoGTO(%lu)", p));
|
||||
gto(arg_gto(p));
|
||||
}
|
||||
|
||||
DoGTOl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* GTO g: Non-local goto, descriptor at g */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@M6 DoGTOl4(%lu)", p));
|
||||
gto(arg_gto(p));
|
||||
}
|
||||
|
||||
DoLIMz()
|
||||
DoLIM()
|
||||
{
|
||||
/* LIM -: Load 16 bit ignore mask */
|
||||
LOG(("@M6 DoLIMz()"));
|
||||
LOG(("@M6 DoLIM()"));
|
||||
spoilFRA();
|
||||
wpush(IgnMask);
|
||||
}
|
||||
|
||||
DoLINl2(arg)
|
||||
long arg;
|
||||
DoLIN(l)
|
||||
register unsigned long l;
|
||||
{
|
||||
/* LIN n: Line number (external 0 := n) */
|
||||
register unsigned long l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoLINl2(%lu)", l));
|
||||
LOG(("@M6 DoLIN(%lu)", l));
|
||||
spoilFRA();
|
||||
putLIN((long) arg_lin(l));
|
||||
}
|
||||
|
||||
DoLINl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* LIN n: Line number (external 0 := n) */
|
||||
register unsigned long l = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@M6 DoLINl4(%lu)", l));
|
||||
spoilFRA();
|
||||
putLIN((long) arg_lin(l));
|
||||
}
|
||||
|
||||
DoLINs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LIN n: Line number (external 0 := n) */
|
||||
register unsigned long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@M6 DoLINs(%lu)", l));
|
||||
spoilFRA();
|
||||
putLIN((long) arg_lin(l));
|
||||
}
|
||||
|
||||
DoLNIz()
|
||||
DoLNI()
|
||||
{
|
||||
/* LNI -: Line number increment */
|
||||
LOG(("@M6 DoLNIz()"));
|
||||
LOG(("@M6 DoLNI()"));
|
||||
spoilFRA();
|
||||
putLIN((long)getLIN() + 1);
|
||||
}
|
||||
|
||||
DoLORs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
DoLOR(l)
|
||||
register long l;
|
||||
{
|
||||
/* LOR r: Load register (0=LB, 1=SP, 2=HP) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@M6 DoLORs(%ld)", l));
|
||||
LOG(("@M6 DoLOR(%ld)", l));
|
||||
spoilFRA();
|
||||
switch ((int) arg_r(l)) {
|
||||
case 0:
|
||||
|
@ -469,12 +229,12 @@ DoLORs(hob, wfac)
|
|||
}
|
||||
}
|
||||
|
||||
DoLPBz()
|
||||
DoLPB()
|
||||
{
|
||||
/* LPB -: Convert local base to argument base */
|
||||
register ptr lb;
|
||||
|
||||
LOG(("@M6 DoLPBz()"));
|
||||
LOG(("@M6 DoLPB()"));
|
||||
spoilFRA();
|
||||
lb = dppop();
|
||||
if (!is_LB(lb)) {
|
||||
|
@ -483,56 +243,36 @@ DoLPBz()
|
|||
dppush(lb + rsbsize);
|
||||
}
|
||||
|
||||
DoMONz()
|
||||
DoMON()
|
||||
{
|
||||
/* MON -: Monitor call */
|
||||
LOG(("@M6 DoMONz()"));
|
||||
LOG(("@M6 DoMON()"));
|
||||
spoilFRA();
|
||||
moncall();
|
||||
}
|
||||
|
||||
DoNOPz()
|
||||
DoNOP()
|
||||
{
|
||||
/* NOP -: No operation */
|
||||
LOG(("@M6 DoNOPz()"));
|
||||
LOG(("@M6 DoNOP()"));
|
||||
spoilFRA();
|
||||
message("NOP instruction");
|
||||
}
|
||||
|
||||
DoRCKl2(arg)
|
||||
size arg;
|
||||
DoRCK(l)
|
||||
register size l;
|
||||
{
|
||||
/* RCK w: Range check; trap on error */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@M6 DoRCKl2(%ld)", l));
|
||||
LOG(("@M6 DoRCK(%ld)", l));
|
||||
spoilFRA();
|
||||
range_check(arg_wi(l));
|
||||
}
|
||||
|
||||
DoRCKm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* RCK w: Range check; trap on error */
|
||||
LOG(("@M6 DoRCKm(%ld)", arg));
|
||||
spoilFRA();
|
||||
range_check(arg_wi(arg));
|
||||
}
|
||||
|
||||
DoRCKz()
|
||||
{
|
||||
/* RCK w: Range check; trap on error */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@M6 DoRCKz(%ld)", l));
|
||||
spoilFRA();
|
||||
range_check(arg_wi(l));
|
||||
}
|
||||
|
||||
DoRTTz()
|
||||
DoRTT()
|
||||
{
|
||||
/* RTT -: Return from trap */
|
||||
LOG(("@M6 DoRTTz()"));
|
||||
LOG(("@M6 DoRTT()"));
|
||||
|
||||
switch (poprsb(1)) {
|
||||
case RSB_STP:
|
||||
|
@ -563,12 +303,12 @@ DoRTTz()
|
|||
popFRA(FRASize);
|
||||
}
|
||||
|
||||
DoSIGz()
|
||||
DoSIG()
|
||||
{
|
||||
/* SIG -: Trap errors to proc identifier on top of stack, \-2 resets default */
|
||||
register long tpi = spop(psize);
|
||||
|
||||
LOG(("@M6 DoSIGz()"));
|
||||
LOG(("@M6 DoSIG()"));
|
||||
spoilFRA();
|
||||
if (OnTrap == TR_HALT) {
|
||||
npush(-2L, psize);
|
||||
|
@ -585,22 +325,20 @@ DoSIGz()
|
|||
}
|
||||
}
|
||||
|
||||
DoSIMz()
|
||||
DoSIM()
|
||||
{
|
||||
/* SIM -: Store 16 bit ignore mask */
|
||||
LOG(("@M6 DoSIMz()"));
|
||||
LOG(("@M6 DoSIM()"));
|
||||
spoilFRA();
|
||||
IgnMask = (uwpop() | PreIgnMask) & MASK2;
|
||||
}
|
||||
|
||||
DoSTRs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
DoSTR(l)
|
||||
register long l;
|
||||
{
|
||||
/* STR r: Store register (0=LB, 1=SP, 2=HP) */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@M6 DoSTRs(%ld)", l));
|
||||
LOG(("@M6 DoSTR(%ld)", l));
|
||||
spoilFRA();
|
||||
switch ((int) arg_r(l)) {
|
||||
case 0:
|
||||
|
@ -616,12 +354,12 @@ DoSTRs(hob, wfac)
|
|||
}
|
||||
}
|
||||
|
||||
DoTRPz()
|
||||
DoTRP()
|
||||
{
|
||||
/* TRP -: Cause trap to occur (Error number on stack) */
|
||||
register unsigned int tr = (unsigned int)uwpop();
|
||||
|
||||
LOG(("@M6 DoTRPz()"));
|
||||
LOG(("@M6 DoTRP()"));
|
||||
spoilFRA();
|
||||
if (tr > 15 || !(IgnMask&BIT(tr))) {
|
||||
wtrap(WTRP, (int)tr);
|
||||
|
|
|
@ -23,111 +23,39 @@ extern int running; /* from main.c */
|
|||
|
||||
PRIVATE lfr(), ret();
|
||||
|
||||
DoCAIz() /* proc identifier on top of stack */
|
||||
DoCAI() /* proc identifier on top of stack */
|
||||
{
|
||||
/* CAI -: Call procedure (procedure identifier on stack) */
|
||||
register long pi = spop(psize);
|
||||
|
||||
LOG(("@P6 DoCAIz(%lu)", pi));
|
||||
LOG(("@P6 DoCAI(%lu)", pi));
|
||||
call(arg_p(pi), RSB_CAL);
|
||||
}
|
||||
|
||||
DoCALl2(arg)
|
||||
long arg;
|
||||
DoCAL(pi)
|
||||
register long pi;
|
||||
{
|
||||
/* CAL p: Call procedure (with identifier p) */
|
||||
register long pi = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@P6 DoCALl2(%lu)", pi));
|
||||
LOG(("@P6 DoCAL(%lu)", pi));
|
||||
call(arg_p(pi), RSB_CAL);
|
||||
}
|
||||
|
||||
DoCALl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* CAL p: Call procedure (with identifier p) */
|
||||
register long pi = (L_arg_4() * arg);
|
||||
|
||||
LOG(("@P6 DoCALl4(%lu)", pi));
|
||||
call(arg_p(pi), RSB_CAL);
|
||||
}
|
||||
|
||||
DoCALm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* CAL p: Call procedure (with identifier p) */
|
||||
register long pi = arg_p(arg);
|
||||
|
||||
LOG(("@P6 DoCALm(%lu)", pi));
|
||||
call(pi, RSB_CAL);
|
||||
}
|
||||
|
||||
DoCALs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* CAL p: Call procedure (with identifier p) */
|
||||
register long pi = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@P6 DoCALs(%lu)", pi));
|
||||
call(arg_p(pi), RSB_CAL);
|
||||
}
|
||||
|
||||
DoLFRl2(arg)
|
||||
size arg;
|
||||
DoLFR(l)
|
||||
register size l;
|
||||
{
|
||||
/* LFR s: Load function result */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@P6 DoLFRl2(%ld)", l));
|
||||
LOG(("@P6 DoLFR(%ld)", l));
|
||||
lfr(arg_s(l));
|
||||
}
|
||||
|
||||
DoLFRm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* LFR s: Load function result */
|
||||
LOG(("@P6 DoLFRm(%ld)", arg));
|
||||
lfr(arg_s(arg));
|
||||
}
|
||||
|
||||
DoLFRs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* LFR s: Load function result */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@P6 DoLFRs(%ld)", l));
|
||||
lfr(arg_s(l));
|
||||
}
|
||||
|
||||
DoRETl2(arg)
|
||||
size arg;
|
||||
DoRET(l)
|
||||
register size l;
|
||||
{
|
||||
/* RET z: Return (function result consists of top z bytes) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@P6 DoRETl2(%ld)", l));
|
||||
ret(arg_z(l));
|
||||
}
|
||||
|
||||
DoRETm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* RET z: Return (function result consists of top z bytes) */
|
||||
LOG(("@P6 DoRETm(%ld)", arg));
|
||||
ret(arg_z(arg));
|
||||
}
|
||||
|
||||
DoRETs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* RET z: Return (function result consists of top z bytes) */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@P6 DoRETs(%ld)", l));
|
||||
LOG(("@P6 DoRET(%ld)", l));
|
||||
ret(arg_z(l));
|
||||
}
|
||||
|
||||
|
|
|
@ -27,14 +27,13 @@
|
|||
|
||||
#endif SEGCHECK
|
||||
|
||||
DoADPl2(arg)
|
||||
long arg;
|
||||
DoADP(l)
|
||||
register long l;
|
||||
{
|
||||
/* ADP f: Add f to pointer on top of stack */
|
||||
register long l = (L_arg_2() * arg);
|
||||
register ptr p, t = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADPl2(%ld)", l));
|
||||
LOG(("@R6 DoADP(%ld)", l));
|
||||
spoilFRA();
|
||||
if (t == 0) {
|
||||
warning(WNULLPA);
|
||||
|
@ -45,70 +44,14 @@ DoADPl2(arg)
|
|||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoADPl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ADP f: Add f to pointer on top of stack */
|
||||
register long l = (L_arg_4() * arg);
|
||||
register ptr p, t = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADPl4(%ld)", l));
|
||||
spoilFRA();
|
||||
if (t == 0) {
|
||||
warning(WNULLPA);
|
||||
}
|
||||
l = arg_f(l);
|
||||
p = adp(t, l);
|
||||
check_seg(ptr2seg(t), ptr2seg(p), WSEGADP);
|
||||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoADPm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* ADP f: Add f to pointer on top of stack */
|
||||
register long l = arg_f(arg);
|
||||
register ptr p, t = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADPm(%ld)", l));
|
||||
spoilFRA();
|
||||
if (t == 0) {
|
||||
warning(WNULLPA);
|
||||
}
|
||||
l = arg_f(l);
|
||||
p = adp(t, l);
|
||||
check_seg(ptr2seg(t), ptr2seg(p), WSEGADP);
|
||||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoADPs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* ADP f: Add f to pointer on top of stack */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
register ptr p, t = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADPs(%ld)", l));
|
||||
spoilFRA();
|
||||
if (t == 0) {
|
||||
warning(WNULLPA);
|
||||
}
|
||||
l = arg_f(l);
|
||||
p = adp(t, l);
|
||||
check_seg(ptr2seg(t), ptr2seg(p), WSEGADP);
|
||||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoADSl2(arg)
|
||||
size arg;
|
||||
DoADS(l)
|
||||
register size l;
|
||||
{
|
||||
/* ADS w: Add w-byte value and pointer */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register long t = spop(arg_wi(l));
|
||||
register ptr p, s = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADSl2(%ld)", l));
|
||||
LOG(("@R6 DoADS(%ld)", l));
|
||||
spoilFRA();
|
||||
t = arg_f(t);
|
||||
if (s == 0) {
|
||||
|
@ -119,75 +62,15 @@ DoADSl2(arg)
|
|||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoADSm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* ADS w: Add w-byte value and pointer */
|
||||
register long t = spop(arg_wi(arg));
|
||||
register ptr p, s = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADSm(%ld)", arg));
|
||||
spoilFRA();
|
||||
t = arg_f(t);
|
||||
if (s == 0) {
|
||||
warning(WNULLPA);
|
||||
}
|
||||
p = adp(s, t);
|
||||
check_seg(ptr2seg(s), ptr2seg(p), WSEGADP);
|
||||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
|
||||
DoADSz()
|
||||
{
|
||||
/* ADS w: Add w-byte value and pointer */
|
||||
register size l = uwpop();
|
||||
register long t = spop(arg_wi(l));
|
||||
register ptr p, s = st_lddp(SP);
|
||||
|
||||
LOG(("@R6 DoADSz(%ld)", l));
|
||||
spoilFRA();
|
||||
t = arg_f(t);
|
||||
if (s == 0) {
|
||||
warning(WNULLPA);
|
||||
}
|
||||
p = adp(s, t);
|
||||
check_seg(ptr2seg(s), ptr2seg(p), WSEGADP);
|
||||
st_stdp(SP, p);
|
||||
}
|
||||
|
||||
DoSBSl2(arg)
|
||||
size arg;
|
||||
DoSBS(l)
|
||||
register size l;
|
||||
{
|
||||
/* SBS w: Subtract pointers in same fragment and push diff as size w integer */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr t = st_lddp(SP);
|
||||
register ptr s = st_lddp(SP + psize);
|
||||
register long w;
|
||||
|
||||
LOG(("@R6 DoSBSl2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
check_seg(ptr2seg(t), ptr2seg(s), WSEGSBS);
|
||||
w = sbs(t, s);
|
||||
if (must_test && !(IgnMask&BIT(EIOVFL))) {
|
||||
if (l == 2 && (w < I_MINS2 || w > I_MAXS2))
|
||||
trap(EIOVFL);
|
||||
}
|
||||
dppop();
|
||||
dppop();
|
||||
npush(w, l);
|
||||
}
|
||||
|
||||
DoSBSz()
|
||||
{
|
||||
/* SBS w: Subtract pointers in same fragment and push diff as size w integer */
|
||||
register size l = uwpop();
|
||||
register ptr t = st_lddp(SP);
|
||||
register ptr s = st_lddp(SP + psize);
|
||||
register long w;
|
||||
|
||||
LOG(("@R6 DoSBSz(%ld)", l));
|
||||
LOG(("@R6 DoSBS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
check_seg(ptr2seg(t), ptr2seg(s), WSEGSBS);
|
||||
|
|
|
@ -14,68 +14,22 @@
|
|||
|
||||
PRIVATE bit_test(), create_set();
|
||||
|
||||
DoINNl2(arg)
|
||||
size arg;
|
||||
DoINN(l)
|
||||
register size l;
|
||||
{
|
||||
/* INN w: Bit test on w byte set (bit number on top of stack) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@Y6 DoINNl2(%ld)", l));
|
||||
LOG(("@Y6 DoINN(%ld)", l));
|
||||
spoilFRA();
|
||||
bit_test(arg_w(l));
|
||||
}
|
||||
|
||||
DoINNs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* INN w: Bit test on w byte set (bit number on top of stack) */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Y6 DoINNs(%ld)", l));
|
||||
spoilFRA();
|
||||
bit_test(arg_w(l));
|
||||
}
|
||||
|
||||
DoINNz()
|
||||
{
|
||||
/* INN w: Bit test on w byte set (bit number on top of stack) */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@Y6 DoINNz(%ld)", l));
|
||||
spoilFRA();
|
||||
bit_test(arg_w(l));
|
||||
}
|
||||
|
||||
DoSETl2(arg)
|
||||
size arg;
|
||||
DoSET(l)
|
||||
register size l;
|
||||
{
|
||||
/* SET w: Create singleton w byte set with bit n on (n is top of stack) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
|
||||
LOG(("@Y6 DoSETl2(%ld)", l));
|
||||
spoilFRA();
|
||||
create_set(arg_w(l));
|
||||
}
|
||||
|
||||
DoSETs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* SET w: Create singleton w byte set with bit n on (n is top of stack) */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@Y6 DoSETs(%ld)", l));
|
||||
spoilFRA();
|
||||
create_set(arg_w(l));
|
||||
}
|
||||
|
||||
DoSETz()
|
||||
{
|
||||
/* SET w: Create singleton w byte set with bit n on (n is top of stack) */
|
||||
register size l = uwpop();
|
||||
|
||||
LOG(("@Y6 DoSETz(%ld)", l));
|
||||
LOG(("@Y6 DoSET(%ld)", l));
|
||||
spoilFRA();
|
||||
create_set(arg_w(l));
|
||||
}
|
||||
|
@ -95,16 +49,20 @@ PRIVATE bit_test(w)
|
|||
register int bitno =
|
||||
(int) swpop(); /* bitno on TOS */
|
||||
register char test_byte = (char) 0;/* default value to be tested */
|
||||
register int wordoff = bitno / 8;
|
||||
register int bitoff = bitno % 8;
|
||||
|
||||
if (bitoff < 0) bitoff += 8;
|
||||
|
||||
if (must_test && !(IgnMask&BIT(ESET))) {
|
||||
/* Only w<<3 bytes CAN be tested */
|
||||
if (bitno > (int) ((w << 3) - 1)) {
|
||||
/* Only w*8 bits CAN be tested */
|
||||
if (wordoff >= w) {
|
||||
trap(ESET);
|
||||
}
|
||||
}
|
||||
test_byte = stack_loc(SP + (bitno >> 3));
|
||||
test_byte = stack_loc(SP + wordoff);
|
||||
st_dec(w);
|
||||
wpush((long)((test_byte & BIT(bitno & 7)) ? 1 : 0));
|
||||
wpush((long)((test_byte & BIT(bitoff)) ? 1 : 0));
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
|
@ -121,6 +79,10 @@ PRIVATE create_set(w)
|
|||
{
|
||||
register int bitno = (int) swpop();
|
||||
register size nbytes = w;
|
||||
register int wordoff = bitno / 8;
|
||||
register int bitoff = bitno % 8;
|
||||
|
||||
if (bitoff < 0) bitoff += 8;
|
||||
|
||||
st_inc(nbytes);
|
||||
while (--nbytes >= 0) {
|
||||
|
@ -128,10 +90,10 @@ PRIVATE create_set(w)
|
|||
}
|
||||
|
||||
if (must_test && !(IgnMask&BIT(ESET))) {
|
||||
if (bitno > (int) ((w << 3) - 1)) {
|
||||
if (wordoff >= w) {
|
||||
trap(ESET);
|
||||
}
|
||||
}
|
||||
st_stn(SP + (bitno >> 3), (long)BIT(bitno & 7), 1L);
|
||||
st_stn(SP + wordoff, (long)BIT(bitoff), 1L);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,400 +13,103 @@
|
|||
#include "fra.h"
|
||||
#include "warn.h"
|
||||
|
||||
DoSTLm(arg)
|
||||
long arg;
|
||||
DoSTL(l)
|
||||
register long l;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = arg_l(arg);
|
||||
|
||||
LOG(("@S6 DoSTLm(%ld)", l));
|
||||
spoilFRA();
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTLn2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSTLn2(%ld)", l));
|
||||
LOG(("@S6 DoSTL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSTLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSTLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSTLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* STL l: Store local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@S6 DoSTLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_st(loc_addr(l));
|
||||
}
|
||||
|
||||
DoSTEl2(arg)
|
||||
long arg;
|
||||
DoSTE(arg)
|
||||
register unsigned long arg;
|
||||
{
|
||||
/* STE g: Store external */
|
||||
register ptr p = i2p(L_arg_2() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@S6 DoSTEl2(%lu)", p));
|
||||
LOG(("@S6 DoSTE(%lu)", p));
|
||||
spoilFRA();
|
||||
popw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoSTEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STE g: Store external */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSTEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
popw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoSTEs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* STE g: Store external */
|
||||
register ptr p = i2p(S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@S6 DoSTEs(%lu)", p));
|
||||
spoilFRA();
|
||||
popw_m(arg_g(p));
|
||||
}
|
||||
|
||||
DoSILn2(arg)
|
||||
long arg;
|
||||
DoSIL(l)
|
||||
register long l;
|
||||
{
|
||||
/* SIL l: Store into word pointed to by l-th local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSILn2(%ld)", l));
|
||||
LOG(("@S6 DoSIL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoSILn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SIL l: Store into word pointed to by l-th local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSILn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoSILp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SIL l: Store into word pointed to by l-th local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSILp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoSILp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SIL l: Store into word pointed to by l-th local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSILp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoSILs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* SIL l: Store into word pointed to by l-th local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@S6 DoSILs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
popw_m(st_lddp(loc_addr(l)));
|
||||
}
|
||||
|
||||
DoSTFl2(arg)
|
||||
long arg;
|
||||
DoSTF(l)
|
||||
register long l;
|
||||
{
|
||||
/* STF f: Store offsetted */
|
||||
register long l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTFl2(%ld)", l));
|
||||
LOG(("@S6 DoSTF(%ld)", l));
|
||||
spoilFRA();
|
||||
popw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoSTFl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STF f: Store offsetted */
|
||||
register long l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTFl4(%ld)", l));
|
||||
spoilFRA();
|
||||
popw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoSTFm(arg)
|
||||
long arg;
|
||||
{
|
||||
/* STF f: Store offsetted */
|
||||
register long l = arg;
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTFm(%ld)", l));
|
||||
spoilFRA();
|
||||
popw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoSTFs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* STF f: Store offsetted */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTFs(%ld)", l));
|
||||
spoilFRA();
|
||||
popw_m(p + arg_f(l));
|
||||
}
|
||||
|
||||
DoSTIl2(arg)
|
||||
size arg;
|
||||
DoSTI(l)
|
||||
register size l;
|
||||
{
|
||||
/* STI o: Store indirect o bytes (pop address, then data) */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTIl2(%ld)", l));
|
||||
LOG(("@S6 DoSTI(%ld)", l));
|
||||
spoilFRA();
|
||||
pop_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoSTIl4(arg)
|
||||
size arg;
|
||||
{
|
||||
/* STI o: Store indirect o bytes (pop address, then data) */
|
||||
register size l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTIl4(%ld)", l));
|
||||
spoilFRA();
|
||||
pop_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoSTIm(arg)
|
||||
size arg;
|
||||
{
|
||||
/* STI o: Store indirect o bytes (pop address, then data) */
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTIm(%ld)", arg));
|
||||
spoilFRA();
|
||||
pop_m(p, arg_o(arg));
|
||||
}
|
||||
|
||||
DoSTIs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* STI o: Store indirect o bytes (pop address, then data) */
|
||||
register size l = (S_arg(hob) * wfac);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSTIs(%ld)", l));
|
||||
spoilFRA();
|
||||
pop_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoSTSl2(arg)
|
||||
size arg;
|
||||
DoSTS(l)
|
||||
register size l;
|
||||
{
|
||||
/* STS w: Store indirect, w-byte integer on top of stack gives object size */
|
||||
register size l = (P_arg_2() * arg);
|
||||
register ptr p;
|
||||
|
||||
LOG(("@S6 DoSTSl2(%ld)", l));
|
||||
LOG(("@S6 DoSTS(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
p = dppop();
|
||||
pop_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoSTSz() /* the arg 'w' is on top of stack */
|
||||
{
|
||||
/* STS w: Store indirect, w-byte integer on top of stack gives object size */
|
||||
register size l = uwpop();
|
||||
register ptr p;
|
||||
|
||||
LOG(("@S6 DoSTSz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = upop(arg_wi(l));
|
||||
p = dppop();
|
||||
pop_m(p, arg_o(l));
|
||||
}
|
||||
|
||||
DoSDLn2(arg)
|
||||
long arg;
|
||||
DoSDL(l)
|
||||
register long l;
|
||||
{
|
||||
/* SDL l: Store double local or parameter */
|
||||
register long l = (N_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSDLn2(%ld)", l));
|
||||
LOG(("@S6 DoSDL(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pop_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDLn4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SDL l: Store double local or parameter */
|
||||
register long l = (N_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSDLn4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pop_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDLp2(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SDL l: Store double local or parameter */
|
||||
register long l = (P_arg_2() * arg);
|
||||
|
||||
LOG(("@S6 DoSDLp2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pop_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDLp4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SDL l: Store double local or parameter */
|
||||
register long l = (P_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSDLp4(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pop_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDLs(hob, wfac)
|
||||
long hob;
|
||||
size wfac;
|
||||
{
|
||||
/* SDL l: Store double local or parameter */
|
||||
register long l = (S_arg(hob) * wfac);
|
||||
|
||||
LOG(("@S6 DoSDLs(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_l(l);
|
||||
pop_st(loc_addr(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDEu(arg)
|
||||
long arg;
|
||||
DoSDE(arg)
|
||||
register unsigned long arg;
|
||||
{
|
||||
/* SDE g: Store double external */
|
||||
register ptr p = i2p(U_arg() * arg);
|
||||
register ptr p = i2p(arg);
|
||||
|
||||
LOG(("@S6 DoSDEu(%lu)", p));
|
||||
LOG(("@S6 DoSDE(%lu)", p));
|
||||
spoilFRA();
|
||||
pop_m(arg_g(p), dwsize);
|
||||
}
|
||||
|
||||
DoSDEl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SDE g: Store double external */
|
||||
register ptr p = i2p(L_arg_4() * arg);
|
||||
|
||||
LOG(("@S6 DoSDEl4(%lu)", p));
|
||||
spoilFRA();
|
||||
pop_m(arg_g(p), dwsize);
|
||||
}
|
||||
|
||||
DoSDFl2(arg)
|
||||
long arg;
|
||||
DoSDF(l)
|
||||
register long l;
|
||||
{
|
||||
/* SDF f: Store double offsetted */
|
||||
register long l = (L_arg_2() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSDFl2(%ld)", l));
|
||||
spoilFRA();
|
||||
pop_m(p + arg_f(l), dwsize);
|
||||
}
|
||||
|
||||
DoSDFl4(arg)
|
||||
long arg;
|
||||
{
|
||||
/* SDF f: Store double offsetted */
|
||||
register long l = (L_arg_4() * arg);
|
||||
register ptr p = dppop();
|
||||
|
||||
LOG(("@S6 DoSDFl4(%ld)", l));
|
||||
LOG(("@S6 DoSDF(%ld)", l));
|
||||
spoilFRA();
|
||||
pop_m(p + arg_f(l), dwsize);
|
||||
}
|
||||
|
|
|
@ -33,166 +33,80 @@ extern int must_test;
|
|||
|
||||
PRIVATE unsigned long dvu(), rmu(), slu(), sru();
|
||||
|
||||
DoADUl2(arg)
|
||||
size arg;
|
||||
DoADU(l)
|
||||
register size l;
|
||||
{
|
||||
/* ADU w: Addition */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoADUl2(%ld)", l));
|
||||
LOG(("@U6 DoADU(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) adu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoADUz()
|
||||
{
|
||||
/* ADU w: Addition */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoADUz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) adu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoSBUl2(arg)
|
||||
size arg;
|
||||
DoSBU(l)
|
||||
register size l;
|
||||
{
|
||||
/* SBU w: Subtraction */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoSBUl2(%ld)", l));
|
||||
LOG(("@U6 DoSBU(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) sbu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoSBUz()
|
||||
{
|
||||
/* SBU w: Subtraction */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoSBUz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) sbu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoMLUl2(arg)
|
||||
size arg;
|
||||
DoMLU(l)
|
||||
register size l;
|
||||
{
|
||||
/* MLU w: Multiplication */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoMLUl2(%ld)", l));
|
||||
LOG(("@U6 DoMLU(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) mlu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoMLUz()
|
||||
{
|
||||
/* MLU w: Multiplication */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoMLUz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) mlu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoDVUl2(arg)
|
||||
size arg;
|
||||
DoDVU(l)
|
||||
register size l;
|
||||
{
|
||||
/* DVU w: Division */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoDVUl2(%ld)", l));
|
||||
LOG(("@U6 DoDVU(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) dvu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoDVUz()
|
||||
{
|
||||
/* DVU w: Division */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoDVUz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) dvu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoRMUl2(arg)
|
||||
size arg;
|
||||
DoRMU(l)
|
||||
register size l;
|
||||
{
|
||||
/* RMU w: Remainder */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoRMUl2(%ld)", l));
|
||||
LOG(("@U6 DoRMU(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) rmu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoRMUz()
|
||||
{
|
||||
/* RMU w: Remainder */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = upop(arg_wi(l));
|
||||
|
||||
LOG(("@U6 DoRMUz(%ld)", l));
|
||||
spoilFRA();
|
||||
npush((long) rmu(upop(l), t), l);
|
||||
}
|
||||
|
||||
DoSLUl2(arg)
|
||||
size arg;
|
||||
DoSLU(l)
|
||||
register size l;
|
||||
{
|
||||
/* SLU w: Shift left */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = uwpop();
|
||||
|
||||
LOG(("@U6 DoSLUl2(%ld)", l));
|
||||
LOG(("@U6 DoSLU(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush((long) slu(upop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSLUz()
|
||||
{
|
||||
/* SLU w: Shift left */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = uwpop();
|
||||
|
||||
LOG(("@U6 DoSLUz(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush((long) slu(upop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSRUl2(arg)
|
||||
size arg;
|
||||
DoSRU(l)
|
||||
register size l;
|
||||
{
|
||||
/* SRU w: Shift right */
|
||||
register size l = (L_arg_2() * arg);
|
||||
register unsigned long t = uwpop();
|
||||
|
||||
LOG(("@U6 DoSRUl2(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush((long) sru(upop(l), t, l), l);
|
||||
}
|
||||
|
||||
DoSRUz()
|
||||
{
|
||||
/* SRU w: Shift right */
|
||||
register size l = uwpop();
|
||||
register unsigned long t = uwpop();
|
||||
|
||||
LOG(("@U6 DoSRUz(%ld)", l));
|
||||
LOG(("@U6 DoSRU(%ld)", l));
|
||||
spoilFRA();
|
||||
l = arg_wi(l);
|
||||
npush((long) sru(upop(l), t, l), l);
|
||||
|
|
Loading…
Reference in a new issue