The deprecation of mode64bit / mode32bit

Started by Charles Pegge, June 27, 2024, 01:38:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Charles Pegge

OxygenBasic comes with 2 compilers: co2.exe is native 32bit, and co2m64.exe is native 64bit. Both compilers can produce 32 or 64 bit binaries, but when executing code directly they are confined to their native bitness, and do not set mode64bit or mode32bit flags.

To resolve this issue the best way to test for 32/64 bit is to test the width of the sys type:

#if sizeof sys = 8
  ...
#else 'sizeof sys = 4
  ...
#endif

I found that about 20 files in the OxygenBasic package teste the mode64bit flag, so I have changed these files to use this new test instead in the latest update.



James C. Fuller

Charles,
  Latest Upload has the same version (2024-06-18T14:12:57) as the last one.
James

Charles Pegge

Correct. The changes were made to some inc files in the library and to some o2bas demo files. The compilers were also recompiled but no change to their source code.