Path: utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!rutgers!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: Multiple serial ports (was Re: Need help with signals) Message-ID: <3127@cbmvax.UUCP> Date: 11 Jan 88 22:39:32 GMT References: <1359@sugar.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 47 in article <1359@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) says: > AmigaDOS already HAS a method for binding names to devices. It's called > AmigaDOS. That's absolutely true, and something I've been trying to get know for awhile. As I've pointed out before, though, it's not always simple to get EXEC level device and unit data from a DOS level name. At least, the method for this isn't documented, and damned if I haven't been able to figure it out completely. > You can get the device info for any open file from the file system. To a degree, perhaps. What I really want is the name of the EXEC device and the logical unit associated with any EXEC device, so I can use the low level EXEC I/O routines. What I get is sometimes the EXEC info and sometimes pointers to DOS level handlers instead, depending on the device in question. > #include > fh = Open("SER:", ACCESS_WRITE); > FH = (struct FileHandle *)(fh<<2); > Hmmm. The documentation is a mite skimpy on where to go from there. It seems > like it should be possible to go with it... send serial port messages to the > fh_Port in the structure. But what's the fh_Type feild? I would expect that the fh_Port structure is likely to be a message port to the device's handler, not the device itself. For most applications, especially things like serial port driving, you want real EXEC level access to the EXEC level device. DOS shouldn't get in the way. > If this works, this should be the way to go. I believe it's a bad idea to > duplicate a system that already exists. Anyone know more? Don't know much more myself. But I do agree that DOS does provide a standard and complete level of device abstraction, and it should be exploited in favor of any other system, providing the translation from abstrat to concrete is going to be a standard thing that I can do without special, inside information. > -- > -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter > -- Disclaimer: These U aren't mere opinions... these are *values*. -- Dave Haynie "The B2000 Guy" Commodore-Amiga "The Crew That Never Rests" {ihnp4|uunet|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy "I can't relax, 'cause I'm a Boinger!"