[Oberon] Why is RSC string data word-aligned?

Colby Russell oberon at x.colbyrussell.com
Sat Jan 30 21:12:05 CET 2021


I'm returning to some of the code that deals with Oberon's RSC binary
file format.  The first time I went through this exercise, I noticed
that ORG pads string data, so individual strings begin on word
boundaries, and I didn't think much about it.  Presumably it was done
for efficiency.  Now, though, I'm wondering.

Does anyone have a breakdown comparing the two approaches--where strings
don't get padded with NUL bytes and may begin anywhere, versus what
happens if with word alignment?  If there are some string handling
routines where this makes a material difference, can someone point to
them?

I've already looked around, but I realize that string representation is
a cross-cutting concern, and there's just too much material to
exhaustively scour it all again.  If there was a call out on this topic
in the explanation of the the simple compiler that's documented in
Compiler Construction, then I wasn't able to find it.  I looked at a few
sections in the Oberon book as well, hoping to see if it was explained
(e.g. the module loader chapter), but didn't spot anything there,
either.

-- 
Colby Russell



More information about the Oberon mailing list