[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eject Disk
- Subject: Re: Eject Disk
- From: nparker@cie-2.uoregon.edu (Neil Parker)
- Date: 12 Nov 1994 06:58:05 GMT
- Newsgroups: comp.sys.apple2
- Organization: University of Oregon Campus Information Exchange
- References: <3a0pqg$hq9@senator-bedfellow.MIT.EDU>
In article <3a0pqg$hq9@senator-bedfellow.MIT.EDU> pbauer@ATHENA.MIT.EDU
(Paul H Bauer) writes:
>I have a 2e with the UDC Disk interface card and a Mac 800k drive
>without an eject button. Is there any software routine I can
>use to eject the Disk or am I destined to always have to stick the
>proverbial "paper clip" into the hole to change or eject the disk?
The following bit of Applesoft code works just fine with the Smartport
interface in my IIGS. If the UDC card supports Smartport control code 4
to eject the disk, then it ought to work for you too.
10 INPUT "Slot? ";S:A = 49152 + 256 * S
20 IF PEEK (A + 1) < > 32 OR PEEK (A + 3) < > 0 OR PEEK (A + 5) < > 3
OR PEEK (A + 7) < > 0 THEN PRINT "Not a Smartport!": END
30 FOR X = 0 TO 13: READ B: POKE 768 + X,B: NEXT
40 POKE 769, PEEK (A + 255) + 3: POKE 770,192 + S
50 INPUT "Unit? ";U: IF U < 1 THEN PRINT "Bad unit!": END
60 POKE 776,U: CALL 768
70 END
80 DATA 32,0,0,4,7,3,96,3,0,12,3,4,0,0
When it asks for a slot number, enter the number of the slot containing your
UDC card. For the unit number, enter the Smartport unit number of your
disk drive (if you have more than one device connected to the card, it may
take some experimenting to find the correct unit number).
Beware! Not all Smartport interfaces support Smartport control code 4 for
ejecting disks. Early versions of the Apple SCSI card, for example, will
reformat your hard drive if you run this program on it. I recommend
experimenting with a blank (or otherwise expendable) disk in the drive.
- Neil Parker
--
Neil Parker No cute ASCII art...no cute quote...no cute
nparker@cie-2.uoregon.edu disclaimer...no deposit, no return...
nparker@cie.uoregon.edu (This space intentionally left blank: )
- References:
- Eject Disk
- From: pbauer@ATHENA.MIT.EDU (Paul H Bauer)