application for single activation button push
arrow keys to move high-lighted letter
'END' key to change high-lighted letter
a$="DBFINTERACTIVE"
open window 640,512
word=len(a$)
cen=(620-(word*20))/2
dim x(word)
dim y(word)
for a=1 to word
x(a)=a*20+cen
y(a)=260
next a
lite=1
repeat
c=peek("port1")
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
if and(c,8196)<>0 letter=1
if letter=1 L=L+1
if L>2 L=2
if L=2 letter=0
if and(c,8196)=0 L=0
if letter=1 lite=lite+1
if lite>word lite=1
if and(c,16)<>0 up=1
if up=1 u=u+1
if u>2 u=2
if u=2 up=0
if and(c,16)=0 u=0
if and(c,64)<>0 down=1
if down=1 d=d+1
if d>2 d=2
if d=2 down=0
if and(c,64)=0 d=0
if and(c,128)<>0 left=1
if left=1 l=l+1
if l>2 l=2
if l=2 left=0
if and(c,128)=0 l=0
if and(c,32)<>0 right=1
if right=1 r=r+1
if r>2 r=2
if r=2 right=0
if and(c,32)=0 r=0
for a=1 to word
if lite=a then
if up=1 y(a)=y(a)-20
if down=1 y(a)=y(a)+20
if left=1 x(a)=x(a)-20
if right=1 x(a)=x(a)+20
endif
if lite=a then
setrgb 1,0,256,0
else
setrgb 1,256,256,256
endif
text x(a),y(a),mid$(a$,a,1)
next a
until (1=0)
have a yahappy day