<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 30, 2021 at 12:12 PM Colby Russell <<a href="mailto:oberon@x.colbyrussell.com">oberon@x.colbyrussell.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</blockquote></div>