Still GEOS device drivers

Edward Ballot (eballot@geoworks.com)
Mon, 5 Aug 1996 14:46:10 PDT

Hello Hans.

You have just about exhausted all the information I know about PCMCIA
drivers. Unfortunately, I don't have time to research this
information (companies that have paid for support are taking up all
but my sleeping hours) so I'll answer your questions the best I can.

> These are my new questions in order of priority.
> 1. My initial (and also most of the remaining) difficulties in
> understanding the Omnigo PCMCIA device driver concept resulted mainly
> from the lack of any documentation describing the usage of a PCMCIA
> device (driver) from an application point of view.
> I assume the only GEOS application which directly accesses a
> PCMCIA card is the "Transfer" utility.

If the PCMCIA card acts as a storage medium (SRAM or similar) any
application can access it thru file access routines (Transfer does
this; so does PocketQuicken, I think). The kernel loads the
appropriate driver and calls the driver routines to perform the
necessary file access.

I believe the driver for a drive can be specified in the INI file
under the [pcmcia] category.

> 2. In the file
> OMNIGO\DRIVER\DDK\PCMCIA\SAMPLE\driver.def,
> where the "Driver function calls" are described, there is a comment
> saying 'See geode.doc in the "Spec" directory for details'.
> I could not find the SPEC directory, nor could I find geode.doc
> anywhere else.
> Can you tell me where to find this file ?

That is an internal file which is not included on the SDK. Here is
the information from it that the PCMCIA sample refers to:

Drivers are primarily used to link PC GEOS to the hardware. Drivers
are linked together with the nextDriver field in the core block. Drivers
are accessed through a single entry point, their strategy routine. This
routine is located in the first code block at the offset given in the core
block.

A driver's strategy address is obtained by calling GeodeInfo to get the
driver's info table address and looking up the strategy routine in this table.

The strategy routine is passed a function number that selects the
driver function to execute. The function number is passed in the DI. The
functions are listed in "Driver Functions" below.

GeodeRemoveDriver:
Desc: Remove a driver
Pass: word - handle of driver to remove
Return:

GeodeInfoDriver:
Desc: Return information about a driver
Pass: word - handle of driver to get info for
Return: pointer - driver's info table

GeodeInfoDefaultDriver:
Desc: Return information about default drivers
Pass: none
Return: word - handle of default video driver

Drivers have a information table in them that can be accessed
externally. The table is pointed to by driverTable. The first part of the
table is the same for all dirvers, the rest is driver type specific. The
standard first part is:

strategy dword ;segment:offset of strategy routine
driverAttributes word ;device attributes for driver
driverType word ;type of driver

> 3. In the file
> OMNIGO\DRIVER\DDK\PCMCIA\COMMON\pcmenumc.asm
> there are instructions interfacing with the Socket Services. An
> example
> is the line
> " mov ah, SS_INQUIRE_WINDOW"
> Can you tell me where "SS_INQUIRE_WINDOW" and the other "SS_ ... " are
> defined ?
> I need to understand the interface from GEOS to the Socket Services.

These are in OmniGo/Include/Internal/zpcmdr.def
You can find information like this by going to the Include directory
and doing "grep -d <string to find> *.*". In your case, <string to find>
is "SS_".

Hope that helps.

- -Ed-