First, let's start with a photo of the PET 2001-8N, SFD-1001 disk drive, and handy 5.25" disk holder (containing a DS/DD disk!):
Here's a close-up of the PET:
Here is the SFD-1001 IEEE-488 drive. Notice the DIP switch on the lower right-hand side - this is the "hacked" device select that I talked about earlier:
Here is the drive side of the cable I made. Note that it's a 24-pin Amphenol connector - smaller than Centronics-style printer plug, but similar in appearance:
Here are a couple of pics of the PET side of the cable (this is the side I soldered). A bit ugly, but functional - and I got good solder joints. I think I'm doing better with my soldering these days. Note that it's the same type of connector as the PET (and later) user port:
This is the SFD-1001 formatting the disk:
And here is the result - notice the 4133 BLOCKS FREE - that's slightly over 1 MB. Read it and weep.
OK, here's where I chain two programs together, while not losing the variables in-between. There are two programs on the disk, creatively named PROGRAM1 and PROGRAM2. I've got screen shots; however, the first screen shot is pretty fuzzy, so here's the code...
5 PRINT "NOW RUNNING PROGRAM1"
30 PRINT A
40 PRINT A$
50 PRINT "CHAINING TO PROGRAM2"
70 LOAD "PROGRAM2",8
Hey, on line 20, what am I doing with the A$=A$+""? Why add a null string to another string? Here's a summary - When Commodore BASIC sees a new string defined like A$="HELLO", it leaves the string storage right in the BASIC program. Why move it and take up more space? Pretty efficient - except when you chain to another program, that line number is gone, and so is your string. So you need to do something to Commodore BASIC to make the string "dynamic" - stored in variable memory, rather than right in the BASIC program. Adding a null string is one way to convince the string to be "dynamic".
For a better and more lengthy explanation, see Jim Butterfield's 5 part series on this topic, as provided to me by Nathan (thanks Nathan!). (Links at the end of this blog post.)
10 PRINT "NOW RUNNING PROGRAM2"
20 PRINT A
30 PRINT A$
Pretty simple, right? Line 70 of PROGRAM1 loads PROGRAM2 from disk, and it starts running, printing the variables to prove they made it! Here are the screen shots, including the program running:
Running PROGRAM1, which chains to PROGRAM2 - Drum roll please!
OK, here are the links to the Jim Butterfield articles if you'd like to read up.
Loading And Linking Commodore Programs by Jim Butterfield (Part 1,) Part 2, Part 3, Part 4, Part 5.
My next posting, perhaps later this weekend, will be a first shot at getting bits from the Intarwebs into the PET, and onto the SFD-1001! Stay tuned!
As a side note, my cat Stormie decided to upstage my retro hobby today. When she wants attention, she's pretty persistent. From one PET to another...
Duplication is the process of recording or "burning" onto blank CD or blank DVD discs. This process is very similar to burning discs on your computer CD or DVD drive, just on a much larger scale. In Duplication, multi-disc duplicators are used to simultaneously burn several discs at once. CD & DVD Duplication
Post a Comment