include "inc/cmdsys.plh"
include "inc/conio.plh"
include "inc/mouse.plh"

var count
var xPos, yPos, bttn

Mouse:clampMouse(0, 39, 0, 23)
Mouse:setMouse(VBL_INT_ENABLE|MOVE_INT_ENABLE|BUTTON_INT_ENABLE|MOUSE_ENABLE)
while ^$C000 < 128
    if Mouse:chkMouse()
        conio:gotoxy(xPos, yPos); putc(' ')
        xPos, yPos, bttn = Mouse:readMouse()#3
        conio:gotoxy(xPos, yPos); putc(bttn & BUTTON_DOWN ?? '+' :: '^')
    fin
    if Mouse:chkVBL()
        ^$400++
    fin
loop
getc
Mouse:detachMouse()
done
