WAITing for BASIC on the Commodore 64 @8_Bit
WAITing for BASIC on the Commodore 64  @8_Bit
Uploaded January 2022 | Updated November 2026, 1 week ago
How can we make Commodore 64 BASIC pause for a specific time? We take a look at three techniques, including their strengths and weaknesses: 1) FOR/NEXT loops which are simple but somewhat inaccurate and not very CPU-accelerator-friendly, 2) polling the TIME variable which might be the best general approach, and 3) Using the esoteric WAIT command to watch particular bits in the C64's jiffy counter. Thanks to patron grymmjack for the question, and to Dr. Craig S. Bruce, Emily Christ, and Jarno Mielikäinen for their insight and help with the answers.

To support 8-Bit Show And Tell:
Become a patron: patreon.com/8BitShowAndTell
One-time donation: paypal.me/8BitShowAndTell
2nd channel: youtube.com/channel/UCAgWzEh5c8391eJnELDy9OA

End credits song is "Park Patrol" by Bedford Level Experiment. Check out the music video here: youtu.be/pA1MR3PuHxU

Index:
0:00 Question: how to sleep/pause/wait in BASIC?
0:23 1. FOR/NEXT loop
7:18 Why not linear?
11:55 2. Polling TI
16:04 A bug in the TI technique
20:50 3. WAIT 162,64
24:26 Why not WAIT 162,60?
29:50 Another WAIT approach
30:59 Conclusion and thanks!
WAITing for BASIC on the Commodore 64Optimizing Line Count in TI BASIC: Type-in Fun with the TI-99/4AOne-Line Bouncing Ball: Commodore 64 BASICKICKMAN C64 Mysteries: Authorship, Versions, Bugs & FixRobotron: 2084 One-Bit Fix and Many Other ThoughtsProgramming Pitfall Harry C64 Booklet - BASIC & Machine Language Code AnalysisUsing Commodore 64 BASIC Command Line Parameter to Change Border Colour #8bit #c64 #shorts8-Bit Era Electronic Arts Logo Easter Egg Hunt 1983-1992: Commodore 64, Amiga, and moreThe VIC-10 & VIC-30: Commodore UKs Cancelled ComputersA-Z Of Commodore 64 Hidden Gems - The Numbers - Unofficial!Simple Commodore 64 Disk Protection: Copy that Floppy, Remove Anti-Piracy MeasuresAtari 64: Commodore 64 BASIC & KERNAL Running On Atari 1200XL
8-Bit Show And Tell |

WAITing for BASIC on the Commodore 64

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER