[comp.sys.apple2] firmware/DRivers

hockley@ENSU.UCALGARY.CA (Dallas C. Hockley) (05/18/91)

help!  I am trying to determine whether output from a GS/OS device driver call
is routed through the serial port firmware or not.  If a sequence of charcters
which can be interpreted as a control sequence for the firmware is to be
transmitted, how can the control  be embedded or otherwise stopped from
executing routines in the communication hardware?
 
Dallas
Dallas Hockley
hockley@ensu.ucalgary.ca
StarGazer at the Data Systems BBS (403)278-0492

mattd@Apple.COM (Matt Deatherage) (05/20/91)

In article <9105171740.AA09361@ensu.ucalgary.ca> hockley@ENSU.UCALGARY.CA (Dallas C. Hockley) writes:
>help!  I am trying to determine whether output from a GS/OS device driver call
>is routed through the serial port firmware or not.  If a sequence of charcters
>which can be interpreted as a control sequence for the firmware is to be
>transmitted, how can the control  be embedded or otherwise stopped from
>executing routines in the communication hardware?
> 

Well, this isn't as easy as I had thought.

The trick to knowing that you can send firmware commands through a GS/OS
driver is to see if the driver is "generated" - if it's a default driver
GS/OS creates to interface with the firmware.  If it's a generated driver
for any character or block device, all I/O is done by GS/OS through the
normal Apple II firmware on the peripheral card/port.

The problem is that the reference material doesn't seem to have any
information on how to do this.  I had thought you could see if a device was
generated by looking at bit 14 of the device characteristics word (returned
from DInfo).  However, the A-W GS/OS Reference says that bit 14 is for
"linked" devices (one of several partitions) and that bit 13 is reserved.
My memory says that bit 13 is for linked devices.

I don't have a final GS/OS Device Driver Reference here at home and I'm in
ProDOS 8 (where's that GS/OS version of ProTERM, anyway?) so I can't use the
Exerciser DA to check it out.  But I'll bet the A-W book is wrong.

-- 
============================================================================
Matt Deatherage, Developer Technical  | The opinions expressed herein are
Support, Apple Computer, Inc.         | not those of Apple Computer, and
Personal mail only, please.  Thanks.  | shame on you for thinking otherwise.
^^^^^^^^ Technical questions are not personal. Please post them instead.
============================================================================

JWANKERL@UTCVM.BITNET ("Josef W. Wankerl") (05/20/91)

On Sun, 19 May 91 17:59:09 GMT Matt Deatherage said:
>In article <9105171740.AA09361@ensu.ucalgary.ca> hockley@ENSU.UCALGARY.CA
> (Dallas C. Hockley) writes:
>>...If a sequence of charcters
>>which can be interpreted as a control sequence for the firmware is to be
>>transmitted, how can the control  be embedded or otherwise stopped from
>>executing routines in the communication hardware?

Well, I assume you're trying to write some kind of program to communicate
with a super serial card and you're trying to send a control-a (the
command character).  There are two ways to approach this problem - the
first, and efficient, way is to disable your command character
recognition by sending control-a Z.  This has a drawback, however... you
can never issue commands to the ssc again.  The other way is to first
change the command character to something else.  Send control-a, some
other control character (like control-b) - this changes the command
character to control-b, send control-a (this sends the character through
the ssc), send control-b, send control-a (this sets the command character
back to control-a).  This lets you issue commands to the ssc later on.

>I don't have a final GS/OS Device Driver Reference here at home and I'm in
>ProDOS 8 (where's that GS/OS version of ProTERM, anyway?) so I can't use the
>Exerciser DA to check it out.  But I'll bet the A-W book is wrong.

Page 232, Apple IIGS GS/OS Device Driver Reference - character device
status word:  bit 14 - linked device, bit 13 - background busy.  (bit
5 - no-wait mode, which is wrong, right Matt? :-)

>--
>============================================================================
>Matt Deatherage, Developer Technical  | The opinions expressed herein are
>Support, Apple Computer, Inc.         | not those of Apple Computer, and
>Personal mail only, please.  Thanks.  | shame on you for thinking otherwise.
>^^^^^^^^ Technical questions are not personal. Please post them instead.
>============================================================================

--
===> Josef W. Wankerl, Technical Editor for GS+ Magazine
  BITNET:  JWANKERL@UTCVM.BITNET       | America Online:  JWankerl
 ProLine:  jwankerl@pro-gsplus         |--------------------------------
Internet:  jwankerl@pro-gsplus.cts.com | "I am a Viking"  -Y. Malmsteen