[Oberon] FJump and FixLink
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Mon Sep 24 00:37:36 CEST 2018
> In short, I would have coded the procedures as follows:
>
> PROCEDURE FixLink*(L: LONGINT);
> VAR L1: LONGINT;
> BEGIN
> WHILE L # 0 DO L1 := code[L] MOD 2000H; FixOne(L); L := L1 END
> END FixLink;
>
> PROCEDURE FixLinkWith(L0, dst: LONGINT); (* used for «UNTIL» *)
> VAR L1: LONGINT;
> BEGIN
> WHILE L0 # 0 DO
> L1 := code[L0] MOD 2000H; fix(L0, dst - L0 - 1); L0 := L1
> END
> END FixLinkWith;
>
PS: Which, if I am not mistaken, could also be expressed as:
PROCEDURE FixLinkWith(L, dst: LONGINT);
VAR L1: LONGINT;
BEGIN
WHILE L # 0 DO L1 := code[L] MOD 2000H; fix(L, dst-L-1); L := L1 END
END FixLinkWith;
PROCEDURE FixLink*(L: LONGINT);
BEGIN FixLinkWith(L, pc)
END FixLink;
More information about the Oberon
mailing list