Canada

Developer(s): D. J. Currie
Date: 1986
Type: Program
Platform(s): TS 2068
Tags: Education

Canada is a map display and geography quiz program that draws a detailed outline map of Canada using a custom run-length encoded DRAW command interpreter, then presents two game modes: locating named cities with a movable crosshair cursor, or identifying cities marked on the map by name. The map-drawing engine at line 1170 decodes a compact string notation where digits represent pixel offsets and the characters ‘e’, ‘w’, ‘q’ (aliased to variables) control direction multipliers, translating runs of encoded steps into PLOT/DRAW commands. Machine code stored at address 64800 (saved separately as “Canada C”) is used via USR calls to flood-fill the provinces and territories with color. The program draws the map twice — once in color (PAPER 6, INK 2) and once in black and white (PAPER 7, INK 0) — because the fill routine requires color attributes unavailable in the game’s monochrome mode. City data for 35 Canadian cities is stored in DATA statements as name, x-coordinate, and y-coordinate, and scoring in both game modes awards up to 100 points across 10 rounds.


Program Structure

The program divides into four broad phases:

  1. Title screen (lines 5–90): displays a block-graphic Canada logo in color, credits, and waits for a keypress.
  2. Color map draw (lines 100–555): sets PAPER 6 / INK 2, draws the full coastline and provincial borders via the encoded string interpreter, then calls USR 64800 to flood-fill regions.
  3. Monochrome map draw (lines 580–1150): repeats the entire drawing sequence in black and white (PAPER 7 / INK 0), adding internal lakes, islands, and provincial lines omitted from the color pass.
  4. Quiz engine (lines 1220–1530): loads city DATA, offers two game modes, and handles scoring.

Map Encoding and the DRAW Interpreter (lines 1170–1210)

All coastlines and borders are stored as compact strings in l$. The subroutine at line 1170 walks l$ character by character, converting each digit to a signed pixel delta via VAL. The digit 0 (decimal value 10 from VAL) acts as a sign-flip escape: when VAL l$(n) = 10 the next digit is negated. Two successive deltas (x then y) are multiplied by o (always 1) and passed to DRAW. The letters e, w, q embedded in strings are simply non-numeric and evaluate to 0 under VAL, acting as separators or no-ops — but close inspection shows they are actually part of multi-character tokens parsed in sequence, since the loop increments n unconditionally. This keeps the strings surprisingly readable as compass hints in the REM comments.

Machine Code Flood Fill

Lines 330–430 and 540–550 call USR 64800 repeatedly after each PLOT to a seed point inside a province or territory. The 500-byte machine code routine is loaded from tape as a separate CODE block (“Canada C”) and stored at address 64800. The result is assigned to the dummy variable a (or A) to discard the return value. Flood-filling is only practical in the color pass where attribute boundaries aid region detection; the monochrome pass omits these USR calls.

Variable Aliasing for Direction Control

Lines 110 and 580 initialize o=1, e=0, w=10, r=0, q=10. Within the encoded strings, the characters e, w, and q are BASIC variable names whose numeric values (0, 10, 10) are intentionally meaningless — they act as visual mnemonic separators (East, West, diagonal?) without affecting the VAL-based parsing. The actual direction of each DRAW step is determined entirely by the sign and magnitude of the two digit characters that follow.

City Data and Quiz Modes

Line 1220 reads 35 cities from DATA (lines 1230–1260) into the string array c$(40,15) and the numeric array c(40,2) for pixel coordinates. Mode 1 (“Find a City”) presents a city name and lets the player move a crosshair cursor with keys 5/6/7/8, scoring up to 10 points per city based on pixel distance: d = INT((20 - SQR(dx²+dy²)) / 1.9), clamped to zero. Mode 2 (“Name a City”) plots a CIRCLE marker and asks for the city name as a string, awarding 10 points for an exact match. Both modes select 10 non-repeating cities using a boolean array d(35) and random rejection sampling.

Crosshair Cursor

The subroutine at line 1510 draws a crosshair using OVER 1 (XOR mode): PLOT x,y-2: DRAW 0,4 and PLOT x-2,y: DRAW 4,0. Calling it twice erases the cursor without disturbing the map underneath — a standard non-destructive sprite technique. Line 1360 polls INKEY$ for keys 5/6/7/8 in a single expression using Boolean arithmetic to increment or decrement x and y.

Two-Pass Map Drawing

The color map (lines 100–555) is drawn but ultimately replaced by the monochrome version because CIRCLE with INK attributes and the quiz overlay text require a consistent attribute grid. The program explicitly apologizes for this at line 560: PRINT PAPER 7; INK 0; AT 20,0;"Sorry but we will have to use black and white for our game." The monochrome pass (lines 590–1150) is more complete, adding Great Bear Lake, Great Slave Lake, Lake Winnipeg, Vancouver Island, Victoria Island, Baffin Island, and provincial straight-line borders omitted from the color pass.

Notable Techniques and Anomalies

  • Line 1200 contains -\\{19}\\{0}(VAL l$(n+1)) where \\{19}\\{0} is an embedded control sequence (INK 0 attribute bytes inside the source), used here as the negation operator’s operand — this is likely a display artifact in the listing but functionally the negation applies to the VAL expression.
  • PAUSE NOT PI at line 80 evaluates to PAUSE 0 (since NOT PI = 0 in Sinclair BASIC), providing an indefinite wait for a keypress — a well-known idiom.
  • Line 1160 is dead code (never reached): it peeks system variables 23677/23678 and STOPs, suggesting a debugging remnant for inspecting coordinates.
  • The SAVE sequence at lines 9997–9999 saves the BASIC program and the machine code block separately, then reloads the code block on startup (line 9999 uses LOAD "Canada C" CODE followed by GO TO 1).
  • Line 1410 uses FOR n = NOT PI TO PI, i.e., FOR n=0 TO 3.14159… with step 1, iterating 4 times for a victory fanfare loop.

Image Gallery

Source Code

    5 BORDER 6:PAPER 6:INK 2:CLS 
   10 PRINT ''''"    \  \..\..\  \  \..\..\  \ .\  \  \. \  \..\..\  \ .\..\. \  \  \..\.."
   20 PRINT "    \{20}\{0}\ :\  \  \' \ :\  \  \: \ :\'.\  \: \ :\  \  \: \ :\  \ '\. \ :\  \  \: "
   30 PRINT "    \ :\  \  \. \ :\''\''\: \ :\  \'.\: \ :\''\''\: \ :\  \ .\' \ :\''\''\: "
   40 PRINT "    \  \''\''\  \ '\  \  \' \ '\  \  \' \ '\  \  \' \ '\''\' \  \ '\  \  \' "
   45 INK 1
   50 PRINT AT 10,10;"MAP DISPLAY"
   60 PRINT AT 12,13;"AND"; AT 14,11;"MAP GAME"
   65 PAUSE 100:PRINT AT 17,9;"by D.J. Currie"
   70 PAUSE 100:PRINT AT 21,5;"Press any key to begin"
   80 PAUSE NOT PI
   90 BEEP .4,25:BEEP .6,35
  100 BORDER 1:PAPER 1:INK 4:CLS 
  110 LET o=1:LET e=0:LET w=10:LET r=e:LET q=w
  120 PRINT AT 21,0;"\{18}\{1} PLEASE WAIT \{18}\{0}"
  130 PLOT 182,32
  140 LET l$="w5q6w3q1w3q2w4q2w2q21q12e11eq1w5q3w2ew3q2w2q2w2q1w11112ee223e414w132q11q2e11q11ee3w44w3q1w31w3q1w21":REM Sault Ste Marie
  150 LET l$=l$+"e3w1ew15w2q1w21w12w21w6ew3q3w1q2w3q2w5q52e211eeq11q1321e3321w2q4212q23e223e2q12q2w2ew1q1w21w4q2w1q1w3ew3q634w1q5w1q51q61q2":REM Chicago
  160 LET l$=l$+"1q11e2114e2w2415232q2eq211e3132e1q11q3eq5w1q21q1231q11q6w3q3w1q24q142433222e1w1ee2213e3221e2w221224":REM St. Lawrence River
  170 LET l$=l$+"3324452213262344324ew1q11eeq1w1q3w3q1w1q131eq131eq42e2q21q1115e323ew1ew22e4111q1eq21q1111q1eq1w1q2eq2w5q5eq2":REM Halifax
  180 LET l$=l$+"w1ew1q2eq2w1q2w2q1w1ew11e3122332w2ew3q2e223w2q3eq1w4q4w2q2w2q1e1w34w25w2ew1q1w1e12e33e22w2q2w3eeq3w1q2w11w1q2eq5eq5w1q1w1q2w7q2w7q2":REM St. Lawrence again
  190 LET l$=l$+"22e12456111317123313w11444241633313e2232112e3w1ew24w31w1q1w11w3ew12w3ew11w4q1w41e1w1ew22w11w1ew22w1q1w12w1ew35w14":REM Labrador-Quebec
  200 LET l$=l$+"w2q11q2eq21q1eq1w1q1eq1w3q4w2qew32w32w12e2w11w6ew34w3ew2q2w11w1q1w31w2q2eq22q2eq22q2eq21q2w1q4eq22e2q11q12q41q4w2q5w2q2w2q13q24q6eq21q1eq3w2q2w2q1":REM Quebec-Ontario
  210 LET l$=l$+"eq2w1q1w1ee1w44w33w27e4w9ew72w44w42w1ew4q2e2w16w11w1q1w1ew11w12e4272323e22e21w12e14211e14211e123e2254133e111e1w11e1w2312e2w11w3ew31w1q12q3w1eeq3w1q3w1q2w1ew1311e1w13w1ew1q4w1ew15w32e2w24w23w2eeq2w2q1eq42q4":REM East NW Territories
  220 LET l$=l$+"112q2w1q21q1w1q2w2q2eq2w1q114e5w34w1q1eq2w1q1w1e1q31eeq1w1q12q2w8ew2ew2ew31w32w2q1eq5w22w22w5ew443ee3w42w31w12w1ew31w2ew2q1w1e13e2w1q1w1q3w24e2w3q3e2w21w41w4q1w2ew21w23e3w22w21w23w21":REM Yukon-Alaska
  230 GO SUB 1170
  240 DRAW -31,-35:LET l$="2q22q1eq6w1q2211q12q12q3eq5w1q71q41q3e1w2q5w4eeq3w1q2eq21q2eq1w1q1eq11e1q2eq3w2q1eq33q4eq12q2eq11q1eq21q11q33q2w3e":REM Canada-US West coast
  250 GO SUB 1170
  260 DRAW 91,-21,.26:LET l$="1q16e2q11q12e1q12e11eq12q2":REM C-US
  270 GO SUB 1170
  280 PLOT 11,135:DRAW 102,-37,.26:REM Prairies-NWT
  290 PLOT 124,83:DRAW -17,-21:DRAW 0,-19:REM MAN-ONT
  300 PLOT 156,61:DRAW 8,-25:LET l$="4e3q2111q14e421ee1eq1":REM Ont-Que
  310 GO SUB 1170
  315 BEEP .3,30:BEEP .5,-10
  320 PLOT 68,130:REM NWT+Y fill
  330 LET a= USR 64800
  340 PLOT 50,70:REM WESTERN PROVINCES
  350 LET a= USR 64800
  360 PLOT 212,50
  370 LET A= USR 64800
  380 PLOT 193,45
  390 LET a= USR 64800
  400 PLOT 184,56
  410 LET a= USR 64800
  420 PLOT 138,50
  430 LET a= USR 64800
  480 PLOT 227,92:LET l$="w1q2w1q41q61q3w1q1eq11q1eq3w1q11q2323221131eeq12ee11e121e1q21e1q111e5w11w1q2w22w1q1w1ee4w1q1w22w2q1w11w1q1w1ew1q1w1ew1q1w11w1q1e412w13":REM PEI next
  490 GO SUB 1170
  500 PLOT 230,78
  510 LET a= USR 64800
  520 PLOT 15,61:LET l$="w21w22w37e3w33e42eeq11q24q4eq32q41q2eq4":REM Victoria Island next
  530 GO SUB 1170
  540 PLOT 13,65
  550 LET a= USR 64800
  555 BEEP .3,0:BEEP .5,-30
  560 PRINT PAPER 7; INK 0; AT 20,0;"Sorry but we will have to use   black and white for our game.",
  570 PAUSE 400
  580 LET o=1:LET e=0:LET w=10:LET r=e:LET q=w
  590 BORDER 7:PAPER 7:INK 0:CLS 
  600 PRINT AT 21,0;"\{18}\{1} PLEASE WAIT \{18}\{0}"
  610 PLOT 182,32
  620 LET l$="w5q6w3q1w3q2w4q2w2q21q12e11eq1w5q3w2ew3q2w2q2w2q1w11112ee223e414w132q11q2e11q11ee3w44w3q1w31w3q1w21":REM Sault Ste Marie
  630 LET l$=l$+"e3w1ew15w2q1w21w12w21w6ew3q3w1q2w3q2w5q52e211eeq11q1321e3321w2q4212q23e223e2q12q2w2ew1q1w21w4q2w1q1w3ew3q634w1q5w1q51q61q2":REM Chicago
  640 LET l$=l$+"1q11e2114e2w2415232q2eq211e3132e1q11q3eq5w1q21q1231q11q6w3q3w1q24q142433222e1w1ee2213e3221e2w221224":REM St. Lawrence River
  650 LET l$=l$+"3324452213262344324ew1q11eeq1w1q3w3q1w1q131eq131eq42e2q21q1115e323ew1ew22e4111q1eq21q1111q1eq1w1q2eq2w5q5eq2":REM Halifax
  660 LET l$=l$+"w1ew1q2eq2w1q2w2q1w1ew11e3122332w2ew3q2e223w2q3eq1w4q4w2q2w2q1e1w34w25w2ew1q1w1e12e33e22w2q2w3eeq3w1q2w11w1q2eq5eq5w1q1w1q2w7q2w7q2":REM St. Lawrence again
  670 LET l$=l$+"22e12456111317123313w11444241633313e2232112e3w1ew24w31w1q1w11w3ew12w3ew11w4q1w41e1w1ew22w11w1ew22w1q1w12w1ew35w14":REM Labrador-Quebec
  680 LET l$=l$+"w2q11q2eq21q1eq1w1q1eq1w3q4w2qew32w32w12e2w11w6ew34w3ew2q2w11w1q1w31w2q2eq22q2eq22q2eq21q2w1q4eq22e2q11q12q41q4w2q5w2q2w2q13q24q6eq21q1eq3w2q2w2q1":REM Quebec-Ontario
  690 LET l$=l$+"eq2w1q1w1ee1w44w33w27e4w9ew72w44w42w1ew4q2e2w16w11w1q1w1ew11w12e4272323e22e21w12e14211e14211e123e2254133e111e1w11e1w2312e2w11w3ew31w1q12q3w1eeq3w1q3w1q2w1ew1311e1w13w1ew1q4w1ew15w32e2w24w23w2eeq2w2q1eq42q4":REM East NW Territories
  700 LET l$=l$+"112q2w1q21q1w1q2w2q2eq2w1q114e5w34w1q1eq2w1q1w1e1q31eeq1w1q12q2w8ew2ew2ew31w32w2q1eq5w22w22w5ew443ee3w42w31w12w1ew31w2ew2q1w1e13e2w1q1w1q3w24e2w3q3e2w21w41w4q1w2ew21w23e3w22w21w23w21":REM Yukon-Alaska
  710 GO SUB 1170
  720 DRAW -31,-35:LET l$="2q22q1eq6w1q2211q12q12q3eq5w1q71q41q3e1w2q5w4eeq3w1q2eq21q2eq1w1q1eq11e1q2eq3w2q1eq33q4eq12q2eq11q1eq21q11q33q2w3e":REM Canada-US West coast
  730 GO SUB 1170
  740 DRAW 91,-21,.26:LET l$="1q16e2q11q12e1q12e11eq12q2":REM C-US
  750 GO SUB 1170
  760 PLOT 11,135:DRAW 100,-37,.26
  770 PLOT 48,116:DRAW -13,-30:LET l$="3q6eq24q6eq22q6eq8":REM BC-ALTA
  780 GO SUB 1170
  790 PLOT 71,108:DRAW -13,-56:REM ALTA-SASK
  800 PLOT 91,102:DRAW -5,-56:REM SASK-MAN
  810 PLOT 124,83:DRAW -17,-21:DRAW 0,-19
  820 PLOT 156,61:DRAW 8,-25:LET l$="4e3q2111q14e421ee1eq1":REM Ont-Que
  830 GO SUB 1170
  840 PLOT 182,116:LET l$="1q21q32q22q41e1q32q34q4eq3w4ew3q1w211q2w2e1q2w1q21q23q1eq3222q2eq12e2q121w12e2211q1eq1":REM Que-Lab
  850 GO SUB 1170
  860 DRAW 16,10:LET l$="1q2":REM Newfie next
  870 GO SUB 1170
  880 PLOT 227,92:LET l$="w1q2w1q41q61q3w1q1eq11q1eq3w1q11q2323221131eeq12ee11e121e1q21e1q111e5w11w1q2w22w1q1w1ee4w1q1w22w2q1w11w1q1w1ew1q1w1ew1q1w11w1q1e412w13":REM PEI next
  890 GO SUB 1170
  900 PLOT 210,56:LET l$="eq12q15ee212w5q3w2ew11":REM Great Bear Lake next
  910 GO SUB 1170
  920 PLOT 50,147:LET l$="eq14q11q2w4ew1q2eq12e31eq21e111e1q123e1w3ew223e11w3ew22w5e":REM Great Slave Lake next
  930 GO SUB 1170
  940 PLOT 56,120:LET l$="2q22q12e212e1132223ee1w3ew2q1w3ew23w22w1e2q4w2q2w4ew2q2":REM Lake winnipeg next
  950 GO SUB 1170
  960 PLOT 102,50:LET l$="w11e5w12w2ew37133q12q31q61q2eq5w1q1":REM Vancouver Island next
  970 GO SUB 1170
  980 PLOT 15,61:LET l$="w21w22w37e3w33e42eeq11q24q4eq32q41q2eq4":REM Victoria Island next
  990 GO SUB 1170
 1000 PLOT 91,151:LET l$="w2ew3q1w31w21e2w44e32e6q211w43w1ew42e1w1244311e2q21q21e121q2eq51e16112q21q71q1w1q21q23q3eq1w2eeq4w1q1w71w61w5q2":REM Baffin Island next
 1010 GO SUB 1170
 1020 PLOT 171,134:LET l$="5q13ee4w44w1ew43w2ee3112e1q11e3q32ee2w1211e4w22w1ew2q1w42w7ew1111w14w11e1w21w2ee1w21w1q1w31w1q2w1ee1w34w1ew55w4eeq1w2ew3q1w1q1eq2w1q2w1115w2q1w2q2w2q61q33q2w2q1eq11e1q2"
 1030 LET l$=l$+"2q16e32113q1131q1112q35q5111q12e1q1eq21q2eq2w2q32q3w4q4w1ew2q1eq31q1211e423e2q22eeq21q13e113q16ee1w22w31w2ew11e1"
 1040 GO SUB 1170
 1050 PLOT 42,170:LET l$="w4q5w1q2eq13q3w2q41q1eq1w3q4eq31q1eq6w1q5w1q1w2q5eq2":REM Yukon-NWT
 1060 GO SUB 1170
 1150 GO TO 1220
 1160 PRINT AT 21,0,:PRINT AT 21,0; PEEK 23677; TAB 5; PEEK 23678:STOP 
 1170 LET n=1
 1180 IF n >= LEN l$ THEN RETURN 
 1190 LET x= VAL l$(n):IF x=10 THEN LET x=-(VAL l$(n+1)):LET n=n+1
 1200 LET n=n+1:LET y= VAL l$(n):IF y=10 THEN LET y=-\{19}\{0}(VAL l$(n+1)):LET n=n+1
 1210 LET n=n+1:DRAW o*x,o*y:GO TO 1180
 1220 RESTORE :DIM c$(40,15):DIM c(40,2):FOR n=1 TO 35:READ c$(n),qq,ww:LET c(n,1)=qq:LET c(n,2)=ww:NEXT n
 1230 DATA "WINNIPEG",102,48,"REGINA",77,54,"SASKATOON",73,66,"CALGARY",51,64,"EDMONTON",55,78,"VICTORIA",16,62,"VANCOUVER",22,65,"WHITEHORSE",22,136,"DAWSON",25,153,"YELLOWKNIFE",69,125,"ST. JOHNS",247,81
 1240 DATA "TIMMINS",154,44,"THUNDER BAY",130,41,"FORT MCMURRAY",64,92,"THOMPSON",103,77,"PRINCE RUPERT",14,99,"KAMLOOPS",32,68,"TORONTO",168,23,"SAULT STE MARIE",148,33,"RANKIN INLET",121,113
 1250 DATA "CHARLOTTETOWN",216,55,"GANDER",237,83,"FROBISHER BAY",173,134,"CORNER BROOK",228,76,"SCHEFFERVILLE",190,91,"MOOSONEE",154,60,"CHURCHILL",115,91,"HALIFAX",222,46,"SAINT JOHN",212,46
 1260 DATA "QUEBEC",189,46,"MONTREAL",184,36,"OTTAWA",177,34,"WINDSOR",158,13,"SUDBURY",159,35,"KIRKLAND LAKE",158,43
 1270 BEEP .1,10:PRINT AT 19,0;"(1)FIND A CITY?"; AT 20,0;"(2)NAME A CITY?"; AT 21,0;"ENTER 1 OR 2:  ":INPUT  LINE y$:IF y$="2" THEN GO TO 1430
 1280 IF y$ <>"1" THEN GO TO 1270
 1290 DIM d(35)
 1300 LET sc=0
 1310 FOR c=1 TO 10
 1320 LET r= INT (RND*35)+1:IF d(r) THEN GO TO 1320
 1330 LET d(r)=1:LET p$=c$(r):LET xx=c(r,1):LET yy=c(r,2)
 1340 PRINT AT 19,0;"FIND", AT 20,0;p$; AT 21,0;"OK? ENTER '0'  "
 1350 LET x=140:LET y=70
 1360 LET x=x+1*(INKEY$="8" AND x<254)-1*(INKEY$="5" AND x>0):LET y=y+1*(INKEY$="7" AND y<175)-1*(INKEY$="6" AND y>1):GO SUB 1510:PAUSE 0:GO SUB 1510
 1370 IF INKEY$ <>"0" THEN GO TO 1360
 1380 FOR n=20 TO 40:BEEP .006,n:NEXT n
 1390 LET xd= ABS (xx-x):LET yd= ABS (yy-y):LET d= SQR (xd*xd+yd*yd):LET d= INT ((20-d)/1.9):LET d=(d AND d>0)+(0 AND d<0):PRINT AT 19,0, AT 20,0;d;"/10 FOR", AT 21,0;"ACCURACY",:BEEP 1,d:LET sc=sc+d
 1400 CIRCLE OVER 1; INK 2;xx,yy,2:CIRCLE OVER 1; INK 2;xx,yy,5:BEEP 1,d:PRINT AT 19,0;"PRESS ANY", AT 20,0;"KEY TO ", AT 21,0;"CONTINUE",:PAUSE 0:CIRCLE OVER 1;xx,yy,2:CIRCLE OVER 1;xx,yy,5
 1410 NEXT c:FOR n= NOT PI TO PI:FOR m=30 TO 40:BEEP .01,m:NEXT m:NEXT n:PRINT AT 19,0;"YOU SCORED", AT 20,0;sc;"/100", AT 21,0;"PRESS ANY KEY",:BEEP .4,10:PAUSE 0:FOR n=19 TO 21:PRINT AT n,0,:NEXT n
 1420 GO TO 1270
 1430 LET sc=0:DIM d(35):FOR c=1 TO 10
 1440 LET r= INT (RND*35)+1:IF d(r) THEN GO TO 1440
 1450 LET d(r)=1:LET xx=c(r,1):LET yy=c(r,2):CIRCLE INK 2; OVER 1;xx,yy,2:CIRCLE INK 2; OVER 1;xx,yy,5
 1460 DIM t$(15):PRINT AT 19,0;"WHAT IS", AT 20,0;"THIS CITY", AT 21,0;"CALLED ?",:POKE 23658,8:INPUT  LINE t$:POKE 23658,0:IF CODE t$=32 THEN GO TO 1460
 1470 IF t$=c$(r) THEN PRINT AT 19,0;"THAT IS", AT 20,0;"CORRECT", AT 21,0;"WELL DONE",:BEEP 1,15:LET sc=sc+10:GO TO 1490
 1480 PRINT AT 19,0;"NO, IT IS", AT 20,0;"CALLED", AT 21,0;c$(r):BEEP .5,0:BEEP .5,-10
 1490 CIRCLE OVER 1;xx,yy,2:CIRCLE OVER 1;xx,yy,5
 1500 GO TO 1410
 1510 OVER 1:PLOT x,y-2:DRAW 0,4:PLOT x-2,y:DRAW 4,0:OVER 0
 1530 RETURN 
 1600 REM \{6}\{6}\{6}\{6}Modified from the method in\{6}MAP WORK by D. Anderson in\{6} Sinclair Programs, July, 1983  by D.J. Currie 1n 1986\{6}\{6}\{6}m/c by R. H. Mitchell\{6}\{6}
 9997 SAVE "Canada" LINE 9999:BEEP .4,15:SAVE "Canada C"CODE 64800,500:BEEP .2,25
 9998 PRINT AT 6,4;"REWIND THE TAPE"; AT 9,4;"PLAY THE TAPE TO VERIFY":VERIFY "":VERIFY ""CODE :BEEP .2,30:PRINT AT 15,4;"PROGRAM IS SAVED O.K!":STOP 
 9999 CLEAR 64799:PRINT AT 9,4;"\{18}\{1}LEAVE RECORDER RUNNING\{18}\{0}":PRINT AT 12,4;"WE ARE LOADING BYTES":LOAD "Canada C"CODE :GO TO 1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.