Oxygen 32 or 64 Bit?

Started by Frank Brübach, May 27, 2024, 12:16:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank Brübach

Good morning,

Have a question how I can detect If its compiled in 32 or 64 Bit?

'' how I can detect if it's 32 bit or 64 bit
'' oxygen basic
#if defined( __FB_64BIT__ ) '' ?? ( __OXYGEN_64BIT__ )
#print "Producing 64-bit code output"
#print "Producing 32-bit code output"

print "ok"

Frank Brübach

Hey Charles

Can you Tell me If this is a valuable 64 Bit Code example? If Not have you another oxygen example?

$ FileName "test64abcd.exe"
#include "$\inc\RTL64.inc"

Declare Function MessageBox Lib "user32.dll" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Sys

byte val1
byte val2
int result ''resd 1
    val2=6 '

     mov eax,val1 
     mov eax,val2  ''multiply eax by ebx  "
     mul val1 'ebx 
     mov result,eax

zstring tit[]="64Bit OxygenBasic"
zstring msg[]="Hello dear Animal World! " + str(result)

'' oxygen 64 bit
sub  rsp,40h ''32
mov  r9,  0       
lea  r8,  tit   
lea  rdx, msg   
mov  rcx, 0
call messagebox       
add  rsp, 40h ''32
'' oxygen 64 bit
'' output: Hello dear Animal World! 24

Charles Pegge

Hi Frank,

mode32bit and mode64bit:
these are set from rtl32.inc and rtl64.inc respectively

#ifdef mode64bit

The MessageBox example looks correct for 64bit calling