'' -- halProment Basic 64 bit test, 26-5-24, 29-05-24, by frank bruebch 
'' -- you must compile this example with menu compile/quickrun produces an exe file
''

$ FileName "test64-2.exe"
#include "$\inc\pro64.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  
    
    val1=4
    val2=6 ' 

     'mov eax,val1  
     mov eax,val2  ''multiply (or add) eax by ebx  "
     'mul val1 'ebx
     add eax,5  '' here add 5
     mov result,eax 

zstring tit[]="HalProment Basic 64 bit"
zstring msg[]="Hello dear Animal World! " + str(result)

'' halProment Basic 64 bit
''

sub  rsp,40h
mov  r9,  0       
lea  r8,  tit   
lea  rdx, msg   
mov  rcx, 0
call messagebox       
add  rsp, 40h 
''
''
'' output: Hello dear Animal World! 11 (add) ' 24 (multiply)
''

#ifdef mode64bit
#print "Producing 64-bit code output"
print "Producing 64-bit code output"
#else
#print "Producing 32-bit code output"
#endif

'' result: "Producing 64-bit code output" ' all ok :-)

