Author: Matt Deatherage
Year: 1989
... corrects an error in the preliminary GS/OS documentation and provides an alternate suggestion for driver developers.
Apple II
Technical Notes
_____________________________________________________________________________
Developer Technical Support
GS/OS
#6: Drivers and GS/OS Direct Page
Revised by: Matt Deatherage January 1991
Written by: Matt Deatherage March 1989
This Technical Note corrects an error in the preliminary GS/OS documentation
and provides an alternate suggestion for developers who are writing GS/OS
drivers.
Changes since September 1990: Updated the list of calls which do not require
the GS/OS direct page and updated the documentation references.
_____________________________________________________________________________
Preliminary GS/OS documentation, including the beta draft of GS/OS Reference,
Volume 2, incorrectly states that locations $5A through $5F are available for
device drivers, and that locations $66 through $6B are shared by device
drivers and supervisory drivers (and may be corrupted by either a driver or
supervisory driver call).
This is not correct. The locations in question are used by GS/OS; destroying
these locations can cause system failure and media corruption.
Drivers which require direct page space of their own should request it from
the Memory Manager when they are started. Upon receiving a call, a driver can
save the value of the D register (containing the GS/OS direct page) and switch
to its own direct page. The driver may keep the value of its direct page
inside the driver itself; no space on GS/OS direct page is available for this
purpose. The driver must restore the D register to point to the GS/OS direct
page before returning from the call, and it should also dispose of its direct
page space when it shuts down.
The driver must also set the D register to point to the GS/OS direct page
before making any system service call other than SET_SPEED, DYN_SLOT_ARBITER,
MOVE_INFO, SIGNAL, and INSTALL_DRIVER.
Note: The location of the GS/OS direct page is guaranteed to
remain the same between Driver_StartUp and Driver_ShutDown calls.
Further Reference
_____________________________________________________________________________
o GS/OS Device Driver Reference