freedman@calgary.UUCP (Dan Freedman) (03/01/88)
I have a programming question that I thought someone might be able to help me out with. I would like to be able to do some pre-processing on characters that are to go out the modem port while using a terminal program (say, versaterm or red ryder). Is it possible for me to "patch" the existing serial drivers, or perhaps intercept calls, do my processing, and then pass the processed data on to the real serial driver? I have an SE, but would like this stuff to work on all macs. I have had a look around for the serial driver resources using resedit, but haven't been able to find them anywhere on my system. All replies greatly appreciated.
chrisj@cup.portal.com (03/03/88)
In <1413@vaxb.calgary.UUCP>, freedman@calgary.UUCP (Dan Freedman) wants to prefix patch the serial driver on his Mac SE, but cannot find the resource. IM IV-225 "In the 128K ROM, a single new Serial Driver replaces the RAM and ROM Serial Drivers." (You might find SERD resources in the System File of your system software master disk, but they probably get dropped out by the Installer when you build a system for a 512KE, +, SE, or II.) IM IV-215 lists the unit numbers for the devices, including .{A|B}{In|Out}. You can use the unit numbers to index the unit table (found via low memory variable UTableBase), and change the dCtlDriver fields of the Device Control Entries from a ROM address to a RAM handle to your driver. (IM II-187..192) If you want your code to be compatible with all models, remember that dCtlDriver might be a handle to the RAM serial driver on a machine with 64K ROMs, or perhaps a RAM driver fixing a bug in 128K or 256K ROMs, instead of a direct pointer to the ROM driver. Christopher Jewell | chrisj@cup.portal.com | sun!cup.portal.com!chrisj