Time to do some serious reading
BEYOND! the BASIC Data Segment
when you're loading your BINARY CODE into RAM, remember to store it as integers and not floating point arrays.
Why? well... because you might waste space!
not because STORING MACHINE CODE IN FLOATING POINT ARRAYS IS PROOF OF CRIMINAL INSANITY
remember to define all your scalar variables beforehand because otherwise it'll move around your machine code and you don't want the code you're calling to move out from under you.

this is very normal
oh it's very nice that you have to use 16-bit integers in your DATA statements! it means you have to define them in byte-swapped order because the PC is little-endian.
They're literally just defining an array in memory containing:
55 CD 05 5D CB 90

But because little-endian with 16-bit integers, it gets written into the source as
CD 55 5D 05 90 CB
remember kids, always add a blank string to an existing string before passing it to machine code functions because otherwise if they modify their parameters it'll change the source code of your program
in cassette basic (because this manual is actually for 4 different BASICs flying in close formation), you can leave out the device name, and it'll default to CAS1:... but CAS1: is also the only value you can give it, so *shrug*
huh, I didn't realize the IBM PC had joystick-polling routines built into the BASIC ROM
wow.
it's got a CLEAR command, but it's unrelated to the CLS command that clears the screen.
No, CLEAR gets rid of all values in variables.
You know, in case you need to make your program zero out all the integers and null out the strings
OH GOODY!
it's great to find out there's parts of your program which aren't allowed to have comments
this is because IBM BASIC supports quoteless string data declarations, like:

420 DATA BLAZE IT

which defines a data statement to be READ later containing "BLAZE IT"
so if you go 420 DATA BLAZE IT ' this program doesn't support drug use

it doesn't make a comment, it instead gives you a string:
"BLAZE IT ' this program doesn't support drug use"
So strings in DATA statements don't have to be enclosed, unless they have commas, colons, or "SIGNIFICANT" leading/trailing blanks.

what in the fheck does that mean? what is a non-significant leading blank?
what do you call it when you want to get rid of a file?
ahh, yes, KILL
or as you'd know it in DOS, DEL... sorry, not DEL, ERASE, that synonym that no one ever used.
ahh, yes, that classic method of querying filenames.
just try to find a filename that doesn't exist and watch it scroll pass all the ones that do!
oh wow. So, the BASIC editor is a immediate-sort of editor, you just have a current state of the program and you can enter commands like SAVE "FILENAME" or LOAD "FILENAME", right? but what if you wrote some part of it in one file, and you want to merge them?
with MS-DOS EDIT or any other traditional text editor, you could load file 1, copy all, load file 2, paste.
You can't do that in BASIC, so how do you merge the programs?
well, it turns out they added a command to do just that!
MERGE!
the fun part is that these programs have line numbers...
so if your current program has
10 print "HELLO WORLD"
20 print "I LOVE IBM!"
30 goto 10

and you load one with
20 print "I HATE IBM"
40 END
you end up with:
10 print "HELLO WORLD"
20 print "I HATE IBM"
30 goto 10
40 END
but don't worry, they defined a way to fix this:
RENUM!
you can tell it something like RENUM 1000,900,20 and it'll renumber all lines after 900 to now start at 1000, but increment by 20 each line.
but my favorite part is that they didn't just limit MERGE to working on disk/advanced BASIC.

OH NO
you can do a merge between multiple BASIC programs on your cassette tapes
there's also a command for turning the cassette tape motor on and off. I'm not really sure why.
the cassette interface can already search for individual files , so you wouldn't manually time skipping files... unless maybe if you were doing copy protection?
ahh, light pens. the 80s were so 80s.
BASIC 2.0 and later has functionality for playing background music. advanced!
literally! it only works on Advanced mode.
ahh, interesting. you can open files... in the cassette BASIC version, which has no disk drives. So you can read/write text files from/to tape?
yep! you can write to tape. I wonder how that works? I mean, synchronization wise. you're writing to it sequentially, right? but it's a tape player, not a disk drive. you don't have any random access. maybe it's buffered and writes in big chunks?
aww, you can only set arrays to start at 1 or 0.

why not 2? 5? 297?
YOU'RE NOT MY DAD
They provide three different ways to save programs:
the default binary format, the simple ASCII format, and the weird protected format. It's binary, but you're not allowed to LIST it.
COPY PROTECT YOUR BASIC!
You can follow @Foone.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: