<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Chuck<div>yes, but file would not be portable anymore because of endianess.</div><div>br<br><div dir="ltr"><div>Jörg</div></div><div dir="ltr"><br><blockquote type="cite">Am 31.01.2021 um 16:52 schrieb Charles Perkins <chuck@kuracali.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr">I think the source of the cognitive difference between .rsc files and in memory structures is that the .rsc file is a sequence of data read and written using the file reader and writer abstract data type, while the in-memory structures are records and arrays of values and blocks of code with constraints applied by the compiler.<div><br></div><div>In Linux and many other Unix-based systems the structure of values on disk (e.g. behind the file ADT) is conflated with the in-memory representation because it can be memory-mapped (an excellent trick enabling many performant optimizations) entirely bypassing the encapsulation provided by the ADT.</div></div><div><br></div><div>If we were to adjust the .rsc file for word alignment of strings, making the on-disk layout of values no longer agnostic to in-memory layout of data, I would go much further. I would make the on-disk layout exactly the same as an in-memory layout, enable demand paging of disk blocks to memory locations, just page in executable code as necessary (don't need an mmu for that if you start out by filling all page cache locations with an instruction that jumps to the 'paged out' handler) etc, etc, etc. but that is a much more complex system unsuitable for illustrating the core concepts of a single-user interactive workstation.</div><div><br></div><div>My two cents.</div><div>Chuck</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 31, 2021 at 7:14 AM Paul Reed <<a href="mailto:paulreed@paddedcell.com">paulreed@paddedcell.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">On 2021-01-31 10:11, Andreas Pirklbauer wrote:<br>
> Isn’t any data - including string data . already word-aligned in the<br>
> compiler (and therefore also in the .rsc file)?<br>
...<br>
>     - All type descriptors are word-aligned (see ORG.BuildTD)<br>
...<br>
>     - All strings are word-aligned (see ORG.MakeStringItem)<br>
<br>
Right, there are sections which *would* be (file) word-aligned, if other <br>
previous sections weren't variable (byte) length.<br>
<br>
Cheers,<br>
Paul<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></div>
<span>--</span><br><span>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems</span><br><span>https://lists.inf.ethz.ch/mailman/listinfo/oberon</span><br></div></blockquote></div></body></html>