olvoilo lll18lly 10 - cosmac elf · other systems you are not using actively for microcomputing. 1-...

40
OlVOIlO lll18llY 10 M IC 8DCDMP Ull 8 IlCHIDlDGY 3ANUARY INDEX 198::5 XSSUE PAGE EXPERIMENTAL VOICE-RECOGNITION by Phillip B. Liescheski III Maybe your computer can understand you! CASMC18- An 1802-CYBER Cross-Assembler 1:S by Phillip B. Liescheski III A FULLY BUFFERED MORSE KYEBOARD by Jhon H. Golbeck OPPROG A 0+ Mini-Monitor by Bert Mathies FORTH and the SMARTERM-80 by Michael Smith DISKETTE Initialization Program by Mike Franklin DEPARTMENTS VITAL INFORMATION EDITORIAL NEW PRODUCT DATA SHEET CLUB COMMUNIQUE MEMBERSHIP FORM 20 29 35 40 41 42 pu blicat ion IPSO FACTO is published by THE ASSOCIATION OF COMPUTER-CHIP EXPERIMENTERS lacel, ANON-PROFIT EDUCATIONAL IntDraatiDI in IPSO FACTO is beleived tD be accurate and reliable. HD.ever, ftD re5pDDSibil- ity is assua.d by IPSO FACTO Dr THE ASSOCIATION OF COMPUTER-CHIP tor its US,; lor tor any intringPients Dt patents or rights ot third parties .hith 11y fro. its us ••

Upload: others

Post on 26-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

OlVOIlO lll18llY 10 MIC 8DCDMP Ull 8 IlCHIDlDGY3ANUARY

INDEX

198::5 XSSUE

PAGE

EXPERIMENTAL VOICE-RECOGNITION by Phillip B. Liescheski III ~

Maybe your computer can understand you!

CASMC18- An 1802-CYBER Cross-Assembler 1:Sby Phillip B. Liescheski III

A FULLY BUFFERED MORSE KYEBOARD by Jhon H. Golbeck

OPPROG A so~t 0+ Mini-Monitor by Bert Mathies

FORTH and the SMARTERM-80 by Michael Smith

DISKETTE Initialization Program by Mike Franklin

DEPARTMENTS

VITAL INFORMATION

EDITORIAL

NEW PRODUCT DATA SHEET

CLUB COMMUNIQUE

MEMBERSHIP FORM

20

29

35

40

41

42

publicat ion

IPSO FACTO is published by THE ASSOCIATION OF COMPUTER-CHIP EXPERIMENTERS lacel, ANON-PROFIT EDUCATIONALDr~nizatiDn. IntDraatiDI in IPSO FACTO is beleived tD be accurate and reliable. HD.ever, ftD re5pDDSibil­ity is assua.d by IPSO FACTO Dr THE ASSOCIATION OF COMPUTER-CHIP EXPEP.lKE~~ERS tor its US,; lor tor anyintringPients Dt patents or rights ot third parties .hith 11y res~lt fro. its us••

Page 2: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

Prtsidtlt: Johl Noris 14161-239-8567Trtasurtr: Ktn Itvis 14161-277-2495Sttrtttry: Frtd FtavtrA/Stct. : Rob ErblickDirtctors: Johhl ·Naris Frtd Pluthtro

Ktl Itvis Nikt Friftklil

Ntllslttttr:

ProdactlonMalager: Frtd PluthtroEditors: Frtd Ftavtr

TOlY HillPublicatiol: Dtllls Nildol

Johl HU5II1

Product Nailing:

Publicatiols: Ed Ltslit 14161-528-3222loards: likt Fruklil 14161-878-0740Soft.art: lichatl Slith

Dtvtlop.nt:

Hard.art: likt FrllklilTOBy HillKtl IIVis

Soft.art: lichatl Slith lob Erlichiaylt lDIdish Dal Thaaas

PUBLICATION POLICY:

lbt Itllslttttr staff iSS... 10 rtspols­ibility for articalt trrors lor forilfringtlt.t .pOI copyright. lht COltt.tof all articllS .ill bt vtrifitd, aslucb is possiblt, lid lilitatio.s listtdli.t. lakt of tquip.lt, ar authtr ofsoftllartJ. lht ...slttttr .ill bt pub­lisbtd tvtry othtr IDBth, co....cingi. Ottobtr. Dtlays aay bt i.carrtd asrtsult of loss of staff, postal dis­ruption, lack of articlts, ttc. Vt apol­ogizt for such i.convtllt.ct, hottvtr,thy art gt.trally caustd by factorsbtyold tht control of tht Clab.

ARTICAL SUBNISSIONS:

Tht cOlttnt of IPSO FACTO is voluntarilysublltttd by club Itlbtrs. Vhilt ACEiSSUltS 10 rtspo.sibility for trrors lorfor ilfrilgtltlt upon copyright, thtEditors vtrify articalt conttlt as luchis possiblt. ACE ca. USt articals, botbhardllirt lid soft.art, of alY Itvtl,rtlatilg to alY licro cOlputtr COlPOI­tits, ptriphtrals, a.d products. Pltastsptcify tbt tquip.lt a.d/or soft.art to.hich tht articalt applits. Typtd artic­Its art prtftrrtd a.d art prilttd first.Pltast stld arigllals, lot phtocopy lat---- ----"" .._-- --aattrial. it .ill rttur. pbotocopits oforigilal if rtquirtd.

IElBERSHIP POLOCY

Aleabtrship is contracttd 01 tht bastsof a club ytar - january 1 to dtctlbtr 31Each atlbtr is iltitltd to, alang othtrpriviltgts of Itlbtrsbip, all issuts ofIPSO FACTO publishtd durilg tht ytar.

Sft back pagt for bargils01 circuit boards. It havtr lo.trtdpricts to gtt rid of tbtl.

ARTICLES

WANTED

Vt Dttd articlts on sixtttn bitCPU'S Such as tht 8088, 8086,68000,~tc. If you havt t.y goodcircuits pltast stld tbtl i••

GlUESTIONS

IF YOU HAVE ANYQUESTIONS OR COMPLAINTSSEND THEM IN WE WILLTRY TO ANSWER OR SATISFYTHEM.

MEETINGS

MEETINGS ARE HELD THESECOND TUESDAY OF EACHMONTH EXCEPT JULY ANDAGUST AT SHERIDANCOLLEGE ON TRAFALGARROAD NORTH OAKVILLE.

MEETING DATESFOR 1.985

12 FEBRUARY12 MARCH

9 APRIL14 MAY11 JUNE10 SEPTEMBER

8 OCTOBER12 NOVEMBER10 DECEMBER

ASSOCIATION OF COMPUTER-CHIP EXPERIMENTERS INC.P.O. BOX 581,

BURLINGTON, ONTARIO,CANADAL7R 3Y5

Page 3: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

EDITORIAL

Welcome to ACE the club devoted to the advancement of microprocessortechnology.

I was going to start with an apology for the lateness of this issue, butI changed my mind. The reason, availability of articals on the 1802 insufficient quantity and quality has diminished to the point where thereare not enough to produce a quality newsletter.

Two years ago when I ran our last Micropocessor Conference, I askedthose attending to fill in a questionnaire. The results and the trend atthe time to sixteen bit CPU's convinced me a change in our club policy toinclude sixteen bit CPU's ~nd MICRO's was needed. Unfortunatly mysuggestion for change was ignored by a majority of the executive resultingin our membership going from an average of 400 to about 90, give or takeone or two. Most of you have indicated on your membership renewal that youare using systems other than ACE and that your ACE system is collectingdust. Those who are using your ACE system have no fear, we will publish allarticals you submit.

SOME STIMULATION

To solve this problem we are changing our club policy as well as ourpuplication policy. The members of the executive who ignored my advice andsuggestions are now agreing with me a little late but maybe not too late.

We will now publish articles of quality on other Micro's. Articlesabout sixteen bit CPU's and Micro's are of major intrest. There are a fewquality boards on the market that use 8088's,8086's,68000's, etc. NE:Megaboard, MBE XT, Motorola's education board. We need articles about theseor others that are available.

Articles of quality will be published about APPLE, ATARI, COMMODORE,IBM, TEXAS, RADIO SHACK, XEROX, ETC •• These are the micro's indicated inuse by you our members.

NOTEQuestion all the people you know about their computing interests, also

tell local user groups that we have the capability of providing a no. 1quality newsletter.

MORE STIMULATION

Some projects have bean proposed to make use of those ACE boards, orother systems you are not using actively for microcomputing.

1- The ACE Home Environment Control and Data aquisition System. Withfeatures to detect intruders, fire, control temperature, dial the phone,print out reports on temp. cycles etc ••

2- Robot control.Send your hardware and software articles on these or other projects

that interest you.

A FINAL COMMENT

THERE ARE THREE KINDS OF MEMBERS IN THIS CLUB.

THOSETHOSETHOSE

WHOWHOWHO

MAKE THINGS HAPPENWATCH THINGS HAPPENSAY WHAT HAPPENED

Page 4: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

Phillip B. Liescheski IIIDepartment of Chemistry ~University of TexasAustin, TX 78712November 26, 1984

An Experimental Voice-Recognition Package with less Hardware

Here is an experimental software oriented voice-recognitionpackage for the 1802 Super Elf. VREC-B is the main program writtenin Quest Super BASIC VJ.O which calls RECNB, a small machine coderoutine. It can be trained to recognize and respond to four spokenwords with little extra hardware support. It can be easily modifiedto control a device. such as a simple robot. which demands a verysmall vocabulary.

The major feature of this system is that it is softwareoriented. Most voice-recognition systems require. in addition toa computer. several band-pass filters. integrator/averagers and ananalog-to-digital converter. This system only demands an 1802 basedmicrocomputer. similar to the Quest Super Elf. with at least 16Kof memory and a cheapy cassette player7recorder with built-incondenser microphone. which one probably already bought from J.C.Penny's (Model #6567). VREC-B uses the cassette recorder asmicrophone and amplifier (with automatic volume control which helpsto normalize the audio signal). The audio signali.is seriallydigitized by the Elf's cassette input and sent to the 1802 CPUthrough the EFJ line. The machine code routine. RECNB. measures the ~

EFJ signal by a zero-crossing technique. While VREC-B analyzes thisvoice information with a pattern recognition algorithm similar tothe K-nearest neighbor (KNN) method.

The first basic problem to tackle in a voice-recognitionscheme is how to measure the voice signal. The measurement shouldbe quick. simple but discriminating. A good method is to countzero-crossings in the signal. The zero-crossing technique containsfrequency information. but is less sensitive to amplitude change.so one needs to be less concerned over how loudly the word isspoken. This reduces some of the sound reproduction problems. Alsozero-crossing requires only a single serial input port, such asEFJ. and the counting can be easily performed by the 1802. Thishelps to replace some of the hardware with software. In other words.this system requires less money to implement.

The routine RECNB counts the number of zero-crossings in thesignal. It does not perform a true-blue zero-crossing count. butcounts the number of on-off/off-on transitions in the EFJ line.The Q light is used to rem~er the previous state of the EFJ so thata transition can be detected and counted. Register RA counts thesetransitions over a 25 millisecond time period. This number isstored on VSTACK. Thirty-two counts are collected so that the totalsampling time is about 800 milliseconds. These J2 counts ormeasurements represent the voice signal. All o~ this is initi~ted

Page 5: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

Liescheski

when the EFJ serial input line goes high and remains high for atleast 90 microseconds. With this scheme, an external push-buttonswitch is not necessary. One merely speaks, and the computerresponds.

The next problem i~ to find a method to teach a computer torecognize patterns. The scheme that I chose is similar to theK-nearest neighbor (KNN) algorithm. In these methods, a measurementtechnique is adopted so that the data representing the pattern can

. be easily formed into a vector array. This vector resides in aspace called Measurement-space or M-space for short. Hopefully ameasurement scheme has been chosen so that the vectors of a certainpattern reside close to eachother in the M-space, but far fromother vectors of different patterns.

To better understand this algorithm. consider two patternsdenoted as X and 0 and a simple 2-dimensional M-space. In thisexample only two measurements (Ml and M2) are made and recorded foreach sample. Several samples are taken for each pattern. and theirvectors (Ml,M2) are pl~ced in this M-space:

'J..xX~XXi.

Ml

In the technique. used by VREC-B. the reference samples for aparticular pattern are not individually saved as in KN~ but theircomponents are averaged together. An averaged vector (Ml.M2) foreach pattern is saved as a reference or template&

o

11\1

This sampling and averaging is part of the training session for thecomputer. After training, the computer has a collection of averagedvectors which are used as templates for each different pattern.With this. the computer can classify an unknown sample by comparingthe unknown to its reference c~llection (templates). For fun.consider an unknown sample (+) in M~space and its spacial relationshipto the two template vectors for patterns X and 0:

----- ----==========.........

Page 6: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

6'

Liescheski

s"- ,,-r.,X...... ,

, So\\\-o

"'1

Since the distance Sx is smaller than the distance So. the computerrecognizes the + sample as pattern X. In M-space. the distance Sis calculated as though the space were Euclidean (PythagoreanTheorem). In other words. all measurements in a sample are givenequal weight.

In VREC-B. the patterns are word sounds. The measurements are)2 consecutive zero-crossing counts in 25-millisecond time slices.This measurement forms a )2-tuple vector which resides in a )2­dimensional M-space. (Warnings Don't try to imagine a )2-dimensionalspace.) This )2-tuple vector hopefully contains enough informationabout the sound of the word so that the word can be recognized anddistinguished from other words in the small vocabulary set.

VREC-B is simple to use. After loading in the Quest SuperBASIC interpreter. type ins "DEFUS @)400." This will open up a -....space in memory for RECNB. With this. type in the BASIC program.VREC-B. If you nave a Quest Super Elf and a cassetteplayerlrecordersimilar to the J.C.Penny's model 6567. then simply insert the Elf'scassette input plug into the recorder's microphone jack. If youdo not have similar hardware. you may have to improvise. Themodifications should be minor. Any 1802 machine and cassette recordershould work well.·cr.~-

Place a cassette tape into the recorder and press the record.play and pause buttons. The pause button keeps the amplifier on butstops the motor. With the motor off. the cassette tape will not betotally ruined. and noise from the motor will not falsely triggerRECNB.

After all of this. run VREC-B. VREC-B will initialize importantparameters. load RECNB into memory and ask you for the vocabularyword size. The maximum number of vocabulary words is four. If onewants the vocabulary set: "YES" and "NO".then one merely enters inthe value two. This value is deposited into the integer variable D.After this. matrix R. which will contain the voice template vectors.and vector array S. which will contain the trial vector distances.are cleared.

With this. the training session begins. First. the word to betaught is typed after the prompt request. The computer will askyou to say that word clearly. After saying the word. the computerwill return and ask whether the word was pronounced properly. Thisrequest is important especially if you are sitting in a squeakychair. Extraneous noise will falsely trigger the system. The computer ~will repeat this sequence ten times in order to get a good sampling.These voice vectors are averaged together and stored into the voicereference matrix R. After this. the co~puter is taught the next worduntil its vocabulary is complete.

-------------

Page 7: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

Liescheski

After training. VREC-B is ready to recognize one of the wordsin its vocabulary. It will ask you to say one of the words. Aftersaying the word. it will respond and begin to analyze the voicedata which was collected by RECNB. The distances between the newtrial voice vector in V and the different voice template vectorsin matrix R are calculated and stored respectively in S. The wordwhose template vector is closest to the trial voice vector isrecognized as the word which was said. The computer tells what itunderstood. It prints out each word with its respective distance ofrecognition. This lets you see how well it did.

The accuracy of VREC-B is fairly good. With the vocabularywords: "YES" and "NO". it made three errors in 25 trials. With thevocabulary: "GO"."TURN" and "STOP". it made only one mistake out of23 trials. Finally with the words: "LEFT". "RIGHT" •"SLOW" and "FAST",it misunderstood twice in 15 trials. From these tests. VREC-B hasabout a ninty-percent recogni~ion accuracy.

This system has some basic problems. First. it is slow. sincemost of the analysis is done by th:r,BASIC program. Writing the mainprogram in machine code or a faste~anguage should solve thisproblem. With faster speeds. the vocabulary size limit could probablybe increased to eight. Second. the system has no means of handlingwords which are not in its vocabulary. If this causes you problems.insert the following line:

502 IF L)T THEN PR "I DID NOT UNDERSTAND YOU1":GOTO 520

A good tolerance value for T seems to be 10000. The value for Twillhave to be optimized for a particular vocabulary set. This additionwill essentially set hypersphere boundaries about each template vector.If the trial voice vector does not reside in one of these hyper­spheres, then the computer does not recognize the word.

VREC-B is fun to use and has some practical applications. Ihave given some interesting references below (1). Some of thereferences are not directly concerned with voice reco~ition. butintroduce some ideas about pattern recognition (2.3.4). One of thereferences gives some information on zero-crossing and has someneat ideas (5). Table I contains results from one of the test runs.Also the assembly source for RECNB is given. if changes are needed.I hope you have fun with VREC-B.

References:

1popular Electronics "IntrOducing SPEECHLAB". May 1977.pp. 43-50.

2Analytica Chimica Acta "Four Levels of Pattern Recognition".Vol. 103 (1978) pp. 429-443.

3Shizvo Fujiwara and Harry B. Mark. Information Chemistry:Comouter Assisted Chemical Research Desi£n (Tokyo: University ofTokyo Press. 1975) pp. 77-95.

4peter C. Jurs and Thomas L. Isenhour. Chemical Aoolicationsof Pattern Recognition (New York: John Wiley & Sons. 1975).

5Mar k J. Robillard. Microprocessor Based Robotics (Indianapolis:Howard W. Sarns & Co., Inc., 1983) p. 205.

Page 8: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

a :--

DEFUS Q31t\JO1 REH **

-~----- -- ------- --_._-._-- -~-

2 REM ** VREC-B ..........3 REM ** PHILLIP B. LIESCHESKI III ** 11-7-S'tIt REM **5 REM ** A SIMPLE EXPERIMENTAL SOFT~ARE ORIE~TED VOICE6 REM ** RECOGNITION PACKAGE FOR THE QUESt-sOPER-ELF~------------

7 REM **1-0-R E~M:--*-*----:S=E=T=---:-U=P::---::I=M=P:-::O::-::R:-::T:-:A:-::N=T=--=P:-:A=R=-=-AMET ER S FO R VR EC-820 DEFINT G

--30 elM R(4,32),VC32),SCIt)39 REM * STARTING LOCATION OF RECNB4-0 [=&32004-9 REM * TOP OF VSTACK50 F=&330059 REM * LOAD RECNB INTO MEHORY60 GO SUB 60070 INPUT "ENTER DESIRED SIZE FOR VOCABULARY (FOUR IS HAX)=" D79 REM **80 REM ** CLEAR THE HATRICES90 FOR A=l TO 0100 FOR B=l TO 32110 RCA,B)=O.120 NEXT B130 SCA)=O.140 NEXT A149 REP! **150 REM ** VOCABULARY BUILDER/TRAINER160 FOR A=l TO 0165 PRINT110 PRINT "ENTER THE NEW WORD";180 INPUT W$(A)190 FOR B=1 TO 10200 PRINT "CLEARLY SAY THE ~ORD - .,; W$CA)209 REP! * LISTEN TO VOCABULARY ~ORD

210 CALLCE)220 PRINT "I HEARD you. WAS THE ~ORD PRONOUNCED PROPERLY (N OR Y)" ;2 30 INPUT TS240 IF T$="N" GO TO 200250 FOR C=l TO 32259 REM * GET SAMPLE VOICE INFO FROM VST~CK

260 P=PEEKCF-C)269 REM * KEEP A RUNNING AVERAGE OF THE VOICE TEMPLATE270 RCA,C)=RCA,C)+P/IO.280 NEXT C290 NEXT B300 NEXT A309 REP! **310 RE~ ** WORD RECOGNIZER315 PRINT320 PRINT "SAY A WORD IN THE VOCABULARY:"325 REM * LISTEN FOR THE TRIAL WORD330 CALLeE)340 PRINT "I HEARD YOU!"345 REM * GET TRIAL VOICE VECTOR FROM RECNB VSTACK350 FOR A=l TO 32360 VCA)=PEEKCF-A)310 NEXT A314 REM * TE~PLATES ARE THE VOICE REFERENCE VECTORS315 REM * DETERMINE DISTANCE B/W TRI~l VOICE VECTOR & TEMPLATES3fO fOR A=l TO 0 -------------

Page 9: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

.-_._---- ------ -_._--_ ..__ ....__ ..._---_._----_.__.... -

FOR B=1 TO 32H=R (A, 8) -v7.(8"');;-----------------------------

S(A)=S(A)+H*HNEXT B

rJEXT A

390It CO

51,;,o_--;-;-;:~~..:.:;:.---=:...:~~---------------.--------_o.. jO43541J 0

REM * FIND CLOSEST TEMPLATE TO TRIAL VOICE VEcloRG=l

If.5 01J60

L=S(G)FOR A=1 TO 0

If.7 0If. 8 0

IF L<=S(A) GO TO 500L=S (A)

If.9 0500

G=ANEXT A

505510

REM * INDICATE THE CLOSEST TEMPLATEPRINT "I UNDERSTOOD - ,,; ~$(G)

5205305 If. 055Q560589

FOR A=l TO 0PRINT W$(A); "DISTANCE="; SCA)S(A)=O.

NEXT AGO TO 315REM *.

DATA -1REM ••

DATA '7B,'2~,'8D,13A,'lBDATA 18A,.73,.F8,.OO,.AA

DATA IFF,.A8,IF8,.OO,IBADATA .AA,.BC,IAC,.AD,IF8DATA .20,.BD,13E,.11,IC4DATA 'C~,'3E,'11,IC4,'CIJ

DATA .9D,.3A,.lB,.7A,18CDATA .73,.9C,.73,#E2,.D5

REM •• RECNB MACHINE CQDEDATA .E8,IF8,.32,IB8,IF8

DATA 13E,.11,.36,.26,.39DATA '21,'lA,IC8,'C~,17A

DATA 17A,130,12E,.IC,'31DATA .2B,.lA,.C8,IC4,.7B

605~6-;7---;;-~7--;;-;;~~~~-;;-O-~~~-'i----------------------------

608

590600

6C9610611612615689

6016026036C4

690700710720

REM •• MACHINE CODE LOADERA=OREAD BIF B=-1 THEN RETURN

7307 If. 0

POKE(E+A,B)A=A+l

750999

GO TO 710END

,.---...-------------------------------------

------ --_._-

Page 10: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

10

** REC~B- A SIHPLE ZERO-CROSSINGS MEASUREMENT ROUTINE FOR* VOICE RECOGNITION EXPERIMENTS. IT SAMPLES THE SIGNAL... IN EF3.

..

...**•

PHILLIP e. LIESCHESKI III .* NOVEMBER 1, 1984(NOTE: ONE MACHINE CYCLE = 5 MICROSECONDS)

eRG iit3200

*PAGEZEROSIZE...RECNB

WAIT

SAMPLE

QOFF

ON

QON

OFF

EQUEQUEGU

SEXLOIPHILDIPLOLOIPHIPLOPHIPLOPLOLDIPHIBN3NOPNOPBN3NOPNOPBN3B3BNQINCLSKPNOPREQREQBRINCBQINCLSKPNOPSEQSEQDECGLOBNZGLOSTXDLDIPLOGHIB~lZ

lao120

R8PAGER8VSTACKR8ZERORARARCRCRDSIZERDWAIT

YAIT

WAITONQOFFRA

OFFRCQONRA

RDRDSAI1PLERA

ZERO

MAKE RB VSTACK PNTRPREP VSTACK PNTR

RESET:ZERO-CROSSING (Z-X) CNTR

HIGH CNTR

PREP SAMPLE CNTR

LISTEN FOR A WORD

IS EF3 HIGH?IF NOT, IS Q OFF?IF NOT, A TRANSITION OCCURRED

BUMP Z-x CNT RKEEP TIMING SMOOTHTURN OFF Q LIGH T

EF3 IS HIGH, SO BUMP HIGH CNTRIS Q ON?IF NOT, A TRANSITION OCCURRED

BUMP Z-X CNTRKEEP TIMING SMOOTHTURN ON Q LIGHT

BUP-IP SAMPLE CNTR

IS 25 MSEC UP?IF SO, STORE Z-X CNTR ON VSTACK

RESET Z-X CNTR

IS SA"FLING tOP'!PlETE?----------------

Page 11: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

- --- ,-----_._--_ .. -------- - ------- -- - -_ .. - -----._- --"._--_. ----- -_.- ------ - _._.- -- - - - - _. ~-

:i..1GlO RC IF so:

-s-ix D ----------pUtHIG----.:tCNT R--(fN-Y-ST AC.C-------- ----~----------

..,---- GHI RC-----STXD_ •. ____ r .•______ ~._________

._--_.~ - _._------.REG TURN OFF Q LIGHT

--------~-SEX R2 Hl KE-R-2SlACIC-P-NTR._-- -----.

RETN RETURN TO BASICS--.. -----

ORG 832FF

*YSTACK DATA ZERO THE YOICE DATA STACK..-

END

Table II

I said Elf understood Mistakes

~:SLOW SLOWRIGHT RIGHTFAST FASTLEFT FAST XLEFT RIGHT XSLOW SLOWFAST FASTSLOW SLOWRIGHT RIGHT

~LEFT LEFTLEFT LEFTFAST FASTRIGHT RIGHTSLOW SLOWLEFT LEFT

------

HAVE YOU WRITTEN THAT ARTICLE YET r- -

- - - - ..-

WHAT HAPPEND? YOU WHERE NOT WATCHING

r---

- ~_.~--- ------------ -

--- -----~-~--- -- - - -

Page 12: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

12

-CASMC18 - An 1802 - Cyber Cross-Assemblerby P.B. Liescheski III, Dept. of Chemistry, U of Texas, Austin T

Here is a cross-assembler for the 1802 written in FTN4 Fortran on· the CDC170/750 Dual Cyber. There is another cross-assembler written by George ~illar inFortran-H for the IBM; however ,- the hardware- architecture for the IBM and the CDCmachines is quite different. With this and the desire to start anew, CASMC18 wasbuilt from scratch.

CASMC18 should be easy to use. The major difficulty will be obtaining anaccount on a CDC machine. Upon doing this, an assembly source code file is createdwith the system editor. The first ten columns of a line are reserved for labels,with the label beginning in the first column. The second ten columns are reservedfor the 1802 mnemonics (code) with the mnemonic beginning on the eleventh column.The third ten columns are reserved for the operands with the operand beginningon the twenty-first column. Columns beyond the thirtith are for comments. Anasterisk placed on the first column reserves that line for more comments.

The CASMC18 recognizes the 1802 mnemonics plus four puesdo codes. The fourpuesdo codes are DATA, ORG, EQU and END. DATA allows for the insertion of byte­size data into the code. ORG defines the starting address for the code. EQU is usedto assign values to labels. END indicates the end of the source. For more details,check the notes and the 1802 mnemonic table at the beginning of the Fortransource.

After creation of the assembly source file, the file should be renamed asTAPEI. CAS~C18 is loaded, compiled and executed. With luck, CASMC18 will assemblethe source on TAPEI and put the results in the OUTPUT file. CASMC18 is relativelysimple. For this reason, it is not fool-proof and contains a few weaknesses.No major bugs have been discovered, but .this only means that it has not undergoneheavy usage. If any bugs are discovered, please write. Good-luck.

ASIIIP1E SAIII'LE• DRS 10000

PAGE EIU 100BE6IN -,SEX 12

LJI PAGEPHI R2LJI STACICPlO R2UUT4III

STACIC JlATA 188ED

IE6INPREP STACIC POINTER

OUTPUT STACIC CONTENTSTOP

IJIPOITAIT

lCYIER-1802 CROSS ASSEllLE1 Vl.0 - SECDKD PASS12 ASIMPLE SAMPLE34 Dl6 1000056 PASE EIU 10078 0000: E2 IEGIN SEX R2 BE6IN9 0001: F80G LJI PASE PREP STACIC PONTER10 0003: 12 PHI R211 0004: F809 LJI STACK12 0006 A2 PlO R213 0007: 64 0UT4 OUTPUT STACIC CONTENTS14 0008: 00 IDL STOP1516 0009 88 STACIC lATA 1881718 END IIIPOITAHT!

-

Page 13: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

[ _.t: .....

PROGR AK CASMC18 CINPUT,lAPE h·OUTPUT)

L •• CYBER-1802 CROSS-ASSEMBLER

.1.3.'

C *.

cr

..........

.t.•

PHILLIP B. LIESCHESKI III • 1/8/82UNIVERSITY OF TEXAS - AUSTINCDC 750/170 DUAL CYDER - FTN4 COMPILER

............................................................................ .....••

cccccccr:cc

cc

c

cccccccccCfCCcCC

ccr.~

cc

c

c

... NOTES ON CYBER-1802 CROSS ASSEMBLER Vl.0....•• I. SOURCE FILE FORHAT... A. LABELS•• 1. KUST BEGIN IN 1ST COLUMN... 2. CAN BE UP TO 9 CHARACTERS LONG•• e. "NEMONICS.* 1. "U5T BEGIN IN 11TH COLUMN..... 2. STANDARD 1802 "NEMONICS (SEE TABLE)*. C. OPRANDS... 1. "UST BEGIN IN 21ST COLUKN•.• 2. FOUR TYPES:** A. LABEL DEFINED OPRAND: EG. BEGIN•• B. REGISTER NUKERIC: RX EG. R7*. C. SINGLE-BYTE NUKERIC: #XX EG. IFF*. D. DOUBLE-BYTE NU"ERIC: .XXXX EG. 80123** D. CO""ENTS*. 1. CAN RESIDE 8/W COlU'UrS 31 TffRU 81** 2. OR, AFTER AN '.' IN THE 1ST COLUMN.* E. SOURCE FILE KUST BE CONTAINED IN TAPEl, NOT INPUT

*. II. PSEUDO CODES•• A. DATA... ~. ALLOWS ONE TO INSERT A BYTE OF DATA IN CODE•• 2. ACCEPTS ANY OPRAND, BUT LSB IS STORED*. B. ORG... 1. ALLOWS ONE TO REDEFINE CODE ADDRESS** 2. ACCEPTS ONLY N~ERIC OPRANDS, BUT 2-8YTE PREFERED... 3. ADDRESS 0000 IS BY DEFAULT... C. EQU... 1. ALLOWS ONE TO ASSIGN A VALUE TO A LABEL... 2. ACCEPTS ONLY NUKERIC OPRANDS.... D. END... 1. INDICATES END OF SOURCE•• 2. REQUIRED...** *••* * ***.***.***.*•••*.** .

*'"*.'II.IYtPLICIT INTEGER(A-Z),..*DI~£NSION MNEMONICI0S).SYftBOL(200,2),CO""ENTCS),OPCOOES(lOl).

&OPRSIZ[(ltlS)••EQUIVALENCECORG,"N(HONl(103»EQUIVALENC[(EgU.~EMONI(104»

EgUIVALENCECEND,"ME~ONICI05»

C *.

Page 14: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

i4 DllA NDATA.NORG,HEQU,NEND 1102,103,104,1051DATA ~ASK 17700000000000000000081DATA ASTERSK 1470000000000000000008/DATA SLANK 110H IDATA PHESIZE/I0S/O'TA COLON 1080000000000000063558/

C ..C 18m2 MNE"ONIC TABLEC 111111

DATA ~E"ONI 1 'IOL ','LON ','INC ','DEC ','DR ','8Q ','8Z "&'EDF ','SPZ ','8G£ ','81 ','B2 ','83 ','84 ','NBR 'y'SKP "&'BHQ ','8HZ ','BNF ','B" ','BL ','BNl ','BM2 ','BN3 ','BN4 ""LOA ','STR ','IRX ','OUT1','OUT2','OUT3','OUT4','OUT5','OUT6',&'OUT7','INPl','INP2','INP3','IWP4','INPS','INP6','INP7-,'RET-',&'DIS ','LDXA','STXD','ADC ','S06 ','SHRC','RSHR','SPfB'y'SAV ""~ARK','REQ ','SEQ ','ADC1','S08I','SHLC','RSHL','SMBI','GLO "&'EHI ','PLO ','PHI ','LBR ','LBQ ','LBZ ','L8DF','NOP ','LSNQ',&'lSNZ'~'LSNF','LSKP','NLBR.,'LBNQ','LBNZ','LBNF.,'LSIE','LSQI,"LSZ " 'LSDF', 'SEP " 'CALL', 'RETN', 'SEX " 'LOX " 'OR -, 'AND .,&'XOR ','ADD -,'SO ','SHR ','Sft .,ILDI ','ORI ','AHI ','XRI ""ADI ','SOl ','SHL ','S"1 ','OATA','OR6 ','EQU ','END '/

c ....D~TA (PRSIZE 11,-1,-1,-1,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,

&2,2,2,2,-1,-1,1,1,1,1,1,1,1,1,1.1.1,1,1,1,1,1,1,1,1,1,1,1,1,'1,1,1,1,1,2, 2,1,1,2,-1,-1,-1,-1,3,3,3,3,1,1,1,1,1,3,3.3,3,1,&1,1,1,-1,3,1,-1,1,1,1, 1,1,1,1,1,2,2,2,2,2,2,1,2,1,0,0,81

C ...DATAOPCODES 188,08,208,408,608,618.628,636,638,63B,648,658,&6~8,678,708,70B,71B,728973B,738,7J8,74B,15B,16B,77B,1808,1208,

&140B,I.IB,I~2B,143B,1448,14S8,146B.147B,1518,IS28,1538,154B,1558,

&15&8,1578,1608,1618,1628.1638 ,1648.1658, 1668,1668.1678,1708,1718,&1728,1738.1748,1758,176B,1768,17789200B,2208,2408,2608,300B,301B,~3D28,3038,3048,305B,3068,3078,3108,31aB,311B,312B,313e,3148,3158,

&3168,3178,3208,320\8,3258 ,340B ,3608,3618,3628,3638,36-\893658,3668,&3618,3708,3718,3728,3738,3148.3758,3768,3778/

( ..C ** FIRST-PASSC .... CREATE· SYMBOL TABLEc 111111

C ... INTIALIZE PARAMETERSLINE=OADDRESS~O

POINT=1( .~ ... GET THE DATE

CALLDATECIDATE)c ..c

3CC

... PRINT INITIAL GREETINGSWRITE 2,. IDATEfOR"AT(54H C1BER-1802 CROSS ASSEMBLER Vl.0 - FIRST PASS

&AID)WRITE 3FOR"ATCSH ERRORS:>...* REWIND SOURCE FILERUfIND 1

DATE,

-C ...C .. READ SOURCE FILE5 R£AD(I,10) LABEL,INSTR,OPRAND,CO""ENT10 FOR"AT(8AIO)

LINE=LINE+lC ...

Page 15: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

.. CHfCK FOR ENDIfCINSTR .EQ. END) GO TO 100•

.1.5

r,.r

_5

• CHECK FOR PREfIlATURE rNo-oF-FILEIfCEOFfl) .E9. 0) GO TO 15IiJiITE 13FOR"AT(2~H ••PREMATURE ENO-Of-FILE)STOP..• CHECK FOR CO""'ENTSCHECK=LABEl .AND. ~ASK

IFCCHECK .EQ. ASTERSK) GO TO 5.'~ • CHECK FOR ORG

IF(INSTR .NE. ORG) GO TO 20CtLL HEXDCOPRAND.ADDRESS)GO TO 5

( .[ • CHECK FOR NO LABELS20 IFf LABEL .EQ.BLANK) GO TO 30c ..C .. CHECK FOR AftBIGUOUS LABELS

PNTPlINl=ponn-l00 28 I=19PNTRIN1

IFISY"BOlCI,1) .NE. LABEL) GO TO 28c •

.. ERROR "ESSA6EVRITE 20\, LINEFOR"AT(37H ••AMBIGUOUS LABEL DETECTED AT LINE 1,14)WRITE 41. LABEL,INSTR,OPRAND,CO""ENTGO TO 5

28

c

CO.TIWE..... SAVE LABEL IN TABLESY"BOL(POINT,1)=LABEl..IF(INSTR .NE. EQU) GO TO 30C~Ll HEXD(OPRAND,SY"BOLCPOINT,2»PCINT=POINT+1GO TO 5

C ..c

30

* AN .ADCRESS LABEL* SCAN "NE"ONIC TABLE TO DETER"INE It LEGITIMATE ~NE"ONIC

DC O\U J=l,"NESIZE1:;;.1

IF(INSTR .EQ. "NE"ONIfI» GO TO 5040 CONTINUEC ..c * ERROR "ESSAGE

WRITE 45, LINE~'5 FCR"AT(43H ••UNRECOGNIZED "NEMONIC DETECTED AT LINE 1,14)

WRITE 47, lABEL,INSTR,OPRAND,CO"'fo1ENTL7 FOR"AT(lX,8AIO)

GO TO 5

.. EVERYTHING IS OK50 IFCLABEL .E9. BLANK) GO TO 60

SY~eOLCPOI NT .2J=ADDRESSPOINT=PD INT.1•ADORESS=AODRESS+IABS(OPRSIZ[CI»

Page 16: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

~ 6 GO 10 5C ••f ....f •• SECOND-PASS~ •• ~SSE~BLE SOURCE CODEc ...C .. INITIALIZE PARAMETERS100 POINT=POINT-I

LINE=OADDRESS=OPlINE=OPASE=1

C ..C .. PRINT SECOND PASS GREETING

WRITE 103,IDATE103 FORftAT(55HIC18ER-1802 CROSS ASSEMBLER VI.O - SECOND PASS

&AIO)

C • REWIND SOURCE FILEREIIIND 1

( ..C • READ SOURCE FILE105 READC1.110) lA8EL,INSTR.OPRAND.CO~ftENT

110 FORftAT(8AIOJLIIIlE=LINE+l

c *.OUTA=OOVTD=C

c ...C • CHECK FOR ENO-oF-FILE

IFCEOF(IJ .NE. 0) STOPc ..~ .. CHECK FOR CO~"ENTS

CHECK=LABEL .AND. "ASKIF(CHECK .EG. ASTERSKJ GO TO 200

c ..r. .. DETER"INE OPCODE115 DO 121 J=1.ftNESIZE

K="IF(IN~TR .EQ. ~E"ONI(K)J GO TO 130

120 CONTINUEc •f. • ERROR "ESSAGE FOR ILLEGAL INSTRUCTION

WRITE 125125 FCR"AT(25H*.ERROR-IlLEGAl ftNE"ONIC)

PLINE=PLINE+lK=lOfCODE=1lNBYTE=tiGO TO 195

C ..C • CHECK FOR ORG INSTRUCTIDN130 IF(K .NE. ftORG) GO TO 135

C~LL HEIDlOPRAND.ADDRESS)GO TO 200

(" *-C .. CHECK FOR OTHER PSEUDO INSTRUCTIONS135 IFfK .EQ. N£QU) GO TO 200

IFCK .Ea. REND) GO TO 200C ..C • DETERftINE hUMBER OF BYTES IN COOE OPRAND

OFCOOE=OPCOOES CKJ

DATE,

Page 17: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

NEYTE=IABS{OPRSIZ[(K»-1

" .. CHE: CK OPRANOIF(OPRSlZECK) .EG. 1 .AND. K .NE. NUATA) G~ TO 170..

L .. SCAN SYMBOL TABLEDO 140 J=I,POINT

I=JIFfOPRAND .EQ. SYMBOL(I,I}) 60 TO 150

14ft CONTINUE

~ * CHECK FOR NU"ERIC OPRANOCttL HEXOlOPRAND,OATA)IFCOATA .GE. 0) GO TO 160

c ...C ... ERROR "ESSAGE FOR ILLEGAL OPRANo

WRITE 145145 FOR,.AT(23H **£RROR-IllEGAl OPRANo}

PlINE=PLINE.lK=1DATA=OGO TO 195

C ...C .. OPRAHD OK150 DATA=STKBOLlI.2)C *r .. CHECK FOR REGISTER OPRANO( * A NEGATIVE OPRSIZE INDICATES A REGISTER OPRANO PRESENT160 IFfOPRSIZECK) .NE. -1) GO TO 165

Nf.YTE=OOFCODE=OPCOOE+MOO(OATA,16)GC TO 170

C • CHECK FOR DATA CODE INSTRUCTION165 IF(K .NE. NOATA) GO TO 170

Nf,YTE=OOPCODE=DATAO'TA=O

C ... FIX-UP HEX ADDRESS170 AuDH=AoDRESS/256

CtlL DHEX2(ADoH.HEXI}OUTA=SHIFTCOUTA.12) .OR. HEXI

c ...

~7

cC

c

180

C~LL DHEX2CADORESS,HEXI)OUTA=SHIFT(OUTA,12) .OR. HEXIOUTA=SHIFTCOUTA.12) .OR. COLON..... FIX-UP HEX OPCODECALL OHEX2(OPCODE,HEXI)OUTD=SHIFT(OUTD,12) .OR. HEXI..... FIX-UP HEX COnE OPRANo.. NO CODE OPRANDIF(NBYTE .NE. 0) GO TO 180OUTD=SHIFT(OUTD,24)GO TO 190

... ONE-BYTE CODE OPRANDIF(NBYTE .NE. 1} GO TO 185CtLL OHEX2(OATA.HEXI)OUTD=SHIFT(OUTD,12) .OR. HEXI

Page 18: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

.1.8

'-C185

[

190CC195

r.200300Cf

OUTO=SHIFTCOUTD,12)60 TO 11J0..* TWO-EYTE CODE OPRANDOATI.H=DATA/256CllL DHEX2COATAH,HEXI)OUTD=SHIFT(OUTO,12) .OR. HEXICAll DHEX2{OATA,HEXI)OUTD=SHIFTCOUTD,12) .OR. HEXI..CONTINUE•.. BUMP ADDRESSADDRESS=AODRESS+IABSfOPRSIZECK»

• PRINT BINARY AND SOURCE .WRITE 300,LINE,OUTA,OUTD,LABEL,INSTR,OPRAND,CO"JIIENTfORPfAT(IX.I4,2AIOy2X,8AI0)•• PRINT PAGE HEADING IF NEEDEDPLINE=Pl INE+1IFCftDD(PLINE,60) .HE. 0) GO TO.105•

-

PAGE=PAGE+l .WRITE 350. PAGE,IDATE

358 FOR"AT(34HICYBER-1802 CROSS ASSE"BLER PAGE .I·\,4X,5HDATE , liD)6tJ TO 105

C .*C **

c *.C ....

SV5ROUTINE DHEX2COECI"AL,HEXI2)f ••C *. A SUBROUTINE UHICH CONVERTS BINARY TO HEXIOECIMAL CHARACTERS[" ..c ••

DATA A /0000000000000000000181DATA ZERO/000000000008000DD033B1

r ..

C .. CONVERT FIRST NIBBLE C"SN)DECIMOr.=MOO(DECI"AL,256)

SCRATCH=DECI"OD/16IFCSCRATCH.GE. 10) HEXI2=SCRATCH-l0+AIF(SCR_TCH .LE. 9) HEXI2=SCRATCH+ZERO, .HEXI2=SHIFTfHEXI2,6)

c •C .. CONVERT SECOND NIBBLE (LSN)

SCRATCH="OOCDECI"OD,16)If(SCRATCH .GE. 10) HfXI2=(SCRATCH-I0+A)+HEXI2IFCSCRATCH .LE. 9) HEXI2=(SCRATCH+ZERO)+HEXI2

c *RETURN

c .....c ••

EWOC *-a.C .-a,.. ••\,...

Page 19: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

SUBRO UTINE" HEXD (HEllS IT -nr entAL)C **C ** A SUBROUTINE THAT CONVERTS H[X!DECI~AL CHARACTERS TO BINAFY-' ..

I~PLICIT INTEGER (A-Z)

DATA MASK 177000000000800000000BIDATA ~~SKL 10077000000000000000081DATA AT 17400000000000000000081DATA NU"SIGN 16500000000000000000081DATA REG 12200000000000000000081DATA A 180000000000000000001BIDATA F 10000000000000000000681DATA ZERO 10000080000000000003381DATA NINE 10000000000000000004451

C *BYTES=O

C ..C .. CHECK FOR a,a OR eRe IN 1ST COLUMN OF HEXIGIT

TEST=HEXIGIT .ANO. "ASKIF(TEST .EQ. AT) BYTES=4IfCTEST·· .EG. NU"SIGN) BYTES=2IF(TEST .EQ. REG) BYTES=l

C 'It

C 'It RETURN ON ERROR50 DECI"Al=-l

IF(BYlES .EQ. 0) RETURNC *C .. CONVERT HEXIDEClftAL CHARACTERS INTO BINARY

DECI"AL=OSCR AT CH=HEX 161T00 100 I=l,BYTES ._-_.. -

PAD =SCRATCH .AND. "ASKLPAD=SHIFTCPAD,-48)

C *C 'It CHECK FOR ERROR IN NUftERIC OPRAKD

IFCPAO .GT. F .AND. PAD .LT. ZERO) GO TO 50IF{PAD .GT. NINE) GO TO 50

c ..IF(PAO .LE. F) DECI"AL=(DECI~AL*~6)+(PAD-A+I0)

IFCPAD .GE. ZERO) DECI"AL=(DECIftAl*16)+(PAD-ZERO)SCRATCH=SHIFT(SCRATCH,6)

100 CCNTlNUEC ..

RfTURNc ...c ••

END

~9

HAVE YOU MAXLED THAT ARTXCLE YET?

Page 20: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

20

. A Fully Buffered Morse lCeyboard- ~y John H. Colbeck, 4867 Melbourne Rd., Baltimore, Maryland. 21229

This simple 202-byte program plus'the addition of a parallelASCII keyboard provides a fully-buffered Morse Code keyboard. Theprogram features user-adjustable keying speeds from 5 to 50 WPM andan expandable text buffer that will allow you to type ahead 50characters. All letters, numbers, and c~o!!"""punctuation.are avad.Labl.e,along with several special symbols (KN, AR, SK). The Q line servesas output to an easily constructed keying relay and the two-digitLED display shows the next available memory location in the text buffer.The program is easy to use: just load, switch to run, enter the keyingspeed via the hex keypad, and you I re ready to begin sending perfectMorse Code.

EQUIPMENT REQUIRED

The program will work on a minimal (256) byte as well as anexpanded memory machine; in both cases, the type-ahead buffer willbe 50 characters. To expand the buffer to a full page (256) bytes,the high order bytes of R(C), R(D) , and R(F) must be changed to thedesired page. Be sure to wire pin 23 of the 1852 input port to theINT line since most systems provide a choice between this line and oneof the EF lines. The program is designed so that the input port is #7(command 6F); you may wish to change this to conform to your machineby altering the byte at memory location 0024.

In addition to the computer, you will need a parallel ASCIIkeyboard with. strobe, and a few transistors and a magnetic reedswitch to construct a keying relay for your transmitter.

THE PROGRAM

A listing of the program is shown in Fig. 2 and the registerassignments are listed in Table 1. The first order of business isto set the high order bytes of all working registers to Hex 00 sothat page 0 will be selected on an ELF with expanded memory. Next,the low order bytes of the interrupt pointers (Rl, R2), the bottom-and top-of-stack pointers (RC, RD) and the intermediate data storagepointers (RB, RE) are set. After the interrupt subroutine isestablished in M(001B-0044), the Q light comes on as a "cue" for theuser to enter a code speed. As in all Morse Code programs, the dotlength is the basis of the timing circuits (Table II). In thisprogram, the dot length is established by entering a value on the hexkeypad corresponding to the chosen keying speed shown in Table III.The program stores this value in R5 and triples it to form the dashlength, which is stored in R6. Just as the dot length is used toform the element space, the dash length is used to form the characterspace. I have written the program so that an element space automatically

-follows every dot or dash. This means that when the program.is runand a character·space is called, the actual character space length willbe four rather than three element spaces long. I made this compromiseto shorten the program and provide for the largest possible text buffer.

Page 21: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

.'

The word space is formed by multiplying the dash length by two andstoring the value in R7. Since every dot or dash is followed by anelement space, the word space becomes the standard seven element spacesin length.

After these tasks are completed, the program branches to a loopM(0095-009D) that performs two tasks: it outputs to the LED displaythe next-available memory location in the text buffer and it asks thequestion, is there any data to process? The data stack works as follows.R(C) always points to the bottom of the stack M(OOCE) and R(D) pointsto the top of the stack, which varies. If no data is present (that is,no key has been struck on the ASCII keyboard), R(D) - R(C) and theprogram continues to loop. When data is entered by way of the ASCIIkeyboard, it is stored in M(R(D» and R(D) is incremented. Now,R(D) ~ R(C), the program branches from the loop and the contents ofM(R(C» is transferred to the D register for processing.

At this point, we need to examine how the Morse Code is generated.The basic problem in generating Morse by computer is that we are notdealing with a well-defined code: there are no start or stop bits asin ASCII and the characters are of variable length. We can, however,get around this limitation and provide a "stop" instruction by usingthe "silent dash" technique. It works like this. Suppose a binary zerorepresents a dot and a binary one represents a dash. A Morse characteris formed by mapping the dits and dahs into binary ones and zerosbeginning with the least significant bit. We provide the "silent dash"by adding an extra binary one to the highest order bit of every characterwhen the mapping is complete. The program is written to recognize this"silent dash" and terminate data processing by sending a characterspace. Consider the letters "A" and "L". When coded from right to left,they become 00000010 and 00000010, respectively. No difference, right?If we add a "silent dash" to signify the stop bit of the character, theletters become 00000110 and 00010010, respectively. The Morse isgenerated by shifting the row to the right and testing whether a oneor a zero is present in the DF register. The shifting continues untilthe bit pattern becomes 00000001, at which point the computer knowsto terminate transmission with a character space.

We have one final consideration. The data occupying the text bufferM(R(C» through M(R(D» is encoded in ASCII. We need to translate it intoMorse and incorporate the "silent dash" stop bit. This is done by way ofa lookup table in which the ASCII character in the D register serves notas data, but as the address location of the Morse bit pattern. Theprogram fetches the contents of this address and places it into the Dregister for processing.

The lookup tables for the letters A-Z are stored in M(0061-007A)and for the numbers 0-9 in M(002C-003F). The lookup tables for thepunctuation marks and special symbols are scattered throughout memory.

Once the data is in the D register, the program asks whether itis a Morse character or word space~ If a character is found, the datain D is shifted right and the lowest order bit is dumped into the DF

- - -- ------- -

--------------

2.1.

Page 22: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

22

register for testing. If DF=O, a dot is called for. The Q line goeshigh and a countdown loop specified by R5 begins to operate. When thetiming loop is complete, the Q line goes low and a second countdownloop, also specified by R5 begins to operate. This is the elementspace that follows every character. If DF=l, a dash is called for andthe countdown loop specified by R6 is called into action.

After the dot or dash has been sent, the program loops back toask the question: has the entire character been sent? If D contains00000001, the computer knows. that transmission is complete and yetanother countdown loop begins to operate, which corresponds to theletter space. If D does not contain 00000001, the contents of the Dregister is again shifted right, DF is retested, and a dot or dash isgenerated according to protocol.

Let us now assume an entire character has been sent and theletter space has been completed. ·The data at the bottom of the stackM(R(C» is now "used up" and we need to roll the stack down toplace a fresh character in M(R(C». The roll is accomplished by copyingthe contents of the n+1t h memory location into the nth memory locationstarting at the bottom of the stack and ending at the top. The top-of­stack pointer, R(D), is decremented and the program branches to ask thequestion anew~ is R(C) = R(D)?

The interrupt routine serves to place new data from the keyboardinto the stack at location R(D). When a key is pressed, the programresponsible for Morse generation is temporarily suspended and theinterrupt routine takes command (Fig. 3). The interrupt program beginsby storing the program coUnter, the X register and the contents of Dand DF in a.stack at memory location M(OOCD). The keyboard data isinput into the D register and stored in the memory location specifiedby the top-of-stack pointer R(D). R(D) is then incremented to specifya fresh memory location for the next data entry. The program alsooutputs the value of R(D) to the LED display; this is important sinceit indicates where the next memory byte is to be stored.

The text buffer begins at M(OOCE) and ends at M(OOFF), allowinga 50 character buffer. If you are a fast typist or a slow CW op,you should be careful to monitor the display so that you do not exceedmemory location FF. After data entry has occurred, the interruptroutine restores R(O) , X, D, and DF and control is returned to the mainprogram.

Because the memory display function is embedded within the interruptroutine, the display does not "count down" as each letter is processed;it only gies the next-available location when a new character is entered.If you wish to determine the location of R(D) at any point in a runningprogram without entering data, simply press the space bar.

To terminate an ongoing message, turn off the run switch. You willhave to reenter the code speed when the run switch is turned back on butthis can be easily circumvented. When I am satisfied with a given codespeed, I jump around the code speed routine by replacing hex 45 with 95at location 001A via my resident monitor. Now, turning the run switch offand on will cause the registers to reinitia1ize without affecting yourcode speed.

Page 23: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

USING THE PROGRAM

After you have loaded the program, recheck your work by single­stepping through the commands with memory-protect on. Correct anyerrors. Switch. to run and the "Q' light will .turn on. This is thesignal to enter a one-byte code speed via the hex keypad (do not usethe ASCII keyboard). Choose the value to the entered according to thecode-speed given in Table m. These speeds should be correct for anl802-based machine having a 1.8 MHz clock; my ELF-II has a 2.58 MHzcrystal and a divide-by-two counter. When the data is entered and theinput key is pressed, the "Q" light will go out and you may beginsending.

All of the letters keys and numbers keys are functional, as arethe comma, double dash, period, slash bar and question mark keys. Inaddition, the semicolon codes for KN, the less-than symbol codes forAR, and the greater-than symbol codes for SK. Pressing the space bara number of times will introduce·a brief pause in the message.

To change keying speed, turn the run switch off and on again.Select a new speed and press the input switch. To turn the transmitteron for tuning or an SWR check, reenter the program and do the adjustmentsbefore selecting the keying speed.

The program is best put on cassette tape for easy storage andloading. You may need to modify the first three bytes of the programto specify the location of the resident monitor for your particularmachine. When the program is loaded, I replace the first three byteswith NOP's (C4, C4, C4) to allow immediate reentry to the program.

INTERFACE CIRCUITS

The simple. interface shown in Fig. 1 works well for most rigsusing grid-block keying. Be sure to make the shielded cables as shortas possible and to bypass the leads to the keying relay and to thetransmitter with 0.001 pF ceramic disc capacitors. I found that atoutput levels exceeding 50 watts, rf enters the computer and causesit to repeat letters (stutter). What seems to happen is that the interruptline is "bounced" by the rf field and the last data entry gets repeatedlyreentered into the text buffer. At times, the entire memory gets filled,and, due to ·the wrap-around nature of the memory, the beginning of theprogram gets copied over. If the interrupt routine is violated, theprogram will crash. To cure the stutter, I found it necessary to isolatethe computer from the same ground used by the transmitter. Neither ofthe contact of the keying relay (Fig. 1) going to the transmitter shouldbe attached to the computer ground. Make certain, of course, that yourtransmitter is attached to a good earth ground.

You will be surprised at you increase in code speed when you use thiskeyboard. I use with with a microcomputer-based Morse decoder tocommunicate at 30+ WP, with OW operators having similar systems.

Page 24: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

R(O)R(l)R(2)R(3)R(4)R(5)R(6)R(7)R(8)R(9)R(A)R(B)R(C)R(D)R(E)R(F)

TABLE I

• 0000. Main Program Counter• 001C. Interrupt Program Counter• OOCE. Interrupt X Pointer

UnusedUnusedDot LengthDash LengthWord Space LengthCountdown RegisterUnusedAddress to Morse Conversion

• 003A. Morse Data Storage• OOCE. Bottom-Of-Stack Pointer

Top-Of-Stack Pointer• 003D. Intermediate Storage Pointer

Stack Roll Pointer

STORE R(O). X. D. DFIN STACK

tINPUT CHARACTER FROf.tKEYBOARD TO D, M(R(X))

t

N~

TABLE II

Code Element Timin~lative to Dit

Dit 1Dah 3Element Space 1Character Space 3Word Space 7

TABLE III

Speed (Words Per Minute) .Hex Keypad Entry

5 2810 1113 0015 OB20 0925 0730 06

) 40 05 )50 04

STORE CHARACTER IN TOPOF STACK, M(R(D))

1INCREMENT TOP OF STACKPOINTER. M(R(D))

tOUTPUT VALUE OF R(D)

·TO LED DISPLAY

~.RESTORE R(O). X, D, DF

)

Page 25: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

0000 COFOOO LBR IIFOOO .. TO SYSTEM MONITOR0003 90 GHI RO SET UP REGISTERS0004 B1 PHI R1 HIGH ORDER BYTES0005 B2 PHI R20006 BB PHI RB0007 BC PHI RC0008 BD PHI RD0009 BE PHI REOOOA BF PHI RFOOOB F81C LDI 1I1COOOD Al PLO R1 •• LOW ORDER BYTESOOOE F83A LDI 113A0010 AB PLO RB0011 F83D LDI 113D0013 AE PLO RE0014 F8CE LDI liCE0016 A2 PLO R20017 AC PLO RC0018 AD PLO RD0019 3045 BR 1145001B 70 RET •• ' BEGIN INTERRUPT ROUTINE001C 22 DEC R2001D 78 SAV •• SAVE OLD X,P001E 22 DEC R2001F 38 SKP0020 FF (DATA) • .SPC BAR0021 73 STDX •• SAVE D0022 76 SHRC0023 73 STDX ·. SAVE DF0024 6F INP 7 - ASCII INPUT·.0025 5D STR RD STORE IN TOP-af-STACK0026 1D INC' RD ·. INCREMENT POINTER0027 8D GLO RD0028 52 STR R20029 64 OUT 4 ECHO MEMORY LOCATION002A 3040 BR 1#40002C 73 . (DATA) • •COMMA002D 31 (DATA) • .DASH002E 6A (DATA) • .PERIOD002F 29 (DATA) • •SLASH0030 3F (DATA) •• ZERO0031 3E (DATA) • .ONE·0032 3C (DATA) •• TWO,0033 38 (DATA) • •THREE0034 30 (DATA) • •FOUR0035 20 (DATA) •• FIVE0036 21 (DATA) •• SIX0037 23 (DATA) • •SEVEN0038 27 (DATA) • .EIGHT

.,--.." 0039 2F (DATA) . • .NINE

Page 26: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

-003A 00 IDL003B 2D (DATA) • . KN003C 2A (DATA) • .AR003D 00 IDL003E 68 (DATA) • •SK003F 4C (DATA) •• QUESTION MARK0040 42 LDA R2 RESTORE DF0041 FE SHL0042 42 LDA R2 RESTORE D0043 301B BR ItlB EXIT INTERRUPT0045 EB SEX RB0046 7B SEQ CUE TO ENTER SPEED0047 3F47 BN4 1t470049 6C INP 4004A B5 PHI R5 ·. STORE DOT LENGTH004B F4 ADD004C F4 ADD .COMPUTE DASH LENGTH004D B6 PHI R6004E FE SHL COMPUTE WORD SPC LENGTH004F B7 PHI R70050 7A REQ0051 3095 BR ##950053 95 GHI R5 •• DOT LENGTH ROUTINE0054 B8 PHI R80055 90 GHI RO0056 A8 PLO R80057 7B SEQ "Q" ON0058 28 DEC R8 COUNTDOWN0059 98 GHI R8005A 3A58 BNZ ##58 TEST FOR COMPLETION005C 95 GHI R5 ·. ELEMENT SPC LENGTH ROUTINE005D B8 PHI R8005E 90 GHI RO005F 307B BR 1t7B0061 06 (DATA) • •a0062 11 (DATA) • •b0063 15 (DATA) •• c0064 09 (DATA) • •d0065 02 (DATA) • • e0066 14 (DATA) • • f0067 OB (DATA) •• g0068 10 (DATA) • •h0069 04 (DATA) · . i006A IE (DATA) • • j006B OD (DATA) • •k006C 12 (DATA) •• 1006D 07 (DATA) • .m006E 05 (DATA) • •n006F OF (DATA) •• 00070 16 (DATA) • •P

Page 27: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

0071 IB (DATA) • • q0072 OA (DATA) • • r0073 08 (DATA) • •s0074 03 (DATA) · . t0075 OC (DATA) • •u0076 18 (DATA) • •v0077 OE (DATA) • •w0078 19 (DATA) • •x0079 ID (DATA) • •y007A 13 (DATA) • • z007B A8 PLO R8007C 7A REQ Q "Q" OFF007D 28 DEC R8 ·. COUNTDOWN007E 98 GHI R8007F 3A7D BNZ #7D BRANCH IF COMPLETE0081 30A8 BR #A80083 96 GHI R6 •• ' DASH LENGTH ROUTINE0084 B8 PHI R80085 90 GHI RO0086 A8 PLO R80087 3057 BR #57 BRANCH TO COUNTDOWN0089 96 GHI R6 ·. CHARACTER SPC ROUTINE008A B8 PHI R8 ~_.'

008B 90 GHI RO008C A8 PLO R8008D 30B4 BR #B4 ·. B~~CH TO COUNTDOWN008F 97 GHI R7 ·. WORD SPC_LENGTH ROUTINE0090 B8 PHI R80091 90 GHI RO0092 A8 PLO R80093 30B4 BR #B4 • • B~~CH TO COUNTDOWN0095 8D GLO RD TEST IF R(C) = R(D)0096 5E STR RE0097 EE SEX RE0098 64 OUT~ 4 ·. OUTPUT MEMORY LOCATION0099 2E DEC RE009A 8C GLO RC009B F3 XOR009C 3295 BZ #95 LOOP IF TRUE009E OC LDN RC ·. ELSE LOAD DATA TO D009F AA PLO RA ·. USE ASCII AS ADDRESSOOAO OA LDN RA FETCH MORSE FROM TABLE

.OOAI 5B STR RB00A2 EB SEX RB00A3 F8FF LDI #FF ·. TEST FOR SPACE00A5 F3 XOR00A6 328F BZ #8F00A8 F801 LDI #01 ·. TEST FOR SILENT DASHOOAA F3 XOROOAB 3289 BZ #89OOAD FO LDXOOAE F6 SHR IF NOT FOUND, SHIFT RIGHTOOAF 5B STR RB STORE D IN R(B)

27

Page 28: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

28

OOBO 3BS3 BNF #53 •. TO DOT ROUTINE00B2 3083 BR #83 ••. TO DASH ROUTINE00B4 7A REQ ••. "Q" OFFOOBS 28 DEC R8 COUNTDOWN00B6 98 GHI R800B7 3ABS BNZ #BS00B9 8C GLO RC ROLL STACK DOWN ONEOOBA AF PLO RFOOBB IF INC:· RFOOBC OF LDN RFOOBD 2F DEC RFOOBE SF STR RFOOBF IF INC RFOOCO 8F GLO RFOOCI SE ST.R RE00C2 8D GLO RD00C3 EE . SEX RE00C4 F3 XOROOCS 3ABB BNZ IBB ••. AGAIN IF NOT COMPLETE00C7 2D DEC RD •• DECREMENT ReD)00C8 309S BR #9S •.. TO TEST, R(D) = R(C)

I...

Page 29: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

OPPROG: A Sort of Mini-MonitorBart Mathias 4894-3 Kilauea Ave, Honolulu HI 96816

With G• .Jones article, "9600 Baud..... (Ipso Facto38:6-9), I know that there are at least three of us in ACEnow with Netronics~ SMARTERM-80s (cf. M. Smith, "TheNetronics Smarterm-80," Ipso Facto 32:28-33).

I can report the same "clear-to-end-of" problem in myspring ~82 vintage model that Smith mentioned (p. 33). Withmine, however, it is not just from the upper right-handcorner--I have found similar problems doing clear-to-end~s

from column 80, any row. Needless to say, I also haveencountered .Jones~ problem wi th spurious "lock terminal··commands coming from other uses of the "Q" line (cassettewriting, and since I use Q for printer strobe, printing).In my case, at least, however, I think DC1~s are theproblem. I find they have the same effect as ESC #. It didnot take me long to put an "unlock keyboard·· command in allof my programs utilizing the keyboard.

Let me also mention that I was very grateful for .Jones~

article. I had had no trouble getting my terminal to readthe computer at 9600 baud; it was one of those rare routinesthat worked the first time, ironically. But my Elf II wouldnot read the terminal, because the signal was beinghopelessly attenuated before it reached the base of Ql onthe Giant Board. If anyone else is having a similarproblem, my solution--it took me most a year to find thespare time and the gumption to try it--was to replace C4with a smaller capacitor. It works fine now, but I stillworry: if a smaller capacitor is really okay, why didn~t

Netronics specify it in the first place?Anyway, the hardware problem solved, I still had

software trouble with my 9600-baud READ routine (I forgotthat I should be trying to detect the .iddle of theincoming bits instead of the edges), and gave up and used.Jones~ routine. The SEND routine in the same article turnedout to be much cleverer and shorter than mine, so you willsee that it, too, is used in the program below.

The person who will find the following program mostuseful is someone with a SMARTERM-80 and no more decentmonitor in ROM than the Netronics 256-byte one. I realizethat such a mixture of riches and poverty is at best veryunlikely, and that is why, to save space, I am providingonly a listing of machine code with a general sectionsection-by-section explication, rather than a disassembledlisting. However, this is a revision of a program for the1861 video chip and ASCII keyboard, and that was a revisionof someone else~s program for hex keypad and special switchinput. Which is to say that- even people without SMARTERMsmight be able to modify it to be useful.

The original program was by .Jack Dollhausen andappeared in Popular Electronics ("Simple display andoperating program," Sep 81, pp. 84-5). In adapting it for

29

Page 30: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

30

serial input I have had to abandon the continuous scrollfunction of the original, but it retains the originalfunctions of scrolling up and down a byte at a time,changing the byte at the cursor, running a program begin­ning at the cursor, and copying a block of memory. Theimprovements are the ability to display up to 24, ratherthan just eight, bytes of memory on the screen at one time(assuming the 24-line version of the monitor), a searchfunction (one-byte operand), a skip-consecutive-occurrencesof-the-same-byte function (to skip through fill, or spacesin ASCII text, etc.), and the ability to copy a block non­destructively in either direction, making insertion almostas easy as deletion.

This relocatable program occupies well under a page anda half of memory, leaving room more routines or whatever. Ikeep a register-display routine (also listed here) in theextra space, and usually record as part of all my other pro­grams on tape. Being able to get into memory at the drop ofa hat has save me hours worth of data on more than oneoccasion.

Use of the program requires little explanation. Func­tions are called with control characters (I use AA forscroll ahead, AH for scroll back, AC for change location, ASfor seeking a byte (which is entered after AS), AD forfinding the first byte different from the one at the cursor,AR for running a program starting at the cursor, and AM formoving (copying) a block, but these mnemonics are easilychanged. To move a block down in memory (close), put thecursor, using AC, AA, or AH, at the beginning of the newlocation, type AM, then the lower address of the block to bemoved, followed by the upper. "ADDRESS?" will appear on thescreen, indicating completion. To move a block up in memory(open), again set the cursor at the low end of the newlocation, then type AM followed by the end address of theblock to move and the beginning address, in that order.(Example: You need to insert three bytes at 37 22, bymoving the block 37 22~37 E6 three bytes up, to 37 25~37 E9.Put the cursor at 37 E9, type AM, 37 36, 37 22. When"ADDRESS?" appears, type 37 22, and the three new bytes.)To fill a block, say with OO~s or FF~s, type the fillcharacter at the first byte of the block. The cursor movesto the second byte. Type the full address of the firstbyte, then the full address, minus one, of the end of theblock.

Page 31: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

_2 _1 -~ -~ -~ -~ _9 _Z -§ _2 _8 -~ -~ _!2 _5 _EXx 00: co 01 73 FC 01 B4 B5 BD BF F8 FF A2 F8 lC A3 F8

10: 01 A4 F8 21 A5 F8 49 AD F8 56 AF D3 E2 D4 lB D420: 22 D4 02 D4 41 D4 44 D4 44 D4 52 D4 45 D4 53 D430: 53 D4 3F D5 DF 52 D5 Fl BE D5 DF 52 D5 Fl AE 8E40: FF 07 AE 9E 7F 00 BE D4 lA D4 OC D4 02 9E FE DF50: DD 9E DD D4 20 8E FE DF DD 8E DD D4 3A D4 20 OE60: FE DF DD 4E DD D4 lB D4 3F D5 D5 D5 C4 FF 08 3A70: 4B D4 08 D4 08 2E D5 FF 10 33 85 FA OF DF 52 D580: Fl 5E IE 30 3F 8B FF 01 32 82 FF 02 32 21 FF 0190: 32 EB FF 04 32 B5 FF 05 32 B8 FF 05 32 A4 FF 01AO: 32 AB 30 75 9E BO 8E AO 37 A8 DO D5 DF 52 D5 FlBO: 52 4E F7 3A Bl 2E 30 3F D5 DF 52 D5 Fl B9 D5 DFCO: 52 D5 Fl A9 D5 DF 52 D5 Fl 73 D5 DF 52 D5 Fl 52DO: 89 F5 12 99 75 3B E4 22 49 5E IE 89 F5 12 99 75EO: 33 D7 30 23 22 09 5E 29 2E 30 DO 4E EE F7 32 EBFO: E2 30 3F 00 00 00 00 00 00 00 00 00 00 00 5B 01

'l.y 00: D3 43 7B SA F8 07 AA C4 C4 9A 76 BA CF 7B 38 7A10: C4 C4 2A SA 3A 09 7A F8 06 AA 2A 8A 3A lA 30 0020: D3 FC 00 C4 37 24 F8 80 C4 3F 30 E2 FC 80 30 3230: C4 C4 C4 C4 33 39 F6 30 28 AB FF 20 3B 20 FF 2040: 3B 44 FC 09 FA OF 30 20 D4 FA OF FF OA C7 FC 0750: FC 3A 14 30 48 D3 7E 7E 7E 7E 30 55 Al C4 C4 F860: 4F B2 F8 20 A2 E2 F8 00 C7 F8 01 73 8F 73 9F 7370: 93 BF F8 6C AF OF FF 01 5F FC 10 IF IF 5F 82 FF80: FF 3A 6C F8 6C AF F8 8F 5F IF IF F8 9F 5F 92 BC90: 82 AC lC 93 B3 B4 BD BE BF F8 01 A4 F8 49 AD F8AO: 56 AF F8 A6 A3 D3 F8 27 A9 D4 lB D4 3D D4 27 D4BO: 3F D4 52 8C F6 DD D4 3A D4 20 OC FE DF DD 4C DDCO: D4 20 OC FE DF DD 4C DD F8 AE AE 19 89 5E 52 F8DO: 36 F7 33 A9 F8 27 5E D4 lB D4 3D D4 37 D4 3F D4EO: 44 D4 46 D4 3A D4 20 OC DD F8 00 BO AO 37 ED DOFO: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

xx OO~XX IC: Initialization. R2 addresses stack, R3the main program. R4, R5, RD, and RF address subroutinesdescribed below.

XX lD~XX 20: Unlock terminal, just in case.XX 21~XX 32: Type "ADDRESS?"" on screen. Byte XX 22

says something about where. Besides OD, one could use OC,02, or 09.

XX 33~XX 64: Read two numbers from keyboard, convertto hex, store in RE, and type the seventh preceding bytefrom memory, preceded by its address and a colon; XX 65~XX

70: Repeat until the byte addressed by the keyboard is onthe screen. The number of bytes may be varied from eight,but XX 41 and XX 6E must be changed simultaneously. Don~t

try to use this program to operate on itself in this case.XX 71~XX 84: Back up cursor and buffer pointer. Read

keyboard; if not control character, read again, convert thetwo ASCII bytes to one hex byte (e.g. 35 46 -~ 5F), storeat buffer pointer, go rewrite screen starting one bytehigher.

3.1.

Page 32: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

XX 85~XX A3: If valid control character, branch toappropriate routine; if not valid, ignore.

XX A4~XX AA: Wait for keystroke, then run programstarting at buffer pointer <RE).

XX AB~XX B7: Read two keystrokes, move through memoryuntil corresponding hex byte is found.

XX B8~XX EA: Get addresses from keyboard, compare, andcopy the bytes between them to buffer pointer, moving thelatter up or down each time depending on which address waslarger.

XX EB~XX F2: Skip each byte that matches the onebefore it.

XV OO~XV IF: Send the byte pointed at by R3 to thescreen. Routine called by D4.

XV 20~XV 47: Routine called by D5. Read keyboard,keep copy in RB. Return if control character, otherwiseturn to hex nybble first.

XV 48~XV 54: Routine called by DD. Convert rightnybble of byte to ASCII, then go to XV 00 to send to screen.

XV 55~XV SB: Routine called by DF. Shift right nybbleto the left, and three bits of the left nybble to the rightnybble position. End of program.

The following is extra, but may be of interest.XV SC-XV aD: This is a folded-op version of Ken

Mantei "s "Simple routine to save registers for debugging, II

Ipso Fac~o 20, page 41. It uses 20 bytes of some out­of-the-way page of memory (XV 60 addresses it; 4F in my 20Ksystem). XV SC tells where the D register will go; the nexttwo bytes (C4 C4) are spares. The same caveats as made inHantei"s original article apply, including changing XV 70 ifnot going to be there under the auspices of R3 as PC.

XV aE~XV EF <plus or minus) will send the list ofregisters, labeled, to a terminal, using the routines at thebeginning of this page of memory. The 93 at XV 93 (no punintended) is redundant if the PC is R3, but otherwise mustbe changed to 9-whatever. The last seven bytes take me backto OPPROS ordinarily; people with boots will want to changethe address probably.

ARE yOU MAKING THINGS HAPPEN?

Page 33: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

33

FORTH and the SMARTE~~-80

-by Hichael Smith, 1 Cranleigh Crt., Islington, Ont., H9A 3Y2

Undoubtedly, most of you have used other computers besides your ACE, TECor Netronic's system. \Vhile using this other computer system, probably younoticed that there are great advantages to having a memory ~pped video display.A distinct advanta~e is that editing entered data becomes a simple matter of theprocessor moving blocks of memory in the display memory. The Netronic's Smarterm-80also has full screen editing capabilities. However, these have been unused due toa lack of available software.

Forth offers the flexibility~nd speed required to provide reasonable editingcapability. By incorporating both machine language and Forth in the editor, onecan devise an input routine with insert/delete and forward/back tab commandswithout an apparent time delay. The machine language is used for fast memorymoves and the high level Forth words do the rest of the data manipulation.

The actual program consists of two words: (CMOVE and EXPECT#2. <CHOVE is astandard Forth machine code word whose use can be found in practically any bookabout Forth. EXPECT#2 gets ASCII data from KEY and then checks if the key whichwas pressed was an editing command. If it was, execution of the appropiate wordsis rapidly completed. Otherwise, the character is stored in the text input bufferand Forth waits for another key entry.

EDITING COM}IANDS:Control A: moves the cursor one to the right but does not change the data in the

text input bufferControl H: backspace one to the leftControl I: moves the cursor to the next tab location to the right

Note: for proper use, tabs must be placed as they are at power on(ie. every 8 spaces), and typing of the line has to start atone of the tab locations!

Control U: moves the cursor to the previous tab location to the leftSee note under Control I for proper use.

Control Q: moves the contents of the text input buffer to the right one characterstarting at the present cursor location. A space is generated at thecursor location and the character at the end of the line is lost.

Control W: moves the characters to the right of the cursor one to the left.Hence, the character at the current location of the cursor is deleted.A space is generated at the right end of the text input buffer.

Control X: erases the contents of the text input buffer and moves the cursordown one line to the left margin to permit re-entry of the whole line.

RETURN: Exits the word EXPECT#2 and nulls the current cursor location so thatForth will only "see" the characters presceding the cursor.

To enter the program, enter listing one onto a screen ( deleting the comments )and then type:

FORTH DEFnlITIONS DECn-tAL CREATE @iOVE 41 ALLOT SMUD3E• <~iOVE HEX NFA •

Forth will respond with the address of the beginning of the word <CMOVE. Jumpto the system Moniter and then enter listing two.

Even though the word EXPECT#2 seems complicated, it is a reliable and usefuladdition to Forth. Future expansion may include a full screen editor with similar

~ editing features, or maybe a word processor, or numerous other things. Until then,I hope this program will help eleviate excessive backspacing and retyping of erranousdata while using Forth.

Page 34: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

Listing One:

¢ ( LINE EDITOR FOR THE S!'IARTERi'!-8¢ ) --....1 FORTH DEFIIHTIOHS HEX2 EXPECT#2 TIB @ 5¢ BLANKS OVER + SWAP DO KEY DUP ¢E +ORIGIN @ =3 IF DRO? ¢8 TIB @ I = DUP R) 2 - + >R - EHIT ELSE DUP ( BACKSPACE)4 1 = IF EMIT ELSE D'JP ( CURSOR ONE TO THE RIGHT )5 9 = IF R> 9 + FFF8 A..TI(D 1 - >R EHIT ELSE DUP ( FOR·,iARD TAB)6 15 = IF DROP TIB @ I 1 - FFF8 A~~ > IF 7 EMIT R> 1 - >R ELSE7 R> 1 - FFF8 AND 1 - )R lB DIIT 49 D-iIT THEN ELSE ( BACK TAB) DUP8 11 = IF DROP I I 1+ 4F I TIB @ - - <CMOVE lB n4IT 519 E}fIT BL I C! R> 1 - >R ELSE DUP ( CHARA.CTER INSERT)

1¢ 17 = IF DROP I 1+ I 4F I TIE ~ - - C?-10VE DUP 4F + BL C!11 1B UIIT 57 EHIT R> 1 - }R ELSE DIT? ( CHARACTER DELETE)12 18 = IF DROP CR TIB ~ 50 BL\NKS TIB ~ 1 - R> DROP >R ELSE DUP ( ERASE LINE)13 ¢D = IF DROP ¢ I ! SPACE LEAVE ELSE DUP ( RETURN)14 I C! F.1'lIT T?EN THEN THEN THEN THEN THEN THEN TEE2~ LOOP ¢ IN ! ;15 ' .:EXPECT#2 CFA ' QUERY 8 + !

Listing Two:

XXXX is the address which Forth printed as the NFA of <rn10VE.

XXXX 86 3C 43 4D 4F 56 C5 ZZ ZZ The name <CMOVE, followed by ZZ ZZ which is thelink address. After this, there will be a twobyte address which will point to the byte followingthe two bytes. At this point, enter the followingcode. Addresses which have to be change areunderlined, and may have to be replaced with a ~

long branch if a page boundary is crossed.

0000 E9 19 ¢9 AE 29 ¢9 BE 29 8E:4 A8 29 9E 74 B8 280010 29 8E F4 A7 29 9E 74 B7 27 07 58 27 28 2E 9E 3A0020 19 8E 3A 19 29 29 DC

HAVE YOU TALKED TO ENYONETHE· CLUB

ABOUT .::rOINING

Page 35: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

DI 5KETTE I HIT I AL I 2AT I ON PF.:OG~:Flt-l

HAVING AQUIRED ABOUT 12 USED DISKETTES WITH ANn~CO~lPATA8LE FOR~lAT I FOut·-!C' A NEED FOF~ A PGt'l TOIt-HTIALIZE DISKETTES •

THE PGM HOMES THE DISC THEN PROCEEDS TO WRITE EACHTF~ACK AND UPl::.ATE THE DATA BEFORE STEPF'ING AHEAD • THETRK NO. AN!:"J DISC ERROR STATUS is PRUnED Ot-~ THETER/'l I t-lAL TO CHK OPERAT I ON • t-~OTE TR.< ee STATUS SHOULD BE04 INl:-'lCATn~G THE DISC I...IAS HOt'lED I.IJHEN PGrl STARTED • THE"DI~-IT" PIN (37) ON THE 1771 CONTf;,:OLLER ~lU5T BE ENABLEDTO WRITE A TRK • RUN TIME IS APPROX. 1 MINUTE •

THE PGM IS LOCATED AT 8000 HEX WITH DATASTARTING AT 8100 HEX • THE DATA CONSISTS OF 52a8 BYTESTHAT MAKE UP ONE COMPLETE TRK • THIS IS t'lADE UP OFVARIOUS FIELDS AND CONTROL CHARACTERS .TO FORMAT ONETRK OF A [)ISl<ETTE • lllHEN THE NEr~T Tj;~K IS TO BE FORt-1ATED.THE ONL'-,J DATA CHAr~GE F~Et;~UIREC' IS THE ·TRK NO IN THESECTOR FIELDS • NOTE WHEr4 ~IO CRC ERROR CODECHARACTERS ARE TO BE INSERTED ~ ONLY A SINGLE

F7 CONTROL CHARACTER IS REQUIRED ~ THE 1771 DISCCONTROLLER WILL CALCULATE AND INSERT THE PROPER TWO BYTEERROR COOE •

w.... SVSTEM IS THE ACE '.JER. z iJ.lITH THE 1771 DISCCOt-4TROLLER BD • 1'1Y DISC IS A SHUGAF~T 8" 80(i/:301 SSSD.

REGISTER USAGE

F.:0 -} R6 STAt-4C·ARD (SCRT);;~::: - } T?.K cout-nERR9 -} SUB ROUTINE COUNTERRA -} D1SG ADDRESSRF. I -}

RDDRE$S OF MONITOR SU8S USED

C239 -) INITIALIZATION OF REG FOR SCRTc1AS -:> o/p H~~':: l:JIGIT IN RF. 1::: 1 E:: - > Cvp F:SC I I STf::: I t-~G (~ r'l <F~::' )

E:l,·'T=: "00" ENC>S

_ - :::81'1 374C~ l:;.ISKETTE DATA FORMAT2 ;'~ATIOHAL IHS1771 DISC FORl'lATTER/C:OHTRDLLER DATA

SH:::ET HO. 42€.3~'15468-0~31 •

Page 36: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

36

'70 Bytesof

FF,6

247 Bytesof

FF,6

27 8ytesof

FF,6

42 Bytesof

FF,6

FinalPon-Data IPre·lndexl

Ae~ Oap Oap

Bytes

Byte.

One SecIO'

~---......_/'.....-_----­}-~----/

...

~ I Sync Index Poet·lndex Sync 10 POlt·ID SyncFormat Preamble Field Marie Oap Field Field Oap Field Dlta

11..2G Sector.128 Byte. '3'per Sector

r---l, 5 Sector. 40 6 , 26 G 7 " G256 Byte. Byte. Byte. Byte Byte. Bytes Byte, Byte, Bytes 259per Sector of of of of of of of

FF,6 0016 FC'6 FF,6 00'6 FF,6 0016 --18 Sectors5'2 Byte. 5'5per Sector

'\

. f----46 Bytes--f 33 BytesI ·1

..

I· Repeeted for EecSector (26. , S. or 8 ti

5208 BytesfTrack

Figure H4-2. A Summary of the Fields Comprising the IBM 3740 Data Format

OeUi "e"em Clock MerleIM..I Inl.....,e U1tlOll IM..I

F7 Write CRC Chared. FFF8 Oete Address M.r1l. C7F9 OeUi Addres. Mer1l. C7FA Del. Addre•• Mer1l. C7

-Fe Oete Addre•• Mer1l. C7FC Indell Addres. M.r1l. 07FO SpereFE 10 Addre•• Mer1l. C7

177' FOeINITIALIZATIONCONTROL BYTES

Slyles

(

IDCylinder Heed Sector Size CRC I SyncCRCAddres.

No. No. No. Ihiohl I Oowl Field lMer1l. I

I00~C151 00.01 I01-, A,5

00-128\10~751 01-OF,5 01-255

01.08 02-512

ICI IHI 151 INI FLOPPYDISKETTESECTORIDFIELD

TJ

SeClor ID FieIcI

Page 37: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

DISKETTE !NITIALIZATION PROGRAM G. J. n. S.

or REGI STEF::S.

II

II

II

II

II

II

•o/p cr'1D HCIt'1E DISC•.••WAIT FOR COMPLETE••

• HHTIALIZATIOt-i• •• LfSES SC:F:T ••

II

.R9 = TRK NO. LOCATION•••••• IN THE FIRST SECTOR ID FIELD•••

• INCREMENT TRK NO •••.IN THE SECTOR ID FIELD•.•• •• OF EACH SECTOR FOR.• •• THE ENT I RE TRK •••

#~:t~1A8

#:::~:::1A7

#:::(1AB#:3~3A7

#8~3A7

#80A7#:3C1A8#80A7

RB#0~3

RS#0E:R22R8#17R3#01R9#61)R9#:3(1AF#E:..:1A7#:30AB#80A7#80A7#80A7#8~3A8

#80A7#80A7#80A8#80A7#'.3(1A7#8~:::1A7

#8(1AE:#80A7#8~1A7

R3#C:239F~2

iFFP..BiF:::

R[1

R3#N::~

GSU8

GSLIE:l-'-' 1-'~'-'t:o

GSUE:

GSIJE:

GSUSGSU8GSUB

GHIPHILDIPLOLBRSEXLOIPHILDIPLOLorPLOLDIDECOUTSTRBH3GHIADIPHILDIPLOl:iSUBGSUE:GSU8GSU8GSU8GSUSGSUE:GSU8GSU8GSU8GSUBGSU3GSUBGSUE:GSU8

E:~:::1(10 9~1

:::(11,2:1 -I~

1::\"':'

:::002 F:::[)~3

8~304 A3E:f;::1~::::15 C~1C23:;'

E:(1~3::: E2:3~3"::::19 F8FF:::(1~3B 88:::(1~3C: F:::F::::::C10E AB:=:~::1"3F F8(1(18011 A8:::612 FS088~:n4 "'1~...:...:::~315

~,.,

C"::'

:::~316 58:::017 3E17:::~319 .=-~

o' .,j

E:~31A FeelS(11C 8'3:::(110 FS6D:::~:::11F A9::aZt20 C148~3AF

:=:~123 D48~3A7,---.8~'f2E, D480A8:=:02'3 !)4:::0A78lZt2C D480A78~32F [)4:30A7E:..:;132 D48~3AS

sezs C;.4:::0A78!-~138 D48(1R781.33:: C;.4S(1A8:=~i.~3E ()48~7

8!2141 1"·4MR.......' , ..:::(144 r o,,'P.30 ';''-0 t.i

:::(:147 C"fb~1AP. ,_"- --'::~1;::1~1A D48(1:=17~~~:14D [)4:=~~~A7

sese C)4~=:~1R7

:=:i3~3 :14~3:':1RE:

S:C-t5E~ C)4:=:~~A7

~::~:::"t59 C:.4:=:0A7::::2t5C: !)4:::0AE:~::1;::15F ::14:=:~:1R7

~:::~1E,2 (:14:::0A7~:[1E~5 [)4:::..JA71::~1e.::: :)4;:::12tRE:~:i;::1~,E: C)4:::~3A7

Page 38: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

36.

"

"

II

II

"

.."

..

II

II

II

II

"

..II

II

.o/"p HOR. TAB •..II

• CHK LAST TF::K !.,.lR I TEr·~ •••• •• IF SO E:'::IT TO 1'1monTOF~

II

.o/p CMD TO INC. TRK •••••• WAIT FOR COMPLETE.••

.O/P SPACE TO TERMINAL •••II

.O/p TF.~ NO TO TERMINAL

•GET DISC STRTUS•••.TO RF.1 AND O/P .•.• •• TO TEF~t'1 I ~'~AL

II

.D~lA PGI~~TER - [)ATA LOC"

.INCR TRK - BRANCH .••• •• TO I.rJR I TE to~E~'::T TRK.SU8(S) TO INCR TRK NOS •••••• IN DATA LOCATION••.

.OP WRITE TRK CMD TO DISC...

... WAIT FOR COMPLETE•..II

RE:2

#F4~:2

~::J

#0(;:1

.LL""I~tt" ."

#5E:

RE:

.-,

..::.RoO;,'.~

#F0

c·­rcr-

R9

#4C#C131#F4j;~8

RE:#A2R:3#19F.:9#01R'3F.:9#E:AF~'::c

F~:=:

R'3

RF#C1AE#C1EC

LOI

ItK:

OUTSTR

CiSL!E:

~::iLf]

ADIPLOCiLOSTPF.:En·~

5:)!L8Z

GSUE: #C1AEGSUE: #C1EC

LDHIDLGLO

PHILDI

LDI[)EC:OUTSTF.:E:H3GLOPHI

DECOUTLN~

PHIGSU8

LDIF'Lel

E:~:

Gi-HADI

IDLLDIri,o

I r'oTi..-L..' .1"

-,.-,L":'

F:=:FtZ1AE:.-,-...::..~

62~~iE:

5E:3:=:A2

R9

:::"i--CIC,; :_,l..o.'! I

22

FD4CC2C131F~:F4

oc·, .....1

t=C'C:CIr I_I._,~.

583E7'?

E:FD4C1AED4C1EC091210

301'~

r~"3

FC:~31

E:l3

',=II~iOt:"'_"_'1 Ji

':IJ':=;:::."I_";","..:-I.A,

'_II .•;I-J_.,_"':'" .,__"

:::12171

:=:,":1~=:5

E:;;;:1::~7

~::i;::17:=:

:=:~::i7;~

:=:~:::i::Ki D4C 1EC:=:(::1::::3 20:=:~:):=:4 (1[1

Page 39: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

F- - - ·ir-r-'#

----~~Ii

FFFF;0tU:::1~3 ;

F1=1=t:' ·, I I ,#

01;;:1[1(1;000·3;~3t-~1(11.::1 s~XK1~:::i;

ooeo;~30~~1~~ ;

~:::100IZt;

~XH:::i0;

0~:::100;

[1~3 ~:::i ~:::1 ;

0000;0[10(1;000~:::1;

(1(100;

FFFF;

FFFF;

0:3C:4;FFFF;FFFF;FFFF;FFFF;FFFF;FFFF;~30Q1;

~3e00;

00130;0[100;[1~)00;

0~:::1(u3;

(100~3;

~3~300;

1::"--- .• ... r r- ..

FFFF

O~:100

0(1[100~300

0~300

0~X10

~3~3(1~:::1

0(100(112100FFFF~:::1000

C4C4 C4C4;C4C4 C4C4;432~3 494E;

FFFF[1~:100

~J[1(10

0~300

0000000f10000oo~:::[o

0'315-::·(1~33~3

FFFFFFFFFFFFFFFFFFFFFFFFFE4CFF(10~3~30~3

~Xu30

1Je0~3

~X~I;;:;0

(10[1[1';;:H)00~3000

~:::1~300

FFFFFFFFFFFF

8FD4 CiAE;D4C1 AEC4 ;AE:FS 5E:22;

E:';F:::: E.[)Fr?;D4eo A7D4;::::~3A:::: ()4:=:O;A7D4 :::~3A7;

D4::::~3 AE:D4;

-r=--1"", r- l""

FFFF

FFFF

~FE:E:

~:1~~1~:::10

0fn:::i~3

0(1:;;:1~3

0000(1[100IXl00(1 1::'1~71 ~'!

:;::;000eeoe

~:::100·3

(100~:1

0000C1~:103

(1~:::100

O~:::100

FFFFFFFFFFFF00FC

(1E:E:FF8F4E:'3:::9C4C4C4C449534E0'?m)~3A

0eO~3

FFFF.X1(1.?'~X100

~X100

(1.30000001;;:10[1~)

(1['u;:K10(10~3

FFFF

FFFF

FeOl:::OA7A7D4C:'4::::08~:::1A7

AE:D4

'="7-"==• ' t ,

~~1[1~:::1~3

~1C1t.3(1

~:1Cil~1~~1

C1f1~~1~:1

I , i I

oC"!C10~:i[H30

[1~3::1C1

(100(1

:;::100;;;:1

t1~~1~

00(10:3[1[1[1

----:-~r-:-

(:;(101;;:10.:::1(10:;::1!.Xn3

~~1~3~3,"~1

~10~3~~

22E.2

17'33

r=--­I I I i

FFFF

FFFF

FFFF0000FFFF~3~3"::1~Z1--1='-r-r-: r000.:::1

--,...-r-r-rr

C131FC~31

C4C4C4C4~3'344

494F53(1A

ABD4D4::::0::::GAE:A7D4D4:::~:::1

--e-r-r-: r-

~)~~~i~i

~j(1[1~J

FFFFr==.11-·I _'"'t'_o

(1QH~i:~i

eeee

0000 iX1[1.3F~F~ FFFF

80A7

(1(100

0000(~C~~:1!2f

22E.2F~3A8

4CC21'3'~'~

C4C4(:4C4~3'~0'~

41544A4DFFFFr=---.r-r-:-FFFFFFFF1300~3

FFFF~:;:;(1I;;:H3

FFFF0000~X100

0000~3~~1 ~Z1 ~~1

~~1~1~::'1~1

IX10~:::1

5E:3ED4::::~3

:=:~:::1A7

A7D4D4::::0

'",:"...~..::::(.",:".. ;:::,'":"'"".~".~.;'-'''"-"... :;... ,;....._,.:..., .....

0000(1f30(1

ABD4D4::::C1

22E.2

A7C'4FE:F400F::::8:3FD183~3

C4C4C4C4(1C~:::1'=-'

4'35A2047r=1=-­I , r- r-FFFFFFFFFFFFFF~3~3

FFFFFFFFFFFF130~::K!

~30~:::1(1

r=r=r=eI ! I I

t3~:~C1C1

i~i;.3C1;~i

Cl~3:2i~1

C1 ':i.:z::::':1 ~:1 ~:1 ~~1

~~~3!3}~1

(~~)(~::::i

[10C1C1r===r=I •• I

FFFF

312~1

FFFFFFFFFFFF

FFFFFFFFFFFFFFFF~:::1eFE:

0~30(1

A7D4()4::::~:::1

(10A~3

EC2~3

~:::19~:::10

3EA2C4C431C4C1EC414C

F:=:[:'(1F:::(1E:AFD4D4::::0:::0R?

:3ej~i ~:1

!":"",;7... r:"i":""':"":"":""::'"

:=FFF

C0C1C4D4

-r-,...-r-rrr-

41~54

2(130FFFFFFFFFFFFFFFF

~:::i0A:=:

D4:3~:::1

E,25E:5'?Cr5

A7D4[:04::::0::::0A7Ea3F8()4ClC1EC

':"-:':'::',":"'..,_. ....:.,.. 1':-'

::~2E€1 :=~4C:

:::2F(i FF0~~1

:::150 FFFF:::1 ';:.0 FFFF::: 1 713 O~3F7

::: 1 :::a3 O~3~3~3

:::1 '::10 OIZI~]O

~:12€i

:::13f1:314~j

8~;:19(1

:::0FIG;::OE:~3

:::~3C~3

:::(10e

~:: 1:;(1 i;:1~30~) iZt0~3ta ~3~~~1~1~:1

8180 6000 0000 0000~: 1eli e 00';::1 ~X100 000081D0 0600 0000 0000;lE0 0000 000(1 13130081F0 0000 0000 000082013 001313 0000 F7FF8210 FFFF FFFF FFFF8220 00130 0008 0300~::23~:1 FFF="F FFFF !=:=Fi="

:::Ci~:::10

8010::::(12138030::::(14(1:=:0513:=:~:::16G

807~3

E:~1:=:t1

:30FO81 ~::K1

8110

Page 40: OlVOIlO lll18llY 10 - COSMAC ELF · other systems you are not using actively for microcomputing. 1- The ACE Home Environment Control and Data aquisition System. With features to detect

40

ACE PRODUCT DATA SHEET - Floppy Disk Controller Board Ver 2, 84-07.

The DCB is designed for either 8 inch or 5~ inch soft sectoreqflo?py disks, and specifically patte~ned fortheCDC model BR8ser~es. However, the disk interface is provided with jumperpads to accommodate any drive signal pin-out. :Note, all drivesuse the same signals, howver, they may be nameq differently ..

The board uses a port to ensure proper memory map data transferfor data storage or retrieval.

The board is configured for both 1771 and 279x series FDC chips,either selectable by a series of jumpers located on the board.The board has jumpers in place for the 1771 chip.

THe board art work occupies the lower 4.5width of the board, conforming to the ACEsimular in size to a Vector or RCA board.has jumper pads to permit re configuation

inches of the 6 inchstandard, which is

The edge connectorto any buss pin-out.

The 1771 requires +5, +12, and-5 volts, while the 279x requiresonly +5v.

+

• .. ·0"'0

22

, J3.,.14068 I+I 4555 ,

oJ. 14069 , +174640

.J_12 • ..-..I5.~ ~ -R5

oj. I 4053 I+~~ ~ +I 4049 IRlS,17.'8,~1 ~

~ U ~~~;;~r7 f1~~ 1.'1,:;: ~~+'-4-0-19=1 rlc*~~ J. Rir~l~.! J9~.·•• ~.!...

J~. J8'-'. JI0 .-J14 C2 'i'"

+I 4021 I I 1771/219' Ii::I

Disk Edge ConnectoJ__:-__~1

620 Ohm620 Ohm10k10k*150 Ohm150 Ohm

1 SPOT switch 900 offset mount1 4.00 Mhz Crystal

18 0.01 bypass capacit~rs .1 AMP 50 pin ribbon connector 1# 88373 - 1

7 Dint Sw to 1771 or + to.279X/3i8 -5v to 1771/1 or pin 29 to 279>9 - to 177X/25 or + to 279X/25

10 + to 279X/17 -11 - Clock to 1771/25 or trimmer to

279X/2512 - Separated Data to 1771/27 or

Oata to 279X/27~ _

for 1771 FOCI except J 3 and J4.* Board is strapped

ACE DISK CONTROLLER BOARD, VERSION 2, 84 - 07Parts List

IC.s

# 1 4068 1# 8 4027 1# 15 74062 4068 9 1771 279X* 16 40493 ·4555 10 4013 ' 17 74LS744 4069 11 4019 18 74LS745 74HC640 74HC642* 12 .9602 19 74LS046 4013 13 4053 20 74LS1937 4075 14 74LS08

* IC to be used with 279X FDC only

Resistors - \ watt 5~

R 1 15k Z 150 Ohm or 10k pot*132 3.9k 8 150 Ohm 143 2.2k 9 150 Ohm 154 2.2k or 10k pot.* 10 150 Ohm 165 10k 11 10k _ 176 150 Ohm 12 150 Ohm 18

* Resistors to be used with 279X FOe onlyCapacitors DiodesC 1 0.01 uf* 5 10 pf -r----ln914

2 10 uf elec. 6 0.01 uf 2 In9143 10 uf elec. 7 0.01 uf - -12v only 3 In914 *4 1-35 pf trimmer * 8 0.01 uf - -5v only 4 In914

9 10 uf 16v tantalum* Capacitors to be used with 279X FDC only Diode used with 279X only

1..-------...,1

Miscelaneoussockets 1 - 40 pin

1 - 20 pin11 - 14 pin

7 - 16 pin

Jumper ConnectionsJ 1 - +12v to 1771/40

2 - EFlag3 - Port 1#4 - 74123/12 to 1771/235 - EF or lr to 1771/396 +12v to 1~Zl/40 or

pin 23 to 279X/40

ACE BUSS EDGE CONNECTOR-.