How do I wait x amount of time in basic 6502? I am on VICE xpet, and I would like to print a character, wait a little, then delete it, and repeat for a while, as a sort of status indicator. The only problem is that it deletes to fast so the indicator never shows up. I've tried looking for such a command on the reference, but there is nothing for just flat out waiting a little bit. I know that if I make a huge for loop I may be able to slow the machine down enough to do it by brute force, but I'd rather avoid such if possible. Is there not a better way? Thanks!
It's been decades since I've programmed on a 6502 (C-64/VIC-20) but I'm pretty sure even their version of BASIC had the keyword TIMER. If memory serves, it counts milliseconds, but I could be wrong. You might have to play with it. Set a variable equal to TIMER, do a for/next loop to take up some time, then check its value again. Once you figure out how many ticks occur in a second, you'll be able to make that a constant and then loop until variable = timer start plus constant ticks per second (first setting variable to timer before loop, of course).