Author Topic: Is it possible to resolve the compiler differences of 64 bit and 32 bit QB64  (Read 3571 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Before the next release of QB64 it would be nice to fix problems with differences.  Mainly there are some things that will not work and cause problems or just work strangely.  The only one I know right off the bat is READ/DATA statements in the language.  Does not work.

Way back when the QB64 got a 64 bit release there were a number of issues.  (more than just 1).  Is it possible to fix as many of the problems before the next release ?  I really want to go all 64 bit.  Can't since a couple of my programs won't work 64!

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
What exactly do you think is wrong with READ/DATA statements between 32-64bit?

In the beginning of 2021, I've pushed some enhancements regarding DATA allowing numbers with explicit type suffixes, which became already part of v1.5, but there I haven't  seen any 32-64bit differences to take care of in the source.

Also, before a new release I always test my GuiTools on both versions, but I've never had any issues with the READ/DATA related stuff between 32-64bit. (well, I talk Windows only)
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
@doppler I'm always running the absolute latest dev build and I've not seen anything wrong with DATA and READ statements. Can you elaborate further and explain which build you are on as well as your version of Windows?

Quote
⚠️🐞 If you are posting about a possible bug 🐞⚠️
- First make sure you have tried to replicate the problem in the latest development build. Get it from the Dev Build page;
- If the suspected bug is also present in the latest dev build, please report what you get in the Help->About dialog [e.g. Version 1.5 dev build from git a6101af];
- Report the OS you are using [e.g. Windows 10 Build 2H2D].
Shuwatch!

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Time for more testing.  Since release notes of V1.4 to V1.5 mentioned nothing about 32 and 64 bit problem fixes.  I have to get the original release mention of 64 bit compiler problems and test them again.

There may have been a fix, that was just done and not mentioned.  I quick checked read/data, it worked as expected.  I will pull out my original failing program and really go to town on it.

In the mean time .... Never mind.

edit: Tried to find the original message announcement of 64 bit compiler. No luck. (anybody find the link?) Maybe lost to time or forum changes.
« Last Edit: September 13, 2021, 10:44:50 am by doppler »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Maybe Odin is part Scottish, and he just enjoys tossing posts.

I can't say I recall a post about READ and DATA handling differences. I do remember a post about some math differences between 64-bit and 32-bit systems, which makes sense. Further back than that, I recall some posts about problems with switching from SDL to GL. One was my only graphics GUI routine, which had a bleed, much like TheBOB's White Cake, when we changed from SDL to GL. Bob was able to fix his issue. I still haven't tried to address mine.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Back when I first added the 64-bit compiler options for us, READ and DATA statements didn’t work with it.  (There’s a difference of an extra leading underscore needed for the c++ data linking syntax, which was so subtle I never picked up on it at all.  Luke is the one who finally found and corrected the glitch.)

But that was back all the way in the [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] days, when I bundled and offered the 64-bit version as a personal option via my dropbox.  (Much like I currently offer my expanded SDL-version, which I need to get back to work on sometime to bring further up to current language standards…)

Before QB64.org ever started to include the 64-bit compiler within the github repo, and before it ever offered QB64x64 as an “official” download version, the DATA glitched was found and fixed.  As far as I know, the only real differences you might see between the two versions now might be hardware related.

64-bit may use 64-bit floating point math instead of 32-bit math…. Of course, 64-bit can use unlimited amounts of system memory without an issue, whereas 32-bit has about a 1.5GB limit…

There’ll always be *some* differences due to the nature of the two systems being different (such as 32-bit pointers being 4-bytes in size, and 64-bit pointers being 8-bytes), but 99.99% of programs should work interchangeably between the two systems.  Those that don’t, probably would, with just a little tweaking to them.  (To adjust to windows data packing if a declare library is used, or to allow for larger offset sizes, or minor fpu math variations…)

Honestly, unless you’re just pushing the boundaries of what QB64 can do normally, you probably won’t ever see any difference in the two,   And, when you DO start to push so hard that things get wonky, just remember to post here on the forums for help.  There’s several of us now who can help with those little mem/packing/syntax/$IF tweaks required to make things work fully — and we’re all always happy to help!
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
@SMcNeill Thanks I really think I was going crazy.  Of course this whole qb64 project is not an official project.  Just a labor of love (for some), hell for others.  So little things like bug fixes, just get fix with no fanfare or documentation.  Only the majors (features) get announced.

As far as better.  If you are running on 64 bit o/s.  I have seen way back then.  There was an improvement.  It's marginal, but I will take it.  Unlike using the raspberry PI 64 bit kernel over the 32 bit one.  That one was a major effect.  Unfortunately 64 bit raspberry is still not ready for prime time.  Unless you can do without a bunch of stuff.  Hence why I was waiting on the laundry list to be fixed.  Only to find out, those shirts have been clean and put away long ago.

I will be changing over to 64 bit and monitor for problems.  QB64 will be headed down the path of 64 Bit only soon enough.  Time to go with the flow.  When the debugger version is flushed out, we are so close to another major release.