[Oberon] RISC emulator and floating-point
jan at verhoeven272.nl
Tue Mar 25 16:04:30 CET 2014
Paul Reed wrote:
> There's also something wrong with Texts.WriteInt, trying to print
> 80000000H results in a trap.
> Yes that's definitely weird, probably a consequence of the circuitous
> cross-compilation route (via my own RISC VM) I used to create the image.
> I will look at this further and let you know in due course. Sorry for any
> inconvenience and thanks for the feedback!
Is there really something wrong with the Texts.WriteInt function?
I made the following source:
Out.Int (80000000H, 20);
and then compiled it with obc:
jan at nitrogen ~/Oberon/source$ obc -o wint wint.m
"wint.m", line 6: warning -- the integer value 2147483648 does not fit in
> Out.Int (80000000H, 20);
So, before you start changing the Module. it may be more appropiate to
check the syntax parser. Oberon generates a trap. But so does obc.
See what Mocka says:
InOut.WriteInt (80000000H, 20);
@ Col 19: constant out of range ( > upb )
Also Mocka generates an error before the runtime could generate a trap.
More information about the Oberon