marekp@contact.UUCP (Marek Pawlowski) (06/16/90)
If I wanted to let's say, attach a light bulb to my computer, and be able to control it via software. What port should I use on my //c? How would I control the flow of electrical current etc? Is this possible? Subject: CATALOG I also wish to intercept (ProDOS) the Catalog routine, so that I can run one of my own routines before it actually CATALOG's. What address should I intercept? Please reply via private mail, to: marekp@contact.uucp sysop@aunix.uucp marekp@pro-generic.cts.com marekp@generic.uucp Or, maintain the exact same Subject line, and reply on comp.sys.apple2. Thank you
reeder@reed.bitnet (Doug Reeder,,,2343817) (06/30/90)
> If I wanted to let's say, attach a light bulb to my computer, >and be able to control it via software. What port should I use on my >//c? How would I control the flow of electrical current etc? Is this >possible? The simplest output on the IIc is the headphone jack. Accesing the speaker harware location sends out a pulse, which is alternately positive and negative. I cobbled up a circuit to control the pause input on a cassete tape recorder out of a Radio Shack 65-in-1 electronics kit. It was just a monostable multivibrator and a relay. > I also wish to intercept (ProDOS) the Catalog routine, so that >I can run one of my own routines before it actually CATALOG's. What >address should I intercept? Each system program must provide its own catalog routine, if it wants one. The BASIC.SYSTEM catalog routine can be called from a machine-language program. See, for example,_Benath Apple ProDOS_. You could write a BASIC.SYSTEM external command which called your routine, and then the BASIC.SYSTEM catalog routine. Your command would have to be named something different from CAT or CATALOG, and thus would not be used by Applesoft programs which did a CAT or CATALOG. The possibility exists of changing the names of CAT and CATALOG in the BASIC.SYSTEM binary (not advised) and then giving your external command the name CATALOG. However, Applesoft programs can also read directory files without doing a CATALOG. If a program does a catalog independantly of BASIC.SYSTEM, through the MLI, it would be extremely difficult to intercept. To do so would neccessitate intercepting all MLI calls, by changing the MLI vector to point to a routine which checked the call to see if it was an access to a 'linked-list' storage_type file, and then passed it on to the real MLI. What is the routine you wish to run before cataloging? There may be a simpler solution to your problem.