World Geography

This program embodies a very elegant graphics routine. The program offers you two categories of study: Countries/Islands or Continents/Oceans/Seas; whichever category is chosen, you have the option of Review/Identify. If you choose the Identify option, you are asked to give the names of various geographical entities within the category you chose. If you choose Review, then you will see the names of those identities displayed as they are pointed out on the map.

It’s the map that makes the difference. It is hard to believe that the block graphics of the TS1000 could give the degree of detail that Mr. Byrne has developed. And the scrolling action alone is enough to provoke wonder.

Lines 5012 and 5132 give one more option among do-nothing commands for entering the realm of USR. Since a repeated RANDOMIZE USR would destroy the randomness which is sought in lines 5030 and 5280, Mr. Byrne uses the simple IF USR…THEN (that is, if USR…<> zero, THEN), and then does nothing at all (REM), regardless of what the answer is.

The decimal values of the machine code bytes in line 1 REM (memory addresses 16514 to 16866) and in line 2 REM (16873 to 16906) are shown in the figures.

The shortcomings of the program are those inherent in any computer quiz. First, of course, the number of questions must be limited. More seriously, the computer can not tolerate any deviation from the answer it wants. If, for instance, you give Islas Maldivas as the answer for Falkland Islands, you get the hook. Similarly, you are not allowed to give England, the United Kingdom, or Great Britain when the computer expects “British Isles”. Even “The British Isles” would be rejected. And misspellings also disqualify you–there’s no such thing as a near miss.

Now there’s where we really need Artificial Intelligence.

World Geography map display
World Geography map display

Listing for Geography

   1 REM X?S▒ ▒▒,8Y?M?INKEY$MLEN
INKEY$Y?M▒INKEY$MPEEK INKEY$TAN
Y?M?INKEY$MLEN INKEY$Y?M▒INKEY$
MPEEK INKEY$ GOSUB ?£RNDU▒RNDACS
?CGACS ?U▒RND4? RETURN ,COS W55
;▒ RUN ▒ GOSUB ▒/? RETURN COS
X5*▒;??▒5 GOSUB PI▒ RUN ▒ GOSUB
▒/?▒ ACS ?U▒RND40W RETURN ?4▒▒M
▒RND<??7Y/:3 GOSUB ▒77<<X4 PRINT
/7X RETURN COPY 4▒Y?M▒RND5*▒;??
FY/:3 GOSUB ▒FF..X4 PRINT /▒M▒RN
D GOSUB ?▒RND▒U▒RND RETURN 64▒Y*
▒?)?▒E£RND▒ GOSUB ?)? VAL ?CHR$
,AT S▒W?LN ▒RND;( CLEAR FAST ▒U▒
RNDACS ?CJ FAST E£RND7ACS ?4▒) R
UN ▒; FOR LPRINT ▒4Y?£▒4▒ LPRINT
FAST ▒ GOSUB ? FOR ?ACS ?C▒ACS
RETURN ACS ▒ FOR GOSUB ?7<( SLOW
AT TAN AT GOSUB ?▒RNDACS ?4$Y3?
;▒2?▒S▒ GOSUB ?R FAST E£RND7K▒23
; FOR LPRINT ?▒//?Y;▒4▒LN ▒RNDST
R$ )?▒ GOSUB ?SGN ▒ GOSUB ? FOR
?ACS ?C▒ACS RETURN ACS ▒ FOR GOS
UB ?STR$ )? ; STOP 25;SGN FOR £(
PEEK TAN
2 REM M$5 DIM INKEY$6-RNDLN 0
)777 FAST E£RND)7 ;SGN ▒3 GOSUB
▒7:4 GOSUB ▒TAN
4 REM *** ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ***
BY SHAWN BYRNE
5 RAND
7 SLOW
10 LET DF=PEEK 16396+256*PEEK
16397
20 LET GET=DF-289
30 LET M=16540
40 LET M$="
"
100 PRINT "DO YOU WANT TO ";TAB
2;"▒-REVIEW";TAB 2;"▒-IDENTIFY"
;AT 4,2;"PRESS 1 OR 2";AT 4,0;
110 LET G$=" "
112 IF NOT USR GET THEN GOTO 11
2
113 REM 1,2
120 PRINT AT 4,2;" "
130 LET O$=G$
1040 NEXT A
1060 DIM P$(NN,2)
1070 LET A$=",▒1▒; ▒▒▒ $0 RETURN
;▒H$9"+CHR$ 11+CHR$ 11+"?£8( SAV
E W▒▒$£▒"+CHR$ 69+"2"+CHR$ 72+":
+ CLEAR S<"
1080 FOR A=1 TO NN
1090 LET P$(A)=A$(2*A-1 TO )
1100 NEXT A
1110 GOTO 5000
2000 LET LN=18
2002 LET NN=17
2016 DIM N$(NN,LN)
2018 LET A$="NORTH AMERICA $S
OUTH AMERICA $AFRICA
▒EUROPE ▒ASIA
▒AUSTRALIA ▒PACIFIC
OCEAN $ATLANTIC OCEAN :IND
IAN OCEAN £ARCTIC OCEAN
£MEDITERRANEAN SEA)GREAT LAKES
"+CHR$ 11+"GULF OF MEXICO
:RED SEA ▒HUDSON BAY
▒BERING STRAIT $PERSIAN G
ULF £"
2020 FOR A=1 TO NN
2030 LET N$(A)=A$(1+LN*(A-1) TO
)
2040 NEXT A
2060 DIM P$(NN,2)
2070 LET A$=CHR$ 84+"▒"+CHR$ 11+
",2<2▒▒V,"+CHR$ 77+">:?H-"+CHR$
72+" PLOT 2▒▒▒£8$▒ "+CHR$ 71+"
CLEAR B"+CHR$ 11
2080 FOR A=1 TO NN
2090 LET P$(A)=A$(2*A-1 TO )
2100 NEXT A
5000 POKE 16520,0
5002 POKE 16521,0
5004 POKE 16522,36
5010 FOR A=1 TO 8
5012 IF USR M OR USR M OR USR M
OR USR M THEN REM
5014 NEXT A
5016 DIM T$(NN)
5018 LET CT=0
5030 LET D=INT (RND*NN)+1
5032 IF CODE T$(D) THEN GOTO 503
0
5034 LET T$(D)="1"
5040 LET L$=N$(D, TO CODE N$(D,L
N))
5060 LET Y=CODE P$(D,2)
5065 IF Y>128 THEN LET Y=Y-256
5070 POKE 16522,34+(Y<PEEK 16521
)
5080 FOR A=1 TO ABS (Y-PEEK 1652
1)
5090 IF USR M THEN REM
5100 NEXT A
5110 LET B=PEEK 16520-CODE P$(D)
5120 POKE 16522,36-3*(B>0 AND B<
42 OR B<-42)
5130 FOR A=1 TO ABS (85*(ABS B>4
2)-ABS B)
5132 IF USR M THEN REM
5134 NEXT A
5140 LET A=USR 16875
5160 PRINT AT 1,1;
5165 IF O$="1" THEN PRINT L$
5170 LET A=Y-26*(Y>26)
5180 LET B=DF+412+33*A*(Y<1 OR Y
>26)
5190 LET F=PEEK B
5200 LET C=23+128*(F>127)
5210 FOR A=1 TO 15
5220 POKE B,C
5225 FOR D=1 TO 2
5226 NEXT D
5230 POKE B,F
5240 NEXT A
5245 IF O$="1" THEN GOTO 5500
5250 LET G$=L$+" "
5260 LET G$=G$( TO USR GET)
5262 REM A-Z,
5270 IF L$<>G$ THEN GOTO 5300
5280 LET A=INT (RND*3)*6+1
5282 PRINT AT 2,1;"RIGHT.GREAT.S
UPER."(A TO A+5)
5290 FOR A=1 TO 12
5292 NEXT A
5295 GOTO 5500
5300 PRINT AT 2,1;"NO, THIS IS "
;L$;"."
5310 FOR A=1 TO 35
5312 NEXT A
5500 LET CT=CT+1
5502 IF CT=NN THEN GOTO 5000
5510 PRINT AT 1,1;M$
5520 GOTO 5030
9998 SAVE "GE▒"
9999 RUN

Bytes in Line 1 REM

 61  91  56   4   0   1   7  26
 36  62 111  50 122  65  50 198
 65  62 103  50 135  65  50 211
 65 201  62 103  50 122  65  50
198  65  62 111  50 135  65  50
211  65 237  91  12  64  58 138
 64 203  79  40  44 203  71  58
137  64  32  15 254  26 200  60
 33  33   0  25   1 247   2 237
176  24  91 254   0 200  61  33
 23   3  25  84  93   1  33   0
237  66   1 247   2 237 184  24
 69   6   0 203  71  58 136  64
 32  28  60 254  85  32   1 175
 50 136  64  19  98 107  35  62
 24  14  31 237 176  35  35  19
 19  61  32 245  24  35  61 254
255  32   2  62  84  50 136  64
 33  23   3  25  84  93  43  62
 24  14  31 237 184  43  43  27
 27  61  32 245  24   3  50 137
 64 237  75 136  64   4  58 138
 64 254  34  32   4  62  23 128
 71  17 195   9  42  12  64 175
237  82  17  85   0 197 120 214
 26 193  56   5  60  71 205 139
 64  25  16 253 229   9  58 138
 64 203  79  40  47 229  42  12
 64  35 203  71  32   4  17 247
  2  25 235 225   6  32  62  86
 12 185  32   2 225 229 175 237
111 235 119 203  95  40   4 203
254 203 158 235 237 103  35  19
 16 228 193 201 193 237  75 136
 64 203  71  32  13  62  31  95
 25 129  30  85 187  56   3 237
 82  55 229  42  12  64  35  48
  3  30  31  25 235 225  72   6
 24  24  15  62  25 185  32  10
205 139  64 213  17  77   8 237
 82 209 175 237 111 235 119 203
 95  40   4 203 254 203 158 235
237 103 213  17  85   0  25 227
 30  33  25 209 235  12  16 211
201

Bytes in Line 2 REM

 50  13  33 233  65  34  22  64
205  28  17  35  35  35 229  42
 12  64  17  35   0  25 209   1
 31   0 237 176  35  14  32 237
176 201
World Geography map, close-up screen display
World Geography map, close-up screen display

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