Download Issue 10 June 1980

Transcript
D
D,
AN ARESCO PUBLICATION
VOLUME 2,ISSUE 10
JUNE 1990, $2.50
MACIIINE IANGUAGE
tB02 Mernory Display Program.. . . Gerald Strop€ . . . 02 "L0. 09
9600 Baud I/o with the vIP. , , . . Bill Barrett. . . . 02 .L0 . 31
\-
CHIP-
B
littl-e Loops.....
MUSIC
Six
Songs
.........Ton Swan......,.02.10.14
for VIP Supersound. o.John Hanner.....A2,LO,2t
HARDWARE
A Hardware Breakpoint Systeln. . .Bill- Barrett .,..Q2.t0,26
MISCEI1ANEOUS
o.... r................
.02.!0.L3
.....
. o... .,02.!9,25
Programrning Hints.... ....
.....
...r...r......r0?"t0.34
Terryts Note.....
Non ComrnerciaL Ad Corn€f
New
Product Announcement.... .. . .. . . ... . .. .... ...02.L0.2O
ADVffiTISEMENTS
RCA.
RCA......
r.....r.02.10.09
..........r.......r.
................................r'O2.10"30
02. 10.
00
SUBSCRIPTION RATES, ADVERTISING RATES,
& OTHER ]NFORMAT]ON
\ r-l
I
I
l
'i
l
The vrPER -t" published ten tipgs each year by ARESCo, at 6303
.Golden Hook;
columbia MD, 2Lo44r Erd maileo 1o subscrirers-oir
or'around the 15th of each month except June a)rd December. The
single gopy priee is $z per copy ana th6 subscription price is
$I1/LO issues of the current volume. Subscriptions do not carry
over from one volume to the next, and readers-who want less than
the full volume should send $2 for each issue d.esired. Renewals
are aeeepted during the, last two months of .the current vol-ume
year, and the first issue of each volume is published in Ju1y.
The entire eontents of the VIPEF. are copyrighted c L9?9 bV
Inc.
Second class postage paid in Columbia MD 27045 (USPS 520- 550).
Pos tmagter : S end all ad,dres s changes to ARESCO, P0BoxLL+Z,
ARESCO,
Columbia MD
ZLOLI'L+,
Subscriptions: Subscription orders should be sent to P O Box 1142, Columbia, MD, 21044; not
to the street address given above. USA residents: $20/10 issues mailed second class; g25/10 issues
mailed first class. Non-uSA residents: $20110 issues mailed second class; $30/10 issues mailed
first class. VISA/ MC/ p"ttottal checks, cash, money orders accepted as payment. All funds should
be in US dollars. Checks drawn on foreign banks should include any exchange rare difference in
currencies.
AdvertisinE ratesn Non-commercial ads by subscribers z $IO/)
fficrers
eaeh. i,ion-com*"r6iai aos by non-subscribersr $tS/l lines of 60 charaeters each. For comrnercial
ads, please wrj-te for advertising rates. Payment must accompany
ad in arry event.
Staff r
Publisherr Temy L Laudereau, ARESC0, Inc.
tor !
Tom Swan
Edi
Subscriptions:
Sandy Nol-an
"VfP" and. "COSMAC" are registereQ trad.ernarks of RCA Corporation.
The VIPER is not associated with RCA in any way, and RCA is not
responsible for its contents. Readers should not correspond
with RCA regarding VIPER material. Please direct all inquiries
to ARESCO, P O Box t742, Columbia, l\[D, ?L044,
Contributj.ons: Readers are encouraged to submi-t rnaterial of
interest to VIP own€rs. However, it must be understood that
the function of the VIPER is to duplicate the rnaterials--and
to mail them out to other VIPER readers. We cannot pay (sigh)
for your efforts. In time, perhaps. . . . .
02.t 0 . 01
EDITORIAL
big old ciruela tree in front of our place is turning a young
green, the leaves just barely covering its scraggy winter bareness"
Black birds, I think they are mockingbirds, sail back and forth
carrying nest building supplies. By the time we begin Volume 3 of
the VIPERT ttrat tree will be a dark green dabbed and dotted with
yellow-red fruit. The baby birds will just be learning to f1y,
and to hide in the l-ush trees when the rains come " That will be a
time to look ahead to the future, and ten more issues paeked with
VIP information, games, programs and a Little nord of our usual
craziness. I'm looking forward to it. Hope you are too!
At about the sarne time, I expect Hayden Book Company to be bringing
out my COSMAC I8O2 programming manual. Rather than spill the beans
before they were in the pot, I decided to delay any word about the
project until I was sure it woul-d be publishedo Naturally, I
wanted all of you to be the first to know. Itrs a book for those
who want to learn machine language prograrnming but don't know where
to start; plus it's a complete manual on IBOZ progralnming concepts
and features. There's a small subroutine library and a mini 78Oz
assembl-er/disassembler with which, bV the way, f-wrote and tested
The
of the code in PIPS FOR VIPS IV. Enough proud father boasting
Irl-1 1et you know more as soon as they telL me.
Some expected additions for the next volume of VIPER include arrows,
brackets and greater than/less than symbols fon the typewr!-ter.
Scribbl-ing these in by hand is such a chore, I sent off for the
extra keys a few weeks ?.gor This may seem to be a tiivial point,
but if I forget to fill in a l-ess than slrmbol by hand, the resuLt
makes no sense. Pl-us, the type will look better " While I 'm on the
subject, we all owe thanks to my wife Anne for typing every word
in these pages" She's one of those behind-the-seenes people who
deserve some recognition once and a whil-e. Also, Sandy in ARESCO's
offices
ioe . my Mexlcan connecti-on! And itf s simply not
possible to thank Rick and Terry enough for their unending
dedication to this newsletter.
To authors, we look forward to seei-ng more of your great work. It I s
your not wer who reall-y deserve thanks from all of us" If you have
ifre time to tlrpe your manuscript, we'd appreffite the effori, but
there's nothing wrong with a "hand-u-script." Just try to write as
clearly and as neatly as you can so we donnt inadvertantly
most
introduce 3rr$ €rrors
0f course r this message isn't
you then.
o
goodbye
!
It t s "Hasta Julio. rr
Tom Swan
-'{0N1
-.u"-A
Taxco,
MEXIC0
02" 10.0
2
See
A
SAD NOTE FROM f}TE EDITOR
it is April L5, 1980 and I have just been made aware of
decision not to continue publishing the VIPER. Perhaps
Terry will explain to you what has happened, I do not knowr. but
the news is as much of a shock to me as I am sure it is to many
of you.
Also tod.ay I learned of the erratic publishing schedule for the last
two issues. My arrangement with ARESCO was to provide camera ready
copy by the 15th of each month, a deadli-ne I have been most careful
to meet without failo Because of the time lag between my work done
here in Mexico where we l-ive and ARESCOTs offices in Marytand, I
had no idea until- now that you weren't receiving your issues on time.
Even so, I wish to offer my apologies to al-l of you. Hopefully the
fatter issues you did receive made up for the missing publieations"
If we had continued, I think the VIPER would have entered its best
period. Al-ready we were receiving some fine articles and I feel the
content of the newsLetter was growin,g more professional all the ti-me.
Before I began to edit each issue, I was mostly concerned with my
own material, though along with the rest of you, I devoured each
issue as soon as j-t arrived. Afterwards, and from reading many of
your comments, I began to see how the VIPER coul-d better serve all
of youo One thing I do agree that was wrong was to publish material
needing the routines from PIPS to run" Seriouslyr w€ were not
trying to coerce anyone to buy the books. The articles came so we
published them" Still-r $ou ?re correctr r€d.derso Programs published
here should run without having to buy a book from someone else,
There's nothing wrong with writing books, and I plan to write some
more" But if we had gone on to next year, I would have followed a
policy that most of the material be for everyone. (By the way, 180
pages of PIPS IV was ready to be released when ARESCO made their
announcement to me. The subject is Graphics and Animations for the
VIP and most El-f owners will find routines that donrt require the
VIP operating system or hardware to run" If anyone is interested
I suppose Iom in search of a publisher!)
That brings up another, and final point. ShouLd anyone be interested
in continuing the VIPER, I am willing to help either as editor
or as a contributor" For that reason, I've decided to include my
address below and any interested people may write to me direetly.
To me, the VIP was just beginning to get off the ground" Some of
you have probably seen RCAts new advertising campaign and new $99
version of the VIP. My 1802 manual wil-l be coming from Hayden
Books soon and I really hate to think we will all l-ose touch.
However, if this is goodbye, let me thank you all for your letters,
your criticisms (tney were all offered and received to be constructive
in nature) and your compliments. I arn especially sorry that mueh
of the fine material sitting in the drawer will never be printed.
And thank you for the opportunity to at least get my feet wet as
your editor" It was good while it 1asted and was an experience I
will not soon forget.
Good luck to aLl of youo
Today
ARESC0Ts
Tom Swan
Apartado #38
Taxco, Groo,
MEXICO
o2,t 0.03
READER
T/o
VIPER Recently, I presented a few ideas for expanding
VIP TINY BASIC (VTB). Here are some moreo You al-ways lose two
lines on the CRT with "READY" and the prompt. This is sort 'to
of
a nuisance when writing and editingr hlving only five lines
start with" If your tast PRINT statement is short (example:
gft Z C), foll-ow it witfr ;" "i and READY will appear on the last
printed fine (if tfrere's room) instead of on the next line"
This doesnrt sound like much, but it cuts re-listing to get back
the 4th line up from the bottom by a'bout 50%.
My first program that ran more than 2K calculates the price of
Dear
gold (timely, huh?). I whittled it down to fit. Irm strictly a
non-math type, and I amazed myself by even being able to work out
the forrnul-a. This is my first prograrn so far that actually
compqtgs anything. 0f course double precision floating point
wouLd;be € lot better"
Now that my computer will compute and do all those other wonderful
things,,I could. use a printer. Apparently two or three VTPs have
printers conneeted. But they all seem to use 1802 machine code.
I have found a pseudo-LPRINT that works with VTB and a strobe,
too. It also make a nifty DEC-lmX converter if you have a HEX
display on the output port. I'm working out the detaifs of a
printer conversion, but I don't have a printer yet. They are al-J.
too expen$ive. I'm working on an idea that uses the old W.U.
Deskfax units (at surplus fleamarkets ror $15 or $eo) to build a
printer/plotter. Some mechanical changes wil-I be necessaryo A
UART could serial-ize VIPrs paraI1e1 output. The fax is a serial
input device using a chaged wir.e stylus to mark electro-sensitive
tr)aper. You move the paper and/or the stylus and zap the paper to
make a mark. Timing does the rest. I have 3 or 4 extra fax uni.ts
and about 27,OOO sheets of paper for them" Roll paper can be used
in other machines. Fax paper is not the same as thermal paperr
but that may work too. Alphanumerics and graphics in aqy forrnat
carr have much better resolution with this than VIP's tBA TV
interface'" Would anyone care to try this? My address is included
for those who do, - Don L" Hartley Rt" A Box 168D, Yel1vi1le, Ark.
7268?
Dear VIPER - My trek through your PfPS FOR VfPS packages continues,
r an one of those ELF owners who is keying in aLl- those pages of
codeo As a result, I am likely to run into any bugs in your
object code. Here are the latest.
In VIP-OKER (PIPS III ) on page 57 the CHIP - B instruetion at 05DE
should be changed from ABC0 to ABCO whieh will corceetly point to
the
"FOLDS
" character string.
02.10.04
Also in thi-s same program, I found and bypassed a questionable
piece of code on page 87, The code at 0C9C readsr 0144 F1F0"
Please explain what these two CHIP-8 inst.ructions doo I changed
them to 8100 1CA0 (V1=VO, G0T0 CAO) and the program works fine.
Also in PIPS I, there is a 2 page Editor machine language program
used to display CHIP-8 code. Coul-d you verify the object code
against a version you lmow works? Thanks ! - Chuck Reid
Dear Chuck - Thank you for the correctioh.s. As mahy times as I
have typed or written B's for 8's and vice versan I'm ready to go
back to octal or use the original hex digits U,V,W;X,Y, and Zl
The MLS you bypassed takeF[ffiace
of tfre BI\mm{ instruction in
the CHIP:-8 Interpreter. Itrs not needed fof bets less than $tr0.
The routine serves to combine V1 into Y/ al)-owing'successive
decimal keypresses to go into a single variable. H,erets the litt1e
MLS
you skipped,
01A4. n6 t+5 A6 45 A7 05 FE 56 EE FE F4
olBo F4 56 D4 --
E?
This is reLocatable (i"er u$es no branches) so it may go anywh€r€o
The FXFY following the cal-l- to the sub serves to identify X and Y
as the active CHIP-B variables.
Ae far as I krT ow the ob ject cod.e for the ed.itor is correct as
printed. It does nake use of VIP operating system routines, howeverg
which may not be availabl-e on your ELF. Are there any ELF owners
out there who know the answer? Thanks for writing" - Tom
Dear VIPER - A few months ago I purchased my VIP -with color and
Simple Sound. I now have TINY BASIC and the VP-611 keyboard. I
havi also gone back to the dealer for volumb 1 of the VIPER along
with ,the tipe and info "PIPS FOR VIPS," by Tom Swan.
I have just completed a modification to the Text Editor-Z1 prog{am
that aliows my keyboard to work with this prograrn, As requestgd
in the i.ntrodi"rction to "PIPS FOR VIPST" here are the modifications''
84 to 03 for ASCII
28 to 37 lrlait for
39 to 98 Get 8,1
And
with
FA
7F 85 9F character
29 2C keypress
3A
86 D4
MSB
off
2A 30
?F Mask
38
28
2C
2D
2E
2F
30
3I
32
34
FB
33
28
3c
BB RB.1
3D
3E
FB
3F
6n Input to
llo
04
AB Key
BB debounc
3A
3r
e
4t
4z
4l
44
1 97 Az
BB C6
FF Compare to
Bg 30
20 20
BA 28
33 Jump to 83
83 if more than C0 98 Get R B. 1
C1 FA All-ow onlY
20
FB Initial ize RC CZ 07 0B-0F codes
Ca F9
81 for hex
0B
B,C Keyboard scan CU
C5 BB Do function
FB
BB
Put in
RB'
02.10.05
35
"36
ol+
45
AB
37
t+6
95
AC
c6
D4 routine
C7
o2
to 00C0 C8
00
37
co
ca
3Lt,
3B
30 Loop baek for
DP Do routine
CA
28 next key
hlith these changes control "L" functions as key rrC, and the second
key is selected on the hex keyboard as before. With the control
key and keys "H through 0" the rest of the functions are
available. - R. Winterton
4Z
4B
B3
30 Jump
late in responding, I hope you can stil_f
use the inforrnation. I woul-d buy a light p€rrr and Itm interested
in the "stringy floppy"" Right nowmy ELF II is not a VIP, but
Dear VIPER - Al-though
it will be. I really l-ike the VIPER especially Tom Swanrs
artiel,es. - Kendall Stambaugh
EDITORTS NOTEr Thanks for writitg, KendaLlo To other readers who
have expressed an interest in the light p€rir look for appli-cations
notes in next yearrs'volume of VIPER. I've got mine working -soon as I get a program together, I plan to write it up" - Tom
soon
VIPER I discovered an interesting and baffling bug in my
register and breakpoint program (vfpnn, Oct " 7978) that might
also confuse its users. It hadn't shown up until now, since it
appears onJ-y under rather special circumst?.h.ces r
Essentially, the system will break in rare instances at unspecified
places in the! program. The circumstances are these
1. An IDL (oo) exists in the program at some location P.
2, A branch to l-ocation P+1 has just been executed.
(caused by the I86t TV interface) fras
3. An interrupt
just
occurred
before the instruction at location P+1
Dear
There is no way to prevent this kind of erroneous break from
happening, hence I have no fix to offer for the prograrn. The
system depends on hardware interrupts (generated by the TV interfaee)
as a means of capturing al-l the registers,' These interrupts occur
at regular (Uut long) intervals. When one occurs, the interrupt
routine inspects the l-ocation R(P)-l. If that is an IDl,, the
program concludes the interrupt was caused by a breakpoint (another
use of IDlr). Usually that assumption is coryect an IDL, waits
for an interrupt or DMA. A DIVIA is prevented from occuruing by
special instructions in the hardware breakpoint program' so an
interrupt only causes a breakpoint.
However, a branch to an instruction just following an IDL can aLso'.
look tike a break, since the instructi.on preceding it is 00. Such
a break will only occur if the interrupt happens to fall- just after
the branch, after R(P) has been changedr but before the next
instruction is fetched. There is no way to determine whether such
a break is valid or not after the fact.
The bright side of all this is that the breakpoint system won't
mi.ss a planted breakpoint, if the rules are followed. It just might
come up with a breakpoint that you didn't seto - Bill Barrett
-Y
Dear
VIi
Ovrnerse
I a,n negotiating wlth Temy to continue publication of VIIIS unlnterupted 1f at all possible. l{e both consider it of utmost inportance to
VI? users that our only means of infornation exchange be kept alive and
servlng our needs, The 'rblg'r computer hobb;r magazines rarely j.f ever
aclqowlege our existence. f intend to seep VIIFR almost exactly the sa,ne
for now. Teter some changes and./or improvenents will be consldered.
this is -your magazlne-newsletter and I will depend heavi.ly on your
support and suggestions to make thls effort suecessful. Will you help
rne make a smooth transition by renewing no"'v for one year at the usual
rate of $15 for 10 lssues? Ilease add $10-Tor airnail cut of USA 48.
Your cheeks and noney ord.ers will be kept 1n a special aceount until
I receive 500,renewals and./or nel.r subs.- I must have at least a5fi cf
present subscriber response by June first to make the deeision to print
a July issue(vol .3r#1)-ana 1OO'.fi w111 ensure a full year of publieatlon.
I want to get that issue to the printer on June 15 and in the noall by
June 25 so you w111 get the lssue early in July. If I do not get suffietent response all. checks will be returned" Please include a stasped,
addresseil envelope(sase) with your eheck. It costs about S80.00 to re'
tur:r 424 cheeks and a Base w111 insure lrnmediate return if response is
not sufflcient. I stncerely hope I can return all your sasers l.trrused
with the first issue.
looking to the near future, I expect to see more lnterest ln VIPs ;
now that I{CA has announced. a price of $99 for essenr,lally the s4me
gXrslen that most of us paid 1-275 for. (ouch!) The announcement of
VP-701 fuII BASIC rvith floating polnt ls very exclting and l-ends eredence to ny opinion that VfP ouners can do anything that the ilother
guystt are doi.ng and for a lot less money.
As your ne'"i publlsher, f have several hints, trleks, and. ideas to
offer. Exarnples include a really cheap printer & lnterface to Tiny
Baslcr some VTB progranmlng ideas, & a portable camy case/cabin,et
for your YIP that
also holds a bunch of accessorles and I/0
expansion. f will contribute these and other ldeas as tlme permits.
Initially I 'rill be counting on you for raore of the fine artlel-es and.
Letters that have made VIlIi. an lnd.lspensable part of VIP-ingl
All naterlal nust be eanera ready to be printedr 4s I have no text
edltlfrg to begtn with(soon f hope)." I rvlll i.se your sub. money onl.y for
gettlng out the first few monthts issues untll thls venture ean support
itself and pay for future refinements. A larger subserlber base vrill
enable and hasten improvements, and forestall'a rate increase.
I will enjoy working r.rith Terry and Riek during the startup phase.
Tttgy- 9i4 " fipe iob-ge-tting our newsletter started and I will be totally
lndebted to them and. their support.
I welcome your comments. Ad.dress eorrespondence to: Don Hartleyr \
i{artron, Rt. A Box 168D, Ye11v111e, Ar. 72687.
Dedr
VIPER I have found PIPS
FOR
VIPS volume Z
puzzling" f
interested in using the revised Editor program for an ASCII
keyboard. Does the PIPS FOR VIPS tape contain the edit program?
Also' I found it helpful as a precaution to break the tabs on the
back of cassettes" This prevents recording anything over the
am
- Marvin J" Bleiberg
Dear Marvin - The editor you mention is included on voLume 1 of
the PIPS seri-es. Howevers any text editor could be used to
prepare source code for Volurne II's CHIP-B Assembler. The code
must foJlow the format explained in the book. Thdnks for the tip
on the cassettes. This is very important especially when using
the assembler which requires a l-ot of tape handling, - Tom
programs.
ASCI I encoded keyboards
as low as $esf
The RCA VP-601 keyboard has a 58 key typewriter format for
alphanumeric entry. The VP-61 1 ($t 5 additional.) offers the same Vpewriter format plus an additional 16 key calculator type keypad.
Both keyboards feature modern flexible membrane key switches with
contact life rated at greater than 5 million operations, plus two key
rollover circuitry.
A finger positioning overlay combined with light positive activation key
pressure gives good operator "feel", and an on-board tone generator
gives aural key press feedback.
The unitized keyboard surface is spillproof and dustproof. This plus
the high noise immunity of CMOS circuitry makes the VP-601 and VP-61 1
pafticularly suited for use in hostile environments.
The keyboards operate from a single S-volt, DC power supply, and
the buffered output is TTL compatible For more information contact
RCA Customer Service, New Holland Avenue,
Lancaster, PA 17604.
Or call our toll-free number: 800-233-0094.
]rG'T
'Optionaluser pnce. Dealer and OEM prrces avartable.
02 " 10.
0B
1BO2 MEMORY DISPIAY
PROGRAM
by Gerald Strope
I wrote this program to display the contents of memoryp mainly
to verify newly entered prograns. This is very important in a
microprocessor without memory protect, because one wrong instruction
can cause many other memory positions to be altered, causing the
progran to enter self-destruct mode. The Cosmac VIP has the
capaUitity to display memory one byte at a time, dut this is rather
tedious when verifying up to 2K of memory. This prograrn was
developed on a 2K Cosmac VIP, but with a few modifications will
run on the ELF-Z.
Here are some of its strong poi.nts i a) f t is contained in one
page of memory (256 bytes) u) ft runs alone in machine language
independent of any other program such as CHIP-8" c) It can be
loaded in any page of memory that is available.
There are three display options available r
Option I - 2 byte address 2 bytes of data
Option 2 1 byte address J bytes of data
Option 3 - no address 4 Oytes of data
Option 1 is the most convenient for displaying CHIP-8 programs
because instructions are written in a two byte format. Option 2
al-lows the right half only of the address to display, and displays
J bytes of data to fit more memory positions on the scr€€n.
Option 3 allows maximum data to be displayed" I suggest you change
address AF to hex 'COr to display four lines instead of five. l^iith
this change exactly 15 Uytes of data are displayedr so every time
the display is advanced the first byte displayed will be 00-10-2O-3O
etc. This option is good for copying down a program after it is
debugged"
in figure 1 shows the control byte changes for the.
different options, To use the programr perform the following stepsr
lo Load the display program into the desired page. (ffre code is
set to run at 0500 as printed.)
2o Alter memory locations OOOO-OOO3 to CO XX OO (XX = page ad.dress
where the display program is locatedo Normally XX=06"
3" Use the display prograrn (C tcey wil-l- cause the memory location
to advance ) "
4" When finished alter OOOO-OOOI back to original d.ata.
Here are some additional notes on the use of this program. Watch
out when using it in page 06 of memory. CHIP-B uses the next to
last page as a work arear so if CHIP-8 is exeeuted the display
program will be alteredo Al-so the C key advances the dlsplay only
because that was the last character set in the keyboard latch by
The chart
0 2.L0. 0 9
\-
the -operating system. If you enter this program from another
ed.itor or some other means, the last key you used before entering
this progran will be the advanee key. I intentionally did not set
any specific character into the keyboard latch to save prograrn
space
r
that funny line is at the bottom of the
screeno I didn't have room for the i-nterrupt stack in one page
of memoryr so I used some of the display memory to hold it. It
is quite instructive to see the stack in operationo I didnrt
You may wond.er what
realize it worked quite that way until I saw it in operation.
I hope you find this progran as useful as I have" '
MODIFICATIONS FOR
ELF-z
USERS
The program uses the character patterns stored in the Cosmac VIP
ROM" Figure 2 is a listing of this pattern. fo run on the El,F-2,
store this pattern using the same l-ow order address. Set the high
order address to the desired page. (for example: store the display
program in page 0J and the pattern in page 06) One word of caution
herer page 07 is set up as refresh memoryo Do not try to load the
pattern in the sane page as refresh memory. Refer to figure 1 for
inforrnation to relocate .the refresh page" ALso you must change the
following address l-ocati oflg,o
Addres s
1D
B2
from to
81 XX ( XX=page bit pattern is in )
3E 3F (alfows input key to ad.vanee program)
C
ontro.l
Address 2 data byte
Location format _
9n'
B1
c2
Chart - Fisure #t
3 data byte l+ data byte
Byte_
format
format
B5
B5
B5
B5
7E
Dg
Dg
7E
7E
Address Location
AF=FO-Display 5 l ines
AF=C0-Display 4lines
is loaded in)
is l-oaded in)
will s tart displaying at )
T9
ZD=XX (Xx=page to be used as refresh memory )
0B=XX (Xx=page program
CI=XX (Xx=page program
OD=XX (XX=page program
B5
Character
O FO BOFO BO
T4 FO BO BO BO
1B Fo 507 o50
1C Fo 50 50 50
1
Bit Patterns - Fizure
20
F0 80F010
2C
FogoFolo
FoloFo90
24
28
FoBoFogo
#2
30 Fo9A9o9O
34 Fo101010
38 10602020
3C 207 oAoAo
4o Fo zozo
02. 10.10
Register Allocation
R0 - Refresh
R1 Interrupt
RZ - Stack
R3 - Main
R4 - Display subroutine call
R5 - Memory being displayed. location
R6 - Display tocation
R7 - Pointer to.bit pattern
R8 - Work register 8.O-counterr 8.l-character
R9 - Work register 9.O-counterr 9.1-character
RA - l,eft half-right half flip-flop
RB Counter-1st,2nd,3rd,4th decision block
RC Counter-divider bar positioning
Program List:lng
Address
00
o3
o7
Code
Comments
FBOOAA
RA.o,R5.o,R5.o
22
23
25
A5A5ABBB
FBO 6BT
B3B4
FBo 5n5
FBz 5Ar
FBFFA2
FB42A4
FBo7F.2F,6
FB BTBT
FBZAA3
D3
7 270
227 B
27
2252
OA
0c
OF
I2
T5
1B
1C
1F
2g
c4c4c4
2C
FBoTBO
2F
32
FBOOAO
3t+
E.220A0
E.220A0
F.220A0
3C3z
37
3A
3D
3F
t+L
Ll,z
4l
46
4B
4e
4o
5o
54
57
BOE2
3023
D3
A7
F8o 5A9
47 56
BCFB O2
3z5a
3o54oo
o 5r9 05 56
FBO BAB
281 6 BB
RB.0rRB.1=00
R1
o!rR3,1rR4.1=06
to be displayed
R5 o 1= 06=page
o 0= 25=
R2 o O=FF= stack
R4. 0= \z=flisp1ay
interrupt
R1
R2o1rR5o1=A?
RZ . 1=
subroutine
B1=display pattern pointer
R3.O=/A=main
P=R3
Restore D, R 2+1 , restore X ,BR 2+I
R2-1 save X,P in M at R2
R2-1 save D in M at Rz
No- op
.I=07
R0
0700=refresh
R0 .0=00
D=RO 0 ,X=2
location
'
R0-1rR0o0=D
lt
il
It
It
Go to refresh
Go to return
if
EF1=0
P=R3
RZ o O=D ( q
tart of display subroutine )
o5 ( character byte" eounter)
M(R5 ) =vt(R7 ) ( ch aractbr pattern-refresh )
Get RC .0 , ex 0R with 0Z
Go to 50 if D=0
Go to t4'
D=M(ne ) , or with M (R6 ) =05 (put bar between
addres s and d.ata )
R9.0=
RB.0=08 (refresh advance counter)
RB-1,R6+1 ,f=RB"o
02.10, IL
Address
Code
5A
3457
zgBg
5c
6o
5E
ltt+6
6l
B6FAOF
FBOF
55
6?
6B
5e
3A
6n
rc
F8C3A3
3oht
6n
FB 27A9
7o
73
75
7B
29z689
3470
Comments
Goto5TifDnot0
not o
f=n6.0, and with 0F (mask off left half )
Ex or i-mm with 0F ( eheck if display at right side)
Goto6nifDnoto
R5+1 (new l ine )
RJ.O=Cl (return l-ocation for main)
\
Go to 41 (return to main)
(counter
to back up R6 to next
R),O=21
R9-1rD-R9.0
Go to Lt'6 if D
character location)
R9-r,R6-l,D=RP,o
GotoT0ifDnot0
30Ur
7A
7C
7E
E26g
3onll
RJ.O=Cl (return l-ocation for main)
Go to 41 (return to main)
X=Z turn on TV (s;tart of main)
Go to B4 (erase routine)
FBOOAC
RC
B1
85BB
"
(put low order M address in
R8.1=R5.0
3087
Go
B3
B5
87
B9
FBCaA3
Lt,5BB
FAFO
r'6r'6n'6r'6
BD
B9
8E
1A 1C
9o
9z
e5
9B
gA
9C
gE
3ocB
gBFAOF
89aATC
3oc B
lBBB
FBO 1
327F.
AO
BBFB02
A3
A5
AB
BBFB03
AA
AD
FBOOAB
B6FBFO
3285
3285
BO
3AD9
B2
3E82
FBoZB6
B7
BA
BB
BE
FBFFA6
ell
n5
FBo 07 3
CB
853ABA
30D9
BA3A9z
30 9A
FBO5so
CB
FBEOAD
CE
9?EDF3
rD32D7
c1
ca
c6
D1
0=00
work register)
to
87
R8.1=M(R5) (put M(R5) in work register)
with F0 (mask off right half)
Shift right 4 times
Put in R9"1
RA+1,RC+1
Go to CB (compare subroutine)
Get R8r{, and with 0F (rnask out left half)
R9.faD,RA-1,RC+1
Go to CB
RB+1 , D=RB.0
fmm or 01
Go to 7E if D=0
D=RB.Orimm or OZ
Go to 85 if D=0
D=RB.Orinm or 03
Go to 85 if D=0
RB.0=00 (reset B.O to OO)
D=R5.0ri.mm or F0 (check for bottom of ,screen)
GotoD9ifDnot0
Go to 82 if EF3 not 1 (wait for key)
And
R6,r=oz
R6, o=FF
R6=x
I,oad 00, store and decrement
D=6"0rBo to BA if D not 0
to
Go to
Go
D9
D=AoOrBo
to 92 if
D
not
0
9A
R?=o6no
D=9.1 ,x=P,tu(nD) ex or D
RD+1 go to DZ is D=o (equal compare)
0 2,L0,L2
Address
Dll
Code
Comments
1D3o CE
RD+1 go to CE
D=M(no;,P=R4
RC.0=Az
RB.1=R5.1
D7
lloo4
D9
FBO zAC
DC
DE
EO
95BB
3087
00 30
oL3g
0222
o32A
E2
Elr
E6
EB
EA
o
EC
o6zu
oll,3E
EE
520
Go
to
(
compare again
)
87
ompare Tabl e
1st byte=compare
Znd byte=pointer address
C
( example-the
at address
of bit. pattern
pattern
bit
for O is located
30 )
07 3t+
0826
o928
FO
F2
Fll
OA2E
F6
FB
OBl
B
0c14
FA
0D1C
FC
0E 10
FE
0F12
this listing has the fol-lowing options set in it.
desire other options refer to figure #!,
1r
2 address bytes 2 data bytes format
To be loaded in page 06
2o
3. Program will start displaying at 0600
4, Displayheight= 5lines
NOTE:
If
you
I
5,
Refresh memory = page 07
NON- COMMERCIAT
AD CORIYER
Joseph F. Oberhauser has a srew (r can think of n6 other word)
of _VIP equipment for sale" VIP, cassette, printer, keyboard
and more" send inquiries to us and we'1] pass them on- to Joe.
This brings. up an important point as r suspect Joe woul-d not
*lld receivi-ng direct replies " But if you want us to print Jrour
address in the newsletter, you must specifically give Annscoand/or the VIPER perrnission-to do so. We have LeSn strict about
this policy out of respect for those who do not have the tine,
energy (or sometimes the money) to reply to all the mail that
can result from publishing thbir address" Only if you write
"you have my pdrrnissicjn to publish ny address'or words sirnilar
to those will we print your address in the newsletter"
Thanks
Tom
02.10,L3
LITTLE L00PS by Tom
STACK
IT
TO
Swan
NM
cHrP-B is stackless" Yes, there is a stack for cHrp-8 but it is
not accessible to your programs " The cHrP-B-Eack is used. by the
interpreter to store interurediate values needed. later and to keep
track of the paths, channels, twists and turns of your subroutine
structure" When all subroutines RETURN, the staclo provides a map
of the way back. You do not have to be aware of the stack or how
it operates. A11 is handl-ed invisibly by the genius of the CHIP-8
interpreter.
As you become more interested in programming eoncepts, the stack
is a DATA STRUCTURE you must learn inside out. Even if you have
some stack handling experience, especially if your stack use has
been limited to 1802 machine language, the foll-owing comments may
be of use to you. Unfortunately, the stack procedures of the tSOz
are unnecessarily confusirg, and do not inspire correct stack
handling" The comments from a reader in San Diego (who asked not
to be identified) are quite correct. There should be a Pre
decrement for the STX fesulting i-n a DSTX rather than STb; Good
point.
A stack is a very simple structure to understand" The term IIFO
for Last In First Out has been given to this common programming
device as a descrj-ption of the action of a staek" .Have you ever
played that children's game where everyone pil-es their hands on
top of everyone elsers? Thatos a stack, except that bringing new
hands from the bottom of the pile would be illegal in a computer
stack" If no one cheats, the only way to get to the fourth hand.
is to remove one-by-one, all the hands above it" The last hand on
the pile (in the stack) must be the first one to be removed"
The sample program, written in CHIP-8, is intended to demonstrate
stack input and output, When an iten is i-nserted into the stack,
progralnmers say the item is "PUSHed onto the stack. " Taking .an
item off the stack is jargonized into "P0Ping the stack." PUSH
and POP should become familiar terms to you. They are not
descriptions of the sounds made by a certain breakfast cereal.
The two subroutines PUSH and POP may be used in your own prograns
to implement a CHIP-8 stack. Happily, no jumps were needed by
either routine, so they may be relocated without rewriting any of
the instructionso
Before calling either subroutine, you need to initialize two
variables somewhere in your progran. VA must be initialized to /
and VB to the maximum number of items you will allow in the stack"
VB may be any value from / to FF but w-itf usually be set to 10 or
20 (hex) for a stack depth of 16 or 32 bytes. VB is set to 0C
(12 deejmat) in_the sampte program to avoia printing too many
numbers on one l-ine r
CALLING PUSH: Now that you have initialized the stackr ;rou may PUSH
dldlGffi
trre stack 6y first setting V/ equal to thai value then
.
a2.10 "L4
2XXX where the Xrs are replaeed with the address of the
o Imrnedi-atel-y on returning from the sub, check the val-ue
of VF. If Vf=Z;-=nen-V/ was successfully PUSHed onto the stack.
If VF=1 on return, then the stack was ful1 and Y/ was not PUSHed.
V/ is not ehanged " Note that this overfl-ow eond-ition 6Es not
prevent you from taking items off the stack to open up some room.
Some textbooks treat overflow as a fatal condition
that isr the
prograrn stops. Ihis does not have to be the case with these CHIP-8
subs" The stack pointer will always be correct.
executing
PUSH sub
the topmost item from the stack, simply
exeeute 2XXX with the Xrs set to the address of the POP sub. If
VF=/ on return, then Y/ was set to the val-ue of the top item of .the
stack" If VF=1, however, then the stack was already empty" Again,
your prograrn may continue without concern for this underflow
condition. It simply indicates an empty stack, not a damaged on€r
When an item is POPed from the stachr gou should consider that item
to be gone from the stack even thou55h the value may still be in
memory at I+vA+l. The sample progran takes advantage of this fact
to print out the stack it just saves the stack pointerr pops
the stack to underfl-ow while printing each digit, then restores VA.
CALIING POP: To remove
Normally, this is not good stack handling, howevern
In the sample program, O5OO is used as the base address for the
stack. This may be changed by setting the I pointer at O22B and
0238 to a different add.ress. The base address, in this case 0600,
will never be used to store values in the stack. In other words,
the stack always contains a wasted byte at the bottom" It is
important that- you do not modify the- subs to avoid this insignificant
wasteo In a prograln that uses several stacks, this byte may be used
to store the stack pointer for that stack" Thus any number of
stacks may eoexist in memory using only a single staek pointer
CHIP-8 variabl-e. Each stack woul-d contai-n its own stack pointei
always located at the base of the stack"
Because of the way "I" may be indexedrx the CHIP-8 stack will start
at BASE+I and grow to gASE+2r BASE+3.o r1*{! before overfl-ow occurso
Most processors run the stack the other w?y, subtracting one. from
the BASE address before PUSHing. (Except f,or the 180e wnicfr PUSHes,
then subtracts one. -- 0h dear! ) Don't forget which direction your
stack is headedl
Finally, VB may be freed for other uses by using a perrnanent
maxi-mum value for the stack depth. The instruction at 0222 could
be changed to: 4AXX where XX= the number of items allowed in the
stack. For a prograln with a single stack, this would be a useful
modification. For a mul-ti-stack prograrn, perhaps with memory
assigned dlmamically as needed, VB will be needed to control stack
sizes.
Like textbook Chess openings, these subroutines represent the way
to implement a software stack. You do not have to be aware of the.
stack pointer -- it wil-l take care of itself. Stacks have uses in
arithmetic expression processing, gaJnes, graphics and even
interpreter design" We'11 l-ook into these possibilities in future
issues. Until Ju1y, have fun!
*Anyone who tri-es to index "Me " is in big troubl-e, though .
02"10"L5
.
PRO.]ECTS:
1) The childrenrs hand game mentioned earlier forbids taking hand,s
from the bottom of the pile " If that rul-e is l-eft in, what data
structure is then represented by the pile of hands? Try to
that structure in CHIP-8"
2) Whatrs a simple way to use an entire memory page for the stack?
3) The sample progran contains a skeleton of a CH\P-8 character
set display, Unfortunatelyr 4S presented, the idea is rather clumsy.
Can you think of a better character set display using basically the
same idea, but avoiding confl-icts with the I pointer? (The answer
is contemplated as a possible article for a later issue and response
is welcome.) Coul-d a stack be used?
implement
STACK SAMPLE PF.OGRAM
-VARIABI,E
ASS IGNMENT-
V/ - General parameter passing
V1 General -- used in OIIECHR sub and Main Loop
VZ - Next character index for printing strings (words)
V3-V9 - Not us ed
VA F Staek pointer. v A= /= emp tv /v[ =vB = fu]- l
VB - Maximum depth (# items) allowed in stack
VC - X eoordinate for display
VD Y coordinate for display
.-- VE -- Hol-ds VA during output of stack
VF - Flag variable. General use
LANGUAGE: CHIP-8 as printed in the VIP programming manual. Load
into 0000-01FF
NOTES 0N IOADINGT Remember to load the MLS at O4OO" This is.
included herer but was documented in last monthrs column.
When you are finished loading, record five pages from
OOOO-O4I'F and flip to run.
USING: Press any key less than hex A to PUSH that value onto the
stack. Push any key greater than 9 to POP one value
from the stack" After each operation, the stack is
shown with the top of the stack to the l-eft. Note that
r,mderflow occurs on P0Ping an emptv stack, not on
removing the l-ast val-ue.
iMAIN
],OOP
,VA=/ Initialize stack pointer to zero
6goC ;VB=C Initialize maximum stack size
FoOA ;IGY
Get hexpad input tn Y/
6to9 ;V1=9 Test if V/ is greater than
O2OO BEGINT 6AOO
02
04 51:
06
OB
8105 ; V1-V0 -E
9 by subtracting from 9
02.10,L6
o20A
0c
OE
02I0
T2
!1,
$
s2:
1B
1A
1C 53:
1E
3F00 ; V1( v/
T2L6 52
2232 PoP
3F00 ; SK 0K
22AC PUNDR
IzIC 53
2220 PUSH
3F00 ; SK 0K
22gB P o\rER
22EA STACK
1204 51
-F If nega.tive result, then Vg > 9
-E Etse ng< =9/co TNSERT
F- POP an item off stack into Vg
- - If flag not s et , then skip
-- EIse print underflow message
-- Skip the next section always
n- PUSH Vg onto stack
F- If flag not set, then skip
F- EIse print overflow message
F- Show eonterrts of stack
\
-- Go do it again
;END MAIN LOOP
cHrP-B suBROurrNE E- PUSH Vg 0NT0 STACK
O22O
PUSH:
22
l r- Preset. flag to indicate possible overflow
this
9AB0 r sK / -- rf vA/vB then skip. No ffi
6Fo1
;
vF=
time
-F- Return u'i-th flag set=1. Stack is fulI
-- Add one to stack pointer preparing to
740 1 ;VA+1
Eins ert
A600 BASE -- Set I to the base address of the stack,
FA1E ; I+VA -E then add VA to find the top
EE Insert V/ value into stack at X (VA )
Fo 55 ;PUSH
EF
6r'oo ivF=/
Set fl ag=g marking suecessful PUSH
00EE iRET -F Return from subroutine
00EE
2Lt,
26
2B
2A
2C
2E
0230
;
RET
CHIP-B SUBROUTII\E -E POP STACK INTO V/
32 PoP:
34
36
3B
3A
3c
3E
0240
4z
5r'ot ;vF=l -4noo sK/o
Preset flag to indicate possible underflow
Skip as loig as VA/o " Sffinot
empty
;
00EE ;RET -- Return with flag set=1.
Stack is empty
A600 BASE
Set I to the base address of the stack,
FA1E ; I+VA
then add VA to find the top
Fo65 ;PoP -- Retrieve the value from the stack.
Put :rnto Y/
one from the stack poiirter
VA-1
Subtract
TAFF ;
5noo ivn=g
Set flag=/ markLng successful P0P
00EE ;RET -- Return from subroutine
SCROLL CONTROLLER
I+4
45
4B
4A
4c
llE
SCRLC :
s cRLl !
6r'og ;vF=B -- See last month f or scroll ing details .
o40o ; s cRoI -E This sub needs the SCROLL MLS @ 0400
TFFF ;VF=1
3F00 ; SK=g
T246 SCRL1
00EE
;RET
0
2. 10. L7
ONECHR SUBROUTINE
0
25a OIYECH 70FF ; V0-1 -rr
r
52
54
56
5B
5A
5c
5E
0260
0262
CHTAB
I
6B
5n
?4
Ad
just
VF
Fo ga Fo A0 go 00 rr
'
r'
90 90 90 90 F0 oo -r
,
_,_
go
90 Fo 6o oo
90
FO BO EO BO BO oo -'
rr
BO BO BO BO FO oo --
7A
BO
B6
BC
9z
,
(t
st charaeter at
ind ex=/)
810E ;SHL
Shift Vg left to multiply*Z, Save in V1
B0 1E ; SHL r- Shif t V1 l ef t to multipl ioa, Save ( *tt, )
in V0
Add V0+V1 for VOx$ total . Save in V0
f3 Ly 'tilBo, :: Set I to base address of eharacter tabl-e
F0 1E ; I+VO -,.r Add V0 to I to find right charac.ter
DCD5 ; SHOW -- Print the eharaeter widfr eode V6
7CO5 ;VC+s r- Advance X coordinate for next printing
00EE ;RET -- Return from subroutine
Fo 50 50 50 Fo O0 -E Index
lCnar
t 2:/
t ED
FO BO EO BO FO oo -,9O Do B0 9O 90 oorr
3;/ '' N
Fo go go go Fo oo r' 4/ ''r? o
5/
6;/ I',
R
9;/
t
?/
B/ rr'
U
v
F
PRINT ''OVER ''
0298
9A
gc
POVER
I
P0VE1
!
gE
0
2A0
A2
A4
A6
AB
AA
2?82
ILIIYE
--
6z00 ivz=/ -A2D2 OVER -F
F21E |I+YZ -F0 65 ; GET -llooo I sK/o rIzCO PFLO I2250 ONECH Er
7 Z0 1 iY 2+I --.
IzgC P0VE1 --
Reset VC,VD and scroll up
Set V2=/ for indexing stiing
Set I to first byte of string
Add index (v z) to I
Get a byte of the string
If not=f, (end of strirs), then skip
Else go print "FLO"
Do sub to print one charaeter
Add one to VZ index
Go
PRINT
AC
AE
0
loop until
''UNDER ''
. ILIIVE E-r (See not'es for
6z00 iv z=oo -A2DB UNDER -E
F21E ; I+V2 EFo65 ;GET EF
4ooo ;sK/o F12C0 PFLo -2250 oIYECH - E
720 1 iYZ+I -F
72BO PUND1 -I
PUNDR: 22EZ
PUND1 |
280
B2
B4
B6
BB
BA
BC
BE
done
P0VER sub)
PRINT ''FLO ''
ozco
CZ
C4
C6
PFLO:
PFL01
r
6z00 ;YZ=/ rF, (See notes for
AzDE FLO -F
F21E
F065
iI+VZ
POVER sub)
aF
;GET
a 2. 1 0 . t
B
o
7cB
4ooo
CA
OOEE
cc
2250
CE
7
0 2D0
20r
L2C2
; sK/o
;RETN -- PUNDER, POVER, and PFLO return here
ONECH -iY2+I --
PFtOl
EE
CHAR STRINGS
OZDZ
D8
DE
OVER z ol+o7 o2O5 OOoo -- Uses a
UNDER; O6O3 OLOT 0500
code
I'1,0
r,
o8o9
o4oo
INIT
special non-ASCII
for this program
only
.
L]NE
-- Do sub. Scrol-l- up one line
-- Set X coordinate=/ (feftl
6D38 ;VD=J8 -- Set Y coordinate=38 (bottom)
00EE iRETN -- Return from subroutine
O2E2 ILIIYEt 221t4 SCRIC
E&
6000 iVC=gl
n6
EB
SHOW STACK
EA STACK z 22Ez ILINE -- Reset VC,VD and scroll up
EC
BEAO
Save stack pointer in VE
rVE=VA
EE
POP
2232
-- P op an item from the staek
0 2F0
;SK 0K -- If flag not s et , then skip
3Fo0
F2
Else done. Go reset and exit "
tZsc STAC2
F-
-F
r sHohl
ONE NUMBER
F4
F6
F0
F'B
7c05
FA
1zEE
zg
I -- I addresses ROM bits for Vil value
Displ ay the LSD of Vfl
Add 5 toXcoordinate
;VC+5
STAC 1
Go l-oop until done
;SET
r SHOW
;RESET STACK
FC STAC?: BAEO
FE
OOEE
;
saved value in VE
stack shown on dlsplay
VA from
-- RestoreE-
TRETN -- Return
IVIACHII\E LANGUAGE SCROLL SUB
o4oo
gB
0
00
410
;VA=VE
BE BF FB OO AE FB OB AF 4n 5E 1E BF 3A og FB
5E 1E BE 3A oF D4 00 00 00 00 00 00 00 00 00
ANSWERS TO LAST MONTHIS
IITTLE
LOOPS
f) The best place to enter a timing loop, slowing the CHIP-B
prirne number prograrn to a respectabl-e rate is not in the SHOW
PnfUn (SHOPR)-suu" The purpose of this questi-6fr-was to inspire
you to dig into the l-isting. At address O254, and only therer w€
can be sure that V4 is prime. Entering a loop at that: point wil-ldelay showing each prime number by as much as you want. The
fol-l-owing will do the job:
0 2 ,LO , L 9
-- Jump to patch at OZZO
027
6p6o -- Set VF= constant timine value
72 L00P I TFFF -- Subtract one from V/ Ui adding hex FF
7t+
3F00 -- hlhen VF=00, skip the next instruction
76
1272 Go to loop, waiting a fixed amount of time
7B
t23A Go show the prime number
r purposely gid not use the regular timing loop that works
-NOTE; . .
by setting and testing the internal- CHIP-8 timerl There's more
\
than one way to skin a scorpian! (Wtratt)
2) _ simple" To chan_ge_the amount of scrorl, just change the
number of ti-mes the MLS is cal-Ied, This is easily acc6mplished by
setting a new lgop value into vF with the byte at locat:.lon o33?. [ry a value of $06 or an even-larger va]-ue iit<e
or highel-ana
watch the effect. less than 6 may pr:oduce some $fo
odd happeiings.
Also, unl-ess the top line is totalfy scroll-ed away, coiriusin! ults
of its lower parts may remain on display.
o264,
7270
EE
O
NEI/il PRODUCT ANNOUNCEMENT
T,INE INTERRUPTER
$t 39 '9 5/$t zLt " g 5
P OI/trER
El ectronic
Speeialists,
I South Main Street
Natick, Mass . 07? 60
Ine
o
17
(6n
) 655-1532
Electronic Specialists has introduced the Power Line Interrupter"
Shou1d AC l-ine voltage be disrupted or exceed user sel-ectabl-e
limits, the Power Line Interrupter disconnects the power" Front
panel controls provide und.er/oier voltage interrupt level
sel-ecti-on and powdr reset. Other features incl-ude integral
spike/surge suppression and response delay to prevent false
interrupts.
Intended for specialized MicroComputer applications, where
equipment is subject to periods of unattended operationr the
Power Line Interrupter is designed to provide safety and
proteetion.
to the AC line with a standard 3-prong plug, the Power
Line Interrupter can accommodate a 15 amp resistive load or a 10
Connected
amp 5-nductive l-oad.
Model pt-ts-O/U Over and Und.er-Voltage $I39,95
Model PI-15-U Under-Voltage only
$t24.95
For more informationl write to Frank Stifter at
02.
the above address.
10
,?0
SIX
SONGS FOR
VIP SUPERSOUND
by John C. Hanner
The AlLey Cat Song
Pin-B
#1 Enter (? pages) Pin-8 program list with test song.
(From RCA VIP Supersound. System VP550 instruction
manual-, appendix BrB-2 and B-J)'
Measure f ime
#z Check 0259, should. be FF (s1ow 4/4 tine)
#3 wtaice the following changes:
tzot sot4 olEo FE11 )1F0 t4or BoFE 1308
eot4 olBo FFoo
Break codes
027
A
O
0280
02F0
Measures
0300
o3to
o4o4 ogog 0F0F 0404 ogog oFoF ogog 0F0F
-
0105 0g0D Iott+ 1B1c IF23 272F 2832 363A
3n4t 4442 4A4D 4p 53 5? 58 5F6: 666A 6n? z
0000 and 0000's to O37F
-
o1o5 ogoD
o32o
B Measures
o3 Bo
0390
03A0
A Notes
0400
0410
a420
01130
0440
01150
o45o
047 o
B Notes
0500
o5to
o 520
o 530
o 540
0 550
a 560
0570
D Measures
a 500
510
0620
0
D Notes 0680
o690
-
-
rrr5 rgrD 2125 292D 3135 393D
4t44 4649 4e&n 4p5l 5559 5D6r 5569 5n?t
0000 and 0000 o s to 03FF
0070 5r'5o 6c6s 5can 6o5e 6c6n 6ncF 5oao
7 06r' 6D6C 6e6C AD6o 6e6C 6n6p Do6o Ao?o
6r'6n 6c6s 6can 6o5s 6c6n 5ncF 5oao ?o5r
6s6c AD6o 6s6c 6n6p Do6o 6o?o ?2F.2
6oZ o ? zBz 6oao 6oT o ? ?Bz 6oao Ao T z
6n6n 6stg 6o?o 6p6n 6c6e 6can 6o6n
5ncr' 5oRo ?o6p 6D6c 6s5c AD6o 6n5c
D060 4000 0000 and 0000's to 04FF
6n6c
5oao
7 06r'
6c6n
6n6p
a 007a 6o6s 5a64 6o5s 6o7o 6o6n 6o?z 6o5n
6o7z 6o6s 6o?z 6o5s 6o?z 6o6s 6o?o 6o6n
-E 6o7o
6o6s 6064 6o6B 6o7o 5o6n 6o?z 6o6n
6a?z 6o6s 6o? z 6o6e 6a? z 6aZ e 6oT o 5s 64
?rDz 6oA6 6n?t F265
- 6oa9 ?o?7 D26o A46n
6os4 ABBo ABZo 6o6s
AB6e
6oeo
6066
6ocs
- 6066
6066 5o5s 6066 6o5s
6a6n
6056
6o6s
to 05FF
5oFo
and
0000
0000's
-
-
B1B1 B1B1 B1B1 B1B1 BFBF BFBF BFBF BFBF
87 87 87 87 87 87 g3g3 B1B1 B1B1 81 81 87 BB
0000 and 0000 's to O67f
- 003D 1B1F 1F1F 3F3D 3D3E 3A7O 0000
3E3B 3F?F 0O0O and 0000 's to 06FF
003D
-end-
o2 "10,2L
Edelweiss
i-\---
Pin-B
'#1 Enter (7 pages) pin-8 prograln list with test songr
(From RCA VIP Supersound System VP 550 instruction
marrual, appendix B rB-2 and B-3)
Measure Timg
#z
0270
A Measures
0300
to
B Measures
00 cE
I
-
BT81 B1B1 8181 B1B1
B4Bll B4Bll Bll84 BllB4
o5ro
D Measures
0600
06 10
D
2C2E
F
0400
o 520
0 530
\-
1B2o 2325 2628 ?A2B
05OO
390
0l+10
B Notes
-
r
0420
o43o
0
Notes 0680
3/4 time )
enter the f ollowing
a 1301 Bo 74 o lEo FE 13 o4Bo 1401 COFF 0000
r o1o3 o4o6 o?og ocoD oElo rr73 t4t6 t g1A
, oIo2 o3oll o 506 o7o B 09oA
r rr74 r?rA 1D2o 2326 292A
- ooA5 69no AE 69 cZ A6 5666
-E D0AE 6gCZ A66g 6g6n 6ncE
6n6n 69A6 69cE AZ 6n Bo 6n
- 6gcZ A669 696n 6ncn AEFF
03 Bo
A Notes
0259 enter BF ( slow
#3
Break codes
03
at
-
cAcF
c
B
c6 c8cl
zp3t 3ztV
3Z3B
0B0c 0D0E 0F10
2B2C 2D2E 2F3Z
6z6g cBca A66g
cE5o oo2o 2969
cDcg A66g D0AE
0000 0000 0000
c6cE CACF CBC6 C6CE
c569 Z z6o 662 z 6o6n ? 260 66?z 6o6Z 68?4
646n 1466 6nz5 666n ?zcE ccc B cAc6 c66E
? z6o cEoo oooo oooo o0oo 0000 0000 0000
B1B1 81
B1B1 81
81 81 81 81 81
81 81 81 87 BA
0o3E 3E3B 3F3D 3A3F 3F3D 3D3B 303F 3F3F
-endWashi-ngton and Lee Swing
#1 nnter
Pin-B
Measure Time
Break
Q pages) Pin-8 program l-ist with test
(From RCA VIP Supersound System VP 550
manual, appendix B rB-2. and B-3)
c
odes
027 o
A Measures
at
enter FF ( sf ow t+/4 time )
#3 enter the following:
r I30I B0 I4 01E0 FF00 0000 0000 0000
#z
0300
F
o3 ro
o32O
-
-
sorrg,
instruction
0259
0000
5 o? og 0 c 1 0 L2I4 17 rB 1D1F 2226 2B2A
2832 3$6 3g3D 3Pt+r 44L}B 4A4C 4r5Z 5354
5500 0000 0000 0000 0000 0000 0000 0000
0 10
02"10,22
'l
Measures
03 Bo
0390
03Ao
Not
e
s
0400
0410
0420
o43o
o44o
a450
o1o5 ogoD Irr5 rgrD 2125 2724 2E32 3w?
- 3A3E 4246 &A4n 50 52 54 57 59 5B 5F6S 6Z 6n
6n7 Z o0oo oo0o 0000 0000 0000 0000 0000
0050 6s6n 6nso AFAD nn6n
BOAF ADAB 5N'5N ar'60 617o
5cas 6o6e 606p BzBr BzB3
6N6p BOAF ADAF 6D6C AB 60
Br77 72AD 6o6n 6C6N B2BO
6nng EDEF FODO 5oFr' oooo
-
Notes O 500 -
6Cen
60 6 56t+ 6l6t 6o68 5o6t 6o68 6o6t 6o68
5o6t 5564 5t6n 6o68 6o6n 5o6n 6o6p 6o68
606p 6869 6nas A968 6os4 6s6o
6860 ABAA A868 6o6n ? oBo 5r'6n
6D60 6860 6n60 6860 6n60 6860
0550 - ADA9 46A4 616o AoA5 A6A? t66B
o 560
6968 608 6l6t+ 6Z68 6664 6t6t
a57o
6t6o FFoo oooo 0000 0000 0000
a 520
a 530
o 540
Measures
o 600
Notes
6n6p
oo
051o
0
5o6s
7IB2 BOAF An5n
ZUZI 5r'6n 6s6n
5s 6n 5r'go AFBo
AFAD ?o6n ABZo
oooo oooo oboo
81
81 Br 81 81 81
81
6B6E 6p6o
?o6n 6n6o
Zo5r' ADAB
6o68 6B6D
6os6 6n5B
0000 0000
81 81 81 81 81 81 81 81 81
81 81 81 81 8181 B5Bg
B5B5 B5B5 B5B5 B5B5
610
oo3F 1E1E
O5BO
3B3D 3D3E
3470 3F3F 3F3F 3F3F
-endAnd the Band Played 0n
#1 Enter
Pin-B
Measure time
Break codes
o27A
0280
A Measures
0300
0310
o32o
B Measures
03 Bo
#z at 0259 enter BF (s]ow 3/4 tlne)
#3 enter the following:
r3or eot4'o1Eo FE13 o4no thot BoFE r3o8
eor4 0880 FFoo 0oo0 0000 0000 0000
-
0000
0104 oToB oEoF 1011 r4r7 1A1D 2o2r 2223
2629 2C2F 3235 3g3A 3D4o 4146 4g4a 4n4c
4r'oo oooo oooo oooo 0000 0000 0000 0000
1o4 oToA ODOE oFlo
2829 2B2D 3o3r 3233
o
1E 1F
song.
instruction
2o2r 2425 2627
536 3? 3A 3Do0 oo0o
01100 - 0068 6r'6n 5t6r' 6a 68 6szo 28A6 zBzB cADo
0410
D060 6066 6s6n 6a6B 6568 6t 6n 6a6B 6668
011,20 - c5cF cF50 686A 6e6s 5e6s 6a 6a 6g6g 6g58
o43o
BB2 B 6868 6868 6nzo 2FDo 7 060 6868 6Z 68
o44o
5sga 2866 686A AB 2D zFC B CACB 6e6a 6o6o
0390
A Notes
Q pages) pin-B program tist with test
(From RCA VIP Supersound System VP 55O
manual-, appendix B ,B-2 and B-3 )
3
02. 10,23
Notes
O 500 - 00 68 6060 616o 6o68 616o 615o 5oca WCA
o5ro - 5n'61 5o5r 6o6o 6A60 6o6p 6o6o AA6l c8ca
o 520 - c85o 616o CBCA CBCD clAD 5saa 646L 6060
o 530 - CLCT CaAll 5oca cF 68 6p6e 6860 6ooo 0000
6\-. D Measures
0600
0 610
Notes
- 81 81 81 81 81 81
- BllB4 B4Blr BllB4
oo3E
0580
3D3D
81 81 81 81 81 81 81 81
B4B4 B1B1 B1B1 B1B1 87 BA
81 81
3B3F 3F37 3F3F 7 03F 3F00 0000
-end
-
Hers Got the Whole World
#1 Enter
Pin-B
in His
Hands
Q pages) pin-8 program list with test
(From RCA VIP Supersound System VP 550
manual-, appendix B ,B-2 and B-3 )
time #z at
enter FF (srow 4/4 time)
#3 enter the following:
Break codes
ozTo - t3ot eot4 0180 ffitz 0180 t5oL BoFF 0000
Measure
A Measures
0300
F
o3ro B Measures
03 B0
0390
Notes
0259
0rc5 0B0E r2r1 rBzr 252A 2834 3B3E 4Z4B
5t 545A 5r,64 6Z 6n 6v7 t 7 200 0000 0000
4c
oIo2
060A
0E
12 75TA LE22 262A
5? 58 5F6l 6Z oo
- 3FtD 4Z4n 4p5l
- oo5o 7o?o 5oeo
2BBB zv?o 6rZn
0420 - zD?o ?06I. 6nsg
0/+30 - ? o3o 30 2D 5r5r'
obllo - 2DB9 3o7Z 7o3o
01150 - 2DB0 aDBg 307 2
0450 - 6r'zD zDzF Bo zD
0t+7 0 - ABE9 Ca6o oooo
6D6g 307 2 7 030
2D2F B0 6n 6930
2o3o 3o2D 7070
2BBB 2F7o 6pzn
3o2D 707o 6r'59
7030 30 2D 6r'6r'
B93o 7 27 o 30 30
500 - ooEo 6660
0src - 6t6o 6660
o 5zo
6660 6660
a 530 - 6t6o 6660
o54o - 6t66 6066
0550
6o5t 6066
o 560 - 6t6o 6t66
6660
6660
6660
6660
6066
6066
5066
0400
0l+10
Notes
F
I
O
I
I
Measures
0600
0610
.D Notes O6 Bo
I
-
81
81
81 81 81
81 81 81
6t6o
6t6o
6t6o
6t6o
6o6r
6o6t
6o5t
81
81
2832 363A
0000 0000
3o2D 616r'
7 27
0
3030
2DB9 307 2
2D2F 7070
A920 3030
2BBB 2F7o
zDBO BOAF
0000 0000 0000 0000 0006
6t6o 6860 6t6o 6860
6t6t 6860 6t6o 656t
6fta
6t6o
6o6t
6o6t
6t65
6860 5$a
6860 6t6o
6a6B 6o6t
6o5o 6t6o
6o0o 0000
5B5o
666r
6o68
6t6o
0000
81 81 81 81 81 81 81 81 81 81 81
81 BrB2 Bv?F 7F?F ?F?F ?FZF
007D 7E?? 7A00 0000 0000 0000 0000 0000
-end0
song"
instruction
2.10 ,24
Boogie
Woogie
n
#1 Enter Q pages) Pin-B program list with test song,
(From RCA VIP Supersound System VP 55O instruction
Pin-B
manua}, appendix
Break codes
027 0
A Measures
otog0109 !t9g olog 2t29 3t3I 3?oo'oooo
0300
B Measures
0109 0109
03 B0
B Notes
0400
0410
0420
o43o
rB-2 and B-3)
#z at 0259 enter FF ( sl-ow 4/4 t::ne)
fi enter the foll-owing:
1300 otrs 0BB0 Fl.tz 0180 t4ot BoFF 0000
Measure Time
A Notes
B
F
rrIg 0109 2129 3I3I
3500 0000
24 30 28 3428 3? Zn 3928 3A2D 3g2B 37 28
3Ll2g 352D 3g3o 3032 3233 3332 3z3o 3a2D
2D26 3z2B 3429 352A 3628 37 29 3528 3426
00
3264 2668 2426 aBEU 0000 0000 0oo0 0000
500 - 0o 24 2028 2028 202D 2028 202D 2028 2028
5to - 2029 2O2D 2o3o 2A32 2033 2032 2o3o 202D
0 520
2026 2o2B 2029 2A2A 2028 2029 2028 2026
o 530
2064 6068 6on4 0ooo oooo 0000 0000 0000
O
o
E
F
D Measures
D
Notes
81
81
81 81 81 81 81 87 87 BB00
0000
0600
81
06 B0
003E 1B1B 3D1B 1B7F 7700 0000 0000 0000
81
81
NOTEr Because we do not have a Supersound board here,
the above code has not been tested. It was retyped with eagle
eyes on the authorrs hand-written copy and we can only cross our
fingers and hope i!'s all- correct. If you detect any errors,
please l-et us lcnow so we may include them in a future issue.
EDITORTS
Thanks.
-
Tom
PROGRAMMING HINTS
The other day I happened to wave a Simple Sound board in front of
my monitor display. To my surprise, the display began to dance
and sway as though I were waving a baton to direct the motion! 0f
course the cause was the large magnet attached to the board's
built-in speaker" This was good for a few laughs but I do not
know if any harmful effects are possibl-e on the insides of the
video "boxo" Don't try this unless you lnrow the correct answer!
Then I began thinking. A magnet that powerful could affect
information recorded on cassettes" This is a serious danger! If
you have a Simpl-e Sound board, don't everr €V€l1 by accident, set
it down on a recorded cassetteo You coul-d. lose the whol-e tape.
A
HAR,DWARE BREAKPOINT SYSTEM
FOR THE COSMAC VIP
by Bill Barrett
Havenrt you wanted to try your hand at writing machine language
prograns on your VIP, but were frustrated at being unabl-e to figure
out why they didnrt work? One tiny mistake and the kit just sits
there with a blank screen. 0f courser $ou can go into the operating
system and poke through the memory locations that hold some of the
registers, then try to figure out what went wrongr but after some of
thatr $ou are probably ready to be pieked up by the men in white
jackets with a butterfly net.
Now therers a better way. For about $Zo in integrated circuits, and
a PC board that you can wire yourself (or order from me), you can
make a hardware breakpoint board, llhat will give you an immensely
powerful tool for finding out just rvhat is going on in the program
you wrote" You can even single-step through each of the machine
instructions, until you see where the troubl-e begins!
The board
You will need a hl+-pin board with enough room f or 9 !6-pin IC 's
and 4 lLl,-pin ICrso Here's a list of the necessary ICts:
,
(4)
5
(4) 7t+cI7
4o 6s
(r) 4oUg
( t ) lroBr
( t ) lro?3
(z) 4or3
silicon signal diode (or equivalent)
The 4o 6l is made by RCA, but seems to be carried by only a few
suppliers -F one such is Tri-Tek, 7808 N. 27th Avenue, Phoenix,
(t)
B5o
1N9r4
AZ,
2L,
A schematic of the board is given in figure t, The circuit runs
on the +5 suppty'of the VIP and draws very l-ittIe current. [he
whol-e system can run on a minimum-memory Cosmac, althouglt with
only B pages of memory, your prograrn can only fil-l- a l-ittl-e less
than 5 pages.
Herets how it works. The four registers Qf-O& carry a sixteen-bit
memory address. That address is loaded in two B-bit portions
through a pair of OUT 7 instructions. Once the address is loaded,
the four comparators a5-48 continuously compare that f6-nit number
with the values on the MA bus. Some additional- logic makes sure
that the only equality comparison that is effective is when an
instructj-on address exactly matches the register value. When that
match is detected, the INTERRUPT l-ine to the LSOZ microprocessor
is pulled to ground., causing an interrupt cycle.
At that point, a software prograrn (given Later) goes into effect"
This program is similar to the one I reported in the VIPER, Oct.
1978, but with some upgrades. This progran saves all the registers,
a,.10.
26
N
N
o
F
O
o
DO
O
F
I
F,
o
5
tr
ct
F
a
o
vo
a
r
o
crq
t
r'1
I
vA?
MAS
x4Ab
MA+
MAt
IJA }
l.1A
MAO
Ru
M7
a,/t 6
lr2tS
Bv: +
AEL
eust
8us
9.6o
oIL
F
D
v
r
5
Jnt
ay. Carna
willavon
re
VI ?@
r!e
R.
4ot3
Hardwa
oornpucar
a
qfic
errr p t
6
A
,i
es
q<*s
coi ? ot-A
nd/ oF
:ccr
r^r +Bl afi
t
0MEA
I
VIP@ ts A RtotJTEAED
IRg DE rnrRK oF RAD lo
*t
ADDRESJ.@
,rl ^tt'tt- 1," o
4
separately from a rel-iabl-e supplier"
cA
6
1?lt
CK
R.
d
D QrlA
,-, 4obl *t
naz
RUN
*
lv
A
+o+)
-lroc
'?8
It
+o+)
-a,6j
QIO F
19
'c,at
-,r
il
Adl rt s.s?r 4 -5 -b-7
4
\
(
tNtER.Tv?r
T?}
IPA
sct
sco
N2
,1o+)-Qlo6
7,.
1 Ag
N'
NO
You can order a kit containing a high-quality gold-plated circuit board, a cassette tape
with the debug software, and conptete instrultlons lrom: WILI,AVON' fiq\_Hyd9 4t"., San
Jose, CA gSl2g. The kit costs $zJ,-incluains postage and handling. Add 6 1/?% sales
tax if you ire a California resiaent. The instructions include complete assembly
instructions, a complete source listing of the software, and diagnostic instructions in
case of trouble" It does NOT inelude ffre IC's listed above I suggest ordering them
-
-displays then on the TV screen, perrnits you to set a breakpoint at
a different location, single-step for a while, view memory or change
memoryo You can also change almost any of the registers by changing
v
their
memory image.
The program operations are shown in figure 2, To use the.system,
you must have the debug software program loaded in pages N-2 and
N-1r where page N is the top page of your memory. For exarnple, for
an B-page (minimum) system, load the program at 0500 for 2 pages.
It needs a stack, controlled by register R(2), and that will- start
at the top of page N-3. Page N is used for the TV display, shared
with the VIP operating system. Fina11y, you need to write C00500
in location 0. That transfers control to an initial-ization section
of the debug software. It will- set up the stack and interrupt
register, set a breakpoint at location 0003, then return to 3" A
breakpoint there will irnmediately occur so that you can set a
breakpoint somewhere else, single-stepr or whatever. The registers
will_ be set as follows t x=2, p=3, Q,=0, IE=1, R1=055B (trre interrupt
entry location), R2=O4FF (the stack. top)rRJ=program counter, RB.HIGH
=memory top pagel i.€ " O7 for an 8-page system. The TV interface
circuii is-oFrl The other registeri ire i.rnaefined.
These cond.itions are somewhat different than those after the operating
system starts a program, but I find them more convenient for progran
development
\-
l
,
o
The system depends on IE=1, R1 holding O55B and R2 pointing to a
valid stack" The TV interface should also be OFF, since otherwise
it will cause interrupts. 0f course, your program should not
alter the instructions in the debug software pages " If any of this
goes wrong, the debug system will failo
The debug program does not alter itselfr so it could be embedded
in a ROM or in write-protected memory. That goes a long way toward
averti-ng special problems with cantankerous prograrns "
No changes to the debug progran are needed for different memory
sizes. However, it must be loaded at N-2 as explained above, and
the VIP operating system must be in place the debug display uses
some of the 0S featur€Sr
If you never invoke the first breakpoint through the initial COO5OO,
the debug board cannot interrupt the VIP, even though you happen
to hit an instruction whose address matches the board's address
register. The board is deactivated on RESET, and remains that way
until an OUT 7 is executed
You must be careful- to plant a breakpoint on the first byte of an
instruction, not its second or third byte. That's the only address
the debug board will pay attention to.
lnlhen a breakpoint is hit, the TV sereen wiLl- display these registersr
x,P,D Q,DF,Q,DF
RO
R1
R2
R3
R4
R5
R6
R7
02,L0.28
i
Touch key 1 and you
RB
RA
RC
RE
will see the rest of the registers
!
R9
RB
RD
RF
Key 1 wil-l- cycle back and forth between these displays " Now
suppose you have set a breakpoint on an instruction at location l"
hlhen the display appears, that instruction will have been executed,
and the progran-counter R(P) wil-l be pointing to the next one to
be executed. If you hit key B, the debug software wil-I automatically
set a breakpoi-nt at focation R(P) and resume one more instruction
will be executed and the display will immediately come back. If
you hit key F, the current breakpoint position is unchanged, and
the program will resume until the instruction at location L is again
executed. A new breakpoint location can be set using key C"
The contents of memory can be viewed by using key A and changed by
using key 0 -- refer to figure 2 for the method.
The contents of any of the registers except R1 and R2 can be changed
by finding their stored 1oeation in memory. Here's how: Note the
value of R(Z) displayed on the screen -- let it be N. Then count
backward starting with N-1 for the X-P byte, N-2 for the D byte,
etc., until you come to the register bytes you want. Then use key
0 with that address to change the register's value. When you return
to the screen display with key I, you will see the new values. R1
and R2 cannot be changed in this way -- you can change their stored
values, but i-t wonrt make any difference when you resume the progrs-m.
The debug program
HereIs the two-page debug program that makes it al] work:
0500 91 BB 90 ts3 81 FF
0508 81 A2 F8 0r A3 E2
0510 58 A1 22 F8 03 73
0518 s2 67 67 C0 00 03
01
D3
FB
E3
B2
F8
00
FB
82 AO 92
cf520 24 A1 7L 21 61
0528 B0 20 F8 Dl 50 20
0530 50 FE 72 D0 20 2A
0538 FB 83 32 49 F0 E2
0540 FC 10 50 30 32 FF
0548 42 E2 60 60 60 60
0550 72 B0 60 72 F6 7A
0558 78 72 70 22 78 22
0s60 F8 00 39 66 F8 0B
0s68 73 90 73 80 73 91
0570 58 73 8,2 FC 09 A0
0578 00 73 B0 73 82 FF
0580 92 7v 00 B0 F8 Dl
O58B FB 93 50 FE FE DO
0590 20 E0 F0 E2 33 9F
0598 50 FB A0 32 A3 30
05A0 EF 30 98 AB F8 00
F8 AF
EO FO
3B
11
4s
30
O5AB FC 01 83 D3 DC T}C DC 59
O5BO FB C3 AE D4 L2 L2 L2 L2
O5B8 D5 3A CA 22 L7 L7 L7 19
05c0 99 73 89 73 30 AC T2 L2
05c8 L2 L2 C0 06 2L 42 70 22
05D0 78 22 52 C4 C4 C4 98 BO
O5DB F8 OO AO BO E2 T,2 20 An
05E0 E2 20 A0 E2 2A A0 3C trB
0588 7A 88 32 Cr) 78 28 30 CD
32 s9
05F0 00 00 00 00 00 00 00
05F8 00 00 00 00 00 00 0c
E2
0
72 AO
7E
73
73
73 F8
92 7C
1A AO
50 20
73 2C
FC FO
8D FF
A3 91
600 F8 cF A1
0608 cc a,4 91 FC
0610 AC 91 FC 01
0618 P8 81 86 B5
0620 23 82 FC 24
0628 87 E2 F8 24
0630 38 36 FB L4
911
063.e n4 D6 FB 01
0640 L4 A9 38 2L
0648 93 FF 0F C2
00
00
FC 02 BB T8
01 BI+ F8 P:F
EC FT{ 95 A6
BA 69 E3 7A
A7 92 7C 00
A9 89 FF L4
30 37 89 AE
3A 46 89 FF
30 2D 02 32
05 lE FF FB
0650 32 93 FF
0658 34 39 82
0660 00 rJ7 07
0668 52 87 F7
0670 E7 67 27
467 I
lE E2 82
06BC DC 60
O6CO FE FX FE
O6CB 73 30 BE
O6DO AA F8 FF
O6D8 34 D5 5D
O6EO F6 F6 F6
06E8 0r' n5 2E
6FO 07 3A DF
O6F8
"
"" " " " "' :" " " " " "'
0 2".
FA
OF FE FC 04
97 7F 00 87
A7
27
A7
8E
67 n2 c0 05
92 87 DC DC
22 nc Dc rlc
02 AE D4 L2
82 A7 92 87
89 DC T}C DC
05 AC 7,2 0g
D4 n6 FP, 01
19 L7 L7 89
30 A6 n3 D6
AE D6 BE Fl
98 BD FB OO
EN 8A 73 BD
F8 C6 A5 FO
D5 F0 27
')'-rr
32 CB 8D
8D
FC 28 AD
FB
E2
DC
27 C2
03 AE
06A8 73 FB
c6B0 C2 05 C6
0688 s7 L7 99
O
32 79 FF Fr
24 A7 92 7C
67 22
0688 60 67 22
0690 D6 30 2L
0698 22 DC DC
06A0 Ag a7
02.
FC
L2
57
FE
D3
AD
8"7
F6
DF
1' 0' :"'2'
g'' " "'''
:
;'
; : ;
;: ; ::
::
30
^ _ The
VIP hobhy @mpuleri
_:
Start programming forbnly $99.
il,?Jl,:#ll,,"n $919. +;yi3u,rl,"flrl199.
Assembled* and tested.
Gompletely assembled
and tested.
Features:
o RCA 1802 Microprocessor.
o 1K Bytes static RAM
With easy-to-buy opttons, the versatile
RCA COSMAC VIP means even more
All the features of the VP-1 1 1 plus:
Expandable on-board to 4K.
Expandable to 32 K Bytes total.
512 Byte ROM operating system.
o CHIP-8 interpretive language or
machine language programmable.
o Hexidecimal keypad,
o Audio tone gonerator.
o Single S-volt operation.
o Video output to monitor or modulator.
o
o A total of 2K Bytes static RAM.
o Power supply.
o 8 Bit input port.
excitement. More challenges in
graphics, games and control functions.
For everyone, from youngster to serious
. 8 Bit output port.
. lO port connector.
o System expansion connector
. Built-in speaker.
hobbyist.
I
o Plastic cover.
Three comprehensive manuals:
VIP lnstruction Manual-z} video
Cassette interface-1 00 Bytes/sec.
game listings. schematics, much more.
'--- lnstruction Manual with 5 video game o VIP User's Guide-operating instruclistings, schematics, CHIP-8, much more! tions and CHIP-8 for the beginner
o RCA 1802 User's Manual (MPMldeal for low-cost control applications,
2018) - complete 1802 referenceguide.
Expandable to full VIP capability with
o
vP-1 14 Kit
*User need
only connect cables (included), a
S-volt power supply, and speaker.
III-T--II
Please send me the RCA COSMAC VIP items indrcated.
tr
VP-l11 New low cost Microcomputer
(See descrrption
above)
lgg
El VP-114 Expansion Kit lor VP-1 1 1-lncludes
3K RAM, l/O Port and connectors. . . $
tr VP-711 VIP-The original VIP Microcomputer
tr VP44
above)
VP-590
foreground
tr
colois
t
I
69
VP-595 VIP Simple
Sound Board-Provides
256 programmable frequencies. For
srmple mustc or sound effects.
VIP Super Sound Board-Turns your
VIP into a music synthesrzer! Two
rndependent sound channels Onboard lempo conlrol Outputs to
audro
system.
$ lg
tr VP-551
tl
'
4-Channel Super Sound-lncludes
VP-576 expander, demo cassetle
and manual Requires VP-550 and
4K RAM
VIP
Memory Expansron BoardVP-570
Plug-rn 4K RAM
,'P-580 VIP Auxrilary Keypad-Adds lwoplayer rnleraclrve capabilrty 16-key
keypad with cable. Connects to
sockets on VP-590 or VP-585.......
VP-585 VIP Keypad lnterface Board-lnterfaces two VP-580 Auxtliary
Keypads to
memory
$
gS
,\'v-'
tr
VIP
tr
VP-565
tr
VP-575 VIP
Board-lnterfaces lwo
VIP
t
eO
I ts
$ g4
Wrthsoftware.
$ 99
Expansron Board-Provrdes 4
buffered and one unbuffered
expansronsockets
.
$ 59
B VP-576 VIP Two-Board Expander-Allows
use of 2 Accessory Boarcls rn erther
I /O or Expansron
Socket
E
$
ZO
$
eS
VP-601 ASCII Keyboard--1 28-character
ASCII Encoded alphanumenc
keyboard
Built around an RCA COSMAC microprocessor, the VIP is easy to program
and operate Powerful CHIP-8 interpretive language gets you into
programming the first evening.
Complete documentation provided.
Send the coupoll now..
.
Complete the coupon below and mail to:
RCA VIP Customer Service, New.
Holland Avenue, Lancaster, PA 17ffi4.
Or call toll lree (800) 23&0094
to place your Master Charge or VISA
credit card order. ln Pennsylvania,
call (717 ) 397-7661 , extension 31 79
2716 EPROMs ro
VIP EPROM Proqrammer Board'Programs 2716 EPnOnts
$-
lncludes speaker .... ;.
El VP-550
nG,n
E VP-560 VIP EPROM
Ze
(See description
. $190
RAM On-Board Expansron Kit-Four
2114 RAM lC's Expands VP 711
g6
memory to 4K
VIP Color Board-Converts VIP to
color Four background and eight
bytes
tr
IITT--III
COSMAC VIP lets you add
computer power a board
at a time.
-rrrII--I
CM-61 1 ASCII I Numeric Keyboard-Same
as VP-601 plus 16 key numeric
keypad ......
.$gO
EM-620 Cable: Connects ASCII keyboards
to VIP
t eO
tr VP-700 VIP Trny BASIC ROM Board-BASIC
code stored rn 4K of ROM..
$ 39
El VP-710 VIP Gam,e Manual-Lrsting for 16
excrlrng games
I 10
n VP-720' VIP Gante Manual-ll-More
excitrng
games lAvarlable 2nd qtr '80) .
I 10
B ilPm- CDP1802 iJser Manual-(lncluded
2018 wrth VP-71 ) ..
t 5
Please send more informatron.......
El
1
for items checked plus shipping & handlrng charge of $300.
Enclosed is
Total enclosed $
Add your state and local taxes
I encloseCl check orEl money order or, charge mytr VISAi Bank Americard
tr Master Charge
$
Credit card account No.
Master Charge lnterbank No
Expiration
Signature (required for credtt card orders):
Name (please type or prtnt):
Street address:
State & Zip:
date:-
City:
Telephone:
(
)
Make checks payable to RCA Corp Prices and specif icatrons are subject to change
without notice
02. 10
.30
-5
9600 BAUD T/a hrrTH THE VrP
by
Bill Barrett
Yes, thatfs right. The 1802 can interface with a cRT at 96oo
baud with a couple of simple software subroutin€sr Thatrs about
9Oo characters per second,i
youtl,I ne,ed a'couple of ICrs
two line drivers,. and a line
reeq,iver. Ore line'driver connects to the Q output of the VIP,
Another should be connected to a pin of U24, the byte output latch,
The line recei.ver should go to pin X of the byte f7O Inteiface.
On the terminal sid.e, there are only four R5232 connections to
worry abouto These arel
Pin 1,2, BAr data outr goes to your line receiver. This wil1
carry characters from the terminal to the 1802.
Pin 48, ground. Nuff said.
Pin 4e, BB; data inr this goes to the line drj-ver connected
to Q. We will toggle Q to send a character to the terminal.
Pin 44, CBr clear to sendr this.goes to the other line
driver. This line should go high (+3 volts) to inform the
tenrinal that the 1802 wants to send characters.
The two data lines will norrnally be LOW (-3 volts) when no
j-nforrnation is being transmitted. O:e eigfrt-bit character is
transmitted (either way) by sending binary levels. Suppose the
character is
c? c6 c5 cU c3 c2 c!
c0
in binaryl where c7 is the most significant bit and c0 the Least.
levels sent aret
1r to indicate a rstart'
cOr i.€. NOT c0
if c0=1r we send 0 and vj.ce v€fsdr
c1
'c2
Then the
aaa
c7
0r the first rstopr
o; the second tst'op
A character like that can be sent at any time
the terminal
waits for the leading edge of a rstartt pulse' then begins timing
out the center positions of each of the remaining leveLso The tine
spent for each bit rnust be L/B seconds, where B is the baud rate.
For 9500 baud, thatrs 104.2 mi.croseconds on each levef . In the
LSOZ, each 2-cycle j-nstruction takes 9.088 microseconds, so 11.5
such instructibns (fo 2-cyc1e and 1 3-cycle instruction) can be
02. 10 ,3L
€xecuted for each level to get the timing right.
The software needed to wri-te one character i-s given below, and is
cal-Ied IIIRCHAR, It is written on the assumption that it will be
called by a SEP n, where n is arly register set to the address of
WRCHAR. Howeverr this can also be called by the standard
subroutine call and return technique (SCnf) Oy replacing the final
branch by RETN (Snf51. It expects D to contain the chaiacter to
be transmitted. (wote that the RCA SCRT does not preserve D. )
It uses F as a temporargr It assumes that when Q is SET, the
transmitted level to the terminal is
writes one ch aTaeter
to terminal )
(Works at 9600 baud )
WRCHARRET I
sEP R3; (Fix this if
another P was used for
(WnCHAR
the call- )
(Any program
resister can be us ed .
Character must be in D at
this point )
IIURCHAR:
PHI
RF;
SEQ; ( start
through
LDI
, goes out
A)
B;
PLO RF; (bit counter
NOP; NOP; NOP; (7,5
)
HIGH.
W1
t
REQ;
BR
WZi
W2t
NOP;
(for timi.g)
DEC RF i
GLO RF;
GLO RF; ( for timi^e)
BNZ W3;
; NOP ; NOP ; (last pulse )
REQ;
LDI 10;
Wbr
SMI 1;
BNZ W5 I (Final stop pulses )
BR WRCHARRET;
NOP
instruct ion times )
GHI RF;
SHR r (bit to DF)
PHI RF;
w3:
BDF W1 ;
SEQ;
BR
WZi
Reading a Character
character is read fron the terminal by calling subroutine
given below. This can be call-ed whenever input from the
terrni-nal- is expected by the VIP. It ''hangs I on the BN4 instruction
at L1 until the first HIGH is sensed on the data out line from the
terrninale then starts its timing.countdown, picking up bits and
packing them into a byte. At the end, it waits out two periods, then
returns with the received byte in the D register. This assumes that
a HIGH level from the terminal results in line E4 going HIGH.
Again' this subroutine can be ealled through SCRI or through a SE? n.
It uses register F as a temporaryo
One
READCHAR
0 2.
t 0 , 32
s
( Operates at
(nnaDcHAR read
from terminal
READCHARRET
SEP R3;
READCHAR
L1 !
I
one
charaeter
L2t
tDI 0;
BR L4.t
)
9600 baud
)
L4r
I
(PC=
SHR i
GHI RF;
SHRC;
PHI RF;
5)
BNIL t1 ; (Wait f or spac e )
LDI B;
PLO RF;
LDI 6i
L3t
SMI T,
BNZ L3; (Wait for middle of
DEC RF;
GLO RF;
BNZ L5i
L6t
B4 L6; (Wait for final- mark)
GHI F; (neturned in D and in
F.HTGH )
BR READCHARRET;
second pulse)
L5z
NOP
L7r
I (For timire)
\
:
B4 L2'
LDI Li
BR LUi
Parity
If you have to supply a parity bit as part of the information, I
suggest setting that up before calling WRCHAR. There isn't much
surplus time to compute parity on the ffy. Al-so DF is used in
the bit writing loopr so it canrt easily be used for parity
purposes. Parity is really only necessary if you have a noisy
channel between the VIP and the terrninal, A hard-wired logic
channel-
requires no such precautioosr
Terminal-VIP Handshaking
From here onr you will have to
to communi-cate with a computer
find out how your terminal- expeets
system. There are several- different
kinds of handshaking possibilities. Some of them make use of
additional R5232 connectiohsl such as the request-to-send (pin tl)
and the clear-to-send (pin 44)" My terrninal- (an 1IPz621) aceepts a
wide variety of handshaking methods, and is easily changed from one
to another. Y.ours may want just one. way of cornmunicatingo
The simplest form of I/O i.s probably line-oriented ENQ-ACK -- thatrs
the one I chose for my Z6Zt. My terminal has a built-in buffer of
t25 charaeter maximum. It can accept characters at full rate
continuously if only the CRE display is orlr Howeverr ilv attached
pri-nter is rather s1ow, so when using a printer, the VIP must stop
every so often and wait for the printer to catch up. Here's how
the system works
Before the VIP sends a batch of characters (l-ess than the I25
character buffer capacity) 1 it sends a ENQ character. When the
terrninaLrs buffer is empty, the terrninal sends an ACK charaeter"
The VIP of course is waiting for that character. When it comes
3
02. t0 ,33
gut-, the VIP starts sending charaeters to the terminal-. No more
!25 are sent -- usually just one line, then another ENQ is
-';han
'
sent,
etco
hlhil-e the VIP is sendi-ng charactens, it can be obl-ivious to anything
,\-r*- returned from the terrninal-r or it can notice whether a start putse
is on its receive l-ine. There's enough time to get into the ieceive
subroutine to look at the character if you want to do thato I donrt
bother
o
Eventuafly, the VIP tires of sending infonnation to the terminal,
and goes into a receive mode by calling RCHAR, Heqe the VIP just
waits until something appears on its EF4 line, then picks it up.
If it then goes into some long processing cycle, it won't notice
anything else sent to it until- itrs done" Thatrs usually OK. You
can probably arrange for the cursor on the terrninal- to blank out
in the meantime, to indicate that the VIP isn't listening for a
whil-e. 0n my terminal, the clear-to-send line serves that
purpose -- when HIGH, the terminal- is in a send state, with cursor
and keyboard active, and when LOW, j-t is in a receive state.
Dear VIPffiS-
This is the very l-ast issue of the VIPER from Aresco" As you
will note elsewhere, Don Hartley will be publishing the next
voLume.
Tr11 rea1ly rniss you. Through your phone cal-l-s and letters,
f ove come to know most of you reasonably welJ- and it hurts
i\-
to say good-bye.
I'11 send all your nanes to Don so he can let you know when
he's ready for your renewals" Please give hirn the same friendly
support you've g5-ven me - the VIPER can't continue at allwithout
you"
I'm probably going to be totally blind in less than a yearo I
have known onJ-y s j-nce my trip to California ( tfre trip that
delayed the last issue) " Although I was able to publish last
year, it seerns to me to be unethical to try for another year
when I may not be able to see at all by January.
Many of you have cal-l-ed and asked why I haven0t sent renewal
noticesi you've sent letters referrj-ng me to agenci-es and products which may prove to be of imnense value. Your affection
has helped a grelt deal - and I love you all for 1t. (Some
of you still didnrt know that lrm a wornan after two years of
VIPER! f really enjoyed your astonishment. )
So good -bye , fri ends . Give Don all the help you cane because
you have made VIPER what it is r people sharing with other
people.
\
\
i\
\
Regards,
i'
\-.
02. t0 , 34