1 line
18 KiB
NASM
1 line
18 KiB
NASM
|
keep obj/toolglue
mcopy toolglue.macros
case on
****************************************************************
*
* ToolGlue - Glue routines for tools that return records
*
* June 1989
* Mike Westerfield
*
* Copyright 1989, 1990, 1992
* Byte Works, Inc.
*
****************************************************************
*
* November 1992
*
* Parameter orders corrected.
*
****************************************************************
*
* August 1990
*
* 1. Restart() has been corrected to expect a single
* parameter. In the previous version of the library,
* it expected the same parameter list as InitialLoad().
*
* 2. All tool calls now store the tool error number returned
* by the toolbox in ~toolError.
*
****************************************************************
*
ToolGlue start dummy routine
end
****************************************************************
*
* MiscTool - Miscelaneous tool kit
*
****************************************************************
*
* FWEntry - Firmware Entry
*
* Inputs:
* aRegValue, xRegValue, yRegValue - registers on entry
* eModeEntryPt - call address
*
* Outputs:
* Returns a pointer to a record with the following
* structure:
*
* typedef struct FWRec {
* int yRegExit;
* int xRegExit;
* int aRegExit;
* int status;
* }
*
****************************************************************
*
FWEntry start
addr equ 1 work pointer
csubroutine (2:aRegValue,2:xRegValue,2:yRegValue,2:eModeEntryPt),4
pha
pha
pha
pha
ph2 aRegValue
ph2 xRegValue
ph2 yRegValue
ph2 eModeEntryPt
_FWEntry
sta >~TOOLERROR
pl2 >yRegExit
pl2 >xRegExit
pl2 >aRegExit
pl2 >status
lla addr,yRegExit
creturn 4:addr
yRegExit ds 2 record returned
xRegExit ds 2
aRegExit ds 2
status ds 2
end
****************************************************************
*
* GetAbsClamp - returns the absolute device clamp
*
* Outputs:
* Returns a pointer to a record with the following
* structure:
*
* typedef struct ClampRec {
* int yMaxClamp;
* int yMinClamp;
* int xMaxClamp;
* int xMinClamp;
* }
*
****************************************************************
*
GetAbsClamp start
pha
pha
pha
pha
_GetAbsClamp
sta >~TOOLERROR
pl2 >yMaxClamp
pl2 >yMinClamp
pl2 >xMaxClamp
pl2 >xMinClamp
lda #yMaxClamp
ldx #^yMaxClamp
rtl
yMaxClamp ds 2 record returned
yMinClamp ds 2
xMaxClamp ds 2
xMinClamp ds 2
end
****************************************************************
*
* GetMouseClamp - returns the mouse clamp
*
* Outputs:
* Returns a pointer to a record with the following
* structure:
*
* typedef struct ClampRec {
* int yMaxClamp;
* int yMinClamp;
* int xMaxClamp;
* int xMinClamp;
* }
*
****************************************************************
*
GetMouseClamp start
pha
pha
pha
pha
_GetMouseClamp
sta >~TOOLERROR
pl2 >yMaxClamp
pl2 >yMinClamp
pl2 >xMaxClamp
pl2 >xMinClamp
lda #yMaxClamp
ldx #^yMaxClamp
rtl
yMaxClamp ds 2 record returned
yMinClamp ds 2
xMaxClamp ds 2
xMinClamp ds 2
end
****************************************************************
*
* ReadMouse - return mouse statistics
*
* Outputs:
* Returns a pointer to a record with the following
* structure:
*
* typedef struct MouseRec {
* char mouseMode;
* char mouseStatus;
* int yPos;
*
|