Live data from Hacker News

40-Year old BASICA utility code for teaching

github.com

21–30 of 40 posts

Re: 40-Year old BASICA utility code for teaching

#21
post #15

GW-BASIC is open source and should presumably be able to run this code with possibly minimal changes. https://github.com/microsoft/GW-BASIC/

It should be able to run them without any changes. GW-BASIC was derived from BASICA and is functionally identical. BASICA required the cassette basic rom which shipped with IBM machines and GW-BASIC did not.

Re: 40-Year old BASICA utility code for teaching

#22
post #6

> 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://git…

very cool to learn - I'll update the readme

Re: 40-Year old BASICA utility code for teaching

#23
post #4

This is fascinating, thank you for preserving this work! Do you have more details on the machine used by your father to develop these utilities? what process did you follow to extract these from the 3.5mm floppy disk?

I know we had a 486 at some point when I was a kid, but this code would have predated that machine by a few years so I'm not entirely sure. There were also machines at the school (where he worked) but not 100% sure what they had when.

I got fortunate with the disks - I just bought a USB 3.5mm reader and hooked it up to my Ubuntu machine, and there the files were, no corruption that I can tell. I'm glad other people are also enjoying the find!

Re: 40-Year old BASICA utility code for teaching

#24
post #9
post #8

Earlier quoted context omitted.

Wasn'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 ..

Not 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/to... ).

That 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-...

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."

Re: 40-Year old BASICA utility code for teaching

#25
post #12

Earlier quoted context omitted.

I had a colleague that did something similar. It generated a lot of confused “which branch do I check out?” slack messages.

It 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.

I'm sure, for this historical-interest repository, that that will pose a real problem.

Re: 40-Year old BASICA utility code for teaching

#26
post #13

Earlier quoted context omitted.

We were still using 5 1/4”, but the school CS teacher had a special press that cut a notch into the 360K (?) ones to trick the Apple II’s into using them in 720K mode. She also had a utility to copy original software disks onto the “high density” disks, then read back the data. From what I could tell, it worked like a charm. 10% of the copies failed, but whatever. (Coursework was stored on unmodified disks, of course…

The special press was fancy! I used a hole punch (the type intended for punching small round holes in paper), and as long as you lined it up correctly it worked great.

Come to think of it, it was a hole punch.

Re: 40-Year old BASICA utility code for teaching

#28

These scripts were written by my father in the 1980s, he was a middle school science teacher and wrote these to help him manage classrooms. I think it’s a cool example of the way personal computing changed life in that era; he was never a software engineer, just a guy that needed to automate some tedious work. I encoded the BAS files in utf8 so they are easier to read.

A bit tangential, but I had a chemistry teacher in high school (~2007) who I liked a lot, but was not super tech-savy. I was staying after class to get some help with a homework assignment, but we ended up chatting a bit because he was funny and very friendly.

He mentioned how long grades took him to calculate because he had a lot of custom weighting for stuff, and he was doing everything with a Texas Instruments calculator, and he was dreading it because the semester was almost over. I said something like "Couldn't you do this with Excel or something?"

He didn't really know what Excel was, but my dad had like a week before taught me how to use it for basic number crunching stuff, so I loaded it up on his computer, and showed him some very basic arithmetic stuff, and how to use cells as variables and roughly how copying and pasting worked. He was immediately amazed and I left feeling super smart.

The next week, I chatted with him again, and he had completely overtaken my Excel ability. He learned a bunch of little tricks I was unfamiliar with, had redone all of the gradebooks with it, added a lot of conditionals, color coding, and I think might have even been using the VBA. He also added graphs to look at how much he had to curve things and to see if tests were fair. It was life-changing for him; a task that used to take him hours of manual work was reduced to about fifteen minutes of playing copypaste.

Excel is particularly interesting to me, because it's very immediately useful, but you can also go super deep with learning new features, and it keeps getting more useful!

Re: 40-Year old BASICA utility code for teaching

#29
post #15

GW-BASIC is open source and should presumably be able to run this code with possibly minimal changes. https://github.com/microsoft/GW-BASIC/

An excellent project that I have used and contributed to is PC-BASIC, a ground-up emulator in Python that is very good:

https://robhagemans.github.io/pcbasic/

Edit: I'm now seeing that the OP project uses PC-BASIC for the Docker mode.

Re: 40-Year old BASICA utility code for teaching

#30
post #6

> 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://git…

This 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).
Post reply on HN