[Oberon] Negative integer literals in Oberon

Joerg joerg.straube at iaeth.ch
Sun Apr 26 22:46:56 CEST 2020


Wojtek

The 64 IO addresses are the last 256 bytes at the top end of memory.
If you have 1MB of memory they are at absolute address 0FFF00H to 0FFFFFH.
If you have 16 MB of memory the IO addresses are at 0FFFF00H to 0FFFFFFH.

You could either write 0FFFFFFFFFFFFFC0H to be prepared for all possible memory sizes, or just simpler -64;

br
Jörg

> Am 26.04.2020 um 22:20 schrieb Skulski, Wojciech <skulski at pas.rochester.edu>:
> 
> Joerg [joerg.straube at iaeth.ch] wrote:
>> as I tried to explain: When you as programmer use the hex notation, 
>> you most probably have unsigned byte, word, longword .. usage in mind.
>> Else why not using the decimal notation in the first place?
> 
> Really? Then why do I see all these negative decimal peripheral addresses 
> in the FPGA Oberon Project?  A while ago I put together the SysDef.Mod 
> to bring some order into this mess. I had to decipher the hex bit patterns 
> "by hand" and find the correspondence with the negative decimal numbers
> in the documentation. The copy is attached. 
> 
> It somehow seems to me that the discussion and the actual practice 
> in the FPGA Oberon Project live in two disjoint spaces. On one hand 
> you have all these hex constants plus the theories exposed in this thread, 
> but when you take the actual practice, it looks very different from the theory.
> 
> W.
> 
> 
> 
> <SysDef_Feb_11_2020c.Mod.odc.pdf>



More information about the Oberon mailing list