<div dir="ltr">On review of the source, I see that LONGREAL is currently aliased to REAL in ORB, suggesting that REAL may stay 32-bit and LONGREAL would be 64-bit. Would the same be done for SET, introducing LONGSET perhaps?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 15, 2021 at 1:08 PM Charles Perkins <<a href="mailto:chuck@kuracali.com">chuck@kuracali.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">I like the idea.<div><br></div><div>The sizes of datatypes in the RISC5 compiler are defined in ORB.Mod. Currently we have:</div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap"> byteType := type(Byte, Int, 1); (*symbol: BYTE *)
boolType := type(Bool, Bool, 1); (*symbol: BOOLEAN *)
charType := type(Char, Char,1); (*symbol: CHAR *)
intType := type(Int, Int, 4); (*symbols: INTEGER, LONGINT *)
realType := type(Real, Real, 4); (*symbol: REAL *)
setType := type(Set, Set,4); (*symbol: SET *)
nilType := type(NilTyp, NilTyp, 4);(*symbol: NIL *)
</pre>In a 64-bit compiler derived from the RISC5 compiler I imagine we would also have 8 byte REALs and SETs and NIL values:</div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap"> byteType := type(Byte, Int, 1); (*symbol: BYTE *)
boolType := type(Bool, Bool, 1); (*symbol: BOOLEAN *)
charType := type(Char, Char,1); (*symbol: CHAR *)
intType := type(Int, Int, 4); (*symbol: INTEGER *)
longType := type(Long, Long, 8); (*symbol: LONGINT *)
realType := type(Real, Real, 8); (*symbol: REAL *)
setType := type(Set, Set,8); (*symbol: SET *)
nilType := type(NilTyp, NilTyp, 8); (*symbol: NIL *)
</pre></div><div>Chuck</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 15, 2021 at 12:30 PM scrutinizer <<a href="mailto:scruty@users.sourceforge.net" target="_blank">scruty@users.sourceforge.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> It would be nice to have a version running in<br>
> a 64-bit environment, but I'm not sure that this<br>
<br>
I'd propose to take a little plunge and change LONGINT to 64 bit<br>
and bootstrap V4 on 64 bit operating system(s).<br>
<br>
Apart from modifying the compiler to 64 bit, the source code changes<br>
to the whole [Linz] V4 package are minimal as the port to AOS<br>
(Alpha Oberon System) for 64 bit Alpha OpenVMS in the mid<br>
1990s showed. Most Elems and apps, etc. could be compiled and ran<br>
without any source code changes. Only very few modules<br>
required source code changes.<br>
This port left no 32 bit restrictions.*<br>
<br>
See<br>
<a href="http://www.modulaware.com/mdlt/mdlt81.htm" rel="noreferrer" target="_blank">http://www.modulaware.com/mdlt/mdlt81.htm</a><br>
<a href="http://www.modulaware.com/mdlt73.htm" rel="noreferrer" target="_blank">http://www.modulaware.com/mdlt73.htm</a><br>
<br>
The Alpha processor is history since about 20 years (due to the sales of DEC<br>
to Compaq to HP and finally to Intel for the Alpha processor. Intel burried<br>
the Alpha in a drawer to push Itanium.)<br>
<br>
But to give an impression of the number and kind of changes needed for a 64 bit port of V4,<br>
attached is an edited output of<br>
<br>
$ grep -a -e "_32" -e "ADDRESS32" -e "INTEGER32" -e "INT32" -- *.mod* >diff64bit.lis<br>
<br>
for the V4 modules. (The "-a" is needed to also get 'about' readable grep-results<br>
for those source files which are in oberon text format.)<br>
<br>
Another challenge would be the 64 port of FPGA Oberon.<br>
<br>
cheers!<br>
<br>
*) Apart from the main- and coroutine-*stack*, which is due to an<br>
implementation restriction of OpenVMS Alpha 7.1<br>
--<br>
(The number after the colon in the filename is the file version number, i.e., the number of edits.)<br>
<br>
browser.mod:62: a0, a1, a2: SYSTEM.SIGNED_32; (* a0 gives org in module list *) (* 20+2, 24+2, 28+2 *)<br>
browser.mod:62: size :SYSTEM.SIGNED_32;<br>
browser.mod:62: id: SYSTEM.SIGNED_32;<br>
browser.mod:62: m^.a0 := SYSTEM.VAL(SYSTEM.SIGNED_32, W.buf.len);<br>
browser.mod:62: PROCEDURE Index(name: ARRAY OF CHAR): SYSTEM.SIGNED_32;<br>
browser.mod:62: VAR id0, j: SYSTEM.SIGNED_32; ch: CHAR; (*enter identifier*)<br>
browser.mod:62: VAR i, j, s, h, h1, h2, class, mm: INTEGER; m, k, k1, k2: SYSTEM.SIGNED_32; strno: LONGINT;<br>
browser.mod:62: PROCEDURE Read4 (VAR i: SYSTEM.SIGNED_32);<br>
browser.mod:62: BEGIN Files.ReadLInt(SF, x); i := SYSTEM.VAL(SYSTEM.SIGNED_32, x) END Read4;<br>
browser.mod:62: VAR i,j: SYSTEM.SIGNED_32; ch: CHAR;<br>
browser.mod:62: EnterTyp("SIGNED_32", LInt, 4, linttyp); (* was "LONGINT" *)<br>
browser.mod:62: better use SIGNED_32 instead of LONGINT<br>
browser.mod:62: EnterTyp("SYSTEM.ADDRESS_32", Pointer, 4, sysptrtyp); (* = SYSTEM.PTR with /pointersize=32 *)<br>
browser.mod:62: EnterTyp("SYSTEM.UNSIGNED_32", Card, 4, cardtyp);<br>
<br>
files.mod:119: VAR i: SYSTEM.SIGNED_32;<br>
files.mod:119: BEGIN ReadBytes(R, i, SIZE(SYSTEM.SIGNED_32)); x := i;<br>
files.mod:119: VAR i: SYSTEM.SIGNED_32;<br>
files.mod:119: IF SIZE(LONGINT) = SIZE(SYSTEM.SIGNED_32) THEN<br>
files.mod:119: WriteBytes(R, x, SIZE(SYSTEM.SIGNED_32));<br>
files.mod:119: i := SYSTEM.SHORT(x); WriteBytes(R, i, SIZE(SYSTEM.SIGNED_32));<br>
<br>
fonts.mod:22: pixmap, pixmapX, pixmapDX, pixmapW, pixmapH, RasterBase, b, n, a, count, list: SYSTEM.SIGNED_32;<br>
<br>
input.mod:41: RETURN S.VAL(S.SIGNED_32, (timeval.usec DIV 1000 + timeval.sec * 1000 - timeStart) MOD 7FFFFFFFH);<br>
<br>
kernel.mod:480: TYPE Tag = POINTER TO RECORD (*size,*) ptroff: INTEGER32; END; (* todo x64 Bit: ptrofs -> 64Bit *)<br>
kernel.mod:480: PROCEDURE ALLOCATE * (VAR v: ADDRESS32; size: INTEGER32);<br>
kernel.mod:480: v := S.VAL(ADDRESS32, NewBlock(size));<br>
<br>
modules0.mod:31: INTEGER32 = S.SIGNED_32;<br>
modules0.mod:31: data-, const-, code-: POINTER TO ARRAY OF INTEGER32;<br>
modules0.mod:31: VAR fp, sp, p: LONGINT; q: INTEGER32; invoContext: EX.InvoContext;<br>
modules0.mod:31: k1 :S.SIGNED_32; (* todo x64: substitute k1 by k to get long consts *)<br>
modules0.mod:31: ext: RECORD extlev, maxIdentLen: INTEGER32; END;<br>
modules0.mod:31: ASSERT(j <= MAX(INTEGER32));<br>
modules0.mod:31: S.PUT(t, S.VAL(INTEGER32, j)); (* todo x64 Bit: remove 32Bit boundary *)<br>
modules0.mod:31: S.PUT(t, S.VAL(INTEGER32, -(nofptr+2)*ptroffSize)); (* todo x64 Bit: remove 32Bit boundary *)<br>
modules0.mod:31: TYPE STdPtr = POINTER TO RECORD tag: ADDRESS64; size: INTEGER64; p0, p1: INTEGER32; END; (* todo x64 bit; *)<br>
<br>
modules.mod:539: INTEGER32 = S.SIGNED_32;<br>
modules.mod:539: PointerOffset = INTEGER32; (* type used for ptr offsets in TypeDescs; todo 64 xbit: change to INT64 *)<br>
modules.mod:539: data-, const-, code-: POINTER TO ARRAY OF INTEGER32;<br>
modules.mod:539: ext: RECORD extlev, maxIdentLen: INTEGER32; END;<br>
modules.mod:539: extlev: INTEGER32;<br>
<br>
oberon.mod:33: PROCEDURE MinTime(): SYSTEM.SIGNED_32; (* << *)<br>
oberon.mod:33: minTime := MAX(SYSTEM.SIGNED_32); t := PrevTask;<br>
oberon.mod:33: RETURN<br>
<br>
pictures.mod:6: INT32 = S.SIGNED_32;<br>
pictures.mod:6: pixels: ARRAY 256 OF INT32; (* Handle to X11 - Color cell *)<br>
pictures.mod:6: truePix: ARRAY trueColorPaletteSize, trueColorPaletteSize, trueColorPaletteSize OF INT32;<br>
pictures.mod:6: VAR iPtr: X11.ImagePtr; img: X11.Image; filler, bits: INTEGER; x, y, z, n, dummy2: INT32;<br>
<br>
put.mod:3: INTEGER32 = SYS.SIGNED_32;<br>
put.mod:3: VAR i: INTEGER; si: SHORTINT; li: INTEGER32; qi: INTEGER64; r1: Ref.Rider;<br>
put.mod:3: VAR r, r1: Ref.Rider; i, j: INTEGER; si: SHORTINT; li: INTEGER32; qi: INTEGER64;<br>
<br>
reals.mod:45: VAR i: S.SIGNED_64; k: INTEGER; h, q, q2:S.SIGNED_32;<br>
<br>
ref.mod:6: PROCEDURE (VAR r: Rider) WriteLInt* (li: S.SIGNED_32);<br>
ref.mod:6: IF r.form = Procedure THEN S.PUT(r.Adr(), S.VAL(S.ADDRESS_32, p))<br>
ref.mod:6: IF r.form = Pointer THEN S.PUT(r.Adr(), S.VAL(S.ADDRESS_32, p))<br>
<br>
refelems.mod:6: VAR si: SHORTINT; i, j: INTEGER; li: S.SIGNED_32; qi: S.SIGNED_64; adr: LONGINT;<br>
<br>
rtdt.mod:174: Instruction* = SYS.SIGNED_32; (* 4 byte *)<br>
rtdt.mod:174: PROCEDURE Trap (VAR sigArgs: Sys.SigArgs; mechArgs: Sys.MechArgs): SYS.SIGNED_32; <br>
rtdt.mod:174: VAR retval: SYS.SIGNED_32; p: Proc;<br>
rtdt.mod:174: instr := SYS.VAL(SYS.SIGNED_32, ASH(01AH, 26) + ASH(R31, 21) + ASH(RA, 16) + ASH(0, 0)); SYS.PUT(codeseg + 8, instr);<br>
<br>
system.mod:285: PROCEDURE Trap (VAR sigArgs: EX.SigArgs; mechArgs: EX.MechArgs): SYSTEM.SIGNED_32;<br>
system.mod:285: Texts.WriteInt(W, LEN(m.code^)*SIZE(SYSTEM.SIGNED_32), 5);<br>
system.mod:285: ch: CHAR; cv, completion: SYSTEM.SIGNED_32;<br>
system.mod:285: context, status: SYSTEM.SIGNED_32;<br>
<br>
types.mod:61: ext-: RECORD extlev-, maxIdentLen-: INTEGER32; END;<br>
<br>
unix.mod hides the OpenVMS operating system interface)<br>
<br>
unix.mod:334: PID* = SY.SIGNED_32; (* Process Id. *)<br>
unix.mod:334: sec*, usec*: SY.SIGNED_32<br>
unix.mod:334: BaseSecs: SY.SIGNED_32; (* TimeBase - UnixEpoch in seconds *)<br>
unix.mod:334: PROCEDURE Adr32* (VAR s :ARRAY OF SY.BYTE):SY.SIGNED_32;<br>
unix.mod:334: RETURN (SY.VAL(SY.SIGNED_32, adr) # adr); (* hG/28-Oct-1997 faster than next line*)<br>
unix.mod:334: PROCEDURE Exit*(status: SY.SIGNED_32);<br>
unix.mod:334: VAR mem: SY.SIGNED_32;<br>
unix.mod:334: result:SY.SIGNED_32; l: SY.SIGNED_64;<br>
unix.mod:334: VAR size: SY.SIGNED_64; result: SY.SIGNED_32;<br>
unix.mod:334: result := lib.LIB$FREE_VM (SY.SHORT(size), SY.VAL(SY.SIGNED_32, mem));<br>
unix.mod:334: secs, usecs, n:SY.SIGNED_32;<br>
unix.mod:334: f0.fab.XAB := SY.VAL(SY.SIGNED_32, NIL);<br>
unix.mod:334: n: SY.SIGNED_32;<br>
unix.mod:334: VAR n: SY.SIGNED_32;<br>
unix.mod:334: ut.sec := SY.VAL(SY.SIGNED_32, clock); ut.usec := 0;<br>
unix.mod:334: dummy_length: SY.SIGNED_32;<br>
unix.mod:334: dummy_length: SY.SIGNED_32;<br>
unix.mod:334: cv := VMS.SYS$DCLEXH(SY.VAL(SY.SIGNED_32, ep)); (* todo 64Bit *)<br>
unix.mod:334: completion: SY.SIGNED_32 (*CV*);<br>
unix.mod:334: m : SY.SIGNED_32;<br>
--<br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</blockquote></div></div>
</blockquote></div>