Author Topic: QuickBASIC 4.5 binary format detected  (Read 4319 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
QuickBASIC 4.5 binary format detected
« on: January 11, 2019, 05:08:30 pm »
Hi all

This is probably explained somewhere on the site but I'm a man, I don't read manuals ;-)

I've just dug out some qb stuff I wrote many years ago and thought I would have a look through them. When I'm trying to load any of them I get the message 'QuickBASIC 4.5 binary format detected. Convert to plain text ?' If I select 'N' I get returned to the directory listing. If I press 'Y' it tries to convert but then comes up with 'Conversion failed'. Is there any way to load my old programmes?
Oh look - a sig file :-)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QuickBASIC 4.5 binary format detected
« Reply #1 on: January 11, 2019, 05:21:12 pm »
Can you share an old file which fails to convert?
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: QuickBASIC 4.5 binary format detected
« Reply #2 on: January 11, 2019, 05:24:53 pm »
Can you share an old file which fails to convert?

Our converter is quite reliable but still in beta. If you can do as Steve suggested above that'd be helpful.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QuickBASIC 4.5 binary format detected
« Reply #3 on: January 11, 2019, 05:33:51 pm »
Get a copy of DOSBOX and run a copy of QB45 in it. That will allow you to open your QB files, and re-save them in text format.

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

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Re: QuickBASIC 4.5 binary format detected
« Reply #4 on: January 11, 2019, 05:54:11 pm »
Hopefully it's attached to this message. I can't even remember what it does and please be gentle with me - it was written back in 1994!
Oh look - a sig file :-)

FellippeHeitor

  • Guest
Re: QuickBASIC 4.5 binary format detected
« Reply #5 on: January 11, 2019, 07:22:30 pm »
Our conversion tool indeed doesn't like something in your file although it loads fine in QuickBASIC 4.5.

Thanks for providing the file, we'll use it to improve the converter.

Please find attached your original program converted to plain text.

PS: Because RIGHT$ is a keyword, QB64 doesn't like the word right being used as a label and you'll have to correct that manually.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: QuickBASIC 4.5 binary format detected
« Reply #6 on: January 12, 2019, 12:12:40 am »
hey Fellippe, the line that kills the conversion seems to be line #615 in the program which is just a plain old "END"
but if you delete this line and save it in QB45 format QB64 has no problem converting it.

Just FYI, not sure if that might help debug the converter or not.
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: QuickBASIC 4.5 binary format detected
« Reply #7 on: January 12, 2019, 06:31:30 am »
hey Fellippe, the line that kills the conversion seems to be line #615 in the program which is just a plain old "END"
but if you delete this line and save it in QB45 format QB64 has no problem converting it.

Just FYI, not sure if that might help debug the converter or not.

Thanks for looking, Cobalt. I had found the issue to be an unknown token of hex value 8C. Turns out Qarnos had already predicted/found out this would happen but left it commented out because, as comment in code states, he had never "seen one of these in the wild". The fix for this had been planned for years by him.

Using this sample file I also found a bug in the processing of old programs using PCOPY, as the parameters would be converted/read in reverse order. We kill two birds with one stone today.

Next version of QB64 will be a tad smarter in converting from QB4.5 binary files.

Offline Mad Axeman

  • Newbie
  • Posts: 74
    • View Profile
    • My web site - Harrythetrout
Re: QuickBASIC 4.5 binary format detected
« Reply #8 on: January 12, 2019, 06:58:16 am »
I'm glad one of my old files could be of help. I'll see if I can find any more files to break QB64 even more ;-)
Oh look - a sig file :-)

FellippeHeitor

  • Guest
Re: QuickBASIC 4.5 binary format detected
« Reply #9 on: January 12, 2019, 07:03:33 am »
I'm glad one of my old files could be of help. I'll see if I can find any more files to break QB64 even more ;-)

As weird as it may sound, that'd actually be great! Thanks for helping us improve it. I'll let you know once the dev build contains the fix above so you can keep using it, since it'll be fixed for the initial problem.