[comp.sys.apple2] FWEntry and friends

toddpw@nntp-server.caltech.edu (Todd P. Whitesel) (02/17/91)

STEIN@UCONNVM.BITNET (Alan Stein) writes:

>use FWEntry to use firmware routines.  The <misctool.h> file with Orca/C
>conflicts with the operand description in Apple's Toolbox Reference, so I
>wonder if anyone can send me an example of a call to FWEntry.

<misctool.h> is correct. According to the toolbox ref the C prototype is

extern pascal FWRec FWEntry (aRegValue, XRegValue, yRegValue, eModeEntryPt)

and the definition for FWRec (look at the summary section in the back) is in
fact what appears in misctool.h (if it doesn't then maybe you need the 1.1
update!).

It is Orca's library's responsibility to translate between that C prototype and
the actual tool parameters.

However, there is a bug in the 1.1 library -- functions that return structs:

-------------------
This archive contains, with source, a replacement for part of ORCALIB and
ORCAGLIB in ORCA/C 1.1.  The tool glue in the original 1.1 libraries is
not correct, and this library fixes it.  It affects all tool calls that
require glue.  Those calls are:
FWEntry, GetAbsClamp, GetMouseClamp, ReadMouse, ReadTimeHex, LongDivide,
LongMul, SDivide, UDivide, InitialLoad, LoadSegName, Restart, UnloadSeg,
GetLoc, GetErrGlobals, GetErrorDevice, GetInGlobals, GetInputDevice,
GetOutGlobals, GetOutputDevice and InitialLoad2.
--------------------

The archive this came from is on tybalt.caltech.edu, in pub/apple2/source as
file orcapatches.bsq -- I can bitnet send it if you want.

Todd Whitesel
toddpw @ tybalt.caltech.edu