4 ms·
> Because DOS systems used CP437 encoding it is unlikely any of your editors will even be able to open the .BAS programming files in the Program directory Actu
by ale42 2y ago
> Because DOS systems used CP437 encoding it is unlikely any of your editors will even be able to open the .BAS programming files in the Program directory
Actually this is not related to CP437. For normal ASCII text, CP437 and UTF-8 are identical... the problem is that BASICA/GW-BASIC were storing the source code in tokenized binary form, probably to save disk space. See for example this decoding utility: https://github.com/rwtodd/bascat https://github.com/rwtodd/bascat
- lloydatkinson 2y agoWhat a weird Git repo structure. One branch for each language, instead of a directory for each language.
- hedora 2y agoI had a colleague that did something similar. It generated a lot of confused “which branch do I check out?” slack messages.
- lloydatkinson 2y agoIt seems totally at odds with common sense. Now, every time you need to make some change across multiple branches you have to go through a lot of unnecessary pain.
- throwanem 2y agoI'm sure, for this historical-interest repository, that that will pose a real problem.
- lloydatkinson 2y agoWell... yes? What if an another newer or older version of the code is found on a floppy or stack of printed code?
- throwanem 2y agoWorry about it when it happens. It seems like finding this version took at least half a miracle, so I feel like the potential and probably not too effortful reorganization of the repo to accommodate another is a problem worth leaving to be solved only once it's known to be worth taking the trouble. For that matter, given manual reconciliation of two versions of very old, not previously version-controlled code would almost certainly be required anyway, the additional friction imposed by this repo structure very likely is net neutral in any case.
- deleted 2y ago[deleted]
- abdulhaq 2y agoProbably an ex-subversion user
- greenbit 2y agoWasn't there a way to tell BASIC to save in ASCII, rather than tokenized? Something like sticking ",A" onto the end of the save command? Or maybe I'm thinking of gwbasic ..
- ale42 2y agoNot sure about BASICA, but GWBASIC definitely had this ",A" at the end of the filename to save in text format. It even had a ",P" flag to save in "protected" tokenized format (which you can't "officially" list, although a POKE at the good undocumented place could remove the flag: https://www-user.tu-chemnitz.de/~heha/hsn/chm/gwbasic.chm/tokens-pgwbp.html https://www-user.tu-chemnitz.de/~heha/hsn/chm/gwbasic.chm/to...).
- livrem 2y agoThat was a fun way to find the address and POKE it. Never knew of any of this, but it inspired me to search for more info, and it looks like there are also easier ways to unprotect files: https://retrocomputing.stackexchange.com/questions/7104/how-were-microsoft-gw-basic-protected-files-encoded https://retrocomputing.stackexchange.com/questions/7104/how-... https://slions.net/threads/deciphering-gw-basic-basica-protected-programs.50/ https://slions.net/threads/deciphering-gw-basic-basica-prote... I remember seeing some BASIC games that could not be listed. Found that very frustrating as a kid trying to learn BASIC. Maybe now I can finally get to see something of how those games were made, assuming that at least some games were only protected in this way. Just opening the file in PC-BASIC seems to be the easiest solution: "PC-BASIC can read and write Protected files created by GW-BASIC. Unlike GW-BASIC, however, it does not disable accessing the unencrypted contents of the file. The encryption used by GW-BASIC has been broken many decades ago, so Protected mode offered little protection anyway; disallowing access is a small security hazard as it would allow someone to send you a program that you cannotinspect before running it."
- wlindley 2y agoHeath/Zenith's ZBASIC on the MSDOS-but-not-PCDOS Z-100 used a similar format but with at least different keywords. Somewhere I had a set of programs I had written in ZBASIC but could never load after selling that computer. Wonder if I still have the floppies squirreled away, now that I have a Greaseweazel to read those diskettes...
- norton120 2y agovery cool to learn - I'll update the readme
- dhosek 2y agoThis was also a feature in Applesoft Basic, where the BASIC keywords were all tokenized to save space (and also speed up execution since the code was pre-tokenized when it was executed).