Article View: net.lang.forth
Article #41Re: How Do You Use The Second Drive?
From: CSvaxPucc-Hags
Date: Mon, 17 Oct 1983 14:41
Date: Mon, 17 Oct 1983 14:41
29 lines
2069 bytes
2069 bytes
The "DR1" problem in fig-FORTH for the Apple is caused by the "R/W" word,
which, as distributed with the model, does not know how to access more than
one drive. In fact, if you use "DR1" and then try to read, say, block 1, then
"R/W" attempts to read from track 35 on drive 0, which is an illegal disk
address. What you want, of course, is to trap track numbers higher than 34
and assign them to other drives.
You need to read the description of RWTS in the Apple DOS Manual to
understand what is happening. There are two locations in the I/O Block
(IOB) that you need to maintain:
IOBPDN (IOB + 10 HEX) - drive accessed on previous command
IBDRVN (IOB + 2) - drive accessed by current command
Note that the IOB is located at $B7E8. Just pick up the old IBDRVN
and save it at IOBPDN. Then when you compute the track number, do one
more divide (by 35) and use the quotient (0 or 1) to determine the drive
number. Of course FORTH's drive 0 as known as drive 1 to Apple DOS. Then
use the remainder from the divide for the track number.
One other problem is that the model attempts to number blocks on the disk
beginning at zero. This does not work, since the rest of the FORTH system
assumes that a block number of zero means that input is coming from the
keyboard, not from disk. Therefore you probably want to offset the block
numbers by one so that you can use the whole disk.
Dave Seaman
..!pur-ee!pucc-h:ags
Technical Details
Message-ID:
<344@pucc-h>Path:
arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!floyd!harpo!eagle!mhuxi!houxm!ihnp4!inuxc!pur-ee!CSvax:Pucc-H:agsReferences:
<573@ihuxv.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pucc-h Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!floyd!harpo!eagle!mhuxi!houxm!ihnp4!inuxc!pur-ee!CSvax:Pucc-H:ags From: CSvax:Pucc-H:ags@pur-ee.UUCP Newsgroups: net.lang.forth Subject: Re: How Do You Use The Second Drive? Message-ID: <344@pucc-h> Date: Mon, 17-Oct-83 10:41:35 EDT Article-I.D.: pucc-h.344 Posted: Mon Oct 17 10:41:35 1983 Date-Received: Wed, 19-Oct-83 22:18:52 EDT References: <573@ihuxv.UUCP> Organization: Purdue University Computing Center Lines: 29