Hello everyone
I'm working on a compiler and emulation of the RISC processor detailed in
the latest (?) edition of Compiler Construction by Professor Wirth
from CompilerConstruction1.pdf
(projectoberon.net)
<http://www.projectoberon.net/wirth/CompilerConstruction/CompilerConstructio…>
.
I can't follow the Oberon code for the emulator in section 9.5 in the
section handling memory instructions, which differs from Peter De Wachter's
Oberon RISC emulator at https://github.com/pdewacht/oberon-risc-emu.git
In Compiler Construction, once an instruction has been decoded as a memory
instruction the address is calculated using
adr := (R[b] + IR MOD 100000H) DIV 4;
which (apart from the DIV 4) agrees with the code in oberon-risc-emu (which
also sign extends the offset before adding it).
If adr >= 0 then a load is carried out, and the N and Z flags set depending
on the value loaded.
However (and this is the bit I don't understand) if adr < 0 then a store is
carried out, whereas in oberon-risc-emu u bit of the instruction is checked
and if 0 a load is carried out and if 1 a store is carried out.
Since I know oberon-risc-emu works, and that agrees with the settings for
the u and v bits in Compiler Construction then I assume that must be the
correct implementation, but is there an error in Compiler Construction or
am I missing something very simple?
All the best.
John Stout
Hi,
For years I've kept the "Work Directory" in UnixAos on an SD card
reformatted to ext2.
Usage notes for flash storage commonly recommend against reformatting.
Eg. https://wiki.laptop.org/go/Secure_Digital_card#Formatting
So I've reviewed the possibility of the Work Directory containing a
FAT file system. Access speed might be a concern for some
requirements; not for me. An obvious small snag is the .aoshome link
which the aos start script attempts to create. The FAT file system
doesn't support links. The link appears in Configuration.XML allowing
File Manager to access "Module Sources" and "Fonts". If aos fails to
create .aoshome, File Manager doesn't show Module Sources and Fonts. A
simple alternative to .aoshome is to hard code the location in two
places in Configuration.XML. (The default location is /usr/aos.)
I haven't noticed any other difficulty with a factory formatted SD
card. Anything to add to notes to help a novice?
Thx! ... P.L.
--
mobile: +1 778 951 5147
VoIP: +1 604 670 0140
48.7693 N 123.3053 W