Re: Complete Pascal Reading from Serial Port?
- From: dempson@xxxxxxxxxxxxx (David Empson)
- Date: Tue, 27 May 2008 12:47:33 +1200
Michael Kent <michael@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
David Empson <dempson@xxxxxxxxxxxxx> wrote:
The serial ports are the realm of the operating system (GS/OS) rather
than the toolbox. I think you can use them by opening a special file
(the GS/OS-suppled "generated" driver for the slot 2 firmware) but I
don't know the details off the top of my head.
This isn't very good, however. The only official API for the serial
firwmare requires a mode switch to emulation mode and only transfers a
single character at a time. This causes a huge performance hit for the
GS/OS generated driver.
Apple never provided a native GS/OS driver for the serial ports, which
would have resolved the performance problem.
If you'll forgive my intrusion where I obviously don't belong (a pro-
grammers' group), perhaps I could use the occaision as a learning ex-
perience.
I thought the "Printer" and "Modem" drivers supplied by Apple with
System 6.01 were in fact printer port and modem port drivers, respectively.
I know they're small (only about 2K each, IIRC), but I thought that's
because no more was needed to move characters down a serial line.
Are you talking about something different?
Printer and Modem are serial port drivers, but they are part of the
printer driver architecture. They allow character-based printer drivers
to send data to the serial ports, but they are no use for communication
software as they are primarily geared to sending data, not receiving it,
and have little or no support for modem flow control signals.
I haven't looked at them in detail, but I expect they are also using the
standard serial port firmware, which requires a trip into emulation mode
and only transferring one byte at a time, hence they have a huge
performance overhead.
The nonexistent driver would be a native GS/OS character device driver
for the serial ports, which might be able to share resources with the
standard serial firmware but which has its own internal direct interface
to the serial firmware transmit/receive buffers, avoiding to need to go
through the bottleneck of the emulation mode shift and copying one byte
at a time. This would allow much more CPU time for other tasks and could
allow higher baud rates to be achieved on an unaccelerated IIgs.
--
David Empson
dempson@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Complete Pascal Reading from Serial Port?
- From: Polymorph
- Re: Complete Pascal Reading from Serial Port?
- From: Michael Kent
- Re: Complete Pascal Reading from Serial Port?
- References:
- Complete Pascal Reading from Serial Port?
- From: Steve ][
- Re: Complete Pascal Reading from Serial Port?
- From: David Empson
- Re: Complete Pascal Reading from Serial Port?
- From: Michael Kent
- Complete Pascal Reading from Serial Port?
- Prev by Date: Re: ProCode for Apple IIe
- Next by Date: Re: Complete Pascal Reading from Serial Port?
- Previous by thread: Re: Complete Pascal Reading from Serial Port?
- Next by thread: Re: Complete Pascal Reading from Serial Port?
- Index(es):
Relevant Pages
|