RCA CDP18S711 Cassette Player User Manual


 
111. CHIP-8 Language Programming
17
lose the CHIP-8 interpreter and will have to reload it.
You can insert stopping points in your program for
debugging purposes. Suppose you want to stop and
examine variables when your program reaches the
instruction at 0260. Just write a 1260 instruction at
location 0260. Flip RUN down and use operating system
mode A to examine variables V0-VF. The memory map
in Appendix C shows where you can find them.
After the above practice you are ready to design more
sophisticated CHIP-8 programs. Always prepare a
flowchart before actually writing a program. The last
352 bytes of on-card RAM are used for variables and
display refresh. In a 2048-byte RAM system you can use
locations 0200-069F for your programs. This area is
enough for 592 CHIP-8 instructions (1184 bytes). In a
4096-byte RAM system you can use locations
0200-0E8F. This area is equal to 1608-CHIP-8
instructions (3216 bytes).
Some Program Ideas
Here are a few ideas for programs to write using the
CHIP-8 language:
1. INTOXICATION TESTER - Display a six digit
random number on the screen for several seconds.
You must remember this number and enter it from
the keyboard within ten seconds after the screen
goes blank to prove that you're sober and score.
2. NUMBER BASE QUIZ - Display numbers in 18.
binary or octal on the screen. You must enter
their decimal equivalent to score points.
3. DICE - Push any key to simulate rolling dice
displayed on the screen.
4. PUPPETS - Show large face on the screen. Let
small children move mouth and roll eyes by 20.
pushing keys.
r
BUSY BOX - Let small children push keys to 21.
make different object appear on the screen,
move, and make sounds.
6. SHUFFLEBOARD - Simulate shuffleboard
type games on the screen.
7. COMPUTER ART - Design new programs to
generate pleasing geometric moving patterns on
the screen.
8. INVISIBLE MAZE - Try to move a spot
through an invisible maze. Tones indicate when
you bump into a wall.
9. LUNAR LANDING - Program a graphic lunar
landing game.
10. COLLIDE - Try to maneuver a spot from one
edge of the screen to the other without hitting
randomly moving obstacles.
Il.
CAPTURE
-
T
r
y
to c
h
ase an
d
catc
h
ran
d
om
ly
mov
i
n
g
s
p
ots w
i
t
hi
n a s
p
ec
ifi
e
d
t
i
me
li
m
i
t.
12. LEARNING EXPERIENCES - Program graphic
hand and eye coordination exercises for young
children or those with learning disabilities.
13. NUMBER RECOGNITION - Show groups of
objects or spots on the screen. Young child must
press key representing number of objects shown
to score.
WALL BALL - Program a wall-ball-type paddle
game for one player.
15. FOOTBALL - Each player enters his play via the
hex keyboard and the computer moves the ball on
the screen.
16. BLACKJACK - Play "21" against the com
puter dealer.
17. HOLIDAY DISPLAYS - Design custom,
animated displays for birthdays, Halloween,
Christmas, etc.
METRIC CONVERSION - Help children learn
metric by showing lengths on screen in inches and
requiring centimeter equivalent to be entered to
score.
19. TURING MACHINE - Simulate a simplifed
Turing machine on the screen.
TIMER - Use the computer to time chess games,
etc.
HEXAPAWN - Program Hexapawn so that the
computer learns to play a perfect game.
22. NIM - Program Nim with groups of spots
shown on the screen.
23. BLOCK PUZZLES - You can simulate a variety
of sliding block-type puzzles on the screen.
24. BOMBS AWAY - Show a moving ship at the
bottom of the screen. Try to hit the ship by
releasing bombs from a moving plane at the top of
the screen.