<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" dir="auto" class=""><div class="">Recently I tried to implement XYplane.Mod from the book of Reiser & Wirth 'Programming in Oberon' for Project Oberon. Within Peter de Wachter's RISC emulator I ran into an overflow problem (leading to the remaining empty of the menu line of a viewer) that appears to be dependent on which disk image is used.</div><div class=""><br class=""></div><div class="">Otherwise my port works fine (produces the IFS fractal fern as expected). </div><div class="">For those interested I will post it to my github repository.</div><div class=""><br class=""></div><div class="">A minimal module that can reproduce this menu problem can be found below.</div><div class=""><span style="font-family: Menlo-Regular; font-size: 13px;" class=""><br class=""></span></div><div class=""><div class="">When starting the emulator in macOS as follows this problem occurs:</div><div class=""><div class="" style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Andale Mono"; color: rgb(242, 242, 242); background-color: rgb(0, 0, 0);"><span class="" style="font-variant-ligatures: no-common-ligatures;">$ ./risc --fullscreen DiskImage/Oberon-2019-01-21.dsk</span></div><div class=""><br class=""></div><div class="">But the problem does NOT occur when starting thus: </div><div class=""><div class="" style="margin: 0px; font-stretch: normal; line-height: normal; font-family: "Andale Mono"; color: rgb(242, 242, 242); background-color: rgb(0, 0, 0);"><span class="" style="font-variant-ligatures: no-common-ligatures;">$ ./risc --fullscreen DiskImage/Oberon-2016-08-02.dsk</span></div></div></div></div><div class=""><br class=""></div><div class="">I do understand that there is a limit to the use of static variables within the PO version of Oberon, but I would not expect this limit to be reached this easily, and I would not expect it to appear in newer versions of the software and not in older.</div><div class=""><br class=""></div><div class="">Does anyone have a clue where to look for the cause of this happening?</div><div class=""><br class=""></div><div class="">Hans Klaver</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">---------------------</div><div class=""><br class=""></div><div class="">MODULE MyViewer;  </div><div class="">(* Test of the menu line of a viewer *)</div><div class=""><br class=""></div><div class="">IMPORT Display, Viewers, Oberon, MenuViewers, TextFrames;</div><div class=""><br class=""></div><div class="">CONST </div><div class="">   max = 16377;   (* If max >= 16367 the frame name disappears; If max >= 16377 the whole menu line disappears! *)</div><div class="">   menu = "System.Close System.Copy System.Grow"; </div><div class=""><br class=""></div><div class="">TYPE </div><div class="">   XYframe = POINTER TO XYframeDesc;</div><div class="">   XYframeDesc = RECORD (Display.FrameDesc) END;</div><div class=""><br class=""></div><div class="">VAR bitmap: ARRAY max OF SET;  (* with this variable present the menu may remain empty! *)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">PROCEDURE Restore(F: XYframe);</div><div class="">BEGIN </div><div class="">   Oberon.RemoveMarks(F.X, F.Y, F.W, F.H);</div><div class="">   Display.ReplConst(Display.black, F.X, F.Y, F.W, F.H, Display.replace);  (* clear *)</div><div class="">END Restore;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">PROCEDURE Handle(F: Display.Frame; VAR M: Display.FrameMsg);</div><div class="">   VAR F1: XYframe;</div><div class="">BEGIN  </div><div class="">   CASE F OF XYframe:</div><div class="">      CASE M OF </div><div class="">         Oberon.InputMsg:</div><div class="">            IF <a href="http://M.id" class="">M.id</a> = Oberon.track THEN Oberon.DrawMouseArrow(M.X, M.Y) END |</div><div class="">         Oberon.CopyMsg:</div><div class="">               Oberon.RemoveMarks(F.X, F.Y, F.W, F.H); NEW(F1); F1^ := F^; M.F := F1 |</div><div class="">         MenuViewers.ModifyMsg:</div><div class="">            IF (M.Y # F.Y) OR (M.H # F.H) THEN F.Y := M.Y; F.H := M.H; Restore(F) END        </div><div class="">      END</div><div class="">   END</div><div class="">END Handle;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">PROCEDURE Open*;</div><div class="">   VAR F: XYframe;    V: Viewers.Viewer;   x, y: INTEGER;</div><div class="">BEGIN</div><div class="">   NEW(F);   F.handle := Handle; </div><div class="">   Oberon.AllocateUserViewer(Oberon.Par.vwr.X, x, y); </div><div class="">   V := MenuViewers.New(TextFrames.NewMenu("MyViewer", menu), F, TextFrames.menuH, x, y)</div><div class="">END Open;</div><div class=""><br class=""></div><div class="">END MyViewer.</div></div></body></html>