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0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

SCREEN 13
FOR i = 0 TO 319
LINE (i, 0)-(i, 199), i AND 255
NEXT

FOR Mask = 1 TO 2
FOR y = 0 TO 15
Byte1 = 0
FOR x = 0 TO 7
READ Bit
IF Bit THEN Byte1 = Byte1 + 2 ^ (7 - x)
NEXT
Byte2 = 0
FOR x = 0 TO 7
READ Bit
IF Bit THEN Byte2 = Byte2 + 2 ^ (7 - x)
NEXT
Cursor$ = Cursor$ + CHR$(Byte2) + CHR$(Byte1)
NEXT
NEXT


DIM Regs AS regTypeX
Regs.ax = 0
CALL INTERRUPTX(&H33, Regs, Regs)

Regs.ax = 9
Regs.bx = 5 'Hot spot, horizontal
Regs.cx = 5 'Hot spot, vertical
Regs.es = VARSEG(Cursor$)
Regs.dx = SADD(Cursor$)
CALL INTERRUPTX(&H33, Regs, Regs)

Regs.ax = 1
CALL INTERRUPTX(&H33, Regs, Regs)

k$ = INPUT$(1)


(by Plasma)


MouseCursorShapeChange - page last edited 2004-03-11 09:59:15 by 172.128.119.83 (home) (edit)
Blast WIKI - by RoboticBoy - edited and tweaked for our evil purposes by Hexadecimal Disaster