hide mouse
dot 320,0
dot 0,480
dot 640,480
 
sync on
 
do
 
text 10,5,"Distance to ref points: "
 
x = mousex()
y = mousey()
 
dot 320,0
dot 1,479
dot 639,479
 
dot x,y
 
ink rgb(255,0,0),0
line x,y,320,0
line x,y,1,479
line x,y,639,479
 
ink rgb(255,255,255),0
 
dxo = x - 320
dyo = y + 0
dxt = x - 1
dyt = y + 479
dxtr = x - 639
dytr = y - 479
 
text 10,18,str$(dxo)
text 10,31,str$(dyo)
text 10,44,str$(dxt)
text 10,57,str$(dyt)
text 10,70,str$(dxtr)
text 10,83,str$(dytr)
 
sync
cls
loop