BASIC Archives

How to build a time of day clock on the Commodore 64

In this video I’ll demonstrate how to build a simple clock on the C64. We’ll go through this process step by step, including the built-in TI and TI$ variables, string formatting with LEFT$, RIGHT$ and MID$, as well as screen formatting. Here’s the code I’m writing – works in Commodore BASIC v2 and above: 5 … Read more

How to create random YouTube URLs in Commodore BASIC v2

In this episode I’ll demonstrate how to create those seemingly random YouTube Video IDs using a Commodore 64. Here’s the code I’m writing – works in BASIC v2 and above: 10 print chr$(14) 20 gosub 100:x=rnd(-ti):cn=1 30 a$=”https://youtu.be/” 40 for i=1 to 11 50 rn=int(rnd(0)*62)+1 60 a$=a$+yt$(rn) 70 next 80 print:print cn;” : “;a$ 85 … Read more