    REM MOVLOC
    REM This 'droid moves to a location specified by user
    REM Note! This program does not do error checking on
    REM the user's input.  May cause 'droid to crash in
    REM wall.
    100 locate 20,64: input "X pos?",x
        locate 21,64: input "Y pos?",y
        gosub 400: rem move to the location x,y
        goto 100

    400 REM This routine moves to a specific location and stops
    410 dx = x - xpos: dy = y - ypos
        xvel = dx * 3: yvel = dy * 3
        if abs(dx)<50 and abs(dy)<50 then xvel=0:yvel=0:return
        goto 410

