Instagram filter used: Normal
Just what no-one has needed since about 1979 or so …
BASIC on the Apple II has no easy way to import text as a program. When you LOAD a file, it must be in Apple’s tokenized format. While Apple DOS has the EXEC facility to run script files as if they were typed from the keyboard, it’s very picky about the file format:
The right way to do this conversion would be to write a tokenizer that spits out the correct binary file. But you can (kinda) fudge it with this shell command, operating from BASIC source PROG.BAS:
sed 's/^[0-9][0-9]*/& /;s/^/ /;1s/^/\n/;s/$/ /;s/[:()]/ & /g;' PROG.BAS | tr '\n' '\r' | ac.sh -p EG.dsk PROG T
ac.sh is the command line version of AppleCommander, and the file EG.dsk referred to above is an Apple DOS 3.3 image created with
ac.sh -dos140 EG.dsk
It still needs work, as there are functions that will mess this up, and Applesoft’s parser makes a mess of code like IF A THEN …, turning it into IF AT HEN ….
So if I wanted to import the following futile program:
10 REM A FUTILE PROGRAM BY SCRUSS 20 HOME 30 FOR X=1 TO 20 40 PRINT SPC(X);"FUTILE" 50 NEXT X
Run through the script (but before EOL conversion) it would look like this:
10 REM A FUTILE PROGRAM BY SCRUSS 20 HOME 30 FOR X=1 TO 20 40 PRINT SPC ( X ) ;"FUTILE" 50 NEXT X
Make a disk and put the modified program text on it:
ac.sh -dos140 futile.dsk sed 's/^[0-9][0-9]*/& /;s/^/ /;1s/^/\n/;s/$/ /;s/[:()]/ & /g;' futile.bas | tr '\n' '\r' | ac.sh -p futile.dsk FUT T
Load the disk into your Apple II, clear out the init program, and import the code with
If all you get is ] cursors printed and no syntax errors, then something might be working. List it:
Disk image: futile-AppleII-dsk.zip, containing:
$ ac.sh -l futile.dsk DISK VOLUME #254 T 002 FUT A 002 FUTILE DOS 3.3 format; 134,144 bytes free; 9,216 bytes used.
The Apple II post from the other day wasn’t as random as it might seem. Through a friend, I got given not just the Apple IIe previously pictured, but also an Apple IIgs and the almost-complete disk library from a local Apple user group.
Logic (“Loyal Ontario Group Interested in Computers”) appears to be defunct now. The Internet Archive has 20+ years of their website logicbbs.org archived, but the domain no longer resolves. It’s a shame if they are completely gone, because user groups contain social history. Once it’s gone, well … never send to know for whom the CtrlG tolls; it tolls for thee.
I’m going to archive as much of the Logic disk library as I can. I’ve been chatting with Jason Scott, and he’s keen to see that the disk images are preserved.
I’d never used an Apple II before. They’re quite, um, different from anything else I’d used. Sometimes hideously low-level (slot numbers!), sometimes rather clever (I/O streams from any of the cards can control the computer). Since nothing but an Apple II can read Apple II disks, I’ve got the IIgs running ADTPro sending images via serial to a Linux machine. It’s pretty quick: a 140 K disk image transfers in around 25 seconds, an 800 K image in just under two minutes. I’m marshalling the images with AppleCommander and trying to keep everything intact despite having little idea what I’m doing.
(Apple II annoyance: searching for the term is harder than it needs to be, as people will try to use the typography of the time and refer to it as “Apple ][”, or “Apple //”. Even though the Unicodely-correct representation should be “Apple Ⅱ”, nobody uses it. I’m going to stick with the two-capital-eyes version ‘cos it’s easier to type.)
It’s nice here with a view of the trees
Pinhole pic taken during a storm, 2003
They’re Paratha Roti Beef Bulgogi Tacos, of course
Instagram filter used: Juno
Photo taken at: Scarborough Arts
This Sign Advertises Nihilism
Oh Ma there’s a hole in my head …
Oh hai …
I saw this headline, and couldn’t help myself.
(Real article: Narwhals Are Helping NASA Understand Melting Ice and Rising Seas – Bloomberg, via mylesb.)
It is good that there are so many scanned manuals for old computer systems out there. Every old system did things its very own special way, and life’s too short to guess. I mean, there’s not much out there on the SYM-1 I’m trying to get working again:
— not much except for 6502.org’s excellent Synertek SYM-1 Resources, that is.
Some manuals, though, while lovingly scanned, are just too large to download, browse or file. Take, for instance, AppleIIScans’ Apple II BASIC Programming With ProDOS. It’s a very faithful colour scan, but at 170 MB for 280 pages, it’s a bit unwieldy. I suspect it’s Adobe Acrobat Paper Capture’s fault: while it makes turning scans into readable files really easy, it doesn’t warn against using 600 dpi full colour for a book with only decorative use of colour.
Good old Ghostscript saves the day, though:
gs -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -dSAFER -q -sOutputFile=1983-A2L2013-m-a2-bpwp-grey.pdf -- 1983-A2L2013-m-a2-bpwp.pdf
By downsampling the scanned images and converting everything to greyscale, the result’s only 16 MB. All text and indexing from Acrobat is left intact.
I see the Nope Flies are back again
tracing in progress
Instagram filter used: Hefe
I didn’t expect that …
175 Speakers (and no-one a-listenin)
If I were to choose a Catcher in the Rye job, it would be folding boxes
floofponger in clover