<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;}
/* 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:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></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=DE-CH link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>Right. Look at ORG.CopyString then you know why…..<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 style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Oberon <oberon-bounces@lists.inf.ethz.ch> <b>On Behalf Of </b>Charles Perkins<br><b>Sent:</b> Saturday, January 30, 2021 9:23 PM<br><b>To:</b> ETH Oberon and related systems <oberon@lists.inf.ethz.ch><br><b>Subject:</b> Re: [Oberon] Why is RSC string data word-aligned?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Just an intuition, but if string constants and string variables start on a word boundary and are padded with nul to a word boundary then a number of string operations only require word access, simplifying assignment (copying) and comparison.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Sat, Jan 30, 2021 at 12:12 PM Colby Russell <<a href="mailto:oberon@x.colbyrussell.com">oberon@x.colbyrussell.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal>I'm returning to some of the code that deals with Oberon's RSC binary<br>file format. The first time I went through this exercise, I noticed<br>that ORG pads string data, so individual strings begin on word<br>boundaries, and I didn't think much about it. Presumably it was done<br>for efficiency. Now, though, I'm wondering.<br><br>Does anyone have a breakdown comparing the two approaches--where strings<br>don't get padded with NUL bytes and may begin anywhere, versus what<br>happens if with word alignment? If there are some string handling<br>routines where this makes a material difference, can someone point to<br>them?<br><br>I've already looked around, but I realize that string representation is<br>a cross-cutting concern, and there's just too much material to<br>exhaustively scour it all again. If there was a call out on this topic<br>in the explanation of the the simple compiler that's documented in<br>Compiler Construction, then I wasn't able to find it. I looked at a few<br>sections in the Oberon book as well, hoping to see if it was explained<br>(e.g. the module loader chapter), but didn't spot anything there,<br>either.<br><br>-- <br>Colby Russell<br><br>--<br><a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><o:p></o:p></p></blockquote></div></div></body></html>