<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Andreas and Jörg,<div class=""><br class=""></div><div class="">Thanks to your suggestions I managed to make a port of Martin Reiser's XYplane.Mod code that runs on the 2019 version of PO, even without the fix below. The original XYplane.Mod appeared to use only the left (user) track for its bitmap, so a bitmap of 753 x 638 bits, needing only <span class="pl-c1">15013 SETs = c</span><span class="pl-c"><span class="pl-c">eil(753 x 638 / 32). </span></span></div><div class=""><span class="pl-c"><span class="pl-c"><br class=""></span></span></div><div class=""><span class="pl-c"><span class="pl-c">You can find the source code, along with IFS.Mod, Random.Mod and an IFS.Tool with parameters for a few more fractal images here: <a href="https://github.com/hansklav/Oberon-07" class="">https://github.com/hansklav/Oberon-07</a></span></span></div><div class=""><span class="pl-c"><br class=""></span></div><div class=""><span class="pl-c">Now starting Oberon-07 programmers can make the examples and exercises that use XYplane.Mod from the book Programming in Oberon by Reiser & Wirth.</span></div><div class="">--</div><div class="">Hans</div><div class=""><span class="pl-c"><span class="pl-c"><br class=""></span></span></div><div class=""><div><blockquote type="cite" class=""><div class="">Andreas Pirklbauer wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Thx. On a separate note: The fix below for ORG.Put1a only works for *non-imported*<br class="">global variables. There, the offset from the static base can now be >64KB, both<br class="">for loading the value of such variables and for determining their address.<br class=""><br class="">For *imported* global variables, there still is the 64KB restriction (actually, loading<br class="">works, but not accessing the address of such variables). This could also be fixed.<br class=""><br class=""><br class=""><blockquote type="cite" class="">On 27 Feb 2020, at 14:35, Skulski, Wojciech <<a href="mailto:skulski@pas.rochester.edu" class="">skulski@pas.rochester.edu</a>> wrote:<br class=""><br class="">Andreas:<br class=""><br class=""><blockquote type="cite" class="">Below is a slightly more elaborate variant that fixes the current bug in ORG.Put1a<br class="">and makes MyViewers.Mod (see below) work on a Project Oberon 2013 system:<br class=""></blockquote><br class="">How about <br class="">CONST LIMIT = 10000H; ULIMIT = 0FFFFH; (* Upper limit = LIMIT -1 = 0FFFFH; *)<br class=""><br class=""> PROCEDURE Put1a(op, a, b, im: LONGINT);<br class=""> VAR r: INTEGER;<br class=""> BEGIN <br class=""> (*same as Put1, but with range test -10000H<= im < 10000H*)<br class=""> (*same as Put1, but with range test -LIMIT <= im < LIMIT *)<br class=""> IF (im >= -LIMIT ) & (im <= ULIMIT) THEN Put1(op, a, b, im)<br class=""> ELSIF op = Mov THEN<br class=""> Put1(Mov+U, a, 0, im DIV LIMIT );<br class=""> IF im MOD LIMIT # 0 THEN Put1(Ior, a, a, im MOD LIMIT ) END<br class=""> ELSE r := RH;<br class=""> IF b = RH THEN incR END ;<br class=""> Put1(Mov+U, RH, 0, im DIV LIMIT );<br class=""> IF im MOD LIMIT # 0 THEN Put1(Ior, RH, RH, im MOD LIMIT ) END ;<br class=""> Put0(op, a, b, RH);<br class=""> IF RH > r THEN DEC(RH) END<br class=""> END<br class=""> END Put1a;<br class=""><br class="">Comments:<br class="">0. Using literal constants in the code is a universally condemned programming practice.<br class="">1. Procedure incR is to be moved up to before procedure ORG.Put0<br class="">2. The use of incR ensures that in fact we do have enough registers available<br class="">3. Register optimization: But a new register is used only when needed (when b = RH)<br class="">4. Instruction optimization: For op = Mov, the extra MOV instruction at the end is avoided<br class=""><br class=""></blockquote><br class="">--<br class=""><a href="mailto:Oberon@lists.inf.ethz.ch" class="">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br class=""><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" class="">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>