I'm starting to get a grip on this 64bit stuff. The calling convention is good for low-level coding due to its use of the extra registers instead the stack, but not so good for high level programming where expressions and functions may be passed as arguments, and inevitably the stack must be used to hold the values before they are passed.
The stack frame for the parameters has to be kept aligned to 16 bytes whenever an OS call is made, and floats have to be passed in the SIMD (xmm0..3) registers, which is a considerable pain when many functions require the services of the Floating point processor (FPU) .
More to be done but 2 independent executables are included below, and the source code which works on the latest Oxygen-in-progress (just posted). You will see that the 64 bit binary is significantly larger due to the 64bit opcode prefixes and stack assignment encodings.
'Charles Pegge
'13 Nov 2011
'===========
'COMPILATION
'===========
$ filename "t.exe"
'
'$ CompileDependent
'$ Compile32BitIndependent
'$ Compile64BitIndependent
'
'
#ifdef CompileDependent
#file filename
const string title="OXYGEN BASIC Compiled"
#else
const string title="OXYGEN BASIC"
#endif
'
'
#ifdef Compile64BitIndependent
#include "../../inc/RTL64.inc"
const string title="OXYGEN BASIC 64-bit"
#endif
'
'
#ifdef Compile32BitIndependent
#include "../../inc/RTL32.inc"
const string title="OXYGEN BASIC 32-bit"
#endif
....
Charles