Hello all,
Soon we will have Windows laptops with ARM CPU, for example the "Snapdragon X Elite". Any idea how such a CPU would play with FreeBASIC? Will it run our x86 programs? And will GCC recognize the arch and optimize / generate proper code for it with the march=native flag?
Thank you
ARM CPU + FreeBASIC?
Re: ARM CPU + FreeBASIC?
Anyone happen to have such a laptop by now and can tell me if FreeBASIC will run on it?
These laptops have great discounts right now.
These laptops have great discounts right now.
Re: ARM CPU + FreeBASIC?
I don't have such hardware unfortunately, so I can't tell for sure, but I read in the news that they do come with x86 emulation (comparable to Rosetta on a Mac). Older versions support 32-bit only, current ones 64-bit as well. So I'm pretty sure FreeBasic itself and FreeBasic applications will run using the built-in emulation (except low-level stuff probably, like serial port IO).
More interesting, however, would be whether FB can be built for ARM+Windows. ARM+Linux already works since quite a while ago, but I haven't heard about ARM builds for Windows (and neither did I try it myself).
More interesting, however, would be whether FB can be built for ARM+Windows. ARM+Linux already works since quite a while ago, but I haven't heard about ARM builds for Windows (and neither did I try it myself).
Re: ARM CPU + FreeBASIC?
Thank you, I guess someone may have to try 

Re: ARM CPU + FreeBASIC?
Afaik a RPI5 can run some form of arm windows. Do get the higher memory models though.
Re: ARM CPU + FreeBASIC?
If you have a Mac with a M1 or higher CPU then you can get VMWare Fusion (it's currently free for personal use from Broadcom) and run Windows 11 for ARM64 (or a aarch64 version of Linux). I have Windows 11 for ARM64 installed in a VM on my M1 Mac Studio and it has x64 emulation (maybe 32-bit too, not 100% about that) for Windows binaries built in to the O/S, I like to tinker with Pascal, so I have the x64 version of the Lazarus IDE installed (just to see it would run really) and it runs OK, albeit a little slow, but it does run and can compile and run the output. From their forums they do not yet have the compiler working on aarch64 yet, something about exception unwinding (I think that may be fixed now) and some sort of other issue holding it back, I believe their ultimate test is whether it can compile itself and it needs to do that to pass.
So I would assume depending on how FB does the compiling/linking on whether or not it could generate a native ARM64 binary but someone more knowledgeable would have to check and I lack that skill, unfortunately. I can test something if it's of interest if someone can give me the steps to try.
Happy New Year to you all btw!
So I would assume depending on how FB does the compiling/linking on whether or not it could generate a native ARM64 binary but someone more knowledgeable would have to check and I lack that skill, unfortunately. I can test something if it's of interest if someone can give me the steps to try.
Happy New Year to you all btw!
Re: ARM CPU + FreeBASIC?
Happy New Year, everyone.
Has anyone tried running FreeBASIC on a Windows laptop with an ARM CPU, like the Snapdragon X Elite? And can FreeBASIC make native ARM64 programs for Windows now?
Has anyone tried running FreeBASIC on a Windows laptop with an ARM CPU, like the Snapdragon X Elite? And can FreeBASIC make native ARM64 programs for Windows now?
-
- Posts: 1
- Joined: Jan 20, 2025 18:14
Re: ARM CPU + FreeBASIC?
Successfully ran compiled examples\manual\samples.bas and used it to compile all the programs in there (one or three might have failed due to compile errors, but I don't think it's related to ARM). The windows,exe and windows2.exe samples run and display the window with its content without any issue. Generated executable is x64, as expected really, and the Windows 11 emulation layer is used to run the programs. My laptop is a Lenovo Yoga Slim 7x. I have never really used FreeBASIC in-depth, so I can't speak to some more complex corner cases that may or may not exist.