table of contents · as stars and stripes, sailor's hornpipe, etc. cassette tape format ......

48
IPS 0 F ACT 0 (A publication of the Association of Computer Experimenters) TABLE OF CONTENTS 1. Editor's Remarks 2. Items for Sale 3. Tapeworm Anyone 4. Hi-Low Game 5. Erratta 6. Back Issue Policy 7. Is it a 'Keyboard? 8. Electronic Metronome 9. 1802 Op-Code Table 10. Letter's of Contact 11. Hangman Program 12. Tiny Basic on the VIP System 13. Letters to the Editor 14. 1802 State Indicator 15. Copy Memory Routine 16. Microcomputer Interfacing 17. 1802 Manual Debugger 18. An 1801 Dis-assembler 19. A Tiny Basic Square Root Routine 20. Renewal Membership and Membership Forms Issue #7 August, 1978 PAGE .............. 2 3 3 3 5 5 6 7 12 12 14 16 17 24 26 28 31 37 44 Editor: Bernie Murphy Invaluable Assistants: Wayne Bowdish, Tom Crawford, Diane York, and all contributors to this issue. Information furnished by IPSO FACTO is believed to be accurate and reliable. However, no responsibility is assumed by IPSO FACTO or the Association of Computer Experimenters for its use; nor for any infringements of patents or other rights of third parties which may result from its use. All Newsletter correspondence should be sent to: Bernie Murphy, 102 McCrany Street, Oakville, Ontario CANADA L6H IH6

Upload: others

Post on 13-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

IPS 0 F ACT 0

(A publication of the Association of ComputerExperimenters)

TABLE OF CONTENTS

1. Editor's Remarks2. Items for Sale3. Tapeworm Anyone4. Hi-Low Game5. Erratta6. Back Issue Policy7. Is it a 'Keyboard?8. Electronic Metronome9. 1802 Op-Code Table

10. Letter's of Contact11. Hangman Program12. Tiny Basic on the VIP System13. Letters to the Editor14. 1802 State Indicator15. Copy Memory Routine16. Microcomputer Interfacing17. 1802 Manual Debugger18. An 1801 Dis-assembler19. A Tiny Basic Square Root Routine20. Renewal Membership and Membership Forms

Issue #7August, 1978

PAGE..............23335567

1212141617242628313744~

Editor: Bernie MurphyInvaluable Assistants: Wayne Bowdish, Tom Crawford,

Diane York, and all contributorsto this issue.

Information furnished by IPSO FACTO is believed to beaccurate and reliable. However, no responsibility isassumed by IPSO FACTO or the Association of ComputerExperimenters for its use; nor for any infringementsof patents or other rights of third parties which mayresult from its use.

All Newsletter correspondence should be sent to:

Bernie Murphy,102 McCrany Street,Oakville, OntarioCANADA L6H IH6

Page 2: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

EDITOR'S REMARKS August 1979

I would like to thank the members of the Association ofComputer Experimenters for enthrusting me the dubious honourof Editor of IPSO FACTO. The new Executive intends to improvethe communication of ideas and facts to the membership.

- You may have noticed that issue #7 is a little thinner thanissue #6. The reason for this is quite simple--we require morearticles! Many people feel that they can not write or thattheir results or findings are too trivial to pUblish. The mostsimple programs and circuits can sometimes provide the "missinglink" in solving a problem. In other words, if you have doneanything interesting or even thought of an application, writeit up.

APPLICATIONS

Some of our members must have interfaced inexpensive S-lOOmemory cards to the 1902 by now--where are the schematics andarticles? A friend of mine suggested that the 1902 and the 1961Pixie chip might make a simple TV dot and crosshatch generator.

How about some "music" for the 1902? Many of us are notmusically inclined but would like the "notes" to play tunes suchas STARS AND STRIPES, SAILOR'S HORNPIPE, etc.

CASSETTE TAPE FORMAT

Some members of ACE in the Hamilton area are in the finalstages of implementing the software for the "IPSO FACTO"standard for KANSAS CITY, format tapes. Once we get the "bugsironed out", the software will be published in IPSO FACTO. Theadoption of the standard which was presented in issue #6 of IPSOFACTO should enable anyone with a cassette recorder and simplecassette interface to exchange programs with other 1902 owners.I feel that it is imperative that we adhere to this standard asnumber of 1902 programs in the public domain is small. Theproliferation of different tape formats will render many programsunusable. This situation has occurred for S-lOO users usingKANSAS CITY tapes. This defacto standard does not even mentionthe number of stop bits, parity or leader format.

Many gOgO and zgO users are unable to exchange programsbecause of the dozen or more tape formats in existance today.We can not afford this to happen to 1902 users!

AUTHOR'S ADDRESS POLICY

As mentioned in issue #6, we shall print the mailing addressof all authors of article and letters. If you do not want youraddress in print, please specifically state so in your corre­spondence.

(2)

Page 3: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

TAPEWORM ANYONE?

ITEMS FOR SALE

1. COS~~C ELF II with VIDEO GRAPHICS assembled & tested (problemexists in graphics & may require new chip). -RCA 1802 UsersManual -Binary Arithmetic Subroutines -Netronics Assembly Manual-Instruction Summary, etc -Copies of articles from PopularElectronics on ELF. Asking $150.00.Radio Shack ASCII Keyboard assembled & tested. All IC's socketed.Test module included. Asking #50.00.Contact: Bill Stockton, 11 Ruddington Drive, Apt. 730,Willowdale, Ontario, M2K 2J6, Phone: (416)221-2072.

2. A HEWLETT-PACKARD 9871A Printer with the following accessories:- 98021A Form-Feed Accessory. The form-feed accessory allows

you to use continuous fan-fold or pin-feed forms on the 9871A.- two packages of sealed (new) ribbons. - Six new character

disks (daisey-wheel type). - Interface connecting cable.- Printer operating manual. - Printer service manual.- Cloth dust protector. Price $2000.00. For informationContact: S~ephen T. Smyka, Box 687, Springfield, VA 22150.

Jeff FosterBellflower, CA

I have written an interesting little program. It's a tapewormthat fills all the memory space with NOP's except for 3 bytes nearthe beginning of the first page.

ASSEMBLY CODE COMMENTSGLO RO Get current pagePHI R7 Put in R7.1LDI FILL ACC=Start of areaPLO R7 Put in R7.0LDI $C4 Set ACC=C4 (NOP)

LOOP STN R7 Write into M(R(7))INC R7 R7=R7...1BR LOOP Keep going•••

LOCATION0001020405070809OB

INSTRUCTION90B7F80BA7F8c457173007

FILL • • •

HI-LOW GAME

Any desired pattern may be used as a tapeworm by changing M(06).(Ed Note: By setting M(06) to 00 you can zero all your RAM).)

Jim HowellSan Jose, CA

A HI-La game that I wrote is found in listing 1. It runs on myELF II, and uses the hex keyboard and "input" switch for input, aadthe two-digit hex display for output. The LED that indicates thestate of the 1802's Q output is also used by the program.

The computer picks a number from 0 to FF (hex) and the playertries to guess it. If the guess is low, the Q light is turned eff.If the guess is high, the Q light is turned on. If you guess thecomputer's number, the Q light blinks. To start another game, turnRUN off and back on.

The listing may look like the eutput of an assembler program, butactually I typed it using an editor program on a computer at work.Thus, the assembly language may not conform to RCA's specifications.

Page 4: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

PAGL:

SUBFWUTINE TO DEL..... Y F()r~ APPRO/' 1/;; SECOND

PICK r'E: NU:.H~EP THAT Tl'lE PLAY.:R \:1 L'. GUESSWIlLE /~AITING FOR THE FIKS~ :JUES":'; •

opcod e Of) erand

INITIALIZE REGIST~RS

~::s .LOtD ~-iI LL BE # TO CUESv«r. FOq INPUT KEY

SET UP R3 AS PC

comments

GET A ZERO FOR H I -BYTE

';F.A) KEYSoAfmAIm DISPLAY IT

EF~"()RE R2

CO TO START CF E?ST r Li E)OH PETURN fr?OM "DEL.... Y"

31',>1'E 'A.A' SO'li~ CM~ OUTPUT IT

Rr~:;"()PE VALUf. or: R2

CLEAR UPPER 8Y'rESOF I'JW?K L:J r.t::GS

SUB;WUTI j~E. Aj.U~?ESS

F<H? '!)cLAY' F?OUTINEliO!lK ARc,~ CSTA.CK) ADD:I::SS

si. X = 2

[)FLA.Y COUNTUSE R9 To COU~~T

Jj.'CRFt.\!':NT P9Uj\~:.·IL ill ;;YTI: IS 0Ncr:' 0 YF.TNo\·j 11'''5 0 - HETLJRN

T\,I~U OFF '0' FOP L()~"I GUESSWi, .: foR IfJPUT PRE:iS~::)

Y~J 1"." FOR INPUT r.EL~ASi:.:

R5PICK

R2

X" AA"R2

A. OC STAf~T)

r~3

f?Or? 3!?3

X" EC"r~9

119f?9DLYIOLY2

R2R4A. DC DELAY)f?4X"Ff'raa2

HAlT~'~A IT I

DISPLAY 'AA' Hi 2-DIGIT DI:~PLiI':

TO u.m CATE STA;rr OJ':: GAI"Il:

INCBN4

LUIPHIINCGillnIPIlU

GET NEXT GUESS FROM KEYBOARD

RE(~

BN434

LOISTP.OUT4DEC

LOIPLOGHIPHISEP

PHIPHILDIPLOLuIPLOSLX

INP4OU1'4DEC

1i nr ! loe coc'p lahe 1

1 0000 Ft: OF2 0002 AJ1 0003 904 OOOtf Bj1- OOOS DJ UL Y'2.,)

(, *'f *", ),

C) -ir

In 00:),':' H: n~ 1)"'./1 )'

I 1 O(K)'3 f3 ()I; O()() () I I; DJ. Y J

1 j OUCl .... 9S)! I~ uocn 3/,. () ()

1 r) 00(1) j() U')I·') *I ., 'k

I'l ..,',~

I \) OOOf lJ,~ STAPf'2.0 OGIO 13~

?I 001 I fD 06~? OO!J AI!L " 0014- Ft; FF~: ,~ OCJI6 A22 .) 001 ./ f .,. /

26 *'2. "' .' .

, , .,2H ~..;2 I) ~.

:~O OU I ~3 Fb A./\31 001.4,. ~)2

:"'2 00113 6t:.33 OOIC 223·1 :i"

3:) *.::.6 *37 *~'~3 OOID 15 PICK31) OOIE 3F ID40 :Ir .

41 *42 ;'r

43 0020 7A LO~'1

411- 0021 31: 21 riA IT115 0023 37 23 l'UdTl46 ..~4 '/ 0025 6C'In (J026 640

4t,.> 0027 22

LISTING 1

(4)

Page 5: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

CO,'.1Pflf?l: PLAYEI1'S GUESS ~nTH our IJUiM3Er-l

opcoc!c opprand

BLINK '0' FOR COHRECT GUESS

COHlIllp.nts

o ONCALL DELAY RDUTIHEo CFFDELAYCONTINUE

SAW: - DoNEou E~;.:; IS LO'··~

'0' ')1~ = GUESS HIG;1GO (;::T NEXT GUESS

1?4

R41':0

GLO 175Sf,lnz [::(Jnue-: LOhSEoJ13ft dAIT

SEOSl:.PHEOS[PHI?END

" j r)r' loc c orir: l~h"? 11

~) r) kI- t 'K-)..I -;rIi :> Of~? H W)~d OU2l) F7r- r:

OO~! :, 3:J. 3 1.) J

~...' :s ()(j~C " --I ?O.... 1 ....

f.J 7 ()C>;~ ~.~ 71)~) . n02F 3:,) 2 J:) ,) ~'r

60 *(, I ;'r:

() .:! 00 ~11 71'. EO63 OO]?- 1)'1() ./; l )() :~3 "1/,.(n 003/t [)/i

t· ...·, O() 3~;1 30 :J16-', I

ERRATTA

A. "Build a IK Video Ram", Issue # 6, pg. 27-34. Thesoftware driver routing was omitted -- it will beavailable in Issue # 8.

B. "A 'So f t.waze Standard for Kansas City Standard Tapes",Issue # 6, pg. 5. The checksum portion should read:

- checksum I byte 8 bits of checksum formed byadding all bytes excluding filetype and checksum byte then,taking the ones complem~of

the above sum.

The reason for taking the ones complement will be disussedin detail in Issue # 8.

BACK ISSUE REPRINT POLICY

The cost of reprints of back issues will be:

1 complete set of issues #1 to

Per copy price of single issue

6 •••••••••••••••••••

• • • • • • • • • • • • • • • • • • • • •

$12.00

$ 2.50

Page 6: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

IS IT A KEYBOARD? Russ NelsonLiverpool, N.Y.

Most people would say that my keyboard is not a keyboard at all.It consists of five switches arranged about 2cm apart. To enter ahex digit, the user simply holds down three of the keys, and hitsone of the two others. Crude, you ask? NO, because it is a loteasier to learn than a conventional 4x4 key pattern. This is be­cause the fingers never leave the keys, and because there is alogical pattern to the key depressions. I have found that I havelearned the binary equivalents for each of the hex digits fromusing the keyboard, not vice-versa. I am working on an ASCIIversion of the keyboard, but it is more difficult because the switchesare not mounted in a single plane.

GET OUR VALUE

FIND ANOTH~R BYTE ON THE STACKWAIT FOR HIM TO RELEASE SWITCHES

USE ONLY THE LOW FOUR BITS, SO BIT4 DOES NOT SHOW UP IN OUR NUMBER

GET VALUE OF SWITCHESIS EITHER HIGH BIT SET?NO-WAIT UNTIL ONE ISYES-WAIT FOR S\'/ITCH TO SETTLE

STACK. SWITCHES ARE PORT #2

$F

Hexer Software~ASSUME X=~AND POINTS TO TOP OF

DEC R2GETKc;y INP $2

ANI $18BZ GETKEYLDI $9PHI R5DEC R5GHI R5BNZ *-2DEC R2IMP $2ANI $18BNZ .-2INC R2LDXAANI

PORT ENHl.Em~Y BE TIED ToNrTO BE CONFlGUREDf\S PORT 2.

MRD

DB\

DBO

..------. D82.

~---. 083

...-.---... DB-+'--~ .....

+6'

FIVE R\ICROSW\TCMES .ON ~PPROX.1C".CEN~RS.

(6)

Page 7: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

ELECTRONIC METRONOME

Robert Edwards

Oak Ridge, Tenn.

In the current issue of IPSO FACTO there is a request forprograms that put the 1802 to work. The attached project was mydaughter's Christmas present (she plays oboe). It appears to bevery useful to a music student. Presently the elapsed time counteris suspended during the metronome or tone generation/pitch analysis.Perhaps one of those clever IPSO FACTO readers can devise a way tocontinue counting time during the functions.

The following 256 byte program for the 1802 micro processorprovides four separate functions to aid the music student. Theprogram is designed for a basic Elf with CMOS memory and batterybackup. The four functions are: 1) a one hour elapsed time counterwith alternate displays of minutes and seconds, 2) an audio/visualmetronome graduated in 10 beat/min intervals from 60 to 150 beats/min, 3) a two octave tone generator from A (220) to A flat below A(880), and 4) pitch analysis for the same two octave range.

The auxiliary circuit for the pitch analysis is shown in figure1. When the LED's are arranged on a circular pattern, the lightswill appear to turn in one direction when the audio tone picked upby the microphone is above the standard generated by the micro­processor, and turn the other way when the external tone is belowthe standard. The delay constants on the program assume a 1 MHZcrystal.

When the microprocessor is turned on, the monitor alternatesbetween a display of elapsed seconds (about 1/4 second duration)and elapsed minutes (about 3/4 second duration). Functions arerequested by setting the date switches and depressing the toggle.The switch settings for the various functions are: 1) X '80' forthe metronome, 2) X '02' for the low octave tone generation/pitchanalysis and 3) X '01' for the high octave. The toggle will causeitems in a menu to be displayed at one second intervals. A togglein the menu display starts the function with the parameter cur­rently displayed. The tone menu uses 'AA' for A natural, 'AB' forA sharp/B flat, 'BB' for B natural, etc. The metronome menu startsat '06' for 60 beats/min., and extends to '15' for 150 beats/min.To exit a function and return to the elapsed time counter, depressthe toggle. A function can be repeated by a toggle on the timedisplay with no switches set.

Page 8: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

<i:No

ClNo

408\

Figure 1

(a)

Page 9: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

B6-B9-78 PAGE

POINT R5 TO MINU1ES

X PO IHTS TO R5ZERO TO DZERO MINUTESZERO SECONDSSUBROUTINE ADDRESS TO R4

PUT DELAY FOR SECONDS DISPLAY IN DOUTPUT & INCREMENT SECONDSIF TOGGLE~ BRANCH TO THIS ADDRESSINCREMENT MINUTES IF D IS ZERODISPLAY AND DELAY MINUTES IF D IS NOT ZERODELAY FOR MINUTES PORTION OF SEC/MIH DISPLAYEITHER DISPLAY OR INCREMENT AND DISPLAY MINUTESIF TOGGLE~ BRANCH TO THIS ADDRESSPOINT R5 TO SECONDS

RE-START TIMER LOOPWAIT FOR NO TOGGLEGET CONTENTS OF LOCATION POINTED TO BY RBSTORE ADDRESS FOR TOGGLE BRANCH IN RBAND SET UP FOR NEXT DELAY

. PO I NT TO TEI"FINPUT SWITCHESIF NO SWITCHES-DO SAME AS BEFORESAVE SWITCHES IN R0HSET DF IF METRONOME

LDI MINUTESPLO 5SEX 5GHI BSTXDSTR 5LDI CHTRIPLO 4LDI 14SEP 4DC TJ1)NABZ TlINC 4LDI 46SEP 4DC TMONBLDI SECONDSPLO 5BR TIMER84 *LDA ~PLO BBR CNTReDC eDC eDC eINC 5INP48Z TN!PHI eSHL

18B2 CROSS ASSEMBLER VERSION 1MUSIC AID PROGRAM

WRITTEN BY R.G.EDWARDS~ ORNL~ OAK RIDGE~ TENN 3783BTHIS 18B2 PROGRAM PROVIDES A ONE HOUR ELAPSED TIME COUNTER~ A METRONOMEGRADUATED IN 1B 8EAT PER SECOND INTERVALS FROM 6B TO 15B BEATS PER SECOND~

AND TWO OCTAVES OF TONE GENERATION/PITCH ANALYSIS. SEVERAL AUXILIARYGATES~ 8UFFERS~ AND LED~S ARE REQUIRED FOR THE PITCH ANALYSIS. THE AUXILIARYCIRCUIT USES AN AMPLIFIED AUDIO SIGNAL AS THE ~D~ INPUT TO EACH OF FOUR~D~ TYPE FLIP FLOPS. THE CLOCK SIGNALS TO THE FLIP FLOPS ARE (Q)&(NB)~

(Q)&(Nl)~ (~)&(NB)~ (+Q)&(Nl). THE Q OUTPUT FROM EACH FLIP FLOP IS SENTTO A SU8MINIATURE LED BY ~Y OF A 4049 BUFFER. FUNCTIONS ARE REQUESTED BYSETTING THE CONSOLE SWITCHES THEN DEPRESSING THE TOGGLE. THE SWITCHSETTINGS ARE 1) X~8B~ FOR THE METRONOME FUNCTION~ 2) X~B2~ FOR THE LOWOCTAVE TONE GENERATION/PITCH ANALYSIS~ AND 3) X~Bl~ FOR THE HIGH OCTAVE. ONDEPRESSING THE TOGGLE~ ITEMS IN A MENU ARE DISPLAYED AT ONE SECOND INTERVALS.A TOGGLE DURING THE MENU DISPLAY WILL BEGIN THE REQUESTED FUNCTION WITH THECURRENTLY DISPLAYED PARAMETER. THE TONE MENU CONSISTS OF AA FOR A NATURAL.AS FOR Ao/8 FLAT~ BB FOR B NATURAL~ ETC. THE METRONO/'E /'ENU STARTS AT B6FOR 6B BEATS/MIN.~ AND EXTENDS TO 15 FOR 150 BEATS/MIN. A FUNCTION CAN BEREPEATED BY A TOGGLE DURING THE TIME COUNTING WITH NO SWITCHES SET.

Tl

TIMER

TM3

COUT

SECONDSMINUTESTEMP .THONATMONB

ORHL

********************START

LOCH IHST

BBeB F821BBaz ASeelB3 ESBelB4 9eleBBS 73Baa6 55aaa7 F83Dela09 A400aR F8BE0BelC D4000D 23BaBE 3211aB10 14Be 11 F82E0B13 114Ba14 2413015 F82BBa17 A501318 3BelAellHA 371AaalC 413aB1D Aa0BIE 3038aB2a aa0021 a13aa22 0Baa23 15Ba24 6CeB25 322D0B27 8El~02a FE

(9 )

Page 10: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

IF DF

SET DELAY 8ETl~EN METPOHOME CHOICES TO OHE SECONDGO DELAY-INCREMENT-OUTPUT SUBROUTINEGO HERE ON TOGGLEIHCREMEHT DELAY CONSTAHT ADDRESSESPULL 5 BACK TO POINT TO LOC 22 (HEX)ARE WE AT END OF t£TRONOME CONSTANTS? SS-Ae+F+6

GET VALUE OF METRONOME SETTIHGPUT IT IH TEMP (HEX 22)PUT THIS VP.LUE ON DISPLAYPULL R5 BACK TO TEMP (HEX 22)GO TO tETRONOI'ELOAD Rll UITH ADDRESS OF tETRONOtE DELAYS

START THE DISPLAY UITH A 'B6'

PUT NEXT LOW ORDER BIT OF CONSTANT IN DF

SEHD N2 AT 1/4 AND 3/4 POINTS OF AUDIO CYCLEGET QUOTIEHT BACKDELAY FOR ANOTHER 1/4 OF TOTAL AUDIO CYCLE

USE UP 2 CYCLES IF DF SETDIVIDE WHAT REMAINS BY 2 - PUT REMAINDER IN DFSAVE QUOTIENT IN R9USE UP 4 CYCLES IF REMAINDER

START LOW PART OF TONE CYCLEON TOGGLE-GO BACK TO MONITORGET TONE DELAY CONSTANTPUT LOW ORDER BIT IH DFTHIS PLUS SE~ FOR 5 CYCLES IF HO DFTHIS PLUS PREVIOUS LSNF FOR 6 CYCLESTHIS INSTRUCTION IS NEVER E~CUTED

SEND NI AT BEGINNING AND AT MID POINT OF AUDIO CYCLEDELAY LOOP FOR 1/4 OF TOTAL AUDiO CYCLE

GET ADDRESS OF CURRENT TOHE SYMBOL(AA.AB.ETC)X IS SET TO R5 IN MONITORPUT TONE SYMBOL ON DISPLAY

TGI

TG2

TS3

11S2

TG3

TG4

ORHL IBB2 CROSS ASSEMBLER VERSION I 06-09-7B PAGE 3BZ TSELECT RECYCLE tEHU IF AT G.BR TSI NEXT LABELGLO 5 GET ADDRESS OF SELECTED LABEL (+1)PLO IB ADDRESS OF SELECTED LABEL (+1) TO RI8DEC IB MAKE IT ADDRESS OF SELECTED LABEL

TS4 SEX 15TOHEGEN REQ

B4 TM2LDN 9SHRLSHFLSDFNOPSEX 15SHRBHF TG2SEX ISSHRPHI 9LSHFSEX 15SEX 15OUTlSMI BIBllZ TG3OUT2GHI 9SMI BIBHZ TG4BQ TOHEGEH GO START ANOTHER AUDIO CYCLE IF UP CYCLE JUST DONESEQ GO START UP PART (2ND HALF) OF AUDIO CYCLEBR TGI

TOHEALT GLO lEIPLO 5OUT4BR TS4

I'ETALT GH I 5STR 5OUT4DEC 5BR MI

I1SELECT LD I t1DPLO IILDI B5STR 5LDI 48SEP 4DC 11S4IHC IIDEC 5SMI WSS'

LOCH INST8E16D 325B886F 3866Bil71 858872 AA8873 2A8E174 EF8B75 7A8B76 37338B7B 098B79 F68B7A C70B7B CFB07C C48E17D EF8B7E F6B87F 3BB28881 EF88B2 F68B83 B90ElB4 C78885 EF8886 EF8087 618888 FF018BBA 3A988a8C 62B08D 9988BE FFOIB09B 3ABE8892 31758B94 7BoB95 3B7BElEI97 SAeEl99 AS8899 64B09A 3B74

·0e9C SSBB9D 55Ba9E 64BB9F 25BBAB 3<1B78BA2 FBF4BOA4 AB8E1A5 FBEl5BElA7 55BBAB F83BBBAA D4BaAB B4eesc IBB8AD 25BaAE FFSS

2PAGE

DO LAST tETRONOtEDO LAST TONECOMMON RETURN TO MONITORWAIT FOR NO TOGGLESET X BACK TO «5DO TIMER LOOPSET NEXT DELAY TO I SECOHDDELAY COtlSTANT TO R2HD 13 X'AB' + VALUE ON RETURHRETURN TO CALLING PROGRAMIllC!<EMENT/DISPLAY/DELAY SUBROUTIHEALTERNATE EliTRY - DISPLAY/DELAY SUBROUTlIEDO DECIMAL INCREMENT FIRSTGET CURREHT VALUEUSE RI2 AS TEMPORARYINCREI"ENT CURREtiT VALUE IH RI2LADD 7 TO CURRENT VALUE (IH D)REPLACE CURRENT VALUE WITH VALUE+7WAS NEW VALUE-6E1?SAVF. NEW VALUE + X'AEI' IH RIElHD IS ZERO IF HEW VALUE WAS 6E1NEW VALUE ~~S < 6B, WAS IT B(MOD 18)SKIP IF 0(MOD 18)IF NOT GET NEW VALUE FROM TEMP (RI2L)

OUTPUT VALUEBRANCH TO COUT OH TOGGLENO TOGGLECOUNT DOWtl 16 81T REGISTER R2IS R2H ZEROSKIP OVER TOGGLE RETURHSET UP FOR ~EXT DELAYTONE SELECT ROUTINEGET SWITCHESSET DF IF SOPRAtlO OCTAVEGET BASS OCTAVE COIlSTANTS IF SUI

GET SOPRANO OCTAVE COHSTAHTS IF SUBADDRESS OF DELAY CONSTANTS TO R9ADDRESS OF TOilE LABELSADDRESS OF TONE LABELS TO R5SETUP R4 FOR DELAY/DISPLAY ONLY ENTRYGO TO A:'"T ENTRY DISPLAY,'DELAY SUBROUTIHEBRA;iCH TO TH IS ADDRESS IF TCGGLEIHc~a1ENT Di::UlY CONSTANTS ADDRESSARE WE AT LAST TONE OF OCTAVE (G.)

GHI EISHRLDI TBLSNFLDI TSPLO 9LDI TLp:...a 5INC 4SEP 41;C TS3ItiC 9GLO 5SMI TS

B4 *SEX 5BR Tl13LDI 48PHI 2GHI IBSEP EILSKPBF! DELAYPHI 2LDN 5PLO 12INC 12ADI a7

.STR 5ADi X'AB'PHI IBBZ DIAM I X' BF'LSZGLO 12STR 5OUT4B4 COUTGHI 2DEC 2BNZ CNTR5INC B8R CNTREI

*T112

CNTRI

CN~B

1MI

*TSELECT

TSI

DIDELAYCNTR5

ORHL 1882 CROSS ASSEMBLER VER~ION I 88-B3-788DF I1SELECT GO TO i'£TRONOtE tENU8R TSELECT GO TO lOtlE tENUGH I B GET FREVIOUS SWITCHESSHL8DF I"ETALT8HZ TONEALT

LOCN I"ISTB829 33A2B82B 3858BB21> 9BElB2E FEa82F 339Ci!I831 3A97

BB33 37333B35 E5BA3a 3815B838 F:?38ee3.:! B2ElB3B 3AeB3C DElElEI3D C8B93E 3e5113B48 8213841 B53842 fieBB43 ICiilB44 FCB78846 55B~47 FCABBEl49 BABB4A 3258B84C FA8FB84E CE884 8C8858 558B51 64BB52 371AB954 92BaS5 22OBS6 3AS2eBse laBB59 3B39

BB5B 9B!!1I3SC F6O<3SD F3EB1lI85F C7ge6E1 FBDCeEl62 A9DI163 F3Dl1ee6S ASBB..6 14Ell!'e;7 D4813£8 ;"1i!D69 19eu6A es8ElSa FFDC

-.....0>

Page 11: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

LOCtl I:IST ORNl 18B2 CRC::-;S ASSCMBlER vFRS ION I CG-09-78 PAGE 4€lOaD 3AA8 BIll I1S280P2 30A2 8P. HSElECT SHIRT TABLE A~A!N [F W!: ARE AT EHD OF TABLE8(',[;4 25 1'154 DEC 5 PULL R5 8,; CK TO PO ltlT TO iEMP (22 HEX)0;]85 reo LDX G~T CURR!::~lT 8YTE ON DISPLAY0086 135 PHI 5 n~ :D PUT IT HI HIGH PART O~ R5€l087 rS03 HI LD[ €l3 COtjSH1:~ r GeOD FOR A 2ElEl N'.5 BEEPe,~[)3 82 Pr1[ 2 8:=!::? COt-J.5TANT TO R2HOUCH ,8 M2 SED STArn H[G~: PART OF AUD[O CYCLEeoes 22 M3 DEC 2 START 8FEP CYCL EEt~CC 82 GLO 2C,)8LJ F(~03 ~l~l [ 133 [F LOW prHH OF R2 [S NOT ZERO CYCLE BACK TO M3OG8F ,ABS Ctl2 r-13£l0C! 398A SliD t12 RESTART HIGH PAP.T OF AUDIO TONE AT END OF lOW PARTa·:C3 7A PE') START LOW PART OF AUD[O TONEC', ., S2 GHI 2 CH!::Ci<: FOR END OF 8EEPt1'.J:_ 5 ::~laB cuz 1130'1[7 CO LDN 11 GET METRmmME DELAY CONSTAHTfJ:.::' 8 D2 PHI 2 Me TRLl~IOMt: TO R2H}t:',~9 1,1 Hie 4 GO TO D[SPLAY/DELAY ALTERNATE ENTRYC~CH [,4 SEP 4i? 'J[ [1 " ::I DC TN2 GO 8ACK TO MON ITOR IF TOGGLEr'nr: ,= 25 VEC 5 POINT R5 8ACK TO TEMP (22 HEX)c ~(D "'C87 Gp. 111O'~~,O GRG X'Del't'~~!J "jH TL DC X'(1A'(F1D 1 n8 DC x:A8'O;J~12 [;8 DC X'8S'nOD: CC DC X'CC'C·jLl~ OJ [lC X'CD'r.l['5 DD DC X'DD'ccr.s DE DC X'DE'8 ~_~ I·? EE DC X'EE'0(:,18 FF nc X'FF'0:][19 FEl DC X'FEl'~l":i H llL) DC X'L13'BO['3 0A [IC X'0A'ourc SE TS DC 11138;J[,D 66 DC 1132OOl'E 5E DC 94OIJDF 'ji' DC 87O~]EO 51 DC 81I)OE1 4A DC 74l:.'lJE2 44 DC G8onu 3F DC 638CE4 39 DC 578·JE:5 34 DC 5208F6 2F DC 47eElE7 2B DC 430r3E8 FC TB DC 25200E9 EC DC 236Bi:JEA DD DC 221€laEE: CF [IC 2B708EC CI DC 19300F.D 85 DC 1810fJEE Fi9 DC 169WJEF SE DC 158€lQFO 93 DC 14788FI 89 DC 13708F2 7F DC 127O:Jr3 76 DC 1188:JF4 37 MD DC 55OOF5 2F DC 47€lOF6 29 DC 41E.13F7 25 DC 37eOF8 21 ~C 330DF9 It: DC 30t:0FA IC DC 2803FB IA DC 260:JFC 18 DC 24m::FD 16 DC 22 \ 11)

END

Page 12: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

1802 OF-CODE TABLE Bernie MurphyOakville, Onto

An 1802 op-code table is found in figureexample, to look up a F2 instruction, go downrow and across to the 02 column. We see thatAND instruction.

1. Forto the FXF2 is an

The table can also be used in reverse.to know what the INC R2 instruction is -- wethe table that the INC instruction is of theWe can conclude that INC R2 is 12 hex.

Say we wantfind fromform IX.

Once you start using this type of table, you willwonder how you ever got along without one.

Reference

User Manual for 1802 COSMAC Microprocessor, MPM-20lA,RCA Corporation.

LETTER'S OF CONTACT

Dear Mr. Crawford,

At a computer show in Anaherm, California, a monthago, I saw Ed McCormick's (author of Pop ElectronicsFeb. '78 article) Elf. Since then I have ordered on ElfII kit (with "Giant" board, kluge board) from Netronics.Anticipating a future need of Elf software exchange ser­vices, I am writing to follow up a lead that Ed McCormickprovided ...

Finally, if you know any Elf users in my area (60miles east of Los Angeles) would you help me contact them?Thank you for your help.

Sincerely,

Ken Mantei

1254 E. 26th StreetSan Bernardino, Calif. 92404

(12)

Page 13: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

00 01 02 03 04 05 06 07 u8 09 OA 013 OC OD OE OF

IDL LDN LDN LDN LDN LDN LD1~ LDN LDN LDN LDN LDN LDN LD"l LDN LDN OXINC INC INC INC INC INC INC INC INC INC INC INC INC INC INC INC 1XDEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC: 2XSR SQ SZ 8GE B1 B2 B3 84 N9R BNQ 3!-IZ I3L BN1 8N2 RN3 gN4 3XLOI\ LOA LDA LD.B. LDn. LD~ LDA LD~ LD~ LD~ LDB. DLA LDA LDA LDA LDA 4XSTR STR STR STR STR STR STR STR STR STR STR STR STR STR STR STR 5XIR X OUT 1 QUT2 OUT3 aUT4 OUT5 OUT6 OUT7 ??? INP1 INP2 INP3 INP4 IMP5 INP6 INP? 6XRET DTS LDX~ STXD .n.DC SDB SHRC S~B SAV ""'U~K REO SEQ 1\ DC I C:;DBI SHLC S"18I 7XGLf) GLO GLO GLO GLO GLIJ GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO 8XGH I GIE Gin G~ I GYI GHI GYI GY I Gil I GH I GYI GYI GHI GHI GHI G!1 I 9X- PLQ PLO PLIJ PLO PLQ PLO PLO PLO PL0 PLO PLO PLIJ PLO PLO PLO PLO AXt-'

\oJ PHI PI{ I PH I PYI PH I PH I P!1 I PH I PH I PH I PH I PH I PH I PH I PHI PH I BX- LBR LBQ LSZ LBDF LSDFNOP LSNQ LSN2 LSNF NL13R L9NQ LBNZ LBNF LSIE LSQ LSZ CXSEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP DXSEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX EXLDX OR AND XOR ADD SD SHR SM LDl ORI ANI XR I ADI SDl SHL SMl FX

Figure 1

Page 14: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

HANGMAN PROGRAM James W. StephensNashville, TN

A Hangman game program is found on the following page. Thisprogram was written to run on a one page memory. It is not initial­ized for larger, more expensive, systems ••• any attempt at modifica­tion cannot be the responsibility of this author.

INSTRUCTIONS FOR HANG~AN G~m

• Assign a hex digit to each letter of the alphabet, such as A-Ol,B-02, etc.

• Write out a list of these for future reference.• Think of an eight letter word and write down the corresponding hex

digits but don't let the computer see what you are doing because itwill think you are writing another program for it and will self­destruct ••• they hate new assignments! Then, sneak up on your key­board and quickly enter these digits into the addresses markedxx(02-09) in the order in which they appear in the word. Thecorrect order is necessary because the Cosmac is terrible atspelling but takes orders perfectly. If you could not think ofan eight letter word, then enter zeroes in the remaining five orsix spaces.

• After entering the eighth letter, push reset and enter an unrelatednumber into the keyboard(not into memory-don't ask why). Now thatyou have the program loaded with the "word", ask a friend to guessletters by pushing the corresponding hex digits on the keyboard.Give him the alphabet list to look at so he can remember whichletter he last entered and not get Cosmac confused. If you don'thave a friend, get an old guy in off the street to try it. Theyjust love this game.

• Now each time the person enters a number, Cosmac will either displaythe location of that letter in the word or, if the number was in­correct, sit there and stare at you. However, if the person pushesa letter which appears more than once in the word, it flashes allcorresponding spaces which makes your friend think he has realry­done something wrongl Your friend gets seven missed letters beforehe loses. If he can spell the correct word before he misses seven,the Cosmac will sit there and stare at you angrily. Cosmac wasprogrammed to whistle and make loud noises when it won, but thishas a tendency to drive away any remaining friends you might haveafter working all week on this program.

HANGMAN PROGRAMPC=RO; RX=R9; DATA POINTER=Rl; SUBR POINTER=R2

LOCATION000206QAOE12151819lCIF

BYTEW'T2XX XX XX XXXX XX XX; XX01 02 03 0405 06 07 08F8 00 B2F8 86 A2E9F8 00 B9F8 4C A9C4 C4 C4

(14)

COMMENTskipWord StoreWord StoreDisplay DataDisplay DataPoint R2 ••To Delay Subr.Set X as R9Point RX ••To free spaceNOP

Page 15: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

HANGMAN 'PROGRAM (CONT'D)

LOCATION2225282B2D2F31323537393B3D3F41434547494B4D505152545758595B5E5F6062656667696c6D6E70737475777A7B7C7E818283858689

BYTESF8 00 21F8 02 Al6c 41 F332 4D41 F332 5441 F332 5B41 F332 6241 F332 6941 F332 7041 F332 7741 F332 7E30 0000 00F8 OA A9

64D230 D2

F8 OB A964D2

30 31F8 OC A9

64D2

30 35F8 OD A9

64D2

30 39F8 OE A9

64D2

30 3DF8 OF A9

64D2

30 41F8 10 A9

64D230 45

F8 11 A964D230 00DO

F8 5A BAF8 FF AA

(15)

COMMENTSPoint R 1 to ••1st LetterCompare input to 1If go to 1st displayCompare to 2If go to 2nd displayCompare to 3If go to 3rd displayCompare to 4If go to 4th displayCompare to 5If go to 5th displayCompare 6If go to 6 displayCompare 7If go to 7 displayCompare 8If go to 8 displayReturnFree data spacePoint 1stDisplay dataGo to delayGo to 2nd letterPoints 2ndDisplayGo to delayGo to 3rd letterPoint 3rdDisplayGo to delayGo to 4th letterPoints 4thDisplayGo to delayGo to 5th letterPoints 5thDisplayGo to delayGo to 6th letterPoint 6thDisplayGo to delayGo to 7th letterPoint 7thDisplayGo to delayGo to 8th letterPoint 8thDisplayGo to delayReturnSubr. returnLoadDelay time

Page 16: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

HANGMAN PROGRAM (CONT'Dl.

LOCATIONSC8D8E909295

BYTES219A

32 9230 Sc'6 4C A930 35

COMMENTSleutineFor eachDisplay•••••••Return ax to freeSubr. exit.

TINY BASIC ON THE VIP SysrEM Richard Ble.aiag

My VIP is operating with TINY BASIC. The software I am usingfor I/O to my TV, cassette aDd teletype is available frem RCA. TheversiOD of TINY I am USiRg

Juses the read and write reutiaes avail­

able on RCAta CDPR5l2 (UT4 to comauaicate with ay tele~ype andceuld be used to read and write paper tapes. Yeu ca. alae .b~ai.

a listing ef~his seftware by gettiRg a copy of RCA'S Evaluati•• KitMuual for the 1802. The ROM sells for lea. than .15.00 aad jus~having the monitor iB the system is worth the price. It will aleeco..unicate with higher baud rate devices and can be used te readand write mag.etic tapee. I wanted to keep the ROM pro.idedwiththe VIP i. the system se I have mounted beth ROMS o. a amall beardaDd use a couple ot 3-level wire wrap 80ckets to form a plug (Yeucould use one 24-pia socket.) and the whole card plugs inte th.socket normally occupied by the CDPR-566. I have included a aketchof what I did. The 3-level pi.s give you just eBough clearaace everthings sticking up on ~e boarci. If yeu have i.stalled a 44-pia.card socket on the VIP axp..ai•• port, yeu will have to ah1t~ be~h

ROMs to one side ot the plug. (I used a ribb•• cable i ••~ead eta socket.)

You will also need t. rovide some means ef resetti. IC-U6 ..the VIP whe. ualag • ' •., ip.. ep,. a •• • a. ·ec Jag hemonitors and ia .ormally rea.t when the ViP's .eBitor execu~ea a 64(N2 set) instruction. My solutio. was to cODBect a switch betwee.pin 6 and 14 et IC-U6, the. while usiag the UT4 after I flip ~herun switch to RUN I teggle the switch I added e. and eft o.ce.(Otherwise your RAM remaiDs disabled!)

I have included two programs written in TINY BASIC aad themachine laguage subreutiaes they use. The Display program waswritten to give me a hard cepy ef the pictures generated using theVIDEO DISPLAY DRAWING game previded in the seftware package whichcame with the VIP. I have re-written a program that copies.4096 BIT picture to my TTY. My .rigiDal prograa took an hour teprint one page. This new versiOD takea less than 11 aiaut.s teprint a page 64 columBS wide.

The other program is used to print a listing of checks anddeposits along with the current balance. It uses the top page e~

memory to store entries so you must adjust the user program areathat TINY BASIC aees. This is necessary since TINY uses ~he tep efuser program area for the GOBUB stack and apparently the USR staokals.. I have limited myselt to one page of memory for storage aadsince each entry uses 6 bytes, I can process 41 checks er depe.itaat a time. (The last entry is _,~,¢.)

(16)

Page 17: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

$275.0058.0015.95

300.0015.0020.00

l683.95

TINY BASIC ON THE VIP SYSTEM (CONT'D)

I have reserved 0900-09FF for my machine language subroutineseven though they each only use a few bytes. If you change this forthe print program you will need to change the address for the pointerto the first location in the PRINT statement.

I am still waiting for my 4-K expansion board from Quest. Theonly other hardware I have is a l-K memory I designed which Ilater rediscovered in an article in Popular Electronics; though Idid bricklayer the 2102 memory chips so all eight chips take onlytwo sockets. I bent the data/in and data/out pins for the top 3chips on each stack so they were horizontal and wire wrapped tothese pins. It works greatl I am using it on my Netronics ELF.

My total system cost so far is:RCA VIP2-K Memory and Chips for I/OTINY BASIC & Experimenter KitTeletype1.5 Amp power supplyMonitor and board

TOTALNow, if I could just afford FORTH!

I have been very impressed with RCA's products and the serviceI have received when ordering parts or publications from theirSolid State Division. The thoroughness of design and excellentquality of the materials I have received is reflected in the easewith which I have been able to get my system up and running.

References:1. RCA COSMAC VIP Instruction Manual VIP-300-12. RCA EVALUATION KIT MANUAL for the CDP1802 COSMAC Microprocessor

MPM-203A(Both available from RCA Solid State Division Somerville, NJ 08876)

3. TINY BASIC User Manual ITTY BITTY Computers San Jose, CA 95153

LETTERS TO THE EDITOR

Dear Tom:I want to take this opportunity to congratulate all who put the

newsletter together. I just got my first copy and I know the workit must have taken to put such a fine copy together. I'm proud tobe a member of such a hard working group. The articles were justthe thing I needed to renew my faultering spirits. Please keep upthe good work.

I own the Quest Elf II and plan to add the 4K board if they willever send me the manual for review. Do others have the same troublein getting responses from manufacturers?

I feel that I should be helping somehow but can't quite suggestanything being so far away. I will send in all the articles thatI can, which may not be many of my understanding of this little elfdoes not improve considerably.

P.S. Please send me the back issues, there is so much I needto know.James W. Stephens, Nashville, TN(Ed. Note: Your back issues should have arrived by the time youread this.)

(17)

Page 18: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

--

·SP103

:LIST

5 REM DISPLAY PGM6 GOT0107 PR·· ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"8 RETURN9 REM THE MACHINE LANGUAGE PROGRAM LOADS CHARACTERS INTO THE10 REM PRINT STATEMENT ABOVE.11 REM INITIALIZE POINTER TO MEMORY TO BE DISPLAYED.15 LET U-USRC23(5)18 REM SET UP MASK BYTES20 LET A=-3270430 LET B-820840 LET C-205250 LET 0-51360 LET E-'"90 REM LOCATION OF FIRST CHARACTER IN PRINT STATEMENT.100 LET K-2592200 LET M-0210 LET U=USRC2313.K)220 LET MeM+ 1230 GOSUB7235 REM COUNTER FOR NUMBER OF LINES BEING PRINTED ­236 REM 32 LINES PER PAGE OF MEMORY.240 IF M<64 GOT0210250 END

:.1M900 280900 00F8 0DB0 F800 A0D5 00F8 00Bl F882 AIC4J0910 E041 3226 F232 IBF8 2A30 IDF8 2058 1888J0920 FDSF 3B29 300F 1030 0910 D5

"- •

-

-

Page 19: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

MACHINE LANGUAGESUBROUTINE

!fuR DISPLAY PGM

R(O) Pointer to memory ceing displayed.R(l) Pointer to masks. (TINY variables A,B,C,D,E.)R(8) Pointer to location of charaters in line being

generated.

0900090109030904090609070908

0909090B090C090E090F091009110912091409150917)919091B091D091E091F092009220924092609270929092A

00FBOCEOF800AOD500

F800B1F882A1C4ill413226F2321BF82A301DF820581888FD5F3D29300F10300910D5

LDIPHILDIPLOSEP

LDIPHILDIPLONOPSEXLDNBZANDBZLDIBRLDISTRINCGLOSDIBNFBRINCBRINCSEP

Loads address of memory to bedisplayed into R(O).

Set pointer to mask bytes.

Get mask byteI f mask byte = 0 restart loopTest byte to see which bits are set.

Skip if byte not set and load blank.Load ASCII *

Load ASCII filS"Store charater into print line.Increment line pointer.

Subtract 5F (0-63) to see if we have filled line.If TRUE returnIf FALSE process next byte.Increment pointer to memory being displayed.

NOTE: The location of the first bytein the line we are printing inthe BASIC program is 2592. (Decimal)Thus 2592-2560 = 32 and32 + 63 = 95 or 5F(hex)

(19)

Page 20: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

-....

....

10 PR" INPUT STARTING BALANCE +SS.CC"J20 INPUT D.E .30 PR II TYPE IN CHECKI.DOLLARS AND CENTS. EACH SEPERATED BY"40 PR" COMMAS. USE -SS.CC TO INDICATE A CHECK. IE. 3.-50.00 ."45 PR" TYPE IN 0.0.8 WHEN THROUGH."50 LET K=4095100 INPUT A.B.C110 LET U=USRC2305,K)120 LET K=K-6130 IF A<>0GOT0100200 PR" CHECK I AMOUNT DEPOSIT BALANCE"210 LET K=4095220 LET U=USRC2324.K)222 IF A=0 GOT0500225 LET K=K-6230 IF B>=0 GOT0300240 LET E=E-C250 IF E>0 GOT0280260 LET E=E+ 100210 LET D=D-l280 LET D=D+B285 IF E>=10 GOT0290281 PR" "JA." "J-BJ"."JCJ" ".DJ".0"JE288 GOT0220290 PR" "JA." "J-BJ"."JCJ" ".DJ"."JE295 GOT0220300 LET E-E+C310 IF E<100 GOT0340320 LET E=E-100330 LET 0=0+1340 LET D=D+8345 IF E>=10 GOT0350341 PR" "JA." ".BJ"."lCJ" "lDJ".0"JE348 GOT0220350 PR" "JA." ".Bl"."lC,;" "JDJ ... ··JE360 GOT0220500 PH" LAST ITEM HAS BEEN PROCESSED TYPE 1 TO CONTINU~'

510 INPUT A520 IF A=l GOT010530 END

I

*?M900 270900 00F8 00B0 A0Bl F882 AIE8 4113 1080 FD05l0910 330A D500 F800 80A0 BIF8 82Al 0828 511U- 0920 1080 FD05 331C 05*SP103

-BALANCE

30.25330.25

CONTINUE

(20)

300.0TYPE 1 TO

DEPOSITAMOUNT19.75

:

IRUNINPUT STARTING BALANCE +SS.CC? 50.00TYPE IN CHECKI.DOLLARS AND CENTS. EACH SEPERATED BYCOMMAS. USE -SS.CC TO INDICATE A CHECK. IE. 3.-50,00 •TYPE IN 0.0.0 WHEN THROUGH.

? 1.-19.151 1.300.00? 0.0.0

CHECK I11

LAST ITEM HAS BEEN PROCESSED1 2

-

-

-

-

Page 21: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

IF LESS THAN SIX LOAD ANOTHER BYTE.RETURNSET COUNTER FOR NUMBER OF BYTES

SET POINTER FOR TINY VARIABLE TO BELOADED.LOAD BYTE FROM STACK INTO VARIABLETWO BYTES PER VARIABLE.

09000901090309040905090609080909090A090B090C090D090E0910091209140916091709180919091B091C091D091E091F09200921092209240926

00F800soAOB1F882A1E841731080FOO5330A1>500F800:soAOB1F882A10828511 11080FOO5331CD5

MACHINE LANGUAGE SUBROUTINEFOR

CHECK BOOK BALANCE

LDI SET COUNTER FOR NUMBER OF BYTES.PHIPLOPHILDI SET POINTER FOR VARIABLES TO BEPLO STORED ON STACK.SEXLDA LOAD BYTE ONTO STACK.STXDINC INCERMENT COUNTER AND TEST FORGLO SIX BYTES.SDIBDFSEPLDIPHIPLOPHILDIPLOLDNDECSTRINCINCGLOAND TEST COUNTER TO SEE IF SIX BYTES HAVEBDF BEEN LOADED.SEP RETURN

R(O)R( 1)

R(8)

Counter for number of bytes processed.Pointer to locations of TINY variablesto be put on stack.Pointer to current location of byteto removed from stack or currentaddress to load byte into stack.

(21)

Page 22: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

PLUG IN ROM BOARDFOR VIP

J---- 2t"

24 Pin plugformed by cutting two3- level 14 pin sockets

CDPR~566

1...... 4 •• ' ••• ,.~'"

-3/l ~ DipSW.

'4 .... .., ........ I

CDPR-512UT4

2

to select

DIP Sw•

5662,0

2Of--I I 'CS' 011 plvJ

Plugs into ROMsocket on VIPV UT4

• 0

I J

!l'o pi~

Used to resetU6 when using

1----1 Ut4

Page 23: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

LETTERS TO THE EDITOR (CONT'D)

Dear Tom:Your article 'A Low Cost 8 Digit Display' and many others talk

about the project I have been working with. However, I found itdifficult to relate it with my ELF. Do you plan to publish theTEKTRON schematic diagram and its BUS structure in your news letteror do you prefer that we non-TEC-1802 owner contact TEKTRON directlyfor information. In any case, I would appreciate if you couldexplain the abbreviation in Fig 3 of page 50 with respect to theoriginal ELF or ELF II.

I read your article 'Hardware Paper Tape Loader' with greatinterest. I wonder if it is possible to do the same loading withcassette tape instead. That will surely eliminate the need of aROM.

Just as in many other cities in the WEST, we too have surplussale of parts from time to time. Since I can not contribute any­thing technical to the club, I think I can at least help our clubmember save some money by buying the surplus parts for them.

I recently came accross a,keyboard assembly. It is a reed switchtype key activated by a permanent magnet. I bought three and con­verted them into a O-f Hex keypad plus four function key (to upgrademy ELF to ELF II). It took me less than twenty minutes to do theconversion and costs me only about US $1.50 per assembly.' All theswitches are brand new; the engraving on the surface needs coveringup by appropriate HEX numbers. Please let me know whoever isinterested in getting it.

Yours sincerely, Richard Ling, 6B Broadway 8/Fl., Mei Foo SunChuen, Kowloon, HONG KONG(Ed. Note: Fig 3 on page 50 of issue #5 refers to the TEC-1802 bussigna18. Please refer to the RCA1802 User Manual, ~WM-201A pages67 to 84 for explanation of these signals.)

Dear Tom:The purpose of this letter is to ask you (or the members of IPSO

FACTO) if they know where I might be able to purchase the integratedcircuit described in the enclosed literature ••• General InstrumentRO-3-9500 and AY-3-8910 •••

As you should see, there is great potential in this chip.( RO-3-9500 or RO-3-9501 graphics ROM).

Please forward any information that you can dig up on the price,availability, etc. of this IC.

Sincerely, Darcy Roberts, 660 Laurier Blvd., Brockville,Ontario, K6v 5X8.

Dear Sirs:I read about your computer club in Byte magazine, and I thought

that I would Join. I, too, own and am interested in the 1802.My system is a trainer bought from NETRONICS R&D, a CONNETICUTbased firm. This trainer is called the ELF-II, and includes thevideo graphics chip, and a hex keyboard. I am a college studentstudying electrical engineering, and I designed a minimum COSMACsystem for my own use. I will be wire-wrapping it this summer.It includes 2K of ram, 2K of rom, a hex keyboard of my own design,and the video graphics chip. All output is done through thevideo monitor. All circuitry will be on 44 pin cards, and connect

(23 )

Page 24: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

LETTERS TO THE EDITOR (CONT'Dt

to a 44-pin bus. This is a little small, but it will do formy purposes •••

I would like to become a member of your fine club, and I amenclosing membership dues. I hope that the American check isacceptable. I am enclosing a description of the hardware andsoftware for my keyboard. I look forward to hearing trom you.Sincerely yours, Russ Nelson.

Tom:Just a note to say that I received Issues 1-4 & 6 of~PSO

FACTO' today and they're great. Of all the publications I get,this is the most useful by far for me as an 1802 user. Keepit up. Sincerely, Richard Moffie, North Hollywood, CA 91605

1802 STATE INDICATOR Darcy RobertsBrockville, Ontario

the interrupt LED is ver~dim when theIf you run an interrupt t e signal re­a 'scope.circuit is for an indicator of the currentconnect the two lines to the wxrr and

The simple circuit illustrated in figure 1 will indicatewhat the current state of the COSMAC 1802 CPU is.

The logic for the circuit is extremely simple; only 3 IO's,4 LED's and 4 resistors are needed. The IC's are common TTLand CMOS ~ a 7404, a 7400 and a 4049. The LED's are almostanything you have and the resistors can be anywhere between100 and 170 ohms. For equal brightness make them all the samevalue.

I used a protoboard for my unit; I assume that almost anyother method of construction can be used.

In case you are wondering, the circuit is smiliar to a74LS139 - but I didn't have one so I built one with what I hadon hand.

You may notice thatcircuit is operating.sulting can be seen on

Another use for themode of the CPU - justCLEAR lines.

(24)

Page 25: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

+5,a.

7+00r----------fl--r.rr-......... •

D'-+I -"'tI"--'t

sc¢ ,

PIN lED INDICATES

8 INTERRUPT CYCLEa EXEC UTE CYCLEII DMA CYCLE3 FETCH CYCLE

Figure 1

(25)

Page 26: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

LOCN OBJ CODE STMT SOURCE STATEMENT 1802 VER 1.4

TO USE:1. LOAD INTO BEGINNING OF ANY PAGE2. HIT RESET,RUN3. Q LAMP COMES ON INDICATING INPUT ADDR

(ENTER HIGH ADDR, HIT I; ENTER LOW ADDR, HIT I)4. Q LAMP GOES OFF INDICATING OUTPUT ADDR

(ENTER HIGH ADDR, HIT I; ENTER LOW ADDR, HIT I)5. Q LAMP ON AGAIN INDICATING LENGTH OF MOVE

(ENTER LENGTH HI, HIT I; ENTER LENGTH LOW, HIT I)6. Q LAMP OFF INDICATING MEMORY MOVE STARTING7. Q LAMP ON INDICATING ALL DONE8. AS PROGRAM IS NOW, TO REPEAT GO TO STEP 2.

JUL 28/78

RO=MAINLINE P.C.R2=STACKR4.1=INPUT ADDR HIR4.0=INPUT ADDR LOWR5.1=OUTPUT ADDR HIR5.0=OUTPUT ADDR LOWR6.1:LENGTH HIR6.0=LENGTH LOWR15=HEX KEY P.C.

D=DATA;R4=R4+1R5 -> OUTPUT ADDR

INDICATE INPUTINPUT ADDR HISAVE IN R4.1INPUT ADDR LOWSAVE IN R4.0

GET CURRENT PAGEPUT IN R2. 1PUT IN R15. 1STACKSET UPX=R2R15=HEX KEYBORADSUBROUTINE P.C.

INDICATE LENGTHLENGTH HISAVELENGTH LOWSAVEWERE STARTING

INDICATE OUTPUTOUTPUT ADDR HISAVEINR5.1OUTPUT ADDR LOWSAVE IN R5.0

ROUTINE

R4R5

R15R4R15R4

R15R5R15R5

R15R6R15R6

ROR2R15STACKR2R2KEYENTRYR15

REGISTER USAGE:

REQSEPPHISEPPLO

COpy MEMORY

GHIPHIPHILDIPLOSEXLDIPLO

SEQSEPPHISEPPLO

LDASTR

SEQSEPPHISEPPLOREQ

1 * * * * * * * * * * * * * * * * * * * * * * * * *2 *3 *4 *5 *6 *7 *8 *9 *

10 *11 *12 *13 *14 *15 *16 *17 *18 *19 *20 *21 *22 *23 *24 *25 *26 *27 *28 * * * * * * * * * * * * * * * * * * * * * * • • *293031323334353637 *383940414243 *444546474849 *50515253545556 *57 MOVE58

0000 900001 B20002 SF0003 F8 320005 A20006 E20007 F8 290009 AF

OOOA 7BOOOB DFOOOC B4OOOD DFOOOE A4

OOOF 7A0010 DF0011 B50012 DF0013 A5

0014 7B0015 DF0016 B60017 DF0018 A60019 7A

001A 44001B 55

(26)

Page 27: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

LOCN OBJ CODE ST~T SOURCE STATEMENT 1802 VER 1.4

RETURN TO MAINLINEWAIT FOR IDEBOUNCEGET HEX DATADISPLAY ITBECAUSE OF OUT4ALL DONE

RO**

R2KEYRTN

o

SEPBN484INP4OUT4DECBR

DCEND

INC R5 R5:R5+1DEC R6 LENGTH:LENGTH-1GHI R6 LENGTH HIBNZ MOVE 0 ?GLO R6 LENGTH LOWBNZ MOVE 0 ?SEQ TELL USER ALL OKIDL JUST SIT THERENOP IN CASE OF PATCHNOP IN CASE OF PATCH

* * * * * * * * * * * * * * * * * * * * * * * * ** HEX KEYBOARD INPUT ROUTINE* * * * * * * * * * * * * * * * * * * * * • * * *

5960616263646566676869707172 KEYRTN73 KEYENTRY747576777879 *80 STACK81

001C 150010 26001E 96001F 3A 1A0021 860022 3A 1A0024 7B0025 000026 C4002'7 C4

0028 DO0029 3F 29002B 37 280020 6<;002£:. 64002F 220030 30 28

0032 000033

o DIAGNOSTICS GENERATED4 SYMBOLS

SY"1BOL TABLE:,MOVE 001A KEYRTN 0028 KEYENTRY 0029 STACK 0032

(27)

Page 28: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

MICROCOMPUTER INTERFACING

(Reprinted with permission from the IEEE publication"Circuits and Systems", December 1977)

John Doyle

Institute of Biomedical Engineering

University of Toronto

Toronto, Ontario

Microcomputers are inter­esting primarily when they can'be interfaced to devices suchas teletypewriters, relays,lamps, joysticks, keypads,displays, loudspeakers, andother equipment. This articlepresents a number of interfac­ing concepts which may be usedto make microcomputers moreuseful. Several examples willbe given to make matters con­crete. These range fromdigital-to-analog conversionto electronic music and com­puter games.

parallel interfacingAlmost all microprocessor

fami I ies inc! ude a parall elinterface chip. These chipstypically have 2 or 3 8-bitports, each of which can beconfigured as an input or anoutput port under softwarecontrol. Examples of suchchips are Intel's 8255A forthe 8080A, Motorola's 6820 forthe 6800.. or Zilog's Z80-PIOfor the Z80. All these chipshave pins for addressinginternal registers, for con­nection to the system databus, for connection to exter­nal devices, and, of course,for power and ground. For de­tailed information on such

chips, cheek the .aufacturer'sdata sheet s ,

Let's see what can be doneus~ng on:y one such chip, sayonn havinJ two 8-bit ports,such as Motorola's 6820. Withthvs! 16 rIo bits you can ac­ronpt ish Ill ... conversion or A/DtOllversion, have an analogdisp l ay 'pnel meter) inter­Ja~e, ard g~nerate audio sig­na t s , 'tc : may also drivelight-e~i~ting diodes, and~ave a ootentiometer control'Ihose shaft position can be,'eld from software. All this~a:es a~out 6 chips (Figure1). The key here is "don't doin hardware uhat can insteadoe done in software."

Taking a detailed look at;'i!IU,'e 1, a number of designtr cks tecone clear. The LEDinierfate is trivial to under­stund; "'i th the buffer operat­in" as Co sink when its inputis high, lhJS causing the LEDto enery~.e. The audio inter­face uses a transistor to sup­p,')·t the hesvier current goingto the spelker and needs aso~tw~r( driver to toggle I/Obit PA1 at the desired fre­quency (Ele"tronic Music typestake note!). The analog dis­pIa.' cirtuit is simple--I/Obit PA2 i~ simply duty-cyclemodulated a,ound a pulse train

carrier of 100 Hz. The me­chanical inertia of the meter(voltmeter or milliammeter)allows us to dispense withel ect ri ca I low-pass fi Itering.We still need a driversubroutine, however, whichgenerates a waveform of xXduty cycle where x is an inputparameter proportional to thedesired metp.r reading. (Bothdrivers di~cussed so far re­quire unde~ 100 bytes ofcode).

The input switch (switchregister) IS another trivialcircuit. Here, bit PA3 isprogrammed as an input and issimply pulled high or low.The 4.7K reslstor isn't reallyneeded (unused inputs alwaysfloat high), but good designsinclude it for noise reasons.Reading the switch involvesreading port A of the 6820 andmasking out the seven. unwantedbits.

The potentiometer circuituses a monostable whose timeconstant (Re) is proportionalto rotor position. The choiceof Rand C should bring thetime constant into the mil­lisecond range. To determinethe pot setting, the mono­stable is first strobed withI/O bit PA4 (programmed as anoutput). The length of time

i

!

j

Page 29: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

taken by the monustable toreset is determined by repeat­ed polling of 1/0 bit 5 (pro­grammed as an input).

projectsIn three of the circuits

discussed so far (audio, ana­log meter, and pot. inter­faces) some notion of timingis implicit. Timing is neededto know when to change thespeaker state, when to togglethe 1/0 bit driving the analogmeter, and to determine howlong the monostable was ac­tive. In addition, timing isneeded for analog-to-digital(AID) and digital-to-analog(D/A) conversion, which willbe disucssed later 0n.

The easiest way to do yourtiming is with a ProgrammableInterval Timer. This devicehas a counter (usually drivenby the system clock after someprescaling) which ~an be readand reset from software. Inaddition, it can usually beprogrammed to initiate an in­terrupt upon reaching zero.Another possibility is to usethe 60 Hz at a transformersecondary together with aSchmitt trigger to generate a120 Hz real-time clock. Thisinvolves using interrupts,however, a technique notrecommended for beginners andnot always easy to debug.

goin,g analogD;gital-to-Analog conver­

sion is needed for such appli­cations as speech synthesisand music generation \of amore sophisticated nature thanthe squarewave example shownpreviously), as well as fordriving oscilloscope displaysand most x-v plotters. O/Aconversion is also used duringthe AID conversion processdiscussed later.

Most D/A converters for mi­crocomputers fit into the ad­dress space of the host mi­croprocessor. To make the DIAvoltage output x volts (e.g.,0<x<10) the correspondingbTnary code ;s simply writteninto the address belonging tothe converter. The most con­venient DIA size going is

8-bi ts, but for I aboratc,rygrade work 10 or 12 bits ismore common. Most D/A's hzvesettling times ~r the mi­crosecond range; this ~s tletime for the output to sett'eto a particular voltage withina specified error bcund.

The DIA conversion syst,~

utilizing port B of the I/Ochip (6820) in Fi£u~! 1 fSa-bits, and thus ncs 256 (2')possible voltage le\e:s. S~le

"smoothing" of the outputwaveform may be accomplish~d

(via analog low pcss filte-­ing), if the picewi~e cons t a rtnature of the outPlt w<vefo~m

is undesirable. (hip countfor DIA conversion \arifS frlm1 to 3 depending en i-he th.ercurrent or voltage cutp0tS a'edesired and whethEr outputconversion (most cn~ron iscurrent-to-vol tage convers iou)or level translatirn ~s neej-ed· TO display wavef.)r:1ls on snoscilloscope, a dri"cr progr3ffiis used to addresshrough anarray of data value~ cyclical­ly. A programmabla intervaltimer is needed for ti~ing

purposes. For some oscillo­scope applications, t~o DIP'smay be needed--one to drivethe X axis and one for th~ Vaxis. Similarly for driv'ngx-v chart recorders.

In biomedical, precess con­trol, and speech anaysis Jp­plications, analog-to-dig'tal(AID) conversion is need~d.

a-bit conversion is the nostconvenient for microproces­sors, but may be inadequatefor appl icat ions requi ring alarge dynamic range (e"g.,speech is adequately encodedlinearly only when 12 bits areused, although 8 will do if,say, -law encoding is used).

Speed of conversion is animportant specificati~n. Forspeech, 8000 saMples persecond or more ire needed.For biomedical data, 500 sam­ptes per second is almost al­ways adequate. The la.terspeeds are easily echieved us­ing software to step throuqh a01A converter (see Figur·~ 1)until a comparator toggles.This software, which involvesonly a dozen or two bytes ofcode, should use the "succes-

(29)

sive approximation" method ofconversion, although ifconversion time is unimportantone could simply have the DIAoutput a ramp signal until thecomparator changed state, atwhich time the voltage sampleobtained would be proportionalto the time taken for the com­parator to change state.

timingThe projects possible based

on the ideas discussed so farare limitless. Here are a fewideas:Tracking GamePlayer must use potentiometerto "stabil ize" the analog dis­play at a particular value.The display is perturbed by anoise waveform (use a pseu­dorandom nunber generator forthis) but the perturbation canbe nulled by adusting the po­tentiomer knob. The averagetracking error over a givenepoch of time can be obtainedto yield quantitative measuresof motor coordination.

Reaction TimeEither the LED or the speakeris used as a signal, and apushbutton is used to respond.Average reaction time measure­ments are easily obtained byusing the microprocessor toperform the required calcula­tions.

Medical Instrumentation'T'fle-07i\ converterout-put canbe used to drive equipmentranging from oscilloscopes tostrip chart recorders. AIDc0nversion is neces~ary forthe analysis of electrocar­diograms (EKG), electroen­cephalograms (EEG) and bloodpressure waves, not to mentionmore mundane measurements suchas body temper8ture.

Electronic MusicThis can be---affacked at twolevels: 1) Using squarewavesto drive a speaker (simplehardware and software, butlimited in musical fidelity),and 2) using OIA conversion(much more difficult, withtighter execution time con­straints and extra hardware,

Page 30: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

hut it's the only way a purist'would do it).

Spe e ch Synt he s i su'seamTcrophorle and AID con­vert e r to capture all thephonemes needed (better knowsome phonetics to do this).

Then form synthetic speech byconcatenating these phonemesas desired. You'll need lotscf memory for this. Consultthe literature for vg~ious

phonemic transitional schemesto improve the intelligibilityof the speech produced.

Audio lntcrtace (Speaker]

AlTcllog Display Interface

Voltmeter

Speaker

lKH

BUFFER

PAl

PAD

PA2

BUFFER

Lowpass Filter_

~. (Optional)1---- ~._--~w..:t

~

+5 V Light Emitting Diode

J:Interface

LEDe.g. FLV102

1-----[>-.-- 470n

+5 VBUFFER e.q. 7404

I-----[>-_.~

+5 V

4.7KH

PA3 ? Input SWitch (1 bit switch register)

Potentrometer Interface

Two eight-bit par~llel ports providing a richvariety of I/O cdpabilities.

Time Constant Adjust

lOOKn

ANALOG OUTPUT

ANALOG INPUT 2

OUTPUT

1-·--------<0ANALOG INPUT 1

CornparatorsI rn, Out""'~1

D/AConver te:

PA5

lSI

PM

PA7

PA6

PBO·PB7

(30)

Page 31: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

1802 MANUAL DEBUGGERby Tom Plttnan

One of the most useful tools a programmer can have is adebugger which gives an interactive look at the machineregisters during program execution. Almost every system letsyou look at and modify memory, but in the 1802 there aresixteen address registers, an accumulator, two four bit addressselect registers, and a couple of one bit flags that reside insidethe CPU and never make it into memory for you to look at.

I just finished debugging a 1K byte program on the 1802without the benefit of a debugger, and I can assure you that,but for the Grace of God, I would still be working on it. Thereis no way to tell why a certain byte in memory is gettingclobbered unless you can dynamically watch the registers to seewhen its address shows up.

Two and a half years ago I began to write my firstCOSMAC programs (it was an 1801 then), and I immediatelyrealized that I needed some way to examine the registers. Themonitor I was working with had memory examine and modifycornrrands, and a cornrrand to start execution at an arbitraryaddress with P=O. Nothing more. So I wrote a one-page"mini" debugger which gave access to the registers, allowedbreakpoints of a sort, and permitted me to resume from abreak. This is that debugger, upgraded to the 1802.

I hate getting my hands into the hardware. I have to doenough of it in the course of my consulting, and in keeping myown system up. But I am really a pencil pusher. This debuggeris entirely done in software with no hardware assist. RCAhas agreat little hardware "ICE box" that does just about everythingyou need. I never got one of those, so I make do withsoftware. Actually I now use the RCA "UT3" debugger In mysystem, but on several occasions this debugger has come inhandy on a customer system.

However, because it is done in software, I cannot save allthe registers. One of them is essential for the ProgramCounter in the debugger itself. Another is needed for a datapointer. And there is no convenient way (without interrupts,but that is hardware) to save P. Two address registers and Pare all thi s debugger costs.

When I wrote this, I went on the assumption that I wouldbe mostly checking out code which runs independently ofinterrupts and DMA, and that has been generally true; theprogram I just finished used the 1861 which re[JJires both, so Icould not use this debugger. Going on this assumption, I let

the two registers I tie up be RO and R1. There is nothingmagical in the program about using R1, but RO turns out to beconvenient for another reason.

After a reset, P=O and RO=OOOO. By placing the debugger inmemory page 00, I can get a hard break by resetting thecomputer. You will notice that the first instruction branchesto the break entry point, so that all registers are saved, just asif a breakpoint had been executed. If this is not a re[JJirement(I would find that hard to believe, but it is your decision), youmay avoid RO and use some other register. However, theregister saving and restoring routines operate most convenientlywith RO and R1 excluded (as opposed to some other pair).

Another peculiarity about this debugger is that it operatesout of RAM. I do not normally write dirty code, but here itseemed called for. The debugger modifies itself. The registersaving and restoring is accomplished by incrementing theinstructions which access them. More on this later.

How to Use It

The debugger sits in memory page 00. Your program to bedebugged is assembled one page up, so it starts at 0100. Theregister save area is OOEO-OOFF. To begin executing yourprogram, or to resume from a breakpoint all you need to do isstart at location 0006. Resetting the computer and starting at0000 will save all regiaters. That is about all you need to know,except that breakpoints are planted in the program as SEP RO(hex DO) inst rue tlons,

Obviously, the user program is not allowed to modify RO orR1. If you modify RO the breakpoints will not work, but youcan still reset-run to get a hard break. If you modify R1 youlose the accumulator on a break. If you know you will be usingR1 for something else, you can get most of the debugger bybranching around the accumulator save code. For now I willassume you avoided RO and R1.

The program being debugged may use any of the otherregisters any way you choose, but of course one of them mustbe the Program Counter. I use the "Standard Call and ReturnTechnl[JJe" described on page 61 of MPM-201A. so I use thedebugger to bypass the register setup part of the program, andbegin immediately with P=3. Since the debugger will load up all14 registers, you can do this. Those registers not explicitlyused for control functions (I.e. R3=PC, R2=stack pointer. R4,RS = subroutine linkages, etc.) can be loaded with easilyidentifiable patterns so you can tell if they have been changed.The debugger will also set up initial values in X, P, 0, and OF.

The 14 address registers are stored in locations OOE~FF,where the register number is doubled and added to OOEO tocompute the memory address. For example, R3 is inOOE6-00E7 (=3·2~EO). The accumulator (D) is stored inooE2 and the Carry flag (OF) is in OOE3(think of the low nibbleof BZ and BDF). LocationOOE1 holds the X and P values. X isactual, but the debugger does not really have any way to tellwhat P was before the SEP ROinstruction (or the reset), so you

(31 )

Page 32: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

tell the debugger what you think P should be, by the contents ofOOEO. In other words, If you are setting breakpoints In aroutine where P=3, then store 03 into ooEO, and the debuggerwill combine that with the actual value in X and store theresult in ooE 1. This is Important, because the value in ooE 1 isloaded back into X and P when you resume.

You may have as many breakpoints In your program as youlike. You have to keep track of them (thatls why I call it a"manual" debugger). Each time you hit a breakpoint, you haveto put the original byte back and back up whichever registerwas the PC. If you do not do this, the opc:ode you replaced bythe breakpoint will not be executed. This is somewhat of apain, and there is a way around It.

If you expect to be using the debugger with a program, youcan put !'OPs at the points where you might want to putbreakpoints. Since it does not matter if a !'OP is executed ornot, it does not need to be restored when you hit a breakpointat that address. Or, if memory space is tight (Isn't it always?),you can put your breakpoints at points in the program thatalready contan SEP Instructions. The first program Idebugged with thi s, I mostly put breakpoints at the exits fromsubroutines (SEP R5). When you do this, set ooEO to the valuethat would have been in P if the SEP were still there. Thenwhen you hit the breakpoint, you can resume with the new valuein P at essentially no cost. Obviously you can repeatedly stop atthe same breakpoint only if you do one of these two ways of notrestoring it.

When you hit a breakpoint, you can then' examine memory tosee what was in the various registers. If you need to change aregister, all you need to do is modify memory, and when youresume, the new value will be in the register.

Implementation No_

I have always used this debugger in a UT2/UT4environment, so after it hits a breakpoint the registers are setup for entry into the UT4 memory dLmp routines. As a matterof convenience, I set them up to display seven bytes beginningat ooE1 (without the address, since I know what that Is); theseare X&P, 0, OF, R2 and R3. If what I want to look at is not inthose registers, it Is easy enough to display the rest of them.

F or those of you who have your own monitor, or (alasl) nomonitor, you will want to replace the code In OO66-OOAF withsomething that gets you Into your monitor, or that allows someaproprlate display of the register save area. If you have tostep up to whatever memory you wish to examine In the (CPU)LOAD mode you may even want to re-arrange the code so thatthe register save area is closer to ()()()(). If you do this, you willhave to add a couple of ANI or XRI instructions in the loopswhere the code tests for the end of the page. I will not go Intomuch more detail on this part of the code.

The startl4' or resume routine has a little delay loop in Itbecause of the crazy way RCA handles the timing on the serial

I/O. If you are not using their monitor you can eliminate thedelay If you like.

The register loading routine uses R1 to point to tl\PLO/PHI instruction which is computed, and R2 to point to theregister save area. The loop counter Is also R2. If R2 is even,a PHI instruction is constructed; if odd a FLO. Thisinstruction is stored into 001 C, then the byte is tetched frommemory and that PLO or PHI Is executed to put the byte intothe appropriate register. Then OF, R2, and 0 are loaded in amore conventional manner. The 01Sat 002F leaves RO pointingto the Save routine and R1 pointing to the save location for 0,ooez.

The next SEP RO instruction reswnes execunon at 0030,which shortly stores 0 where R1 points, then checks to be surethat was where it should have been (ooE2). If not, then R1must be Initialized, and IT sets up the byte that oF Is shiftedinto so that bit 7 is 1 (I.e. 8x instead of Ox). This Is so thatwhen you look at your register dump, you will know that what isshown for 0 is false, and that somewhere out there in memorya byte got clobbered. If this happens to you very many times,you might want to change the two !'OPs at 0030-0031 to a 8Rto 0038 (3038). Now we have ano ther loop which computes aninstruction, stores it into the code, and executes It. In thisloop there are actually two of these: one Is GU; the otherGLO. The entry to this loop is the part of the code that savesthe OF (0050), of which the SHLC Instrcution is skipped onsubsequent times through the loop. In this loop we do not needthe second data pointer, but use the PC itself to point to t"instruction being computed. It is then executed on the ver)next fetch, This would not work for the restore loop, becausethe contents of 0 when the computed instruction is tetchedmust contain a register byte in that case, not the instruction,whereas here it does not matter.

The last step is to determine X and put that together withthe assumed Pinto locationooEl. The MARK instruction has ahardware restriction to R2, so that register Is set up to po,lntto ooE1. The MARK decrements R2, so it does not take many,instructions to put the two nibbles together. Because P=O inthis routine, I can avoid the extra code to strip the old valueof P (inserted by MARK) before ORing the presumed value fromooro.

When I first wrote this routine for the 1801, there was nosuch Instruction as MARK, so I had to resort to subterfuge Inorder to figure out what was in X. Remember, this was to behardWl~lndependent,so I could not use an OUT Instructionto increment R(X) and so find out what changed. In case youhave not noticed, the IRX Instruction Is just an OUT 0; on the1801 there was a real port O. There also was no STXO orLOXA. What I did was load the register number into eachregister (in a loop similar to the save and restore routines) suchthat each now pointed at a different byte in memory. Thesememory bytes each contained the number of the registerpointing to it, so an LOX loaded the value of X (actually I guessI used an OR instruction, and put it together with thpresumed P at the same time). I mention this not only because I

()2 )

Page 33: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

think was interesting, but also to explain the big gap in thecode. As you know, nature abhors a vacuum, but in the originalversion of this program there was no vacancy. That alsoexplains why I IoIIent to such extensive byte-saving tricks - Ihad to in the original, and they never were removed. Anyway,with the find-X code removed, I decided to put the SCRTroutines into some of the vacated space. You will notice that Ihave made some improvements over the RCA version, namely,that D is preserved, and the addresses on the stack are notreversed.

Another routine I find especially useful is a one-byteone-page fetch routine. Since it turns out that most programsaccess a few variables frequently, I usually collect them into asingle memory page, then use this routine to fetch them. Thecall is simply a SEP R7 followed by the one-byte address of thedata. Because the fetch routine also sets X to the registerpointing to the byte, I can proceed to do computations on thatbyte with a minimum of code. Judicious arrangement of thedata can lead to further savings by coding with STXO or LDXA.The following are some typical accesses to this routine:

READ-MODIFY-WRITE

SEP 7~ADDR+l

AUI ETCSTXDLOXADCI HISTXD

LOAD A REGISTER

SEP R7~SAVEU

PHI RNIRXLDXPLO RN

I think some variation of this little gem shows up in three outof every four programs I write for the 1802. In TINY BASIC,for example, I use an LDA Instead of LDX because I am almostalways loading or storing 16-bit registers, and I want to savethat extra INC.

Of course, if you have no use for these routines, you neednot retain them; they are not an integral part of the debugger.I find, once in a while, that I can write ad hoc programs aroundthe debugger more easily than independently. Having theseroutines in the debugger means that I can use the SCRT linkageand the one-byte fetch without explicitly coding it into theprograms.

Extensions

I have given a small amount of thought to how I wouldmodify the debugger if I wanted to run it In ROM. I think itwould add a small amount of code to handle the extra pageaddresses (because the code would not be the same as the data).You could no longer store the computed instruction inline, soyou would always have to use three registers, but as you cansee, R2 can be loaded and stored In the conventional manner,and then you can use it to point to a four-byte work area inRAM. The first byte would of course be the computed opcode;the other three would be a ~R instruction to get you backinto the debugger loop. The ~R would need to be set upbefore it Is used, but that Is a snail cost (9 bytes. assuming youhave to set up R2 anyway). Restoring the registers thus costs37 bytes In all, compared with 34 for inline code. Hmmm... Ialso notice that inline code executes In 2S6us, where the loop(for a ROM version) takes about five times that. Oh, loVell, itwas a fun exercise. It is a pity that RCA didn't Include GLOX,GHIX, PLOX, and PHIX (same as GLO, etc.., but refer to R(X)) inthe instruction set. I guess they ran out of opcodes.

Anyway, this debugger works. All you have to do isconnect it to your monitor for examining and modifyingmemory. And this version Is a little shorter than inline codewould have been •

03 )

Page 34: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

MANUAL DEBUGGER FOR RAM PAGE 030 MAY 78

EXECUTION ($P6)•• DELAY A LITTLE

· .u i IS NO GOOD

•• R2~

• .SAVE D• .CHECK I

•• STARTING R3

• •MAKE U PLOR WI

• •0R .II PHI RWI

• .GET BYTE• .STUFF INTO RN•• CHECK FOR END

•• NOW DF~

•• FINALLY D

.• INITIALIZE POINTERS

• .NO INTERRUPTS

ON BREAKPOINT

ORG UNOPLBR SAVEBR FIX

CONTINUELoI 8PHI IDEC IGH I IBNZ *-2PH I 2LDI REXPLO ILDI RX3PLO 2

SAVE REGISTERSSAVE: NOP

NOPSTR IGLO IXRI SREGRN'1 FTX

RESTORE REGISTERSPRL: SHR

XRI #DOLSDFORI #10STR ILDA 2

REX: PLO 0GLO 2BNZ PRLLDI FLAGPLO ILDA ISHRLOA IPH I 2LDA IPLO 2LDI SREGPLO ISEX ILOXDEC IDIS

U001000200030004000500060007OOOB0009001000110012001300140015001600170018001900200021002200230024002500260027002800290030003100320033003400350036003700380039004U

·00410042

·00430044 ••004500460047004800490050(Jn~l

,F6;FBDO;CF;F910;51;42;AO;82;3A14;FBE3;AI;41;F6;41;B2;41;A2;F8E2;AI; .E1;FO;21;71;

,C4;C4;51;81;FBE2;3A3l:J;

,C4;C00030;3U3B;

,FBOB;B1 ;21;91;3A09;B2;FB1C;AI;F8E6;A2;

! 1"1UOOU00000000000000010004000600060006OOOB0009UOOAOOOB0000OOOE001U0011001300140014001400150017U018001A001B001C001l)U01EOU20002200230024OU25002600270028OU29002B002C002D002EU02F00300030U03000310032OU33

I 0034UU36

Page 35: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

OlJ38 ~1; 0052 GHI IOU39 3L~U; 0053 BZ SOF • •OK. GO SAVE OFlJU3~ ~U; OU54 FI X: GHI 0 • • FI X R1UU3C l3 1 ; UU!;5 PHI IUU3U FHE2; 0056 LOI SREGUU3F J\ 1 ; 0057 PLO I

" U04lJ FU40; UU58 LOI #40 •• FLAG IILOST D~ STORED WILO II

U042 3U50; 0059 BR SDFUU44 006UUU44 , U061 SAVE REGISTERS LOOPOU44 FY9U; OU62 SRL: OR I #9U • • MAKE IIGHI RN"OU46 5U; 0063 STR 0UU47 9U; 0064 GHI 0 •• EXECUTE IT HEREUU4H 51; 0065 STR IUU49 81; 0066 GLO I •• STORE ITUU4A F6 ; 0067 SHRUU4~ F~FU; 0068 XRI #FO • • NOW MAKE "GLO RN"UU4D 5U; 0069 STR 0UU4E HU; 0070 GLO 0 • • DO IT HEREUU4F 3H; OU71 SKPUU!;U 7E; OU72 SDF: SHLC • • (SAV E OF)UU51 11 ; 0073 INC IUU!:l2 51; U074 STR IUU53 11; OU75 INC IUU54 HI; 0076 GLO I • • GO TO NEXT REGISTERUU55 H); UU77 SHRUU56 FAUF; 0078 ANI 15UU58 JA44; 0079 BNZ SRLUU5A 008UOU!:lA ; 0081 FIND WHO IS XUU5A YU; 00H2 GHI 0JU!;B 82; 0083 PHI 2 •• SET UP 2

'- OO!:lC F8E1; 00H4 LOI A.0(SREG-1)UU5E AL; 0085 PLO 2UU5F 79; U086 MARK •• SAVE XUU6U E2 ; 0087 SEX 2UU61 I L; OUH8 LDXA • .INSERT PROBABLE PUU62 FAUF; 00H9 ANI 15UUb4 F1 ; U09U ORUUbS 7J; UU91 STXOUUblJ UU9LUUb6 ; OU93 SET UP FOR UT2/UT4OU66 FH80; 0094 LOI #80 •• OELAY SRUU6U l3C; OU~5 PHI RCUU69 FUEF; 00~6 LOI #EFUU68 AC; OU97 PLO RCU06C FHH1; UU98 LUI #81 •• TYPE5UOU6E l; :3 ; UU~9 PHI 3UUuF 9U; 01UU GHI 0OU7U I:l 5 ; 0101 PHI 5uu 71 IW; 01U2 PHI RD • • SET TO TYPE. ••UU/L l; 1 ; 0103 PHI IUUIJ FHU7; 0104 LOI 7 • .7 BYTESUU7S AI; 01U5 PLO Iuun AD; 01U6 PLO ROUU77 FH7l3; U107 LOI JUTI)U/~ A5; 01U8 PLO 5

U7A 05; 0109 SEP 5OlJll3 F8E! ; 0110 JUT: LOI SXPUU7u AU; 0111 PLO UUU/l FHH4; 011L LOI SCRUuHU A2; 0113 PLO 2

(J5 )

Page 36: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

OU81 C0808E; Ul14 LBR #808EU084 U11~ SCR= * •• SCRATCH USED BY UT2UU84 Ul16 ORG #BOUOBU 0117UUbO ; 0118 SUBROUTINE CALLER (PC=4)

CUOBO 03; Ul19 SEP 3OUIH Af; 012U CALLR:PLO M • •SAV E ACC.OUB2 86 ; 0121 GLO 6 •• PUSH 6 ON STACKUOb3 52; 0122 STR 2UU~4 2~; U123 DEC 2OU~5 96 ; 0124 GHI 6UUH6 5~; 012~ STR 2UUB7 22; 0126 DEC 2UOBcs 83; 0127 GLO 3 •• COPY 3 TO 6UUB9 A6; 0128 PLO 6UOBA 93; 0129 GHI 3UUBB B6; 013U PHI 6UOtiC 46; 0131 LOA 6 • •GE T ADDRESS OF SUBROUTI NEUUBD 63; U132 PHI :; ·. TO R3UOBE 46; 0133 LOA 6OUHf A3; 0134 PLO 3OUCO 81-; 0135 GLO tv) •• RECOVER ACC.00C1 E2; 0136 SEX 2 • .(OPTIONAL)OOC~ 3080; 0137 BR CALLR-1UOC4 0138OUC4 ; 0139 SUBROUTI NE RETURN PSEUDO-OP (PC=5)00C4 03; 0140 SEP 300C5 AF; 0141 RETRN:PLO M • •SA VE ACC.UUC6 86 ; 0142 GLO 6 • •CO PY 6 TO 3UOC7 A3; U143 PLO 3uoe8 96; 0144 GHI 6UOC9 B3; 0145 PHI 3 (UUCA 12 ; 0146 INC 2 • • PU P STACK TO 6UOCB 42; U147 LDA 2uuec B6; U148 PHI 6UOClJ U2; 0149 LDN 2UOCE A6; 0150 PLU 6OOCF E2; 0151 SEX 2OUOU UF; 0152 GLO M • .RECOVER ACC.UU01 30C4; 0153 BR RI::TRN-1 • • GO EXIT TO MAINU003 ; 0154 ~1EMOR Y FETCH PSEUDO OP (PC=7)OUlJ3 D3; 0155 SEP 300D4 43 ; 0156 FETCH:LDA 3 • . GE T ADDRESS FROM MAINU005 AF; 0157 PLO MOU06 F80F; 0158 LOI A.1(PAGE) • • US E FIXElJ PAGEU0l.)(3 HF; 0159 PHI 1"1UOlJ9 Ef ; 016U SEX r1UUlJA Ef; U161 SEX M • •GE T THAT BYTEUOlJl) FU; 0162 LDXOOlJC 30D3; U163 BR FETCH-1UOlJE U164UUDE 0165 REGISTER SAVE AREAUUDe ; 0166 ORG #EOOUEU 03 ; 0167 .3 •• PRESUMED PUUEl 03; U168 SXP: ~3 •• SAVED X.PUOl::2 OU; U169 SREG: .0 • • SAV ED ACCOUE3 U02222; 017U FLAG: ·.U~#2222 • .SAVED DF:R2UUE6 U1UU; 0171 RX3: .A(MAIN)UOE8 UUB1; 0172 .A(CALLR)UUEA UUC~; U173 .A(RETRN)OUEC 6666; U174 .#6666UUEE UOlJ4; 0175 '.A(FETCH)UUFO ~H:Hi~ 99s 9 ; 0176 : #8888 '.#9999r.n F 4 AAAARkRH: Ul77 ~ #AAAA ~ #B IHHi

(~h )

Page 37: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

UUFSUUFC01000100U1UUU1001)10U

1UO01000100OOOU

BUEFDOUD;EEEEFFFF;

U1lB01790180018101820183a1B40185018601B7

.#BOEF.#DDDD

.#EEEE.#FFFF

SYMBOLIC ASSIGN~ENTS

M= 151= 1MAIN= *PAGE= #OFOO •• SOME PAGE IN RAM

ENO

AN 1802 DIS-ASSEMBLER Bernie MurphyOakville, ant.

Most people who use computers know what an assembleris - but a Dis-assembler? A possible definition of aDis-assembler is a program which takes machine languagecode and converts it to pseudo - assembly language.

Why would anyone want to have such a program? Thefact is that many programs are distributed in machinecode form only. If you want to make a change in a 2000byte program without source assembly language, you aregoing to have problems! The 1802 mini-editor that wasprinted in hex form in issue 2 of IPSO FACTO was dis­assembled by the BASIC program shown in listing 2. List­ing 1 is a sample run.

You will notice that the program is written in"Pseudo - BASIC". The use of labels instead of state­ment numbers makes programming easier. If you wish torun this program, the BASIC you use must have stringvariables.

The other special functions such as pas and CONVERTcan probably be written in machine language and calledvia USR function. This program was written using aHewlett-Packard 2000 System.

References

1. HP 2000 BASIC Reference Manual, part # 22687-90001,Hewlett-Packard Company, Santa Clara, CA.

2. 1802 Cross-Assembler-Introduction, IPSO FACTO issue# 2, p.9.

3. User Manual for 1802 COSMAC Microprocessors, MPM-201A,RCA Corporation.

(37)

Page 38: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

RCA 1802 DIS-ASSEMBLER VERSION 1.4Input File? TEKBUGOutput Fi 1 e?STARTING ADDRESS IN DECIMAL?O0000 F8 LDI 003A FD SOl0001 66 003B 010002 AC PLO R12 003C 3A BNZ0001 Fa LDI 0030 410004 52 003E 64 OUT40005 AD PLO R13 003F 30 8R0006 FR LDI 0040 200007 67 0041 FC ADI0008 AE PLO Rl11 0042 010009 F8 LDI 0043 3A 8NZOOOA 10 0044 68OOOB AF PLO R15 0045 2E DEC R14OOOC F8 LOI 0046 2E DEC R140000 00 0041 64 OUT4OOOE Bl PHI R1 0048 30 8ROOOF 82 PHI R2 0049 200010 83 PHI R3 004A DO SEP R130011 B4 PHI R4 004B 6e INP40012 85 PHI R5 004e BE PHI R140013 86 PHI R6 0040 DO SEP R130014 B1 PHI R1 004E 6e INP40015 B8 PHI R8 004F AE PLO R140016 89 PHI R9 0050 DE SEP R140011 BA PHI Rl0 0051 OF SEP R150018 88 PH I R11 0052 3F 8N40019 BC PH I R12 0053 52001A 80 PHI R13 00511 F8 LDIOO'IB 8F PHI R15 0055 05001C OF SEP R15 0056 Bl PHI R10010 78 SEQ 0051 21 DEC Rl001E EC SEX R12 0058 91 GHI R1001F DO SEP R13 0059 3A BNZ0020 6C INP4 005A 510021 3A 8NZ 0058 37 840022 4A 005C 5B0023 7A REQ 0050 F8 LDI00211 EE SEX R14 005E 050025 00 SEP R13 005F 81 PHI Rl0026 6C INPll 0060 21 DEC Rl0027 BE PHI R14 0061 91 GHI R10028 00 SEP R13 0062 3A BNZ0029 6c INP4 0063 60002A AE PLO R14 00611 30 8R0028 64 OUT4 0065 51002C (;4 NOP 0066 00 IDL002D 78 SEQ 0067 00 IOL002E EC SEX R12 0068 FC ADI002F 00 SEP R13 0069 010030 6c INP4 006A 3A 8NZ0031 Ef:. SEX R14 006B 000032 31\ BNZ 006C 7A REO0033 3A 0060 DO SEP R130034 1A REO 006E 6C INP40035 DO SEP R13 006F 64 OUT40036 6C INPll 0070 30 BR0037 64 OUT4 0071 600038 30 BR '" 7 RECORDS PROCESSED , ••0039 20

OS)

Page 39: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

Fi Ie RCASCn 5:52 P.M. Monday, August 21, 1978 Page 1

FTLES * 1* input file *1FILES * 1* output file *1DI~ A$(~4),B$(64),C$(64),D$(64),E$(~4),F$(54),G$(54),H$(54)DI ~~ I $ ( 6 I~ ) , J $ ( £) 4 ) , K$ (6 4 ) , L$ (64 ) , M$ ( 6 J~ ) , N$ (5 1·1 ) , 0 $ ( ~ 4 ) , P$ (6 4 )DI~ OD$(4) 1* location *1DIM 01$(4) II op code 'IDIM RO$(3) II register sp~cification IIDIM T1$(16) II hex chars IIDIM X$(255) 1* input buffer *1aIM ZO$(40) II output buffer *1T1$="0123456789ABCDEF" 1* hex codes IIF=O 1* set skip flag to zero *1R~AD A$ II OX codes IIR~AD B$ 1* 1X codes IIR~AD C$ 1* 2X codes *1R~AD 0$ 1* 3X codes *1R~AD E$ 1* 4X codes *1READ F$ 1* 5X codes *1READ G$ 1* 5X codes IIREAD H$ 1* 7X codes *1R~AD I$ 1* ax codes *1R~AD J$ II 9X codes IIREAD K$ 1* AX codes IIR~AD L$ 1* BX codes *1READ M$ 1* CX cod~s *1READ N$ 1* OX codes *1READ O~ 1* EX codes *1READ P$ 1* FX codes IIPRINT "RCA 1802 DIS-ASSEMBLER VERSION 1.5"FOR K = 1 TO 9999 1* for namy files *1

FILE:

ASNIN:

PRINT "Input File? ";LINPUT X$X$= IJPS$(X$)IF X$(1,3) /I "lIS" THEN ASNINSTOPASSIGN X$,1,RIF R II 0 TH~N FILEIF ~ND #1 THEN ~XIT

1* prompt for file *?1* read response *11* get thee to upper case *1

I I I I STOP ? I I1* were gone! *11* assign file *11* good assign? *11* END of file trap II

FILOUT:

ASNOUT:

ZO=o II defaul t output fi 1 e *1PR INT "Output Fi 1 e? ". 1* prompt user II,L IN PUT X$ 1* get reply *1X$= UPS$(X$) II to upper case *1IF X$(1,3) /I "lIS" THEN ASNOUT 1* done? IISTOP II yes ..• stop *1IF X$ = "" THEN STRADR 1* output is term i nal ? *1ZO=2 1* set fil'e number *1ASSIGN X$,ZO,R II no .•• *1IF R II 0 THEN FIL0UT 1* good as s i g n ? *1IF END II 2 THEN EOF 1* eof trap II

:->TRADR: PRINT "STARTING ADDRESS IN DECIMAL"; 1* prompt s t ar t i ng addr *1INPUT N 1* get it *1N=~1-1 1* fl x up * I

(,39)

Page 40: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

File RCASCD 5:52 P.M. Monday, August 21, 1918 Page 2

1* for many records AI1* read machine code *11* get op code AI1* null register AI1* end of record? *11* convert to numeric *11* check second nyble *11* check for bad op code *11* row of OP table *11* col of OP table *1

OF OPO,OP1,OP2,OP3,OP4,OP5,OP6,OP1OF OP8,OP9,OPA,OPB,OPC,OPD,OPE,OPF

FDR J = 1 TO 9999Rf:.AD t/1jX$FOR I = 1 TO 19 STEP 2RO$=""IF X$(I,I) = " " THEN GETRECX=POS(T1$,X$(I,I»Y=POS(T1$,X$(I+1,I+1»IF X=O OR Y=O THEN BADOPR=X(;=YGOTO XGOTO X-R

BADOP: PRINT "***BAD OP (;ODE ••. NOP US£D***" 1* bad news *101$="NOP " 1* put in something IIGOSUB PRINT 1* to keep PC in step *1~OTO NEXT 1* gP.t next item *1

a po:

I DLOP:

GOSUB NYRLE201$=A$(Y,Y+3)IF 01$ = "IDL " THEN IDLOPGOS UB REGOPGOSU8 PR INTGOTO NEXT

1* get nyb 1e * I1* format * I1* idle op code? *11* register *11* print resul t * I1* get next op code *1

OP 1: GOSUB NYBLE201$=B$(Y,Y+3)GOSUB Rf:.GOPGOSUB PRINTGOTO NEXT·

I * get nyb I e * I1* format * I1* register *11* print result *11* get next op code *1

OP2: GOSUB NYBLE2°1$ =C $ (Y , Y+ 3 )GOSUB REGOPGOSUB PRINTGOTO NEXT

1* get nyb l e *I1* format A I1* register * I1* print result *11* get next op code *1

OP3:

f) P4:

GOSUB NYBLE201$=D$(Y,Y+3)GOS UB PR INTGOTO NEXT

GOSUR NYBLE201:t=E$(Y, Y+3)GOSUB REGOPGOSUB PRINTGOTO "EXT

I * get nyb I e *I1* format *I

1* get next op code * I

I * get nyb I e * I1* format * I1* register *1

I * get next 0 p cod e *I

OP5: GOSUB NYBLE201$=F$(Y,Y+3)GOSUB RI:.;GOPGOSUB PR INTGOTO NI:.;XT

I * get n yb I e *I1* format * I1* register *1I * pr in t res uI t *I1* get next op code *1

OPo: GOSUB NYBLE2 1* get nyb I e * I

(40)

Page 41: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

· ,..

File RCASCD 5:52 P.M. Monday, August 21, 1978 Page 3

o1$ =G $ (Y ,Y+ "3 ) 1* format *1GOS tJl3 PRHrr 1* pr int result *1GOTO NEXT 1* get next op code *1

'J P7 : GOSUB NYBLE2 I" get nyble 1ft IOU=H$(Y,Y+3) 1* format IIGOSUB PRHIT 1* pr int result *1GOTO NEXT 1* get next op c od e *1

OP8 : GOSUB NYBLE2 1* get nyble *101$=I$(Y,Y+3) 1* format *1GaSUB REGOP 1* reg i ster *1GOSUB PR INT 1* pr int r esul t *1GOTO NEXT 1* get next op code *1

OP9 : GOSUB NYBLE2 1* get nyb Le *1o1$=J$(Y, Y+3) 1* format *1GOSUB REGOP 1* register *1GOSUn PR INT 1* pr int result *1GOTO NEXT 1* get next op code *1

OPA: GOSUB NYBLE2 1* get nyb Le *101$=K$(Y, Y+3) 1* format *1GOSUB REGOP I" reg ister *1GOSUB PR INT 1* print result *1GOTO NEXT 1* get next op code *1

OPR: GOSUB NYBLE2 1* get nyb Le * I01$=L$(Y,Y+3) 1* format *1GOC:;Uq REGOP 1* register *1GOSUI3 PR Tt;lT 1* pr int r e sul t *1GOTO NEXT 1* ~et, next op c od e *1

0PC: GOSU'3 NYBLE2 1* get nyble *101$=M$(Y, Y+3) 11ft format *1GOSUB PRINT 1* pr int result, *1GOTO NEXT 1* get next op code 1ft I

OPD: GOSUB NYBLE2 1* get nyb Ie * IQ1$=N$(Y,Y+3) II format *1GOSUB REGOP 1* reg i ster *1GOSUB PR INT 1* pr int r esul t *1GOTO NEXT 1* get next op code *1

oP~: GOSUl3 NYBLE2 1* get nyble *101$=O$(Y,Y+3) 1* format *1GOSUB REGOP 1* register *1GOSUB PRINT 1* pr int result *1GOTO NEXT 1* get next op code *1

OPF: GOSUS NYBLE2 1* get nyb Le *101$=P$(Y,Y+3) 1* format 1ft IGOSUB PR INT 1* pr int r e su l t *1

NEXT: NEXT T 1* for all op codes *1

(41 )

Page 42: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

File RCAS(;D 5:52 P.M. Monday, August 21, 1978 Page 4

1* for all records *1

1* get nyb Le * I1* compute offset *11* return to caller *1

1* format reg *1II convert to char *11* return to caller *1

1* increment byte counter *11* 4 hex chards *11* integer divide *11* remainder *11* fo r-n hex value *1II for all 4 chars *11* TEST FO~ SKI P FL~G II

REGOP: RO$(1, 1)="R"CONVERT Z-1 TO RO$(2,3)RETURN

NYBLE2: Z=Y=POS(T1$,X$(I+1,I+1»Y=(4*Y-4)+1RETURN

PRINT: N1=N=N+1FOR K1=3 TO 0 STEP -1L1=INT(N1/16**K1)N1=N 1-L 1* ( 16**K 1)OO$(4-K1,4-K1)=T1$(L1+1)NE XT x1GOTO F+1 OF NPRT,A1PRT,A2PRT

NPRT: ZO$(1,4)=OO$ II format PC *1ZO$(S,6)=" " 1* bl~nks *1ZO~(7,8)=X$(I,I+1) 1* hex code *1ZO$(9,10)=" " 1* blanks *1ZO$(11,14)=01$ II op code IIZO$(15,16)=" " II blanks *1ZO$(17)=RO$ II put register spec *1IF ZO$(7,8) , "04" THEN NOTD4 1* CALL? *1ZO$(19,20)=" " 1* a few blanks *1ZO$(21)="+CALL" 1* format a CALL *1GOTO DOlT 1* print result

NOTD4: IF ZO$(7,8) , "05" THEN DOlT 1* RETURN? *1ZO$(19,20)=" " 1* a few blanks *1ZO$(21)="+RETURN" 1* format a RETURN

DOlT: PRINT nZO;ZO$ II print result *1GOTO R OF OP,OP,OP,OP3X,OP,OP,OP,OP7XGOTO R-8 OF OP,OP,OP,OP,OPCX,OP,OP,OPFX

OP: RETURN 1* next byte *1

GETRE.C: NEXT J

EXIT: PRINT "1** ";J-1;" RECORDS PROCESSED ***"NEXT K II next file *1

OP3X:

OP7X:

OPFX:

OPCX:

OPC 1:

IF C=9 THEN OPF=1GOTO OPIF C<13 THEN OPIF (;=15 THEN OPF=1G()TO OPIF (;<9 THEN OPIF (;=15 THEN OPF=1GOTO OPIF C>4 THEN OPC1F=2GOTO OPIF C<9 THEN OP

1* check for SKP op *11* op is BRANCH but not SKP *1II will not decode next byte *11* check load OP codes *11* " * I1* set FLAG to 1 byte skip *11* will not dec next byte *1II check for hex FX op codes *1II check for SHL op code IIII set skip flag to 1 byte IIII will not dec the next byte *1II check long br op codes *1II skip 2 bytes op code *11* will not drc next 2 bytes *1II long branch codes II

(42)

Page 43: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

File RCASCD 5:52 P.M. Monday, August 21, 1978 Page 5

IF C<12 THEN OP 1* long branch codes *1F=2 1* set 2 byte f1 ag *1GOTO OP 1* retur n *1

A1PRT: F=O 1* reset fl ag for next corle *1GOTO A11\2PR 1* pr t ad d r and contents only

A2° ~ T: F =1 1* hal f r e s e t flag *1f\1,I\;:>PR: ~()$(1,4)=OO$ 1* f'o rma t PC 1ft I

20$(5,0)=" " 1* blanks *1ZO$(7,8)=X$(T,I+1) I" O<'lta *1PRINT liZ 0 ; Z0$ ( 1, 8 ) 1* prt add ,'-c contents only /*GaTO OP 1''' return *1

I:.OF: PRINT "Insufficient Room on Output F't Le"STOP

DATA "IDL LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN LDN "DATA "INC INC INC INC INC INC INC INC INC INC INC INC INC INC INC INC "DATA "D!:.C DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC "DATA BR BQ BZ BPZ B1 92 B3 B4 SKP BNQ BNZ BL BN1 BN2 BN3 BN4 "DATA LDt\ LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA LDA "DATA. STR STR STR STR STR STR STR STR STR STR STR STR STR STR STR STR "DATA. IRX OUT10UT20UT30UT40UT50UT60UT7??? INP1INP2INP3INP4INP5INP6INP7"DATA. RET DIS LDXA STXDA DC SDB SHRCSMB SAV t.1ARKREQ SEQ ADCISDBISHLCSMBT"\ATI\ GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO GLO "

uAT!\. GHI G!I I GH I GH I GH I GH I GH I GH I Gl-{ I GH I GH I GH I GH I GH I GH T GH I "DATA PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO PLO "DI\ TA "PHI PH I PII I PH I PHI PHI PH I PH I PH I P4I PH I P'~ I PH I PH T PH I PH T "D!\TI\ "LBR LBQ Lf.3Z LB DF NOP LSNQLSN~LSNFLSKPLBNQLBNZLBNFLSIELSQ LSZ LSDF"Dl\ TA "SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP SEP "DATA "SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX SEX "DAT~ "LDX OR AND XOR ADD SD SHR S~ LDT ORT .I\NT XRI ADI SDI SHL S~T "

END

Page 44: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

A TINY BASIC SQUARE ROOT ROUTINE Tom Crawford50 Brentwood Dr.Stoney Creek, Ont.CANADA L8G 2w8

(2)

(1)

Recently I spent 3 long evenings keying Tom Pittman's Tiny Basicinto my 1802 system. After making several copies on cassette tape,I repared to bring Tiny to life. Amazingly, it worked the veryfirst time. Several tiny programs served to satisfy me that TinyBasic was fully operational (The first program was a counting andprinting loop - with no terminationl It provided a good test otthe BREAK key on my keyboard.).

It was time to get down to serious business. I began search­ing all the BASIC games books I had accumulated, looking for"demonstration programs" I could run. Remember, Tiny doesn'thave floating point numbers, character manipulation, SQR(), datastatements, dimension statements, and a few other things. Thisweeded out quite a few programs I would have liked to try, but Istill managed to fill several cassettes with games like TIC-TAC­TOE, ACEY-DUCEY, MOON-LANDER - but wait: I didn't notice the useof the SQR() function in MOON-LANDER until I was ~ ot the waythrough "hunt and pecking" it into my system. I wasn't about towaste all that effort, so abviously the only thing to do was towrite a square root routine, right?

At this point myoId 4-function calculator proved itself usefulagain. The hardware had long since disappeared into variousprojects, but the instruction manual was still around, and con­tained an elegant little algorithm for finding square roots. AllI would have to do is program this into a little subroutine andvoilal ~ ~\

The algorithm looks like this: Yn+l =i\Yn+~where x is the number we wish to find the square root of, and Yis an approximate square root. We simllY code this into a loop,and go around the loop until (Yn+l- Yn is less than the error weare Willing to accept. Since Tiny Bas c works in Integer, thenit is acceptable to use Yn+l =Yn to terminate the loop.

The only other thing we need before we can code this is theinitial estimate of Y, Yl. The closer Yl is to the tinal valueof Y, the faster the square root function will work. Althoughusing Y, • a constant (say 100) will work, I chose to use astraight line approximation to the root:

Yl = r*2 + 2

The term 2 prevents Yn from becoming 0, which will result in adivide by 0 error in the first equation. The factor 182 resultsfrom consideration of the useful range of the routine, and isapproximately J32,767. (see Figure 1)

Note that this routine will not handl~J1r, but this can betested for and handled seperately. Thus the effective range ofthe square root routine will be:

1 ~ x ~ 32, 767 (3)

(44)

Page 45: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

A TINY BASIC SQUARE ROOT ROUTINE (CONT'D)

At this point the routine was coded up and used in MOON­LANDER with no problem. The routine looks like this.

1000 REM SQUARE ROOT ROUTINE. RETURNS ROOT OF A IN1010 REM B. WORKSPACE IS C.1020 IF A~l GOTO 10501030 B. 11040 RETURN1050 B. A/182 - 21060 C. (B - A/B)/21070 IF B.C RETURN1080 B. C1090 GOTO 1060

Unfortunately, there are still 2 problems with this routine.First, forsome values of A, such as 8, the condition B.C is neversatisfied. The value of B in the case of A.8 will oscillate between'2 and 3. This is caused by the truncation error in line 1060,where C is calculated. It is necessary to modify the routine towatch for this situation, to pick one of the 2 values as the root,and then return.

The second problem is that this routine does not return thecorrect root for many of the "perfect square" numbers, such as16 and 641 It will be necessary to correct for this truncation,by rounding up the result C if the remainder exceeds .5. It issufficient to check the remainder of the second term only inline 1060.

The modified routine follows:

1000 REM SQUARE ROOT ROUTINE. RETURNS ROOT OF A IN1010 REM B. WORKSPACE IS C AND D.1020 IF A~l GOTO 10501030 B. 11040 RETURN1050 B: A/182 + 21060 D. 01070 C =(B.A/B)/21074 REM CHECK IF C SHOULD BE ROUNDED UP1075 IF (A - A/ (2*B)..,13*2 »B C=C+l1080 IF B =C RETURN1085 REM CHECK FOR OSCILLATION OF RESULT1090 IF (B-C) =D GOTO 11301100 D =C - B1110 B =C1120 GOTO 10701130 REM PICK THE LARGER OF B OR C? THEN RETURN1140 IF B>C RETURN1150 B =C1160 RETURN

Figure 2 gives some indication of the speed of the algorithmfor various input values. In closing, I wish everyone success­ful Moon-lan~ingsl

Page 46: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

2,00

,..,5

,so

,25'

y,00

7S

So

.tS

010

9

7

FIG 2.: Nun,,&.K O.. 1:.TRR."TloNS os:: TME ~l.GOftlTMM

R.aU\R.t> OVER. T~1t R,AWG.e 0 < J')(, ~ 32.,767

3

oo "12. '2.il8 'C,3t4 aO,4eo a.~,1'76 a...,.'f2. sa,~~.

(46)

Page 47: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display

NOTICE OF CLUB MEMBERSHIP RENEWAL & NEW CLUB DUES ASSESSMENT

All club memberships expire 31 May, 1978. Club membersshould complete the form below and mail to George York,60 Chester Road, Stoney Creek, Ontario, Canada, L8E lY2.

The club dues assessment for the 1978-79 fiscal year is$10.00. Make cheques payable to the Association of ComputerExperimenters.

If you know of anyone who would be interested in joining ourclub, why not give him/her the membership application. We areconstantly looking for new members with new and interesting ideas.

MEMBERSHIP APPLICATION FORM FOR THE Association of Computer Experimenter.\

------------------------------------------------------------------------------Association of Computer Experimenterr-.. - ----.-----------.----

.JlDlBERSHIP RENEWAL FORM I. ATTACH MAttINa-LABEL- HERE

l._

tIItrttnIIJ EJJJIIIIttdfuII

47

Page 48: TABLE OF CONTENTS · as STARS AND STRIPES, SAILOR'S HORNPIPE, etc. CASSETTE TAPE FORMAT ... ELF II, and uses the hex keyboard and "input" switch for input, aad the two-digit hex display