[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

64-bit extensions



Just thought I would start a discussion on 64-bit extensions
to Oberon-2.  As a starting point, let's assume the Component
Pascal definitions:

  BYTE     = signed 8-bit number
  SHORTINT = signed 16-bit number
  INTEGER  = signed 32-bit number
  LONGINT  = signed 64-bit number

One thing I like about this definition is that the BYTE comes
out of hiding from the SYSTEM and is part of language definition.
Of course, I can hear mva saying he'd prefer to leave it in the
SYSTEM (at least for Oberon-2).  Another nice aspect is that
any program which works now should continue to work with these
new definitions -- with some memory penalty.

Almost everyone is also talking about using a Unicode character
set which are basically 16-bit characters.  I noticed the Component
Pascal has defined the following:

  SHORTCHAR = 0X - 0FFX    (perhaps in SYSTEM)
  CHAR      = 0X - 0FFFFX

What are people's thought's about extending the CHAR type as
well?  Personally, this is not a big deal for me, but our
Asian colleagues might definitely be interested in something
like this.

Some advantages I see to these additions are that:

1) Our data types would be much closer to the Java virtual
   machine; perhaps making an Oberon-2 to Java byte code
   back end simpler.
2) The compiler would be ready for 64-bit machines.
3) OOC would be compatible (sort of) with the Component
   Pascal compiler.
4) The world speaks Unicode and now so would OOC.
5) We're ready for humungous graphical databases with
   up to 9,223,372,036,854,775,808 bytes. This number
   courtesy UnixCalc :-). 
6) Greater range on integers.

Of course the disadvantages would be:

1) More memory to hold data structures--at least for
   existing applications.
2) Loads/arithmetic operations might be slower -- at least
   on a 32-bit processor emulating a 64-bit processor.  Of
   course there's probably little need to use 64-bits right
   now except possibly for address computation.

Any comments?  I would be willing to develop the 64-bit
emulation code for the runtime.  And I know that mva has
been planning for this day -- why else has he been calling
the ooc releases oo2c_32-... (note the 32).

Michael Griebling
Computer Inspirations