Skip to content

Instantly share code, notes, and snippets.

@CameronLonsdale
Created December 4, 2017 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CameronLonsdale/f1d20d800fac67a1fa2f1005258d076e to your computer and use it in GitHub Desktop.
Save CameronLonsdale/f1d20d800fac67a1fa2f1005258d076e to your computer and use it in GitHub Desktop.
Happy Birthday Basic
100 print chr$(147); chr$(154)
101 read s : if s = 0 goto 109
102 read s$ : gosub 1000
103 read x1, y1, x2, y2, x3, y3
104 goto 101
109 restore : print chr$(19); chr$(5);
110 l1 = 54272 : l2 = 54279: l3 = 54286
120 h1 = l1 + 1 : h2 = l2 + 1 : h3 = l3 + 1
130 v1 = l1 + 4 : v2 = l2 + 4 : v3 = l3 + 4
140 poke 54296, 15
150 poke v1 + 1, 9 : poke v1 + 2, 0
160 poke v2 + 1, 36 : poke v2 + 2, 36
170 poke v3 + 1, 18 : poke v3 + 2, 170
180 t = ti
200 poke v1,16 : poke v2, 32: poke v3, 16
210 read s : if s = 0 goto 290
212 read s$ : gosub 1000
220 read x1, y1, x2, y2, x3, y3
230 if x1 then poke h1, x1: poke l1, y1: poke v1, 17
240 if x2 then poke h2, x2: poke l2, y2: poke v2, 33
250 if x3 then poke h3, x3: poke l3, y3: poke v3, 17
260 t = t + s
270 if t > ti goto 270
280 goto 200
290 for j = l1 to 54296 : poke j, 0: next j
295 print chr$(154): end
300 data 40, " hap", 34, 75, 0, 0, 0, 0
310 data 20, " py ", 34, 75, 0, 0, 0, 0
320 data 60, " birth ", 38, 126, 28, 214, 5, 185
330 data 60, " day ", 34, 75, 28, 214, 0, 0
340 data 60, " to ", 45, 198, 38, 126, 5, 185
350 data 60, " you ", 43, 52, 30, 141, 4, 73
360 data 60, " , " , 0, 0, 0, 0, 0, 0
370 data 40, " hap", 34, 75, 0, 0, 0, 0
380 data 20, " py ", 34, 75, 0, 0, 0, 0
390 data 60, " birth ", 38, 126, 30, 141, 6, 108
400 data 60, " day ", 34, 75, 30, 141, 0, 0
410 data 60, " to ", 51, 97, 34, 75, 4, 73
420 data 60, " you ", 45, 198, 28, 214, 5, 185
430 data 60, " , ", 0, 0, 0, 0, 0, 0
440 data 40, " hap", 34, 75, 0, 0, 0, 0
450 data 20, " py ", 34, 75, 0, 0, 0, 0
460 data 60, " birth ", 68, 149, 22, 227, 5, 185
470 data 60, " day ", 57, 172, 25, 177, 0, 0
480 data 60, " dear ", 45, 198, 28, 214, 7, 53
500 data 60, " ni " , 21, 154, 30, 141, 7, 163
510 data 60, " na ", 19, 63, 30, 141, 0, 0
520 data 60, " , ", 0, 0, 0, 0, 0, 0
530 data 40, " hap", 61, 126, 0, 0, 0, 0
540 data 20, " py ", 61, 126, 0, 0, 0, 0
550 data 60, " birth ", 57, 172, 34, 75, 8, 147
560 data 60, " day ", 45, 198, 28, 214, 0, 0
600 data 60, " to ", 51, 97, 30, 141, 4, 73
610 data 60, " you. ", 45, 198, 28, 214, 2, 220
620 data 0
1000 print s$; : if right$(s$, 1) < " 0 " then print
1010 return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment