Re: 64 bit MAC software.

Richard Russell

On Mon, Feb 26, 2018 at 01:59 am, J.G.Harston wrote:
losing features risks killing the usability of 35 years of carefully accumulated libraries of code.
Nobody (I hope) is suggesting "losing" features, but of changes being required to support a 64-bits platform, which introduce incompatibilities.  Here's a more practical example, indeed a change which I have found myself making over and over again in the last couple of days:

      DIM mem% size%
      OSCLI "LOAD " + file$ + " " + STR$~mem% + " +" + STR$~size%

When run on a 64-bit platform this reports 'Number too big' because the address of the memory reserved by DIM cannot be stored in the 32-bit integer mem%, so the first change required is this:

      DIM mem%% size%
      OSCLI "LOAD " + file$ + " " + STR$~mem%% + " +" + STR$~size%

The 'Number too big' error no longer occurs, but now an 'Address out of range' error is reported because STR$~ cannot convert the address to a long enough hexadecimal number.  This requires another change:

      *HEX 64
      DIM mem%% size%

      OSCLI "LOAD " + file$ + " " + STR$~mem%% + " +" + STR$~size%
      *HEX 32

Now the code runs again, and fortunately it's still compatible with 32-bit BASIC (with the extra *HEX 32, anyway).

This is typical of the sort of change that is going to be required, and that requirement is going to be very widespread.


Join to automatically receive all group messages.