Category : Miscellaneous Language Source Code
Archive   : RODENT_3.ZIP
Filename : TBRODENT.BAS

 
Output of file : TBRODENT.BAS contained in archive : RODENT_3.ZIP

DEFINT a-z

DATA &H0001: REM 0000000000000001
DATA &H0001: REM 0000000000000001
DATA &H8003: REM 1000000000000011
DATA &HC7C7: REM 1100011111000111
DATA &HE38F: REM 1110001110001111
DATA &HF11F: REM 1111000100011111
DATA &HF83F: REM 1111100000111111
DATA &HFC7F: REM 1111110001111111
DATA &HF83F: REM 1111100000111111
DATA &HF11F: REM 1111000100011111
DATA &HE38F: REM 1110001110001111
DATA &HC7C7: REM 1100011111000111
DATA &H8003: REM 1000000000000011
DATA &H0001: REM 0000000000000001
DATA &H0001: REM 0000000000000001
DATA &H0000: REM 0000000000000000

DATA &H0000: REM 0000000000000000
DATA &H7FFC: REM 0111111111111100
DATA &H2008: REM 0010000000001000
DATA &H1010: REM 0001000000010000
DATA &H0820: REM 0000100000100000
DATA &H0440: REM 0000010001000000
DATA &H0280: REM 0000001010000000
DATA &H0100: REM 0000000100000000
DATA &H0280: REM 0000001010000000
DATA &H0440: REM 0000010001000000
DATA &H0820: REM 0000100000100000
DATA &H1010: REM 0001000000010000
DATA &H2008: REM 0010000000001000
DATA &H7FFC: REM 0111111111111100
DATA &H0000: REM 0000000000000000
DATA &H0000 0000000000000000

' Read cursor data into MCursor$
MCursor$ = ""
FOR i=1 to 32
READ w
MCursor$ = MCursor$ + MKI$(w)
NEXT i

SCREEN 2
REG 1, 0
CALL INTERRUPT &H33
IF NOT REG(1) THEN
SCREEN 0
PRINT "No mouse detected."
END
END IF
Buttons = REG(2)
PRINT "ÉÍÍÍÍ» ÚÄÄÄ¿ ÚÄÄÄ¿"
PRINT "ºQuitº x = xxx y = yyy ³ ³ ³ ³"
PRINT "ÈÍÍÍͼ ÀÄÄÄÙ ÀÄÄÄÙ"
IF Buttons = 3 THEN
RightButton = 42
LOCATE 1, 41
PRINT "ÚÄÄÄ¿"
LOCATE 2, 41
PRINT "³ ³"
LOCATE 3, 41
PRINT "ÀÄÄÄÙ"
ELSE
RightButton = 35
END IF

' Set up cursor
DEF SEG
HiByte = PEEK(1) 'Find the string segment
LoByte = PEEK(0)
z! = CSNG(LoByte) + 256 * CSNG(HiByte)
IF z! > 32767 THEN z! = z! -65536
StrSeg = INT(z!)
DEF SEG = VARSEG(MCursor$)
StrDescriptor = VARPTR(MCursor$)
HiByte = PEEK(StrDescriptor + 3)
LoByte = PEEK(StrDescriptor + 2)
z! = CSNG(LoByte) + 256 * CSNG(HiByte)
IF z! > 32767 THEN z! = z! - 65536
Offset = INT(z!)
REG 1, 9
REG 2, 7
REG 3, 7
REG 4, Offset
REG 9, StrSeg
CALL INTERRUPT &H33

REG 1, 1 'Show cursor
CALL INTERRUPT &H33
DO
REG 1, 3
CALL INTERRUPT &H33
MouseButton = REG(2)
MouseX = REG(3)
MouseY = REG(4)
LOCATE 2, 13
PRINT USING "###"; MouseX;
LOCATE 2, 22
PRINT USING "###"; MouseY;
CALL ShowButton(28, MouseButton AND 1)
CALL ShowButton(RightButton, MouseButton AND 2)
IF Buttons = 3 THEN CALL ShowButton(35, MouseButton AND 4)
LOOP UNTIL MouseButton = 1 AND MouseX < 48 AND MouseY < 24
REG 1, 1
CALL INTERRUPT &H33
SCREEN 0

SUB ShowButton (ScreenLoc, Condition)
LOCATE 2, ScreenLoc
IF Condition THEN PRINT "ÛÛÛ"; ELSE PRINT " ";
END SUB