Compare commits
2 Commits
0e519e1e58
...
5b04986f08
Author | SHA1 | Date |
---|---|---|
Stephen Heumann | 5b04986f08 | |
Stephen Heumann | d9e26d4467 |
|
@ -107,9 +107,8 @@ lb2 asl A get the signal handler address
|
||||||
tay
|
tay
|
||||||
lda >subABRT-2,X
|
lda >subABRT-2,X
|
||||||
bmi lb3 skip if it is SIG_DFL or SIG_IGN
|
bmi lb3 skip if it is SIG_DFL or SIG_IGN
|
||||||
short M set up the call address
|
xba set up the call address
|
||||||
sta >jsl+3
|
sta >jsl+2
|
||||||
long M
|
|
||||||
tya
|
tya
|
||||||
sta >jsl+1
|
sta >jsl+1
|
||||||
ph2 <sig call the user signal handler
|
ph2 <sig call the user signal handler
|
||||||
|
|
49
string.asm
49
string.asm
|
@ -253,9 +253,9 @@ lb4 blt less memory differs - set the result
|
||||||
|
|
||||||
less ldx #-1
|
less ldx #-1
|
||||||
|
|
||||||
lb5 long M
|
lb5 lda rtl remove the parameters from the stack
|
||||||
lda rtl remove the parameters from the stack
|
|
||||||
sta len+1
|
sta len+1
|
||||||
|
long M
|
||||||
lda rtl+1
|
lda rtl+1
|
||||||
sta len+2
|
sta len+2
|
||||||
pld
|
pld
|
||||||
|
@ -436,11 +436,11 @@ lb10 lda [p2],Y
|
||||||
dex
|
dex
|
||||||
bne lb9
|
bne lb9
|
||||||
|
|
||||||
lb11 long M
|
lb11 ply get the original source pointer
|
||||||
ply get the original source pointer
|
|
||||||
plx
|
plx
|
||||||
lda rtl remove the parameters from the stack
|
lda rtl remove the parameters from the stack
|
||||||
sta len+1
|
sta len+1
|
||||||
|
long M
|
||||||
lda rtl+1
|
lda rtl+1
|
||||||
sta len+2
|
sta len+2
|
||||||
pld
|
pld
|
||||||
|
@ -629,9 +629,9 @@ lb3 lda [s2],Y
|
||||||
inc s2+2
|
inc s2+2
|
||||||
bra lb3
|
bra lb3
|
||||||
|
|
||||||
lb4 long M return to the caller
|
lb4 lda rtl return to the caller
|
||||||
lda rtl
|
|
||||||
sta s2+1
|
sta s2+1
|
||||||
|
long M
|
||||||
lda rtl+1
|
lda rtl+1
|
||||||
sta s2+2
|
sta s2+2
|
||||||
ldx rval+2
|
ldx rval+2
|
||||||
|
@ -751,9 +751,9 @@ less ldx #-1 It wasn't, so *s1 < *s2
|
||||||
lb3 blt less the strings differ - set the result
|
lb3 blt less the strings differ - set the result
|
||||||
ldx #1
|
ldx #1
|
||||||
|
|
||||||
lb4 long M
|
lb4 lda rtl remove the parameters from the stack
|
||||||
lda rtl remove the parameters from the stack
|
|
||||||
sta s2+1
|
sta s2+1
|
||||||
|
long M
|
||||||
lda rtl+1
|
lda rtl+1
|
||||||
sta s2+2
|
sta s2+2
|
||||||
pld
|
pld
|
||||||
|
@ -830,9 +830,9 @@ lb1 lda [s2],Y
|
||||||
inc s2+2
|
inc s2+2
|
||||||
bra lb1
|
bra lb1
|
||||||
|
|
||||||
lb2 long M return to the caller
|
lb2 lda rtl return to the caller
|
||||||
lda rtl
|
|
||||||
sta s2+1
|
sta s2+1
|
||||||
|
long M
|
||||||
lda rtl+1
|
lda rtl+1
|
||||||
sta s2+2
|
sta s2+2
|
||||||
ldx rval+2
|
ldx rval+2
|
||||||
|
@ -971,10 +971,10 @@ lb1 lda [str],Y
|
||||||
inc str+2
|
inc str+2
|
||||||
bra lb1
|
bra lb1
|
||||||
|
|
||||||
lb2 long M
|
lb2 pld remove str from the stack
|
||||||
pld remove str from the stack
|
lda 3,S
|
||||||
lda 2,S
|
sta 7,S
|
||||||
sta 6,S
|
long M
|
||||||
pla
|
pla
|
||||||
sta 3,S
|
sta 3,S
|
||||||
pla
|
pla
|
||||||
|
@ -1203,14 +1203,13 @@ lb1 lda [s],Y
|
||||||
short M
|
short M
|
||||||
bra lb1
|
bra lb1
|
||||||
|
|
||||||
lb2 long I,M no match found -> return NULL
|
lb2 ldx #0 no match found -> return NULL
|
||||||
ldx #0
|
|
||||||
txy
|
txy
|
||||||
|
long I,M
|
||||||
bra lb4
|
bra lb4
|
||||||
|
|
||||||
lb3 long I,M increment s by Y and load the value
|
lb3 long I,M increment s by Y and load the value
|
||||||
tya
|
tya
|
||||||
and #$00FF
|
|
||||||
clc
|
clc
|
||||||
adc s
|
adc s
|
||||||
tay
|
tay
|
||||||
|
@ -1266,10 +1265,10 @@ lb1 lda [str],Y
|
||||||
|
|
||||||
lb2 ldy #-1 no match found -> return -1
|
lb2 ldy #-1 no match found -> return -1
|
||||||
|
|
||||||
lb3 long M
|
lb3 pld remove parameters from the stack
|
||||||
pld remove parameters from the stack
|
lda 3,S
|
||||||
lda 2,S
|
sta 9,S
|
||||||
sta 8,S
|
long M
|
||||||
pla
|
pla
|
||||||
sta 5,S
|
sta 5,S
|
||||||
pla
|
pla
|
||||||
|
@ -1377,10 +1376,10 @@ lb2 cmp #0
|
||||||
iny
|
iny
|
||||||
bpl lb1
|
bpl lb1
|
||||||
|
|
||||||
lb3 long M
|
lb3 pld remove parameters from the stack
|
||||||
pld remove parameters from the stack
|
lda 3,S
|
||||||
lda 2,S
|
sta 9,S
|
||||||
sta 8,S
|
long M
|
||||||
pla
|
pla
|
||||||
sta 5,S
|
sta 5,S
|
||||||
pla
|
pla
|
||||||
|
|
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