[Oberon] V4, 64 bit version
Chris Burrows
chris at cfbsoftware.com
Sat Jan 16 00:19:05 CET 2021
>
> On Fri, Jan 15, 2021 at 1:08 PM Charles Perkins <chuck at kuracali.com>
> wrote:
> I like the idea.
>
> The sizes of datatypes in the RISC5 compiler are defined in ORB.Mod.
> Currently we have:
> 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 *)
>
> In a 64-bit compiler derived from the RISC5 compiler I imagine we
> would also have 8 byte REALs and SETs and NIL values:
> 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 *)
>
> Chuck
>
Are you aware of the existing Intel 64 Oberon-07 compiler?
https://github.com/congdm/Patchouli-Compiler/tree/v0.8
The data types are specified here:
https://github.com/congdm/Patchouli-Compiler/wiki/Detailed-Documentation
Note that all the 32-bit data type dependencies have now been removed from the Oberon Language:
The data type definitions pre-2011 were:
--------------------------------------------------
BOOLEAN the truth values TRUE and FALSE.
CHAR the characters of the Latin-1 set.
INTEGER the integers between -2^31 and +2^31-1.
REAL real numbers (IEEE Standard, 32 bits).
LONGREAL long real numbers (IEEE Standard, 64 bits).
SET the sets of integers between 0 and 31.
--------------------------------------------------
In Sep 2011 they were:
--------------------------------------------------
BOOLEAN the truth values TRUE and FALSE
CHAR the characters of a standard character set
INTEGER the integers
REAL real numbers
LONGREAL real numbers
SET the sets of integers between 0 and 31
The type LONGREAL is intended to represent real numbers
with a higher number of digits than REAL. However, the
two types may be identical.
--------------------------------------------------
In Oct 2013, they were further generalised to:
--------------------------------------------------
BOOLEAN the truth values TRUE and FALSE
CHAR the characters of a standard character set
INTEGER the integers
REAL real numbers
BYTE the integers between 0 and 255
SET the sets of integers between 0 and an
implementation-dependent limit
The type BYTE is compatible with the type INTEGER, and vice-versa.
--------------------------------------------------
i.e. CHAR could be any standard character set (not necessarily 8-bits), INTEGER and REAL can be any size, LONGREAL has been removed from the language and SET is no longer constrained to be 32 bits. Note that the Patchouli compiler handles the platform-dependent usefulness of additional data types while still conforming with the language specification by including their definitions in SYSTEM.
Regards,
Chris Burrows
CFB Software
https://www.astrobe.com
More information about the Oberon
mailing list