[Oberon] RISC emulator
jan at verhoeven272.nl
Tue Mar 25 18:14:23 CET 2014
Paul Onyschuk wrote:
> I'm not that familiar with Oberon yet, but throwing trap, when you try
> to print value out of range seems sensible?
Get a copy of obc to get familiar with the language.
obc is a fine compiler, cross platform, without the sidestep to Java or
C. obc object code is interpreted but at amazing speeds.
See also http://fruttenboel.verhoeven272.nl/obc/index.html
I adapted wint.m:
VAR int : INTEGER;
int := 80000000H - 1;
Out.String ("7FFFFFFF = "); Out.Int (int, 20);
Out.String ("80000000 = "); Out.Int (int, 20);
See it compile, see it run:
jan at nitrogen ~/Oberon/source$ obc -o wint wint.m
jan at nitrogen ~/Oberon/source$ ./wint
7FFFFFFF = 2147483647
80000000 = -2147483648
A clean compile. And a clean run.
More information about the Oberon