[Oberon] PO2013 - Show Heap Blocks

Joerg joerg.straube at iaeth.ch
Wed Jun 24 07:45:34 CEST 2020

> 000685E0 FFFFFFFF 00068480
> 00000001 00000000 00000000
>  PROCEDURE List32*;
>    VAR p, q: INTEGER;
>    p := S.ADR(Kernel.MemLim);
>    S.GET(p+20, q); (*32*);
>    WHILE q # 0 DO
>      Out.Hex(q); S.GET(q+4, p); Out.Hex(p); S.GET(q+8, p); Out.Hex(p);
>      Out.Ln; S.GET(q+8, q) (*next*)
>    END
>  END List32
I‘m still confused
How can the output above be generated by the given program?

The first nbr is the current address, and the third value is the next address.
So, the last value of one line must be the first value of the next line?
Where does the address 00000001 come from?
a) The second line should start with 00068480 and b) 00000001 is for sure no valid heap address.


More information about the Oberon mailing list