[Oberon] RISC emulator
Jörg
joerg.straube at iaeth.ch
Thu Mar 27 18:27:58 CET 2014
Hi
To take the variable "n" into account even for MIN(INTEGER) I would change
it to:
IF ROR(x, 31) = 1 THEN i:=10; DEC(n); a:="8463847412"
ELSE i := 0;
IF x < 0 THEN DEC(n); x0 := -x ELSE x0 := x END;
REPEAT
a[i] := CHR(x0 MOD 10 + 30H); x0 := x0 DIV 10; INC(i)
UNTIL x0 = 0;
END;
WHILE n > i DO Write(W, " "); DEC(n) END;
IF x < 0 THEN Write(W, "-") END;
REPEAT DEC(i); Write(W, a[i]) UNTIL i = 0
Jörg
-----Original Message-----
From: Chris Burrows [mailto:chris at cfbsoftware.com]
Sent: Donnerstag, 27. März 2014 14:52
To: 'ETH Oberon and related systems'
Subject: Re: [Oberon] RISC emulator
> On Sun, 23 Mar 2014 21:04:50 +0100
> Peter De Wachter <pdewacht at gmail.com> wrote:
>
> > There's also something wrong with Texts.WriteInt, trying to print
> > 80000000H results in a trap.
>
The corrected version of Texts can now be downloaded from:
http://www.inf.ethz.ch/personal/wirth/ProjectOberon
Regards,
Chris
--
Chris Burrows
CFB Software
http://www.astrobe.com
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6097 bytes
Desc: not available
Url : https://lists.inf.ethz.ch/pipermail/oberon/attachments/20140327/f61f965b/attachment.bin
More information about the Oberon
mailing list