18 Dec
2018
18 Dec
'18
10:21 p.m.
...but ALSO for *regular* procedures, i.e. in ORP.StatSequence…
But in this case, surely RH is 0 so no registers are saved? Maybe the apparent asymmetry comes from having to handle procedure variables too.
That’s indeed the reason: when one calls a procedure variable, e.g. V.handle in Viewers, then dereferencing V to get to V.handle in ORP.selector/ ORG.DeRef will use up an additional register, so RH = 1 in PrepCall. But still, shouldn’t this register be somehow accounted for ? Perhaps with the second of the following lines in ORG.Call: IF x.mode <= ORB.Par THEN load(x); DEC(RH) ELSE Put2(Ldr, RH, SP, 0); Put1(Add, SP, SP, 4); DEC(r); DEC(frame, 4) <--- END ; I just haven’t investigated yet.. -ap