basictool - a command-line tool to tokenise, de-tokenise, pack and analyse BBC BASIC

handy tools that can assist in the development of new software
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: basictool - a command-line tool to tokenise, de-tokenise, pack and analyse BBC BASIC

Post by SteveF »

8cup wrote: Tue Apr 04, 2023 11:39 am Very nice, this makes writing code for the beeb so much faster especially with MMB/SSD Utils.
Thanks 8cup, much appreciated!

I've just tagged up v0.10-pre, which improves auto-detection of tokenised BASIC programs. This should mean it's hardly ever necessary to use the --input-tokenised option now, even if the program you're trying to work with has machine code attached after the end of the BASIC. Thanks to Tom Seddon for the bug report and auto-detection algorithm (which is taken from BeebLink, and apparently traces its roots back to Matt Godbolt's BBCBasicToText.py, so thanks to Matt too...)

Testing/feedback welcome, if no one reports problems with this after a few days or so I'll tag this up as 0.10 proper.

Edit: Just to be clear, this doesn't fix any of the issues lurkio reported. They're still on the list of things to look at...
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: basictool - a command-line tool to tokenise, de-tokenise, pack and analyse BBC BASIC

Post by SteveF »

Tom found some more bugs in detokenising BASIC containing embedded control codes so I've created v0.10-pre2, which you can get here if you want to test it out.

If you're using basictool to write your own code you probably don't care about these changes, but if you're using it to analyse existing programs and want to see these details this might matter to you. We're talking about things like someone embedding VDU sequences inside a REM to cause unusual effects when a program is LISTed.

v0.10-pre2 doesn't strip NUL or LF codes from --ascii output if someone has embedded them inside the program.

There's also a new --output-binary option which uses the C library's "wb" output mode even when writing text output like that from --ascii; this gives users on platforms where the C library translates line endings for text files (like Windows) the choice to disable that if they care about seeing the precise control codes embedded in the original program.

Feedback welcome, and if I don't hear back about any problems after a few days I'll tag this up as v0.10 proper.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: basictool - a command-line tool to tokenise, de-tokenise, pack and analyse BBC BASIC

Post by SteveF »

Tom's added support for building with Visual Studio and made the (somewhat rudimentary) basictool test suite run on Windows as well. I've tagged this as v0.10-pre3; if you're interested please take a look. If nothing new comes up I'll probably tag this up as 0.10 proper in a few days.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: basictool - a command-line tool to tokenise, de-tokenise, pack and analyse BBC BASIC

Post by SteveF »

SteveF wrote: Sun May 07, 2023 11:18 pm If nothing new comes up I'll probably tag this up as 0.10 proper in a few days.
A few days (ahem) later, I've tagged this up. Nothing has changed except the version number.
Post Reply

Return to “development tools”