-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow use of abbreviations in PUTBASIC input #34
Comments
The trouble with the minimum abbreviations listed in the user guide is that "useless" abbreviations are omitted. For example, "AS." resolves to ASC rather than ASN but this isn't documented. BASIC2 has a list of keywords and functions sorted on the first letter only, so it's roughly alphabetical. Abbreviations are resolved to the first match in the list. For example, PRINT is the first P so it gets the abbreviation "P.". The implementation in beebasm would be more obviously correct if it simply used the list of keywords dumped from the BASIC ROM and searched through it in order. On the other hand, there probably isn't a basic program in existence that is both non-tokenised and uses these useless abbreviations. FWIW, here's some code to dump the keywords from the BASIC 2 ROM.
|
There's some discussion and a link to a (hacky, experimental) implementation over at stardot: https://stardot.org.uk/forums/viewtopic.php?f=55&t=13638
While very cool, I'm not too keen on the idea of using the BASIC ROM's own tokeniser - jsbeeb naturally has a 6502 emulator and the BASIC ROM available at run time, neither of which is true for beebasm. The latter in particular creates awkward copyright issues around what is (to us) a binary blob, and it seems best to me just to steer clear.
The text was updated successfully, but these errors were encountered: