<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:ArialMT;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:523326915;
mso-list-type:hybrid;
mso-list-template-ids:-1921471356 201916439 201916441 201916443 201916431 201916441 201916443 201916431 201916441 201916443;}
@list l0:level1
{mso-level-number-format:alpha-lower;
mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>It is true that the RIDER feature was not included in the design of the language Oberon-07. However, it is not relevant that the RISC5 CPU does not offer an auto-increment feature. Unless I have misunderstood you I interpret the statement:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>“This is not existing in Oberon-07 as the RISC5 CPU does not offer the autoincrement feature.”<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>as somehow implying that the design of the Oberon language is dependent on the features of the RISC5 instruction set. If so that could not be further from the truth. It would be quite possible to implement the RIDER feature on any CPU which was otherwise suitable as an Oberon target system regardless of whether or not the instruction set had an auto-increment feature.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='color:#1F497D;mso-fareast-language:EN-US'>The reason that the RIDER feature was abandoned in Oberon-07 is explained in the document ‘An Oberon Compiler for the ARM Processor’. Niklaus Wirth 18.12.2007, rev. 16.4.2008.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><i><span style='color:#1F497D;mso-fareast-language:EN-US'>The third facility of array riders had been implemented on an earlier version of the Oberon-SA compiler, and it resulted in significant speedup for sequential access with arrays. However, we recognized that this situation occurs relatively rarely, whereas the compiler was made more complex for good. Consequently, we decided to drop that feature and will not further discuss it here.<o:p></o:p></span></i></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"ArialMT","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='color:#1F497D;mso-fareast-language:EN-US'>You can download a copy of this document from:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='color:#1F497D;mso-fareast-language:EN-US'><a href="https://inf.ethz.ch/personal/wirth/Oberon/Oberon.ARM.Compiler.pdf"><o:p></o:p></a></span></p><p class=MsoNormal style='text-autospace:none'><span class=MsoHyperlink><span style='mso-fareast-language:EN-US'><a href="https://inf.ethz.ch/personal/wirth/Oberon/Oberon.ARM.Compiler.pdf">inf.ethz.ch › personal › wirth › Oberon.ARM.Compiler.pdf<o:p></o:p></a></span></span></p><p class=MsoNormal style='text-autospace:none'><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>However, the auto-increment feature does exist in various ARM instruction sets. In the Astrobe compilers we came up with a much simpler way than the RIDER concept to utilise its potential for efficiency. Since release v4.5 of Astrobe in 2013 we have included an optional third parameter on the SYSTEM.GET and SYSTEM.PUT functions. This is described in the documentation as follows:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><i><span style='color:#1F497D;mso-fareast-language:EN-US'>An optional integer constant parameter inc can be used with GET and PUT to automatically increment / decrement the value of address. If inc is in the range 1..255 the address is incremented after the value is stored. If inc is in the range -1..-255 the address is decremented before the value is stored. Typical values for inc are 1 for byte accesses and 4 for word accesses.<o:p></o:p></span></i></p><p class=MsoNormal><i><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></i></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>Code examples and a discussion of the performance gains (e.g. <i>five times</i> faster) can be seen in the topic <i>Fast ARRAY and RECORD moves</i> in the Astrobe forum:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><a href="https://www.astrobe.com/forum/viewtopic.php?f=10&t=404">https://www.astrobe.com/forum/viewtopic.php?f=10&t=404</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>For those who have a desire to get some real hands-on experience with modifying the Project Oberon compiler and / or understanding Verilog and how to maintain / port / extend the RISC5 processor an excellent starting exercise would be to implement this extended form of SYSTEM.GET and SYSTEM.PUT in the Project Oberon RISC5 compiler by:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D;mso-fareast-language:EN-US'><span style='mso-list:Ignore'>a)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='color:#1F497D;mso-fareast-language:EN-US'>Using the standard RISC5 instruction set<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D;mso-fareast-language:EN-US'><span style='mso-list:Ignore'>b)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='color:#1F497D;mso-fareast-language:EN-US'>Using an extended RISC5 instruction set that includes an auto-increment feature <o:p></o:p></span></p><p class=MsoListParagraph><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>Ideally b) would include updated Verilog sources and be demonstratable on real hardware, but for those not fortunate enough to have the hardware to do this, the next best thing would be to modify one of the existing RISC5 emulators.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>If sufficient interest is shown I’ll consider running a competition with a prize for the best (in my opinion) solution. Keep a watch on the Astrobe forum for details.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>Chris Burrows<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'>CFB Software<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><a href="https://www.astrobe.com">https://www.astrobe.com</a><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] <b>On Behalf Of </b>Jörg<br><b>Sent:</b> Wednesday, 29 April 2020 1:31 AM<br><b>To:</b> ETH Oberon and related systems<br><b>Subject:</b> Re: [Oberon] Negative integer literals in Oberon<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>One of the new features in Oberon-SA was the base type RIDER, a special case of POINTER TO ARRAY<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>RIDERs are useful, if the CPU offers special pre/post increment/decrement.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>In e.g. Oberon-07 you write something like<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>VAR s, x, y: REAL; ra, rb, limit: POINTER TO REAL;</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>BEGIN<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> s := 0.0; ra := SYSTEM.ADR(a); rb:= SYSTEM.ADR(b); limit := ra + n*4;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> WHILE ra < limit DO<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> SYSTEM.GET(ra, x); SYSTEM.GET(rb, y);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> s := x * y + s; INC(ra, 4) INC(rb, 4)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> END<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>With RIDERS it looks like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>VAR s: REAL; ra, rb, limit: RIDER REAL;</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'>BEGIN<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> s := 0.0; SET(ra, a, 0); SET(rb, b, 0); SET(limit, a, n);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'> WHILE ra < limit DO s := ra^ * rb^ + s END;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.5pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>This is not existing in Oberon-07 as the RISC5 CPU does not offer the autoincrement feature.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>br<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>Jörg<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> </span><span lang=DE-CH><o:p></o:p></span></p></div></div></body></html>