@passel:

I made a simple bouncing ball program using vertical retracing as a timing method:

Code:
DEFINT A-Z
SCREEN 12: CLS
x = 320
y = 240
DirectionX = 1
DirectionY = 1
DO
 CIRCLE (x, y), 10, 0
 DO
  IF INKEY$ = CHR$(27) THEN END
 LOOP WHILE (INP(&H3DA) XOR &H8) AND &H8 = &H0 'This part does the same as "WAIT &H3DA, &H8, &H8".
 IF x <= 0 OR x >= 639 THEN DirectionX = -DirectionX
 IF y <= 0 OR y >= 479 THEN DirectionY = -DirectionY
 x = x + DirectionX
 y = y + DirectionY
 CIRCLE (x, y), 10, 2
LOOP
Whether or not I actually use the WAIT statement I can tell the program's speed increases as I increase the number of cycles in DOSBox. What am I doing wrong?