?login_element?
?pathlinks? – Rev 992
Blame |
Last modification |
View Log
| Download
;XECUTE MOUSE
;TAKE COORDINATES FROM CURPOS==MX
MOUSE LD HL,(COORD)
LD BC,#FBDF
LD DE,(OLDCO)
IN A,(C)
LD (OLDCO),A
SUB E
JR Z,NM_X
JP P,MX_PL
ADD A,L
JR C,ZER_X
XOR A
ZER_X LD L,A
JR NM_X
MX_PL ADD A,L
JR C,BEX_Z
CP #FD ;MAXIMUM X
JR C,BEX_B
BEX_Z LD A,#FD ;MAXIMUM X
BEX_B LD L,A
NM_X LD B,#FF
IN A,(C)
LD (OLDCO+1),A
SUB D
JR Z,NM_Y
NEG
JP P,MY_PL
ADD A,H
JR C,ZER_Y
XOR A
ZER_Y LD H,A
JR NM_Y
MY_PL ADD A,H
JR C,BEY_Z
CP #BE ;MAXIMUM Y
JR C,BEY_B
BEY_Z LD A,#BE ;MAXIMUM Y
BEY_B LD H,A
NM_Y LD A,H
CP #FF
JR C,BIGY
LD H,#FF
BIGY CP #02 ;MINIMUM Y
JR NC,SMALY
LD H,#02 ;MINIMUM Y
SMALY LD A,L
CP #FF
JR C,DIRY
LD L,#FF
DIRY CP #02 ;MINIMUM X
JR NC,DIMENS
LD L,#02 ;MINIMUM X
DIMENS LD (COORD),HL
LD BC,#FADF
LD HL,CONTRB
IN A,(C)
CPL
AND 7
RLCA
RLCA
RLCA
RLCA
OR (HL)
LD (HL),A
RET
COORD EQU MX ;WORKING
OLDCO DEFW 0 ;WORKING