mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-06-07 20:29:28 +00:00
Add tool glue code for ReadMouse2.
This is documented in TBR3 and is already declared in <misctool.h>, but did not previously have glue code. TBR3 says "Applications should never make this call," but it may be useful in system utilities.
This commit is contained in:
parent
d9e26d4467
commit
5b04986f08
38
toolglue.asm
38
toolglue.asm
|
@ -206,6 +206,44 @@ yPos ds 2
|
||||||
xPos ds 2
|
xPos ds 2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
****************************************************************
|
||||||
|
*
|
||||||
|
* ReadMouse2 - return mouse statistics
|
||||||
|
*
|
||||||
|
* Outputs:
|
||||||
|
* Returns a pointer to a record with the following
|
||||||
|
* structure:
|
||||||
|
*
|
||||||
|
* typedef struct MouseRec {
|
||||||
|
* char mouseMode;
|
||||||
|
* char mouseStatus;
|
||||||
|
* int yPos;
|
||||||
|
* int xPos;
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
****************************************************************
|
||||||
|
*
|
||||||
|
ReadMouse2 start
|
||||||
|
|
||||||
|
pha
|
||||||
|
pha
|
||||||
|
pha
|
||||||
|
_ReadMouse2
|
||||||
|
sta >~TOOLERROR
|
||||||
|
pl2 >mouseMode
|
||||||
|
pl2 >yPos
|
||||||
|
pl2 >xPos
|
||||||
|
|
||||||
|
lda #mouseMode
|
||||||
|
ldx #^mouseMode
|
||||||
|
rtl
|
||||||
|
|
||||||
|
mouseMode ds 1
|
||||||
|
mouseStatus ds 1
|
||||||
|
yPos ds 2
|
||||||
|
xPos ds 2
|
||||||
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
*
|
*
|
||||||
* ReadTimeHex - returns the time in hex format
|
* ReadTimeHex - returns the time in hex format
|
||||||
|
|
|
@ -384,3 +384,8 @@
|
||||||
&lab ldx #$1F23
|
&lab ldx #$1F23
|
||||||
jsl $E10000
|
jsl $E10000
|
||||||
MEND
|
MEND
|
||||||
|
MACRO
|
||||||
|
&lab _ReadMouse2
|
||||||
|
&lab ldx #$3303
|
||||||
|
jsl $E10000
|
||||||
|
MEND
|
||||||
|
|
Loading…
Reference in New Issue
Block a user