Erik_
Hmm. I'm guessing I'm doing some weird string to int
Tue Dec 28, 2021 12:43pm

conversion somewhere. I try to suffix my variables with the appropriate marker and also set "DEFINT A-Z". Most things should be INTs.. I might have a string to int thing going on somewhere that QB is okay with but QB64 isn't.

The ClearKbBuffer might also be a problem. I don't know if QB64 allows the POKE and PEEK command. I use those to reset the kb input buffer. If you don't, calling INP(96) will eventually overflow and cause the PC speaker to beep like crazy. INKEY$ will also do the same and is much slower. This is the fastest way I've been able to figure to do it so far.

Code in question is:

DEF SEG = &H40
POKE &H1C, PEEK(&H1A)
DEF SEG


I found it on a tutorial many many years ago. :)


  • *Qb64 fails, can't get it to compile - Puckdropper, Mon Dec 27 2021 3:00pm
    It starts with an error about expected call sub-name () on line 417. The line is "CALL ClearKbBuffer" I wonder if it's either an include that is missing or if qb64 doesn't like declared but not defined subs? If I comment that line, the next error is the same line later on. Then it gets into... more
    • Hmm. I'm guessing I'm doing some weird string to int- Erik_, Tue Dec 28 2021 12:43pm
      • QB64 probably is trying to run BASIC as a language - Puckdropper, Thu Dec 30 2021 8:44am
        where the PEEK and POKEs are directly accessing the machine. Dosbox works because it emulates the whole machine. I also noticed QB64 doesn't have a definition for ClearKBBuffer (I guess that's in helpers.bas [I don't remember the name]) but QB45 did.
        • I managed to get it to some-what run in QB64. - Erik_, Thu Jan 13 2022 3:03pm
          I had to copy in the contents of HELPERS.BAS into XMAS2021.BAS. I also had to add a "CHDIR" to the current directory at the start of the code. It loaded up and the sound actually works. The problem is, it doesn't read any of the sprite data that was saved as binary using BSAVE and loaded with BLOAD.... more
          • It almost seems like COBOL did better than QB64 - Puckdropper, Sat Jan 15 2022 6:07pm
            QB64 just seems so hard to mess with. I get nostalgia, but there's nothing wrong with making things better. I just tried to open the .mak file and got a "file not found" error and when I went back to try again I would have had to renavigate back to the folder with the files. It is amazing, though,... more
            • I think that's only because mine is... - Erik_, Mon Jan 17 2022 1:16am
              actually an QB interpretter where QB64 compiles the QB code into a binary and runs it. Also, CBI doesn't care about any errors interpretting once it does it's basic sanity pass before starting the program. Basically, anything that's not explicitly programmed for is "undefined" behavior.. whether it's... more
        • Yeah ClearKbBuffer is in helpers.bas - Erik_, Thu Dec 30 2021 2:53pm
          Might just be that QB64 doesn't read the .MAK file for includes.. or doesn't support it. Is there an option in the file menu to load a file like in QB? Maybe it just needs to be manually done?
"Forces act when not restrained" - Puckdropper