dr. dobb's journal of - cini.classiccmp.org

36
dr. dobb's journal of rthodontia Running Light Without Overbyte AprH, 1976 Box 310, Menlo Park CA 94025 A REFERENCE JOURNAL FOR USERS OF HOME COMPUTERS In This Issue ... Editorial: History Repeats Itself . . . I Hope Jim C. Warren, Jr. Scanning the Industry Periodicals Information derived from the May 24th issue of Electronic News FEATURE ARTICLES First Word on a Floppy-Disc Operating System Command Language & Facilities Similar to DECSYSTEM-I 0 Hardware & Software for Speech Synthesis Lloyd Rice Detailed discussion of techniques & hardware/software trade-offs SYSTEMS SOFTWARE MINOL-Tiny BASIC with Strings in 1.75K Bytes Erik T. Mueller An outstanding implementation by a high school junior Volume 1, Number 4 3 4 6 System Monitor for 8080-Based Microcomputers Charlie Pack 18 Keyboard control over program loading, examination, modification & execution DATA Submitting items for publication 2 Reprint privileges 2 Subscription & information form 33 PCC Bookstore titles 35 TV Dazzler Contest 36

Upload: others

Post on 25-Jul-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: dr. dobb's journal of - cini.classiccmp.org

dr. dobb's journal of

~alisthenics rthodontia Running Light Without Overbyte

AprH, 1976 Box 310, Menlo Park CA 94025

A REFERENCE JOURNAL FOR USERS OF HOME COMPUTERS

In This Issue ...

Editorial: History Repeats Itself . . . I Hope Jim C. Warren, Jr.

Scanning the Industry Periodicals Information derived from the May 24th issue of Electronic News

FEATURE ARTICLES

First Word on a Floppy-Disc Operating System Command Language & Facilities Similar to DECSYSTEM-I 0

Hardware & Software for Speech Synthesis Lloyd Rice Detailed discussion of techniques & hardware/software trade-offs

SYSTEMS SOFTWARE

MINOL-Tiny BASIC with Strings in 1.75K Bytes Erik T. Mueller An outstanding implementation by a high school junior

Volume 1, Number 4

3

4

6

System Monitor for 8080-Based Microcomputers Charlie Pack 18 Keyboard control over program loading, examination, modification & execution

DATA

Submitting items for publication 2 Reprint privileges 2 Subscription & information form 33 PCC Bookstore titles 35 TV Dazzler Contest 36

Page 2: dr. dobb's journal of - cini.classiccmp.org

DON'T KEEP IT A SECRET!

let us know what exciting new software and systems you are working on. We'll tell everyone else (if you wish). Maybe someone is also working on the same thing. You can work t together and get results twice as fast. Or, may be someone else has already done it; no reason for everyone to reinvent the wheel.

DR COBB'S JOURNAL OF

COMPUTER CALISTHENICS & ORTHODONTIA

Volume 1, Number 4; April, 1976 Box 310, Menlo Park CA 94025 Copyright © 1976 by People's Computer Company

Publisher People's Computer Company 1010 Doyle, Menlo Park, California

Jim C. Warren, Jr.

Contributing Editor

F. J. Greeb

Bob Albrecht Dennis Allison

(415) 323-3111

Rosehips Malloy

Circulation & Subscriptions Mary Jo McPhee

Bulk Sales

Printer Nowels Publications, Menlo Park 94025

POSTMASTER: Please send Form 3579 to: Box 310, Menlo Park CA 94025. Return postage guaranteed. Application to mail at second-class postage rates is pending at Menlo Park CA. Published 10 times per year; monthly, excluding July & December.

t t t t t t t t t t t t t t t t t t

U.S. subscriptions: foreign subscriptions: ~

(Subscnpiion blank is on page 33.) $1.50 for a single ~-$3 for the first three issues. $10 per year.

Add 14 per year to U.S. ' rates for surface mail. t Add $12 per year to U.S. rates for air mail. t

Discounts available for bulk orders.

Disclaimer We serve as a communication medium for the exchange of

information. We do not guarantee the validity of that information.

Reprint pri11i leges Articles herein that are copyrighted by individual authors or

otherwise explicitly marked as having restricted reproduction rights may not be reprinted or copied without permission from People's Computer Company, or the authors. All other articlt1s may be reprinted for any non-commercial purpose, provided a credit-line is included. The credit-line should indicate that the material was reprinted from Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310" Mr;nlo Park CA 94025.

t t t t ~ t ~

SUBMITTING ITEMS FOR PUBLICATION

~ ;;';; '~]-=" ~~ --...._.,,., \ ,I\ \\ •

DATE'M-Please include your name, address, and date on all tidbits you send to us.

TYPE'M-If at all possible, items should be typewritten, double-spaced, on standard, 8~ x 11 inch, white paper. Ifwe can't read it; we can't publish it. Remember that we will be retyping all natural language (as opposed to computer languages) communications that we publish.

PROGRAM LISTINGS-We will accept hand-written programs only as a very last resort. Too often, they tend to say something that the computer would find indigestible. On the other hand, if the computer typed it, the computer would probably accept it-particularly if it is a listing pass from an assembler or other translator.

It is significantly helpful for program listings to be on continuous paper; either white, or very light blue, roll paper, or fan-folded paper. Since we reduce the copy in size, submitting it on individual pages forces us to do a significant amount of extra cutting and pasting. For the same reason, we prefer that you exclude pagination or page headings from any listings.

Please, please, please put a new ribbon on your printer before you run off a listing for publication.

In any natural language documentation accompanying a program listing, please refer to portions of code by their address or line number or label, rather than by page number.

DRAWINGS & SCHEMATICS-Please draw them signifi­cantly larger than the size you expect them to be when they are published. Take your time and make them as neat as possible. We do not have the staff to retouch or re-draw illustrations. Use a black-ink pen on white paper.

LETIERS FOR PUBLICATION-We are always interested in hearing your praise, complaints, opinions, daydreams, etc. In letters of opinion for publication, however, please back up any opinions that you present with as much factual information as possible.

We are quite interested in publishing well-founded, responsible evaluations and critiques of anything concerning hobbyist hardware or software, home computers, or computers and people.

We may withhold your name from a published letter if _you so request. We will not publish correspondence, however, which is sent to us anonymously.

We reserve the right to edit letters for purposes of clarity and brevity.

ADVERTISING-Advertising from manufacturers and vendors may be accepted by us. However, we reserve the right to refuse any advertising from companies which we feel fall short of our rather picky standards for ethical behavior a~d r~sponsiv~ness to consumers. Also, any such commercial advertiser 1s herewith informed that we will not hesitate to publish harsh criticisms of their products or services, if we feel such criticisms are valid.

Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1916

Page 3: dr. dobb's journal of - cini.classiccmp.org

History repeats itself @ " I hope Last December, I had the very good fortune to attend a lecture on the history of the electronic

digital computer given by Professor Henry S. Tropp. Not too long ago, Dr. Tropp spent several years direct­ing a research project for the Smithsonian Institute concerning the history of computers in the period, 1935 to 1955. Much of his work consisted of traveling around interviewing many of the "old Timers" in the fast­moving world of digital computers. Because the field is as new as it is-the first "real" computer was invent­ed in the 1940's-many of the original researchers in computer science and technology are still alive. Dr. Tropp often spent several days talking with them.

His December lecture was a rambling collage of fascinating anecdotes and facts about the people and the technology, and insights into the intellectual character of the times. Some of his observations come to my mind, repeatedly, as I interact with computer hobbyists:

Dr. Tropp noted that, in those first years, there was a tremendous amount of intellectual and technical ferment in the area of computers. A number of prodigious st~ps were taken in a relatively short time, out­lining and developing the majority of the concepts, theories, and principles that remain the cornerstones of computer science and computer engineering. A number of intellectual giants were involved: John Von Neu­mann, Alan Turing, George Stibitz, Howard Aiken, John Mauchly, and many others. As often as not, how­ever, it appears that they had little idea of where they were going, and almost stumbled upon their great discoveries. The research community involved in these efforts was relatively small; most of the researchers knew one another, and there was often close communication among them. It seems like each new discovery by any one person quickly triggered renewed excitement and activity on the part of many others, even though they were scattered all over the northeastern United States, and some were in England. Each new discovery or development was quickly shared, and often served as a foundation element for someone else's discovery. This continued until the early l 950's. Then, this great rush of creation and advancement seemed to slow to a crawl. Some of the researchers went off to work for industry. A number of them moved to the West Coast to apply their research to the aircraft industry. Computers came out of the experimental labs, and became a profitable area of activity for business and industry. Particularly important: It appears that the easy communication and exchange of ideas that was so evident in the '40's was greatly curtailed in the '50's.

I see several parallels between what happened in those early days, and what is now occuring in the hobby­ist community:

I see a great deal of excitement and obvious pleasure in the hobbyists, as they learn about these funny machines and discover their phenomenal capabilities. It seems to me that those early researchers must have felt much of the same excitement and intellectual stimulation, for computers were as new and novel to them, then, as they now are to many of the hobbyists.

I hear of hobbyists who are spending most of their time in a great flurry of activity and experimentation. In the same way, those first computer scientists often worked night and day on their research, sometimes moving bunks into their labs to facilitate their continuous efforts.

I note the extensive development of very inexpensive hardware within the hobbyist community, often developed in a basement shop. Similarly, the computer researchers of the '40's often worked on a shoe­string budget in antiquated facilities.

Perhaps most significantly, I note the great willingness to share ideas, developments, facilities, and solu­tions to problems among the hobbyists. This obviously compares with the easy and open communication that was perhaps invaluable to those early researchers.

It is this open sharing that particularly delights me, and with which I am particularly concerned. I hope that it continues. We must all do whatever we can to encourage it. The sharing of ideas is useful in that it allows us to stand on one another's shoulders, instead of standing on one another's feet. But, there is some­thing else being shared that is of at least equal value: the enthusiasm and intellectual excitement. There is no doubt in my mind that the sharing of such enthusiasm, as well as information, was a significant factor in the prodigious creativity of those original researchers. When one of them was frustrated and "down," probably someone came flying through the door, "wired" over some new discovery, and ricocheting off the walls .. and the depressed co-worker wasn't "down" for very long. I believe the same holds true for the computer hobbyists. So ... continue to share your ideas, and continue to share your excitement.

--Jim C. Warren, Jr., Editor

April, 1976 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 Page 3

Page 4: dr. dobb's journal of - cini.classiccmp.org

SC NI G E I D FROM THE MAY 24TH ISSUE OF ELECTRONIC NEWS (Fairchild Publications, Inc., 7 E 12 St., NYC 10003; (212) 741-4230)

DROP IN DEC ORDERS CAUSES LSl/11-CHIPMAKER MAJOR FINANCIAL PROBLEMS

Western Digital Corp., based in Newport Beach, Cal., manufactures the 16-bit microprocessor that is the basis for Digital Equipment Corporation's LSi/11. Western's attorney recently told its creditors that the company had a "cash flow position where it could not operate," due to drops in DEC orders (e.g., from $400K in March to less than $100K in April. A vice-president from DEC indicated that, although their LSl/11 sales had been going as expected, they could not afford to continue to buy in the same quantities they had in the past. Evidently, DEC had been purchasing more than they were using; they indicated that their inventory was filled to capacity. The creditors' committee recommended giving West­ern 30 days to rectify its financial position.

Editor's Note: If I remember correctly, Western agreed to sell their chip only to DEC. If DEC really wants to keep Western afloat, as appears to be the case, then DEC could try releasing Western from that exclusive sales agreement. My sus­picion is that, if Western were free to peddle their PDP-11 look-alike microprocessor to everyone who wished to buy it, they could cure their financial problems rather quickly.

NATIONAL'S SC/MP KIT FOR $99 National Semiconductor has a microprocessor kit avail­

able for $99. This includes their SC/MP m-p (46 instruction types, single- and double-byte instructions, built-in serial 1/0 ports, bi-directional 8-bit bus, parallel data port, and latched, 12-bit address port), a preprogrammed 512-byte KITBUG ROM (monitor and debugger). 256 bytes of RAM, TTY interface (including buffer and driver for 20mA current-loop), voltage regulator, data buffer crystal (1.0 MHz), complete literature and schematics, and all the passive components and a PC board required to build a wee microcomputer. Contact Semiconductor Concepts: 145 Oser Ave., Hauppauge NY 11787, or 21201 Oxnard St., Woodland Hills CA 91364.

Any computer stores carrying SC/MP kit?

SEMICONDUCTOR SHIPMENTS EXPECTED TO NEAR $5 Bl LLION MARK, THIS YEAR

West€rn Electronics Manufacturers' Association (WEMA), has projected that worldwide semiconductor shipments will hit $4.98 billion in 1976. This is 24% above the $4.02 billion shipped in 1975. This report was a joint effort of all the major semiconductor manufacturers except Texas ! nstru ments.

Other preductions contained in this report included: MOS circuits will byte into the bipolar circuit market, ECL fami-

5 PE I DIC LS lies will see a slowing growth, and 1-squared-L will see, at best, a questionable growth. P- and N-channel MOS is expected to increase from $728 million (in 1975) to $959 million. C/MOS is projected to jump from $96 millign (1975) to $153 million.

MOTOROLA & AMD AGREE ON 2901 SECOND-SOURCE

Motorola Semiconductor and Advanced Micro Devices recently signed a licensing agreement for Motorola to second­source the bipolar, bit-sliced, 2901 microprocessor family developed by AMD. This makes Motorola the third second­source for 2901 's. Others include Ratheon Semiconductor, and the Sescosem Division of the Paris-based Thomason-CSF.

FLOATING POINT SOFTWARE IN P/ROM's FOR 8080's

Recognition Systems in Van Nuys, Cal., is offering a floating point package in P/ROM's for $495. A number of routines are included: floating point multiply, divide, add, subtract, fixed-point to floating-point conversion, square root, and floating-point to binary-coded decimal conversion.

MONOLITHIC MEMORIES OFFERS MICROPROCESSOR-BASED NOVA COMPETITOR

Monolithic Memories, Inc. of Sunnyvale, Cal., recently announced a 16-bit microcomputer that is said to be both software and 1/0 compatible with Data General's NOVA 2 and 3. MMI expects to be producing about 50/month by mid­July. The systems will be priced at $2500 in quantities of 50 or more, including 32K words of memory. The systems use four of MMl's 6701 four-bit bipolar microprocessors. The 32K word memories use of 128 of MMl's 2180 4K RAM's.

There is also a rumor of a NOVA-on-a-chip in the fore­seeable future.

SK PDP-8/E MEMORY FOR $650 WE Computer Extension Systems of Houston has an­

nounced a plug-in memory board for the PDP-8 Omnibus. The memory uses NMOS RAM's. A 4K version costs $400; the 8K version is $650. The company states that they come with an unconditional one-year warranty.

PASCAL COMPILER FOR PDP"11 EXTENDED FOR REAL-TIME FUNCTIONS

A compiler for PASCAL on the PDP-11 is being offered by Electro Scientific Industries of Portland, Ore., for $1500. PASCAL is an excellent, cleanly-designed, block-structured, high-level language, created about five years ago by Niklaus Wirth. ESI has extended the language to include the necessary constructs for real-time data acquisition and process control. The system runs under DEC's RT-11 operating system and requires 16K words.

Page 4 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1976

Page 5: dr. dobb's journal of - cini.classiccmp.org

First word on a floppy,,,,disc operating system Command language & facilities similar to DECSYSTEM .. 10

by Jim C. Warren, Jr., Editor, Dr. Dobb's Journal

We have the first tidbits of information on the floppy-disc operating system to which we have alluded in past issues:

The system, called "CP/M," runs on an 8080. !tis available from Digital Research, Box 579, Pacific Grove CA 93950; (408) 373-3403. Its user interface is patterned after that of the DECSYSTEM-10. The file commands include RENAME, TYPE, ERASE, D! RECTORY, LOAD, and auto-load/execute facility (type the name of an object file; it will be loaded and begin execution). File-names follow the DEC standard of a 1-8 character name with a 1-3 character suffix. An Editor is included that has somewhat the flavor of TECO. There is a PIP facility that allows easy transfer of files to and from any available device, e.g., terminal, paper-tape 1/0, cassettes, floppy discs on any drive, etc .. Note: PIP is DECeze for Peripheral Interchange Program. Other systems software is likely to be included.

Internally, the system allows for dynamic file allocation of files ranging from 0 to 250K bytes in length. It is initially set up to allow up to 63 different user-defined file-names (CP/M system files do not impinge on this file-name space), and can be simply modified to allow up to 255 such file-names. The system is written in PL/M. At an absolute and rather undesirable minimum, it will run on 8080's with only 8K bytes of men;iory. To be really usable, it requires 12K or, preferably, 16K bytes. The system includes an automatic bootstrap facility via a RESET of the controller, or allows a software bootstrap, if the controller doesn't have the RESET facility. The system is sufficiently modular that its designer feels he can easily modify it to operate on most floppy-disc drives and with most floppy-disc controllers.

This system already exists and has been in use for over a year. It was originally designed and implemented by Dr. Gary Kildall, a Computer Science Professor at the Naval Postgraduate School in Monterey, and a well-known, independent consultant in the area of mocroprocessor systems software. Gary is also the designer and implementor of PL/M, the "industry standard" high­level language for microprocessors. PL/M was produced for Intel for their 8000-family micros. Gary recently completed PLuS, a language for the Signetics 2650 microprocessor that is upwards­compatible with Pl/M. Incidentally, since CP/M is written in PL/M, and PLuS is--for the most part--a superset of PL/M, Gary feels that it will be relatively simple for him to make this operat­ing system also available for 2650-based systems.

It is expected that Digital Research wi II offer all of the parts for an inexpensive floppy-disc system, ready to build (kit), and/or plug-in (assembled) to an IMSAI or Altair microcomputer. These "parts" consist of: CP/M, the operating system; a floppy-disc controller; and floppy-disc drive(s). Pricing is still tentative,

Floppy-disc drives ......................... $550-$650

We expect to carry more information, including firm prices, and one or several articles by Dr. Kilda!I in near-future issues.

From our experience, this is the hottest deal going! It's cheap, as far as floppy-disc systems for micros go. The software is well-designed, based on a well-known and easy-to-use operating system that has been around for a DECade. Additionally-major points worth considering-it has been in use for some time, it has been used by a number of people, and it is fairly completely debugged. We know Gary personally, know 'where his head's at," and know that he backs his products and is responsive to his customers. Incidentally, he has an excellent and ongoing working relationship with Digital Research.

You should very seriously consider obtaining a floppy disc subsystem-hardware and software- for your home computer (either Gary's or someone else's). A short-access mass-storage fa­cility increases your capabilities by several orders of magnitude, particularly when it is backed by comprehensive, well-designed, debugged systems software. Note that the I BM 650 (the Model T of computers, and the one that moved computers out of the laboratory and into mass production and widespread usage) had a main memory that was a 2000-word rotating drum with access measured in milliseconds. [The Dragon sez we should tell you that the 650 had 2000 ten-digit words. Think of it as about 10,000 bytes.)

~=i::cccccci:::cccccccccccccccca=

~ A PLEA FOR EXPLICIT DIRECTIONS

~ Dear Jim Warren Jr., 4-27-76 ~ My problem is interfacing (hooking all the components

together so they work as a system). For instance, I can find no where instructions on exactly how to hook my SWTC keyboard and TVT-11 up to my Altair through my 3P +Sand 22" video monitor. I don't mean a few general instructions. I mean a wiring

1) diagram showing exactly which lines go wh~re so all the stro~es, ) waits, readys, etc. work together. The same 1s true of my sud mg

1) cassette interface. Then, if I order a tape from John Arnold what 1) do I have to do to get it to work. I have no trouble building the :~ parts and getting them to work, but nobody will furni~h me with I) comprehensive instructions on putting them together into a I~ system. !) Sincerely, I John Greiner, Jr.

I 20002 s 57th Temple TX 76501

SAN FRANCISCO BAY AREA STORE: however these are the conservative estimates: ~

CP/M User's Manual+ Editor User's Manual+ CP/M bl

COMPUTERS & STU FF of San Lorenzo

E~:~:~~es~s~~~~ d~~~~~~~~t·i~~ ·p~~k~~~:::::::: =~~ ll Formatted, verified, "loaded" disc . . . . . . . . . . . . . . $20 :)

Note: a :'raw" disc costs about $8 I Floppy-disc controller ...................... $100-$350

Computers & Stuff, a new retail computer outlet, has opened at 664 Via Alamo, San Lorenzo CA 94580; (415) 278-4720. Its hours are: Wed. - Fri., 4 - 8 p.m.

Sat. - Sun., 1 - 7 p.m.

April, 1916 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia. Box 310, Menlo Park CA 94025 Page 5

Page 6: dr. dobb's journal of - cini.classiccmp.org

Hardware & software J or speech synthesis by Lloyd Rice Computalker Consultants 821 Pacific St., No. 4 Santa Monica CA 90405

The process of generating voice output with a computer can be broken down into several steps. We will examine the opera­tions at each step to determine the flow of information into and out of the step. This examination will give us the back­ground needed to decide which parts of the overall process should be wired into a hardware device, and which parts should be kept as software to retain flexibility and control over the process. Perhaps the easiest way to carry out such an examination is by following an example phrase thru the sys­tem as it is transformed into a speech signal and sent to the loudspeaker. RESOLUTION OF GRAf:MATICAL

ENGLISH TEXT

MARKED PHONE,TIC

TEXT

Al'IDIGUITIES PHRA.SE STRUCTURE

P;:m;znc DICllO:JA:CY

SPEA.iCER CHARACTiiftISTICS

UNJ'.ARKED PHOI·iETIC

TE.er

A20USTIC ACOCSTI~ PAF.A!SfERS :3':".iTH~SIS P,-"'Al~TD""IO"-ll>I

ctULES VCl:) ULE

Figure 1 Flowchart of th® Speech Synthesis System

Figure shows a flowchart of the speech output system to be described. We will see that the kinds of external infor­mation needed for the first 2 steps is quite difficult to obtain and can require large amounts of processing, whereas the in­formation needed in the third step is easily determined, and in most applications can be set as constants in the system. Finally, the acoustic parameters contain all the information necessary to control the last step, the actual synthesizer, to produce audio output. As a result of these observations, we will see that is most cases, one should specify the material to be synthesized in the form of marked phonetic text rather than raw English text. In order to present a more complete description, however, we will begin with the first step shown in Figure 1, input of English text.

Beginning with the sample text, "This is computer speech.", we first consult a phonetic dictionary, which per­forms a direct translation to phonetic text. A phonetic coding scheme suitable for this purpose which is compatible with the ASCi I character set and Teletype output was developed by the Advanced Research Projects Agency (ARPA) as a part of a recent speech recognition study. That phonetic code, known as ARPABET, is listed in Table 1. The output of the phonetic dictionary in our example would be, "DHIHS/IHZ/KAHM-' PYUWTER/SPIYCH.#".

The main problem which arises at this stage is due to homographs, words that are spelled the same but pronounced differently. Two different types of homographs, however, pre­sent quite different problems. The first type consists mainly of short words such as '.'bow," pronounced either as in "tied a bow" and "bow and arrow," or as in "off th_e starboard bow." In these cases, the pronounciation can usually be re­solved by examining the surrounding context. The other type of ambiguity is a lesser noticed but very widespread phe­nomenon in English: the situation where a word has a differ­ent stress pattern depending on whether it is used as a noun or a verb. As an example of this, notice the difference in

"It was a dull subject," and "They were going to subject him to cruel punishment." It is not evident from the spelling which usage is intended, and requires that a fairly complete grammatical analysis be carried out to make that decision. One advantage at this point is that good use can be made of the recovered grammatical structure in the next step, where a more elaborate assignment of stress is performed.

The second step in the synthesis process deals with the assignment of sentence stress levels to the phonetic text string. To clarify that operation we will first have a closer look at the nature of the linguistic feature known as stress. The strass will be coded as a numerical value attached to a vowel in the phonetic string. That value wi II be realized later by the synthesizer in three different ways: as an increase in the pitch frequency, as a lengthening of the vowel duration, and to some extent as an increase in amplitude. The primary or highest level of stress is marked as a "1" following the vowel symbol. Secondary stress, marked with a "2," has less extreme acous­tic effects than primary stress. As many as 3 or 4 distinct levels of stress may be marked in a sentence.

With regard to its communicative value, stress serves two .., quite distinct functions. The sentence stress pattern, together

with timing and intonation, serves to communicate the gram­matical structure to the listener. One can think of the gram-

' matical structure as being transformed into a stress and into­nation pattern by the speaker which is then decoded back into the phrase structure by the listener. Using the term "grammar," I am here including several kinds of information about words, such as the noun-verb distinction discussed above as well as syntactic information about the phrase and clause structure. The second function of the stress pattern is to indicate which item or items in a sentence are to be given special emphasis. The meaning of a sentence can be shifted around by emphasizing different items. The sources of infor­mation needed for marking these two components of the stress pattern are quite different and must be considered sep­arately. Our example, with the stress pattern marked, would be something like, "DHIH3S/IHZ/KAHMPYUW1TER/ SPIY2CH.#". Notice also that the word and utterance bound­ary markers have been kept explicitly in the text string.

The purpose of the portion of the system described thus far is imply to generate strings of phonetic text with marked stress patterns which are to be synthesized by the 2 steps in the bottom row of Figure 1. Marked phonetic text strings can be obtained in other ways, of course. In the case of pre­determined phrases, marked phonetic strings can be stored instead of raw English text, making the synthesis task much simpler. On the other hand, consider synthesis of speech from an information network of some kind. The qrammatical infor­mation could come from a phrase strur• ire grammar which is being driven by relationships in the network. Items in the net­work. would be coded as phonetic strings, or in essence, refer­ences to the phonetic dictionary described above. There are many significant problems remaining with this approach, but it is perhaps one of the more exciting applications of synthetic speech. The third box in the flowchart in Figure 1 is the acous­tic rules section. In order to describe what the acoustic rules are and what they do, we must first look at the acoustic structure of speech. The speech code must be broken down into components so it can be synthesized by controlling, in real time, a limited number of parameter values. To a good

Page 6 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1976

Page 7: dr. dobb's journal of - cini.classiccmp.org

approximation, speech can be represented by the model shown in Figure 2.

This model requires 9 parameter control values consist­ing of 5 frequency controls and 4 amplitude controls. The box labeled "pulse source" is a controllable frequency oscil­lator which is adjusted dynamically to determine the voice

Table i

COMPUTER

PHONETIC

REPRESENTATIONS

NOTE: Soaces are ignored except within escapes.

jPhoneme

i

1

e

au or aw

al or ay

=>I or =>y

r

l

Ill

Computer Representation 1-Character 2-Characters

i

I

e

E

@

a

0

u

x

R

w y

0

y

w

r

1

m

n

G

IY

IH

EY

EH

~

M

AH

AO

ow UH

ER

AW

AY

OY

y

w R

L

M

N

NX

pitch. The boxes labeled "resonator" are tunable, single-pole, bandpass resonators which determine the frequency or spec­tral shape of the speech signal in different ways. The data bus symbol used to represent the control inputs indicates that each parameter can be controlled by at most 8 bits from the computer's output bus. The data rates needed to control the

Ii Exarnpl<[l

beat

bit

bait

bet

bat

Bob

but

bought

boat

book

boot

about

roses

bird

down

~

~ x_ou

wit

rent

let

met

net

si~

Cornouter Reoresentation Phone.'lle " ~-Character 2-Characters

p

t

k

.b

d

g

h

f

0

s

" s or !

v

z v z or:;

v c v j

syl l,l

syl rn 8m

syl n,n

flapped t,.r

glottal stonr

silence

p

t

k

b

d

9

h

f

T

s

v

D

z c j

H

L

M

N

F

Q

p

T

K

B

D

G

HH

F

TH

s

SH

v

DH

z ZH

CH

JH

WH

EL

EM

EN

DX

Q

Example

£_et

ten

kit

bet

debt

~et

hat

fat

thing

sat

shut

vat

that

zoo azure

church

j_udge

which

battle

bottom

button

batter

non-speech segment i I lat!9_h, etc.

April, 1916

~ol

+

I t

:1 or •

:2 or ?

Val1P

l

2

AUXILIARY SYMBOLS (1- AND 2-CHARAcrER CODES ARE IDENTICAL) Meaning Symbol

Morpheme boundary

Word boundary

Utterance boundary

Tone group boundary

Falling or decl. juncture

Rising or inter. juncture

:3 or •

• •

( )

< :>

Meaning

Fall-rise or non-term juncture

Comment (anything except* or **)

Apes-surround special symbol in comment

Phoneme class information

Phonetic or allohonic escape ! J

STRESS REPRESE!'lTATIO~lS (IF PRESENT, MUST TM.MEDIATELY FOLLOW TH!': VOWEL)

Stress Assignment Value S'""1"'"'"'"' llco:i~M~. :_t_

No stress 3 Tertiary stress

Primary stress

Secondai:y stress

(Etc.)

Dr. Dobb's Journal of Computer Calisthenics & Orthodontia. Box 310. Menlo Park CA 94025 Page 7

Page 8: dr. dobb's journal of - cini.classiccmp.org

parameters are quite low, the highest rate needed for any parameter being less than 100 new settings per second.

I will not go into detail here describing the actual parameter values needed to represent particular speech sounds. An article to appear in the August, 1976 issue of Byte Maga­zine goes into some detail on the nature of the different kinds of speech sounds and how they can be generated by con­trolling the parameter values in such a model. Suen information would, of course, be necessary to write a software implemen­tation of the acoustic rules. For our present purposes, we con­sider the 9 control values as outlined above to represent an acoustic parameter model of speech. We can now turn to a discussion of the acoustic rules and the tasks they must per­form to generate controls for this model.

Each phoneme, as encoded in the phonetic text string, is a symbol representing one or more acoustic speech segments, each such segment being produced by a particular pattern of values on the control parameters. Each pattern, or configura­tion of control values, must be held for a specific length of time before changing to the next pattern. As a first approxi­mation then, the rules would consist of a series of table look­ups to convert each phoneme into a sequence of parameter patterns, along with the duration each pattern is to be held.

Now comes the catch! This first approximation makes rather poor speech. The problem is that the transitions be­tween parameter values are often more important than the actual values at any given time. The flow of parameter values must be more carefully orchestrated. Actually, the only tough problem here is that correct transitions between phonemes are just as important as having the correct temporal structure within a phoneme. This means that phonemes cannot be coded as independent sets of parameter time functions which are merely joined together sequentially, but that some interac­tion must take place between phoneme patterns before they are sent out to the synthesizer module. Briefly, the different phonemes of a language can be classified according to the effects of boundary interactions. The transition of each param­eter value across a given phoneme boundary can then be de­termined from the boundary characteristics of each of the neighborhing phoneme-s. Such boundary behavi0r information can be stored in phoneme look-up tables.

in addition to assigning initial parameter values and mapping the transitions across boundaries, the acoustic rules must also assign and modify durations. For example, a stressed vowel is given a longer duration than the same vowel in an unstressed position.

A third function the acoustic rules must perform-proba­bly the most important for natural sounding speech-is to as­sign the time pattern of values to the pitch frequency parameter. First, an archetypal intonation pattern is chosen on the basis of punctuation (retained in the phonetic text just for this purpose). A period selects a falling pitch, a comma signals a level pause, and a question mark indicates a rising pattern. Other diacritical marks could be defined in the pho­netic string to generate more complex pitch patterns such as singing. The selected archetypal pitch pattern is then modi­fied locally by specific phonemes. Such local modification of the pitch pattern is one of the effects of a stress level marked on a vowel. Also, some consonants affect the pitch value slightly.

To complete the synthesis process, the acoustic param­eters generated by the acoustic rules are output, in real time, to a synthesizer module such as sketched in Figure 2 and

NASAL RRANC H

FigurEI 2 A Mod el of th" Strueture of Speech

described in the forthcoming Byte article. The synthesizer constructs an audio frequency signal as specified by the con­trol parameters. The audio signal is then sant to a loud­speaker as the speech output.

It would be impractical to consider simulating the syn­thesizer module in software because of the speed needed to generate speech in real time. That task is much more appro­priately handled by analog hardware. Such a hardware syn­thesizer module is currently being developed by Computalker, 821 Pacific St., No. 4, Santa Monica CA 90405. The Compu­talker synthesizer module would be driven by the microcom­puter output data bus as described above. The software inter­face consists either of a direct, manually-controlled parameter pattern generator or an implementation of the acoustic rules. Software for the acoustic rules will also be developed by Computalker as the hardware becomes available.

I believe it is important to consider at this point some of the trade-offs involved in implementing the acoustic rules in software rather than hardware. A synthesizer system such as the Votrax VS-6 contains a hardware implementation of the basic acoustic rules. As a result, the language available for coding the phonetic text is fixed and cannot be extended. In addition, the phoneme table values are fixed so that each pho­neme has a set phonetic quality. By implementing these mies in software you could retain the flexibility over pitch pat­terns and speech rate and also have control over the phonetic qualities which determine the language and dialect. The acous­tic rules determine a number of qualities in the resulting speech which are characteristic of a particular speaker, such as the sex and age, and other qualities which vary from occasion to occasion, such as voice quality, speaking rate, distinctness of articulation, etc. Because of time constraints, a software version of the acowstic rules may not have time to handle all these possibilities as on-line variables. Of course, it is cheaper to produce a synthesizer module if a hardware acoustic rules system is not included.

How could speech output from a microcomputer be used? Several applications come to mind for the hobbyist environment, such as responses in games, voice readout of measurement data, system status warnings, etc., etc, Other applications might include telephone answering and intrusion warnings. What about generating audio tape labels automatical­ly? Each of these applications makes its own demands for quality, naturalness and range of vocabulary needed. I would very much like to hear of your interest in computer speech output. What applications do you have in mind? What prob­lems do you foresee? A note to the above address will assure that you receive further information as it becomes available.

Page 8 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1976

Page 9: dr. dobb's journal of - cini.classiccmp.org

MINOL-T'iny BASIC with Strings 1n l.75K Bytes AN OUTSTANDING JOB DONE BY A HIGH SCHOOL JUNIOR Dear Mr. Warren: May 1, 1976

I have a Tiny BASIC program nmning cm my Altair that I think you might be interested in. I call it MINOl (mine-ail). It fits in 1.75K memory. Unlike the other Tiny BAS!C's, MINOl has a string-handling capability, b11.1t only single-byte, integer arithmetic and left-to-right expression evaluation.

Additions to TB include CAll maichine-hmguage s1.1b­rm.1tines, multiple statements on a line (like TBX), and optional "LET" in variable assignments. Memory locations of the form (H,ll can be used interichangably with variables, per­mitting DIM-like operations.

Sincerely, Erik T. Mueller 36 Homestead lane

Roosevelt NJ 08555

MINOL is an abbreviated form of BASIC with additional features. It has twelve statements: LET, PR, IN, GOTO, IF, CALL, END, NEW, RUN, CLEAR, UST, and OS.

Variables: A letter from A to Z, or a memory location of the form (H,l), where H is the high address (decimal), and L is the low address. H and L may be expressions.

Number: An integer from 0 to 255. Expression: A series of terms separated by arithmetic

operators. Terms: Numbers, variables, schars, random. Schar: A single character enclosed in single quotes. Gives

the ASCII value of the character. Random: "!" (exclamation point) gives a random num­

ber between 0 and 255. (Subroutine by Jim Parker.) Arithmetic Operators: + - * I Relational Operators (not permitted in expressions):

= # <("less than") Arithmetic Evaluation: All expressions are evaluated from

left to right (no precedence of operations). Statements: A statement consists of one or more sub­

statements separated by ":" (colon), and terminated by CR. lines up to 72 characters. line numbers from 1 to 254. All statements may be used with or without a line number. Statements without a line number are executed immediately. Statements with line numbers are edited into the existing program.

Substatements: [LET j cp ] <:11ar> = < expr> Assigns the value of a variable. The "LET' can be left out if desired. Ex: LETS= 0

LET (24,0) = P-59 A=B+C* J-198 (25,5)=A *7 /B

PR < var-~ist> [; I cpl <var-list> : Literals, strings, or expressions separated by

commas. literal: Characters to be printed enclosed in double

quotes. Strings: $(H,l): A series of memory locations starting

at H,l which contain characters previously entered. Expressions: Simple variable or expression.

Ex: PR"YOU SAY YOUR NAME IS",$(10,0) PRA,B,(6,0),

PR 56+!/A,B PR

A semicolon at the end of a PR suppresses CR LF. A blank PR produces a CR LF.

PR Format: Numerical values are printed with one lead­ing and trailing space and with all leading zeros suppressed. All strings and literals are printed without leading and trailing spaces. No zone spacing. GOTO<expr>

Transfers control to the specified statement. GOTO 0 transfers control to beginning of unnumbered statement. Ex: GOTO A *10

GOTO 78

IF<expr> <relop> <expr>;<statement> Executes the statement following the ";" (semi-colon) if

the specified relation is true. If it is untrue, control is trans­ferred to the next statement on the line (if present). Ex: IF X= 5 ; GOTO 20

IF A='Y' ;PR"SURE, WHY NOT?" IF A+B*C # !;GOTO 20 : PRA+B*C IF Y # 6; S=!

IN [<var>j<str>] [,[<var>j<str>]]* This statement permits two types of data to be entered

from the terminal: a) Numeric data; and b) Alphanumeric data; either a single

letter, or a string of n characters. Using a <var>: The input data is tested. If it is numeric,

the number is deposited into the variable. If the data is not a number, the ASCII value of the first character typed is deposited.

Using a < str>: (of the form $(H,L) The inputted char­acters are deposited into memory sequentially starting at loca­tion H,l. 255 is placed in memory after the last character before CR. All spaces inputted are ignored unless enclosed by quotes. Note that (H,L) refers to a single location, but $(H,l) refers to a series of locations beginning at H,l. (H,l) can be used in expressions as a variable, but $(H,L) can only be used in i/0 statements (IN, PR).

CALL (H,l) Calls users subroutine starting at location H,L decimal.

END: Terminates program. NEW: Deletes all lines of a program. CLEAR: Sets all variables (A-Z) equal to zero. RUN: Starts execution of program at lowest numbered state­ment. UST: Lists program in memory. OS: Transfers control to user's operating system.

Line editing and correction: Ttping X5 deletes the last character typed. X deletes an entire line. Xe stops executing program.

Prints: BREAK AT LL (LL is the line that was to be executed before the interrupt occurred.)

To delete a line, type the line number followed by CR. To change a line, type in the line with changes. The new

line will replace the old one.

!ERROR MESSAGES !ERR L AT XX 1. Label does not exist

April, 1976 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 Page 9

Page 10: dr. dobb's journal of - cini.classiccmp.org

2. Input is over 72 characters. 3. Unrecognizable statement type. 4. Illegal variable. 5. Syntax error. 6. Out of memory.

EM MINOl 2.1 SYNTAX Apr. 1976

<line> <statement> < substatement>

: : =<number> <statement> er /<statement> er ::=<substatement>* : <substatement> ::=[LET /¢l <var>= <expr>

PR < expr-list> [; / ¢l IN <var-str-list> IF <expr><relop><expr> <statement> GOTO <expr> CALL < memloc> END RUN

altered. Must CALL, INT 315

363 002 /

This checks for keyboard interrupt (Xe).

000 116 - 006 377 Mi NOL Interpreter

000 253 L Highest memory location available 261 H for MINOl programs.

001 142 L 143 H

Address of user's operating system, or mornitor.

All input text is stored at 006 210 - 006 320 Free speace is left for short strings at 006 333 - 006 377 Variables (A-Z) are stored at 005 007 - 005 042

007 000 + Program storage LIST NEW CLEAR OS

Executing MINOL: To start MINOl and initialize program area, EXAMINE 002 350, RUN. To start without initialization, EXAMINE 000000, RUN.

<number> <digit> <var> <relop> <expr-list>

>:: var-str-list> < expr> <term> <literal> <schar> <str> <memloc> < highadr> < lowadr> <char>

: :=< digit>* 2 <digit> ::=O /1 / .. /8 /9 ~~=~ 1~ 1~. /Y /z / < memloc>

: := [ <titeral > / < expr> / < str>] [. [ <Jiteral> / <expr> /<str>]] *

: := [<var>/< str>] [; [<var>/< str>] ) * ::=[ <term><aroper>] * <term> ::=<var> /<number>/ '<schar>' /! : :="<char>*" ::=<char> : : =$ < memloc> : :=( < highadr>, < lowadr>) : :=<number> : :=<number> ::=any character except " and er

Notes: <>encloses an element of MINOL ¢ is the empty set * repeat limited by length of line

*2 repeat from 0 to 2 times

MINOL Memory Allocation: (All locations are split octal) 000 000 - 000 115 1/0 Routines, etc.

System Reset: 000 000 061 LXI SP

CRLF:

INPUT:

OUTPUT:

001 377 002 017 003 317 RST CR LF 004 303 JMP, MiNOL 005 116 006 000 010 A subroutine to output a

020

040

CR followed by a LF. Moves a character from input device to the A reg-ister. Parity equals 1. Must output an echo check of the inputted character. Outputs character in the A register. Parity equals 1. No registers may be

Dear Jim: May 24, 1976 I am enclosing the listing of MINOL-manually typed! There are several features of my program, both positive

and negative, that I might point out. On the plus side, MINOL uses only 1.75K of memory,

including the input-output subroutines (altho1.1gh since writing it I see how I can make it even smaller.) Memory locations of the form (H,l) can be used similarly to one- or two-dimen­sional DIMs in higher BASIC's. Simple input or output strings are possible by specifying a series of memory locations-of the form $(H,ll where H,l is the first location where characters are to be deposited. I am enclosing three programs to illustrate these features. On the negative side, the program is not designed for arithmetic functions, having no grouping of operations, and being limited to a value of 255. The relational operators are restricted to =, #, and <, although > ("greater than") can be done by reversing the logical expres­sions. Fewer error messages am provided than usual. MINOl is written completely in machine language without using IL.

When I can supply MINOL on a cassette l'li let you know. You might like to know that I am in my third year of high school.

Yours truly, Erik T. Mueller Bwitton House

Roose11e!t NJ 08555

Additions/changes since the May 1st letter: Spaces are ignored: a. During line/statement entry

unless enclosed by quotes. b. When inputting variables. c. When inputting strings if the L

address is zero. Spaces are accepted: a. When inputting strings if the L

address is non-zero. b. When enclosed by quotes.

instead of GOSUB/RET statements, use the following substitute statements to perform the same function:

First initialize the GOSUB stack pointer Y,Z: 2 Y=14:Z=255 (Y and Z are the H,L address of some free space in memory.)

Instead of a GOSUB statement, substitute the

Page 1 O Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1976

Page 11: dr. dobb's journal of - cini.classiccmp.org

following: LET(Y,Z)=< Return label> :Z=Z-1 :GOTO <subroutine label>

Instead of a RET, substitute: Z=Z+1 :GOTO(Y,Z)

Free space is left for very short user's strings from 006366 to 006377.

On a directly-executed IN statement, although the data will be correctly stored, an error message may appear after its execution.

April, 1976

The monitor gives a "]" as a prompt. The IN statement gives a "?" unless a sense switch is up.

Three programs in MINOL:

]LIST 1¢ PR"GIVE ME A SENTENCE":IN$(14,l) 2¢ PR"STRING TO SEARCH FOR?":IN$(14,101) 21 A=¢ 22 A=A+l:IF(l4,A)#255~GOT022 23 B=¢ 24 B=B+l:IF(l4 0 lOO+B)#255;GOT024 3¢ C=l~D=l:S=¢ 4¢ IF{ 14, D+l¢¢)~H 14, C) ~ GOT07)d 5¢ D=D+l:C=C+l:IFD(B~GOT04¢ 6¢ LETS=S+l 65 C=C-1 7¢ LETD=l 8¢ C=C+l:IFC(A~GOT04¢ 9¢ PR" 111 ~$(14 0 lOl); 111 OCCURS 11 ;S~ 96 IFS=l~GOT01¢¢ 97 PR 11 TIMES IN 110 ~$(14,l)~ 11111 :END 100 PR"TIME IN 111 ;$(14,1)~ 11 ' 11 :END }RUN GIVE ME A SENTENCE ? THE BLUE BIRD IN THE BLUE SKY STRING TO SEARCH FOR? ? BLUE 'BLUE 1 OCCURS 2 TIMES IN 1 THE BLUE BIRD IN THE BLUE SKY 1

JLIST 1¢ "***NUMBER-A NUMBER GUESSING GAME (NUM¢5) 2¢ PR:PR"WHAT IS YOUR NAME"~:IN${14,l) 3¢ X=-=l:S=yJ:PR"HI, 19 ;$(14,1); 11 • 'WELCOME TO THE GAME OF NUMBER'' 4¢ PR"I 1 M THINKING OF A NUMBER FROM 95 TO 255 09

5¢ PR'"GUESS MY NUMBERl 1 11

6¢ PR:PR"YOUR GUESS 1';:ING:S=S+l 65 IFG=X~GOT090 7¢ IFG<X~PR 11 TOO SMALLe TRY A BIGGER NUMBER .. 11

8¢ IFX<G;PR 11 TOO BIG. TRY A SMALLER NUMBER .. 11

85 GOT06¢ 9¢ PR 11 THAT'S RIGHT, "~$(14,l)~"l l YOU GOT IT IN11 ~S~ 11 GUESSES 11

1¢¢ PR 11 PLAY AGAIN8'~ :INA:IFA='Y' ~GOT03¢ 11¢ PR"OK ........ HOPE YOU HAD FUN .. 11 :END

lfl] PR 11 NAME 11 ; :IN$(14,l) 2¢ IF(l4al)= 1 J 1 ~IF(l4,2)='I 0 ~IF(l4,3)='M 1 ~PR"IT'S JIM! 11

3¢ IF(l4,l)#'J'~PR 11 IT 1 S NOT JIM .. ":GOTOlflJ

JRUN NAME?ERIK IT 1 S NOT JIM .. NAME?JIM IT'S JIMl NAME'?Xc BREAK AT 1¢ 1

Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 Page 11

Page 12: dr. dobb's journal of - cini.classiccmp.org

'- 0 <: .., ::i

OJ

n "' QO

0 ~ ... :::;

0 0..

0 ::i ... Ol 00

0 x w

~

0 0 )>

(£; .,. 0 N

CJ'J

MIN

OL

2

.1

TAG

MI N

OL

ZIP

INS

RT

!HR

OH

IO

PZ

IY

IBY

H

EHR

HB

Y

HII

UPD

T

Eri

k T

. M

uell

er

May

1

97

6

AD

DR

ESS

Il

I2

I3

00

01

16

0

00

12

0

00

01

21

0

00

12

4

00

01

27

0

00

13

0

00

01

33

0

00

13

6

00

01

37

0

00

14

0

00

01

43

0

00

14

6

00

01

51

0

00

15

4

00

01

55

0

00

15

7

00

01

60

0

00

16

3

00

01

64

0

00

16

6

00

01

71

0

00

17

2

00

01

73

0

00

17

4

00

01

77

0

00

20

0

00

02

02

0

00

20

5

00

02

07

0

00

21

0

00

02

11

0

00

21

2

00

02

14

0

00

21

7

00

02

20

0

00

22

1

00

02

24

0

00

22

5

00

02

30

0

00

23

1

00

02

32

0

00

23

3

00

02

34

0

00

23

5

00

02

36

0

00

24

0

00

02

43

0

00

24

4

00

02

45

0

00

24

6

00

02

47

0

00

25

0

00

02

51

0

00

25

2

00

02

54

0

00

25

7

00

02

60

0

00

26

2

00

02

65

0

00

26

6

00

02

67

0

00

27

2

00

02

73

0

00

27

4

00

02

75

0

00

27

6

00

03

01

0

00

30

2

07

6

33

5

34

7

31

5

05

2

00

4

04

1

21

0

00

6

17

6

31

5

06

2

00

5

32

2

00

0

00

1

04

3

17

6

31

5

06

2

00

5

33

2

13

6

00

0

31

5

25

6

00

4

02

1

00

0

00

7

03

2

37

6

21

5

02

3

30

2

15

4

00

0

03

2

37

6

37

7

31

2

17

7

00

0

06

7

07

7

27

0

33

2

15

4

00

0

17

6

37

6

21

5

31

2

34

5

00

0

01

6

00

2

04

3

17

6

01

4

37

6

21

5

30

2

207

00

0

03

2

27

0

30

2

23

1

00

0

32

5

31

5

35

1

00

0

32

1

14

2

15

3

32

5

02

3

03

2

37

6

37

7

30

2

23

4

00

0

17

1

10

2

11

3

02

3

04

3

36

5

17

3

37

6

xx

x

30

2

26

5

00

0

17

2

37

6

xx

x

31

2

22

4

00

4

36J.

0

75

3

02

2

46

0

00

0

12

0

22

1

73

2

75

3

02

3

06

0

00

1

72

2

74

MN

EMO

NIC

MV

I A

II

] ti

RST

O

UT

C.1

\L,

INPT

XT

L

XI

IIL

: 'I

'XT

M

OV

A,M

C

l\L ,

Cl!E

KN

J

NC

, D

IRB

C'I

1 IN

X

HL

MO

V

A,N

C

AL

,CH

EK

N

JC,F

ND

C

AL

,MK

BIN

L

XI

DE

:PR

OG

LD

AX

D

E C

PI

11C

R11

INX

D

E JN

Z,Z

IP

LDA

X

DE

CP

I 3

77

JZ

,IN

SR

T

STC

CM

C CM

P B

,J

C, Z

IP

MOV

A

,M

CP

I "C

R"

JZ,E

KIL

M

VI

C

00

2

INX

H

L

MO

V

A,M

IN

R

c C

PI

"CR

" JN

Z,

Um

. LD

AX

D

E CM

P B

JN

Z,I

BY

H

PUSH

D

E C

AL

,KIL

LIN

E

POP

DE

MO

V

H,D

M

OV

L

,E

PUSH

D

E IN

X

DE

LD.1\

X

DE

CP

I 3

77

JN

Z,E

HR

M

OV

A

,C

MO

V

B,D

M

OV

C,E

Il

lX

DE

IN

X

HL

PUSH

PS

W

MO

V

A,E

C

PI

xx

x

JNZ

,I!I

I M

OV

A

,D

CP

I x

xx

JZ

,ER

R6

PO

P PS

W

DEC

A

JN

Z,I

IBY

LD

AX

BC

srr~X

DE

M

OV

A

,E

CMP

L JN

Z,N

HR

M

OV

A

,D

CMP

H

CO

MM

ENTS

ou

tpu

t p

rom

pt

NH

R

NE

T

STR

G

et

inp

ut

lin

e

IFD

P

oin

t to

in

pu

t te

xt

wit

h

HL

Ch

eck

fo

r la

bel

If

no

la

bel,

go

ex

ecu

te

com

man

d

Po

int

to fir

st

no

n-n

um

eric

ch

ara

cte

t N

TAT

Co

nv

ert

A

SC

II

lab

el

to b

inary

T

his

secti

on

ed

its

(in

serts

, d

ele

tes,

ch

an

ges)

li

nes

of

the p

rog

ram

Lo

ok

at

lin

e

nu

mb

er

Po

int

to li

ne

nu

mb

er g

reate

r th

an

o

r eq

ual

to en

tere

d

lab

el

EK

IL

KIL

LIN

E

BB

L

If la

bel

alo

ne,

dele

te li

ne

ARI<

Co

un

t le

ng

th o

f li

ne

an

d

ad

d

2

If li

ne en

tere

d alr

ead

y ex

ists

, fir

st

dele

te

the o

ld

on

e,

DIR

EC

T

then

in

sert

the

new

o

ne

Dele

te o

ld li

ne

RU

N

HL

po

ints

to

fir

st

locati

on

L

PUB

w

here

n

ew li

ne w

ill

be p

laced

S

av

e p

osit

ion

in

sta

ck

Co

nti

nu

e u

nti

l D

E p

oin

ts

to

BIB

en

d o

f fil

e

Len

gth

o

f n

ew li

ne in

A

xx

x

=

Low

ad

dre

ss:

lim

it o

f p

rog

ram

m

emo

ry

xx

x

=

Hig

h

ad

dre

ss:m

em

ory

li

mit

O

ut

of

mem

ory

err

or

Incre

men

t u

nti

l D

E p

oin

ts to

n

ew en

d-o

f-fi

le p

osit

ion

, an

d

l!L

p

oin

ts to

w

here

fil

e

up

dati

ng

b

eg

ins

BC

p

oin

ts

to

en

d o

f fil

e

EXEC

00

03

03

0

00

30

6

00

03

07

0

00

31

0

00

03

13

0

00

31

4

00

03

17

0

00

32

0

00

03

21

0

00

32

4

00

03

27

0

00

33

2

00

03

33

0

00

33

4

00

03

35

0

00

33

6

00

03

37

0

00

34

1

00

03

44

0

00

34

5

00

03

50

0

00

35

1

00

03

52

0

00

35

3

00

03

54

0

00

35

5

00

03

56

0

00

35

7

00

03

60

0

00

36

2

00

03

65

0

00

36

6

00

03

67

0

00

37

0

00

03

72

0

00

37

3

00

03

74

0

00

37

7

00

10

00

0

01

00

1

00

10

02

0

01

00

5

00

10

10

0

01

01

3

00

10

14

0

01

01

6

00

10

17

0

01

02

2

00

10

24

0

01

02

7

00

10

30

0

01

03

2

00

10

35

0

01

04

0

00

10

41

0

01

04

4

00

10

45

0

01

04

6

00

10

50

0

01

05

3

00

10

54

0

01

05

5

00

10

57

0

01

06

2

00

10

64

0

01

06

7

00

10

70

0

01

07

1

00

10

73

0

01

07

6

00

11

00

0

01

10

3

31

2

01

3

03

3

30

3

32

1

04

1

04

3

17

6

31

5

33

2

07

2

02

2

02

3

17

6

02

2

04

3

37

6

30

2

307

31

5

30

7

03

2

27

0

30

0

14

2

15

3

04

3

17

6

37

6

30

2

04

3

17

6

02

2

37

6

31

0

02

3

30

3

00

0

31

7

257

06

2

30

3

04

1

17

6

37

6

04

3

31

2

37

6

30

2

17

6

376

31

2

06

2

04

3

31

5

04

3

17

6

37

6

31

2

05

3

17

6

37

6

31

2

37

6

30

2

04

3

17

6

37

6

31

2

37

6

31

2

30

3

31

3

00

0

27

2

00

0

21

0

00

6

06

2

00

5

31

7

00

0

12

0

00

3

21

5

33

3

00

0

35

1

00

0

21

5

35

6

00

0

37

7

36

5

00

0

12

1

00

3

04

1

00

1

00

0

00

7

27

2

04

1

00

1

21

5

01

3

00

1

37

7

00

0

00

0

12

l 0

03

36

3

00

2

27

5

22

1

00

1

25

0

22

1

00

1

30

3

10

6

00

1

30

1

32

3

00

2

31

4

30

4

00

2

20

5

00

4

JZ,N

ET

D

CX

BC

D

CX

D

E JM

P,U

PD

T

POP

DE

LX

I II

L:T

XT

IN

X

HL

MO

V

A,M

C

AL

,CII

EK

N

JC

, IF

D

LD

A:B

IN

STA

X

DE

INX

D

E M

OV

A

,M

STA

X

DE

INX

ll

L

CP

I 11

CR

11

JNZ

,NT

AT

R

ST

RE

SET

C

AL

,KIL

LIN

E

RST

R

ES

ET

LD

AX

D

E CM

P B

R

NZ

M

OV

H,D

M

OV

L

,E

INX

H

L M

OV

A

,M

CP

I "C

R"

JNZ

,BB

L

INX

H

L M

OV

A

,M

STA

X

DE

CP

I 3

77

R

Z INX

D

E JM

P,A

RK

N

OP

RST

C

RL

F X

RA

A

S

T!,

:LN

E

JMP

,EX

EC

L

XI

HL

:PR

OG

M

OV

A

,M

CP

I 11

: 11

INX

H

L JZ

,EX

EC

C

PI

11C

R11

JNZ

,LP

UB

M

OV

A

,M

CP

I 3

77

JZ

,RE

SE

T

ST

A:L

NE

IN

X

llL

C

AL

,IN

T

U."

X

HL

MO

V

A,M

C

PI

11:::

::11

JZ,L

ET

D

CX

!IL

M

OV

A

,M

CP

I ''

("

JZ,L

ET

C

PI

"C"

JNZ

,GS

M

INX

H

L M

OV

A

,M

CP

I "A

" JZ

,CA

LI.

C

PI

11L

11

JZ,C

LR

JM

P.E

!UU

Relo

cate

fil

e

leav

ing

sp

ace fo

r n

ew li

ne.

Retr

iev

e p

oin

ter

Po

int

to fir

st

no

n-n

um

eri

c

ch

ara

cte

r.P

ut

lin

e

no

. in

A

S

tore

li

ne

no

. in

fil

e

Sto

re li

ne te

xt

in fil

e

Go

back

to

m

on

ito

r secti

on

D

ele

te li

ne

Dele

te

a li

ne

If d

ele

tin

g li

ne th

at

do

es

no

t ex

ist,

retu

rn

Po

int

to n

ex

t li

ne

Relo

cate

fil

e,

dele

tin

g li

ne

Dir

ect

ex

ecu

tio

n o

f a

sta

tem

en

t

Set

LNE

(cu

rren

t li

ne n

o.)

=0

E

xecu

te

sta

tem

en

t R

UN

S

tate

men

t:

Sta

rt

fro

m

be­

gin

nin

g o

f p

rog

ram

. G

et

nex

t sta

tem

en

t.

If

no

t a

new

li

ne,

go

ex

ecu

te

sta

tem

en

t

If

sta

tem

en

t n

o.;

37

7

(en

d o

f p

rog

ram

),

go

b

ack

to

mo

nit

or

If n

ot

37

7,

sto

re cu

rren

t li

ne

no

. at

LNE

Ch

eck

fo

r k

ey

bo

ard

p

rog

ram

in

terr

up

t C

hec

k fo

r

11="

in

se

co

nd

co

lum

n

(vari

ab

le a

>si

gru

nen

t)

If

"("

in

fir

st

co

lum

n

(mem

ory

lo

cati

on

ass

igru

nen

t)g

o to

L

ET

C

hec

k fo

r

11C

11

If n

ot,

g

o

on

CA

LL

Sta

tem

en

t

CL

EA

R

Sta

tem

en

t If n

eit

her,

re

po

rt err

or

Page 13: dr. dobb's journal of - cini.classiccmp.org

h "O

00

11

06

3

76

3

05

C

PI

"E

"

Ch

eck

fo

r "E

u as in

E

ND

. N

XTE

0

01

34

0

37

6

24

2

CP

I 1

11

1

Ch

eck

fo

r li

teral

=:!.

00

11

10

3

12

0

00

0

00

,l

Z,

RE

3E'l'

0

01

34

2

30

2

02

2

00

2

JNZ

,VA

R

If n

ot,

g

o

on

--

00

11

13

3

76

3

07

C

PI

uG

11

H

R

00

13

45

0

43

IN

X

HL

Pri

nt

tex

t u

nti

l "

fou

nd

....

00

11

15

3

12

0

07

0

03

JZ

,GO

TO

0

01

34

6

17

6

MO

V

A,M

((

) 0

01

12

0

37

6

24

2

CP

I 1

11

1

Ch

eck

fo

r "

ind

icati

ng

0

01

34

7

37

6

34

2

CP

I '"

' " 0)

00

11

22

3

12

0

13

0

01

JZ

,LP

UB

RE

M

sta

tem

en

t 0

01

35

1

31

2

36

6

00

1

JZ,M

RE

ND

0

01

12

5

37

6

31

6

CP

I U

Nll

00

13

54

3

15

0

43

0

05

C

AL

,'l'E

R!1

If te

rmin

ato

r b

efo

re clo

sin

g

00

11

27

3

12

3

50

0

02

JZ

,NE

W

00

13

57

3

32

21

7 0

04

JC

,ER

R5

q

uo

tes,

prin

t err

or

00

11

32

3

76

3

20

C

PI

up

"

00

13

62

3

47

R

ST

OU

T 0

01

13

4

31

2

32

7

00

1

JZ,P

R

00

13

63

3

03

3

45

0

01

,J

MP,

HR

0

01

13

7

37

6

31

7

CP

I ••o

•• M

REN

O

00

13

66

0

43

IN

X

HL

00

11

41

3

12

L

LL

h

hh

.r

z,os

A

dd

ress

o

f u

ser's

mo

nit

or

00

13

67

1

76

M

OV

A

,M

0 0

01

14

4

37

6

32

2

CP

I rt

R"

00

13

70

3

15

0

43

0

05

C

AL

L,T

ER

M

If

en

d o

f sta

tem

en

t w

ith

ou

t ....

00

11

46

3

12

0

10

0

01

JZ

,RU

N

00

13

73

3

32

0

16

0

02

JC

,DC

R

sem

ico

lon

":

" .g

o d

o

CR

c

00

11

51

3

76

3

11

C

PI

., ru

00

13

76

3

76

2

73

C

PI

II;"

0

00

11

53

3

02

1

75

0

01

JN

Z,L

S

00

20

00

3

02

21

7 0

04

JN

Z,E

RR

5 C

l' 0

01

15

6

04

3

INX

H

L 0

02

00

3

04

3

INX

H

L tl

" .,,· 0

01

15

7

17

6

MO

V

A,M

0

02

00

4

17

6

MO

V

A,M

c.

. 0

01

16

0

37

6

31

6

CP

I "N

" 0

02

00

5

31

5

04

3

00

5

Cl\

L,T

ER

M

If

term

afte

r

sem

ico

lon

do

n

ot

0 0

01

16

2

31

2

11

6

00

2

JZ,I

N

00

20

10

3

32

0

17

0

02

JC

,NC

R

prin

t C

R

c: 0

01

16

5

37

6

30

6

CP

I t1

p1

1

00

20

13

3

03

3

40

0

01

JM

P,N

XT

E

Get

nex

t th

ing

to

p

rin

t .... :l

00

11

67

3

12

3

24

0

05

JZ

,IF

O

CR

0

02

01

6

31

7

RST

C

RL

F O

l 0

01

17

2

30

3

20

5

00

4

JMP

,ER

R3

NC

R

00

20

17

3

03

0

13

0

01

JM

P,L

PU

B

- 0 L

S

00

11

75

3

76

3

14

CJ

:>I

"Lu

VA

R

00

20

22

3

76

2

44

C

PI

"$11

....

00

11

77

3

02

2

05

0

04

JN

Z,E

RR

3 0

02

02

4

31

2

07

6

00

2

JZ,S

TR

C

hec

k if str

ing

("

) '

00

12

02

0

43

IN

X

HL

00

20

27

0

21

1

51

0

06

L

XI

DE

:EX

P

0 0

01

20

3

17

6

MOV

A

,M

00

20

32

0

76

2

40

M

VI

A 11

SP

11

Ou

tpu

t le

ad

ing

sp

ace

3 'Cl

00

12

04

3

76

3

05

C

PI

UE

ll 0

02

03

4

34

7

RST

O

UT

c: 0

01

20

6

31

2

22

1

00

1

JZ,L

ET

E

R

00

20

35

1

76

M

OV

A

,M

Tra

nsfe

r ex

pre

ssio

n te

xt

fro

m

... !?;

00

12

11

3

76

3

11

C

PI

II I"

0

02

03

6

02

2

S'ri

\X

DE

":'r

o9

ram

te

>xt

. to

ex

pre

ssio

n

00

12

13

3

12

1

32

0

05

JZ

,LIS

T

00

20

37

0

43

IN

X

!IL

b

uff

cr

n 0

01

21

6

30

3

20

5

00

4

JMP

,ER

R3

00

20

40

0

23

IN

X

DE

"' ~·

LE

T

00

12

21

1

76

M

OV

A

,M

LE

T

Sta

tem

en

t ex

ecu

ter

00

20

41

3

15

0

43

0

05

C

AL

.TE

RM

0

01

22

2

31

5

04

3

00

5

CA

L,T

ER

M

Fin

d

11

=1

1

00

20

44

3

32

0

54

0

02

JC

,HR

,,.

00

12

25

3

32

21

7 0

04

JC

,ER

R5

R

ep

ort

err

or

if n

o

"="

befo

re

00

20

47

3

76

2

74

C

PI

11

:11

"' ::i 0

01

23

0

37

6

27

5

CP

I '1

;::=

11

CR

o

r 1

1:1

1

00

20

51

3

02

0

35

0

02

JN

Z,E

R

n 0

01

23

2

04

3

INX

H

L H

R

00

20

54

0

53

D

CX

H

L "'

00

12

33

3

02

2

21

0

01

J

NZ

,LE

T

00

20

55

0

33

D

CX

DE

!20

00

12

36

3

03

3

21

00

.6

JMP

,FIX

T

ran

sfe

r ex

pre

ssio

n te

xt

in

00

20

56

0

76

2

15

M

VI

A 11

CR

11

0 0

01

24

1

00

0

00

0

NO

P p

rog

ram

te

xt,

to

ex

pre

ssio

n

00

20

60

0

22

ST

l\X

DE

... 0

01

24

3

04

3

INX

!-I

L b

uff

er

00

20

61

3

15

1

62

0

03

C

AL

,EX

PR

... ,,.

00

12

44

0

23

IN

X

DE

00

20

64

1

01

M

OV

B

,C

0 0..

00

12

45

3

22

3

24

0

06

JN

C,M

RE

N

00

20

65

3

15

1

74

0

05

C

AL

,PB

INB

CD

P

rin

t ex

pre

ssio

nls

v

alu

e

0 0

01

25

0

31

5

16

2

00

3

CA

L,E

XP

R

00

20

70

0

76

2

40

M

VI

A 11

SP

1 ' ::

i 1

1=

11

0

02

07

2

34

7

RST

O

UT

::'.

SER

CH

0

01

25

3

17

6

MO

V

A,M

G

o b

ack

befo

re

"' 0

01

25

4

37

6

27

5

CP

I H

=ll

0

02

07

3

30

3

36

7

00

1

JMP

,MR

EN

o+l

00

12

56

0

53

D

CX

H

L S

TR

0

02

07

6

04

3

INX

ll

L

CD

00

12

57

2

53

0

01

0

02

07

7

31

5

06

2

00

6

CA

L,V

AL

G

et

sta

rt.

ad

dre

ss o

f str

ing

0

30

2

JNZ

,SE

RC

H

)(

00

12

62

1

76

M

OV

A

,M

MRE

0

02

10

2

01

2

LDA

.'(

BC

in

B

C.

Pri

nt

str

ing

w

0

01

26

3

31

5

37

1

00

4

CA

L, C

llEK

LT

R

00

21

03

3

47

R

ST

OU

T ....

00

12

66

3

22

3

01

0

01

JN

C,I

NL

ET

If

no

t.

vari

ab

.le,

get

mem

ory

0

02

10

4

37

6

CP

I .o

0

01

27

1

31

5

34

3

00

4

CA

L,G

ET

AD

R

ad

dre

ss

00

21

05

3

77

3

77

s: 0

01

27

4

17

1

MO

V

A,C

0

02

10

6

00

3

INX

B

C

"' 0

01

27

5

02

2

S'l'A

X

DE

Sto

re in

vari

ab

le

00

21

07

3

02

1

02

0

02

JN

Z,M

RE

:I

0

01

27

6

30

3

01

3

00

1

JMP

,LP

UB

N

ex

t sta

tem

en

t 0

02

11

2

04

3

INX

II

L

0 IN

LE

T

00

13

01

3

76

2

51

C

PI

")"

00

21

13

3

03

3

67

0

01

JM

P,M

RE

N

"C

00

13

03

3

02

2

12

0

04

JN

Z,E

RR

4

IN

00

21

16

0

43

IN

X

HL

Inp

ut

sta

tem

en

t Il

l 0

02

11

7

33

3

INP

"'

JHR

0

01

30

6

05

3

DC

X

!IL

"

00

13

07

1

76

M

OV

A

,M

00

21

20

3

77

3

77

("

) 0

01

31

0

37

6

25

0

CP

I "("

0

02

12

1

37

6

CP

I If

sen

se

swit

ch

es

do

wn

,prin

t"?

"

)>

00

13

12

3

02

3

06

0

01

JN

Z,J

HR

0

02

12

2

00

0

00

0

(!)

00

13

15

1

71

M

OV

A

,C

00

21

23

3

02

1

34

0

02

JN

Z,E

AH

R

.!>

00

13

16

3

65

PU

SH

PSW

0

02

12

6

07

6

27

7

MV

IA

II ?

II

0 ~

00

13

17

3

15

0

62

0

06

C

AL

,VA

L

Get

mem

ory

lo

cati

on

in

B

C

00

21

30

3

47

R

ST.

OU

T (J

'j 0

01

32

2

36

1

POP

PSW

0

02

13

1

07

6

24

0

MV

IA

"S

P"

00

13

23

0

02

ST

l\X

BC

00

21

33

3

47

R

S'r

OU

T 0

01

32

4

30

3

01

3

00

1

JMP

,LP

UB

E

AJI

R

00

21

34

1

76

M

OV

A

,M

PR

0

01

32

7

04

3

INX

H

L PR

S

tate

men

t ex

ecu

ter

00

21

35

3

15

3

71

0

04

C

AL

,CII

EC

KL

ET

C

hec

k fo

r v

ari

ab

le

00

13

30

0

43

IN

X

!IL

S

kip

ass

um

ed

ch

ara

cte

rs

00

21

40

3

32

1

64

0

02

JC

,LV

B

00

13

31

1

7(i

M

OV

A

,M

00

21

43

3

76

2

44

C

PI

"$"

Ch

eck

fo

r in

pu

t str

ing

0

01

33

2

31

5

04

3

00

5

CA

L,T

ER

M

If

bla

nk

prin

t,

go

to

C

R

00

21

45

3

12

2

47

0

02

JZ

,ST

RIN

"C

0

01

33

5

33

2

01

6

00

2

JC,D

CR

0

02

15

0

37

6

25

0

CP

I "("

Ch

eck

fo

r sin

gle

m

emo

ry

"' "' "' ... w

Page 14: dr. dobb's journal of - cini.classiccmp.org

..,, 0

02

15

2

30

2

21

2

Ill

00

4

JNZ

,ER

R4

lo

ca

tio

n

00

23

57

0

76

3

77

M

VI

A

<Cl

00

21

55

3

15

1

50

0

03

C

AL

,Vl\

LD

E

Get

locati

on

in

0

02

36

1

02

2

STA

X

DE

(1)

DE

~

00

21

60

3

45

PU

SH

llL

0

02

36

2

30

7

RS

T

RE

SE'l'

+>

0

02

16

1

30

3

17

0

00

2

JMP

,HS

IN

T

00

23

63

3

65

PU

SH

PSH

T

his

su

bro

uti

ne ch

eck

s fo

r LV

B

00

21

64

3

45

PU

SH

l!L

0

02

-64

3

33

0

13

IN

P

01

3

Xe

fro

m

key

bo

ard

0

02

16

5

31

5

34

3

00

4

CA

L,G

ET

AD

R

Get

ac.d

ress

o

f le

tter v

ari

ab

le.

00

23

66

3

76

2

03

C

PI

ux

Cn

HS

00

21

70

3

25

PU

SH

DE

00

23

70

3

12

3

75

0

02

JZ

,BR

EfJ

<

I HE

RE

0

02

17

1

31

5

05

2

00

4

CA

L,I

NP

TX

T

Inp

ut

a li

ne

00

23

73

3

61

PO

P PS

W

00

21

74

3

17

R

ST

C

RL

F 0

02

37

4

31

1

RE

T

0 0

02

17

5

04

1

21

0

00

6

L,'

U

EL

:TX

T

BR

EAK

0

02

37

5

31

7

RS

T

CR

LF

-. 0

02

20

0

17

6

MQ

V

,\,M

0

02

37

6

02

1

11

2

00

3

LX

I D

E "B

RE

A.K

n

0 0

02

20

1

31

5

06

2

00

5

Cl\

L ,

CII

EKN

C

heck

fo

r n

um

ber

00

30

01

3

15

3

60

0

04

C

AL

, PR

IN'l'

XT

0

00

22

04

3

22

2

24

0

02

JN

C,L

ET

R

00

30

04

3

03

2

40

0

04

JM

P,A

T+

C

T F

D

00

22

07

0

43

· IN

X

HL

GO

TO

0

03

00

7

04

3

rnx

l!L

G

OTO

ex

ecu

ter

CT

00

22

10

1

76

M

OV

A

,M

00

30

10

0

43

IN

X

HL

Sk

ip

ass

um

ed

ch

ara

cte

rs

v.'

00

22

11

3

15

0

62

0

05

C

l\L

, cm

:KN

0

03

01

1

04

3

INX

H

L

<-O

l'2

21

4

J32

' 2C

7 0

02

Jc

·,::::

·n

Po

int.

to

fi

r.:;

t n

on

-nu

meric

0

03

01

2

04

3

INX

H

L 0 c:

00

22

17

3

05

PU

SH

BC

ch

ara

cte

r 0

03

01

3

02

1

15

1

00

6

LX

I D

E:E

XP

R

Calc

ula

te v

alu

e o

f ex

pre

ssio

n

... 0

02

22

0

31

5

25

6

00

4

CA

L,H

!\D

IN

Co

nv

ert

A

SC

II in

pu

t d

ata

to

R

ME

00

30

16

1

76

M

OV

A

,M

:J

Ill

00

22

23

3

01

P

OP

B

C

bin

ary

0

03

01

7

02

2

STA

X

DE

- 0 L

ET

R

00

22

24

3

21

P

OP

D

E 0

03

02

0

31

5

04

3

00

5

CA

L,T

ER

M

.... 0

02

22

5

02

2

STA

X

DE

Pu

t A

in

v

ari

ab

le

00

30

23

0

43

IN

X

HL

(')

CID

< 0

02

22

6

34

1

POP

HL

00

30

24

0

23

IN

X

DE

0

00

22

27

0

43

IN

X

HL

00

30

25

3

22

0

16

0

03

JN

C,R

ME

3

00

22

30

1

76

M

OV

A

,M

00

30

30

3

15

1

62

O

OJ

Cl<

L,E

XP

RS

"t

i " 0

02

23

1

37

6

25

4

CP

I "

" C

heck

fo

r m

ore

in

pu

t v

ari

ab

les

00

30

33

1

01

M

OV

B

,C

... 0

02

23

3

31

2

11

6

00

2

JZ,I

N

00

30

34

1

71

/<

!OV

A,C

~

00

22

36

3

15

0

43

0

05

C

AL

,TE

ru1

00

30

35

3

76

0

00

C

PI

n 0

02

24

1

33

2

01

3

00

1

JC,L

PU

B

00

30

37

3

02

0

50

0

03

JN

Z,J

UM

P

OJ

00

22

44

3

03

2

17

0

04

JM

P,E

RR

5

00

30

42

0

41

2

10

0

05

L

XI

l!L

:TX

T

- ~·

ST

RIN

0

02

24

7

04

3

INX

H

L In

pu

t str

ing

0

03

04

5

30

3

00

0

00

1

JMP

,DIR

EC

T

:r

00

22

50

3

15

0

62

0

06

C

AL

, Vf' .

.L

Get

fir

st

mem

ory

lo

cati

on

in

B

C

JUM

P

00

30

50

0

41

0

00

0

07

L

XI:

PR

OG

!I

L

Go

to

m .. -

prc

ssio

n

CD

:J

00

22

53

3

45

PU

SH

!IL

D

UP

00

30

53

1

76

M

OV

A

,M

" 0

02

25

4

31

5

36

0

00

6

CAL,D~lS

Inp

ut

a li

ne

00

30

54

3

76

2

15

C

PI

11C

R11

"' 0

02

25

7

31

7

RS

T

CR

LF

00

30

56

0

43

IN

X

HL

R"

00

22

60

0

41

2

10

0

06

L

XI

I!L

:TX

T

00

30

57

3

02

0

53

0

03

JN

Z,D

UP

0

LD

0

02

26

3

17

6

MO

V

A,M

S

tore

te

xt

beg

inn

ing

at

sp

ec-

00

30

62

1

76

M

OV

A

,M

.... 0

02

26

4

37

6

21

5

CP

I U

CR

'l if

i<X

l lo

cati

on

0

03

06

3

37

6

37

7

CP

I 3

77

,.. :r

0

02

26

6

31

2

27

6

00

2

JZ,T

E

00

30

65

3

12

1

73

0

04

JZ

,ER

Rl

·::>

00

22

71

0

02

ST

AX

B

C

00

30

70

2

70

C

MP

B

0.

0 0

02

27

2

00

3

rm::

BC

0

03

07

1

30

2

05

3

00

3

JNZ

,DU

P

:J

00

22

73

3

03

3

54

0

06

JM

P,C

IN

00

30

74

3

03

0

27

0

01

JM

P,B

IB

,.. '" JE

0

02

27

6

07

6

37

7

MV

I A

3

77

S

tore

3

77

at

en

d o

f str

ing

!E

RR

0

03

07

7

24

1

30

5

32

2

DW

"!E

R"

E

rro

r &

Bre

ak

Tex

ts

00

23

00

0

02

ST

AX

B

C

00

31

02

3

22

2

40

DW

"R

"

OJ

00

23

01

3

03

2

25

0

02

JM

P,C

HK

0

03

10

4

37

7

DB

37

7

0 x C

LR

0

02

30

4

02

1

00

7

00

5

LX

I D

E C

LE

AR

ex

ecu

ter.

Var

sto

rag

e

AT

00

31

05

2

40

3

01

3

24

DW

"

A'r

" LC

R 0

02

30

7

25

7

XR

A

A

00

31

10

2

40

D

B

" "

w

-'

00

23

10

0

22

ST

AX

D

E 0

03

11

1

37

7

DB

3

77

-° 0

02

31

1

02

3

HD

C

DE

BR

EAK

0

03

11

2

30

2

32

2

30

5

DW

"B

RE

"

s 0

02

31

2

17

3

MO

V

A,E

0

03

11

5

30

1

31

3

DW

11A

K''

"' 0

02

31

3

37

6

°'1

2

CP

I 0

42

L

ast

vari

ab

le lo

cati

on

0

03

11

7

37

7

DB

3

77

::>

0

02

31

5

30

2

30

7

00

2

JNZ

,LC

R

BIN

0

03

12

0

00

0

0 0

02

32

0

30

3

01

3

00

1

JMP

,LP

UB

L

NE

0

03

12

1

00

0

Cu

rren

t li

ne n

o.

sto

rag

e

-0

CA

LL

0

02

32

3

00

0

NO

P S

kip

ass

um

ed

ch

ara

cte

rs

00

31

22

0

00

N

OP

ti>

00

23

24

0

43

IN

X

HL

AC

T

00

31

24

3

05

PU

SH

BC

G

ets

th

e v

alu

e o

f a

mem

ory

.... >I"

0

02

32

5

04

3

INX

H

L 0

03

12

4

35

3

XC

HG

lo

cati

on

n

00

23

26

0

43

IN

X

HL

00

31

25

3

15

0

62

0

06

C

AL

, VA

L P

art

o

f th

e

E.'\'.

PRS

su

bro

uti

ne

)>

00

23

27

3

15

0

62

0

06

C

AL

, VA

L G

et

ad

dre

ss in

B

E 0

03

13

0

35

3

XC

HG

to

fo

llo

w

c.p

00

23

32

3

45

PU

SH

!IL

0

03

13

1

01

2

LD

i\X

BC

""' 0

02

33

3

32

5

PUSH

D

E 0

03

13

2

30

1

POP

BC

0

00

23

34

0

21

3

43

0

02

L

XI

DE

:RE

T

Lo

ad

DE

wit

h re

turn

ad

dre

ss

00

31

33

1

07

M

OV

B

,A

N

Ul

00

23

37

3

25

PU

SH

DE

Pu

sh re

turn

ad

dre

ss in

to sta

ck

0

03

13

4

02

3

INX

D

E 0

02

34

0

14

0

MO

V

H,B

0

03

13

5

30

3

24

7

00

3

JMP

,GE

TN

ET

0

02

34

1

15

1

MO

V

L,C

N

OT

EQ

0

03

14

0

17

3

l~OV

A,E

If

two

ex

pressio

ns are

n

ot

00

23

42

3

51

P

Cl!

L

Jum

p to

u

ser's

su

bro

uti

ne

oo-'

-41

2

71

C

M..P

C

eq

ual,

ex

ecu

te

sta

tem

en

t R

ET

0

02

34

3

32

1

POP

DE

00

31

42

3

02

0

41

0

01

JN

6,E

XE

C

(Part

o

f IF

sta

tem

en

t ex

e-

00

23

44

3

41

PO

P !I

L

00

31

45

3

03

0

13

0

01

JM

P,L

PU

B

cu

ter

to fo

llo

w)

00

23

45

3

03

JM

P,L

PU

B

VA

LDE

00

31

50

31

.5

06

2

00

6

Cl\

.I,,

VA

L

~

NE

W

00

23

50

0

21

0

00

0

07

L

XI

DE

:PR

OG

N

ew

00

31

53

1

20

M

OV

D

,B

't:J

00

23

53

0

76

2

15

M

VI

A

"CR

" In

itia

lize

Pro

gra

m are

a

00

31

54

1

31

M

OV

E

,C

~.

00

23

55

0

22

ST

AX

D

E 0

03

15

5

31

1

RE

T

,-0

02

35

6

02

3

INX

D

E 0

03

15

6

00

0

00

0

00

0

NO

P ... to

"" 0)

Page 15: dr. dobb's journal of - cini.classiccmp.org

l:>

"ts

00

31

61

0

00

N

OP

00

33

72

0

32

L

Q,'

\X

DE

~.

EX

P R

S 0

03

16

2

34

5

PUSH

I!

L

Calc

ula

tes th

e v

alu

e o

f an

0

03

37

3

10

7

MO

V

B,A

--

00

31

63

0

21

1

50

0

06

L

XI

DE

:EX

PR

-1

ex

oress

ion

st

ored

in

mem

ory

. 0

03

37

4

02

3

INX

D

E ....

00

31

66

0

16

M

VI

C

DE

.is

the cu

rso

r 0

03

37

5

30

3

13

4

00

3

JMP

,GE

TN

ET

(0

0

03

16

7

00

0

00

0

RN

D

00

40

00

0

41

0

51

0

04

L

XI

HL

:SH

+3

Ran

do

m

Nu

mb

er

Gen

era

tor

'I

0)

RET

PT

00

31

70

0

32

LD

AX

D

E 0

04

00

3

00

6

01

0

MV

I B

01

0

by

Ji

m P

ark

er

00

31

71

3

15

0

43

0

05

C

.'U.,T

ER

M

Ch

eck

fo

r en

d o

f ex

pre

ssio

n

RT

OP

00

40

06

0

07

R

LC

00

31

74

3

22

2

01

0

03

JNC,GO~lOR

00

40

07

0

07

R

LC

0

03

17

7

34

1

POP

!IL

0

04

01

0

00

7

RLC

0

03

20

0

31

1

RE

T

00

40

11

2

56

X

RA

M

G

OM

OR

00

32

01

3

65

PU

SH

PSW

S

av

e O

pera

tio

n in

sta

ck

. 0

04

01

2

02

7

RA

L

00

32

02

0

23

IN

X

DE

Get

Term

/Facto

r 0

04

01

3

02

7

RA

L 0

00

32

03

0

32

LD

!IX

D

E 0

04

01

4

05

5

OC

R

L

... 0

03

20

4

37G

2

47

C

PI

II

'i H

S

ing

le ch

ara

cte

r v

alu

e

00

40

15

0

55

D

CR

L

0

00

32

06

3

12

2

71

0

03

J

Z,A

SC

0

04

01

6

05

5

OC

R

L

0 0

03

21

1

37

6

25

0

CP

I "

C"

M

emo

ry lo

cati

on

0

04

01

7

17

6

MO

V

A,M

er

0

03

21

3

31

2

12

3

00

3

JZ,A

CT

0

04

02

0

02

7

RA

L er

0

03

21

6

37

6

24

1

CP

I 1

11

11

R

and

om

n

um

ber

0

04

02

1

16

7

MO

V

M,A

.,;

... 0

03

22

0

31

2

00

0

00

4

JZ

, P~'!D

00

40

22

0

54

IN

R

L

0 0

03

22

3

31

5

06

2

00

5

CA

L,C

!!E

KN

0

04

02

3

17

6

MO

V

A,M

c:

0

03

22

6

33

2

35

0

00

3

JC,C

ON

ST

AN

T

Co

nst

an

t (n

um

ber)

0

04

02

4

02

7

RA

L

... " 0

03

23

1

31

5

37

1

00

4

CA

L,C

HE

KL

0

04

02

5

16

7

MO

V

M,A

Il

l 0

03

23

4

32

2

21

7

00

4

JNC

,ER

R5

00

40

26

0

54

IN

R

L

- 0 0

03

23

7

02

3

INX

D

E 0

04

02

7

17

6

MO

V

A,M

....

IVA

R

00

32

40

3

25

PU

SH

DE

Vari

ab

le

00

40

30

0

27

R

AL

("

) 0

03

24

1

31

5

34

3

00

4

CA

L,G

ET

AD

R

00

40

31

1

67

M

OV

M

,A

0 0

03

24

4

03

2

LDA

X

DE

00

40

32

0

54

I!

ffi

L

3 "C

00

32

45

1

07

M

OV

B,A

0

04

03

3

17

6

MO

V

A,M

c:

0

03

24

6

32

1

POP

DE

00

40

34

0

27

R

AL

....

GE

TN

ET

0

03

24

7

36

1

POP

PSW

R

etr

iev

e O

pera

tio

n

.OQ

4035

1

67

M

OV

M

,A

~ 0

03

25

0

37

6

25

3

CP

I "+

" 0

04

03

6

00

4

DC

R

B

(")

00

32

52

3

12

2

77

0

03

JZ

,AD

D

00

40

37

3

02

0

06

0

04

JN

Z,R

TO

P

"' -0

03

25

5

37

6

25

5

CP

I 1

1_

n

00

40

42

1

07

M

OV

B,A

;;;·

0

03

2S

7

31

2

30

5

00

3

JZ,S

UB

0

04

04

3

30

3

13

4

00

3

JMP

,GE

TN

ET

.... ::

r 0

03

26

2

37

6

25

2

CP

I lt

f.r'1

SH

0

04

04

6

02

1

23

1

13

2

SEE

D

"' :l 0

03

26

4

31

2

31

3

00

3

JZ,M

UL

T

00

40

51

3

51

D

ATA

n

00

32

67

3

76

2

57

C

PI

"/"

IN

PT

X

00

40

52

0

16

0

00

M

\'IC

0

00

In

pu

t a

lin

e o

f 7

2 ch

ara

cte

rs

"' 0

03

27

1

31

2

32

6

00

3

JZ,D

IV

INP

XT

0

04

05

4

04

1

20

7

00

6

LX

I H

L:T

EX

T-1

go

0

03

27

4

30

3

21

7

00

4

JMP

,ER

R5

INO

0

04

05

7

32

7

R.S

T IN

PU

T

0 A

DD

0

03

27

7

17

1

MO

V

A,C

A

dd

C=C

+B

HR

ER

00

40

57

3

27

M

OV

B

,A

~

00

33

00

2

00

A

DD

B

0

04

06

1

17

1

MO

V

.".,C

... ::r

00

33

01

1

17

M

OV

C

,!,

00

40

62

3

76

0

00

C

PI

00

0

0 0

03

30

2

30

3

17

0

00

3

JMP

,RE

'.l'P

T

00

40

64

1

70

M

OV

A

,B

0..

0 S

UB

0

03

30

5

17

1

MO

V

A,C

C

=C

-B

00

40

65

3

02

0

75

0

04

JN

Z,M

ID

" 0

03

30

6

22

0

SUB

B

0

04

07

0

37

6

24

0

CP

I u

sp

•l

Do

no

t accep

t sp

ace if o

uts

ide

.... "' 0

03

30

7

11

7

MO

V

C,A

0

04

07

2

31

2

05

7

00

4

JZ,

INO

q

uo

tes

00

33

10

3

03

1

70

0

03

JM

P,R

ET

PT

M

ID

00

40

75

3

76

2

42

C

PI

1 •1

v

co

MIJ

LT

00

33

13

1

71

M

OV

A

,C

C=

C*B

0

04

07

7

30

2

11

7

00

4

JNZ

,GO

ON

0 x

00

33

14

0

05

D

CR

B

0

04

10

2

17

1

MO

V

A,C

w

G

BK

0

03

31

5

20

1

AD

D

C

00

41

03

3

76

0

00

C

PI

00

0

~

00

33

16

0

05

D

CR

B

0

04

10

5

31

2

11

5

00

4

JZ,M

RF

.o

0

03

31

7

32

0

.JN

Z,

G'.l

K

00

41

10

0

16

0

00

M

VI

C

00

0

~

00

33

22

1

17

M

CV

C,A

0

04

11

2

30

3

11

7

00

4

JMP,

GO

ON

<D

0

03

32

3

30

3

17

0

00

3

JMP

,RE

TP

T

MR

F

00

41

15

0

16

0

03

M

VI

C

00

3

:l

DIV

0

03

32

6

17

1

MO

V

A,C

C

=C

/B

GO

ON

0

04

11

7

37

6

21

4

CP

I x

L

If

xL

re

do

li

ne

0 C

TU

E

00

33

31

0

14

!N

CC

0

04

12

1

30

2

13

3

00

4

JNZ

,HR

D

-c

00

33

32

2

20

SU

B

B

00

41

24

0

76

3

34

M

VIl

l "/"

"'

00

33

33

3

12

JZ

,ZE

R

00

41

26

3

47

R

ST

OU

T ~

00

33

36

3

32

3

44

0

03

JC

,MIN

0

04

12

7

31

7

RST

C

RL

F ("

) 0

03

34

1

30

3

33

1

00

3

JMP

,CT

UE

0

04

13

0

30

3

05

2

00

4

JMP

,IN

PT

XT

:t>

M

IN

00

33

44

0

15

O

CR

C

H

RD

0

04

13

3

37

6

21

5

CP

I "

CR

"

tP

ZE

R

00

33

45

3

03

1

70

0

03

JM

P,R

ET

PT

0

04

13

5

30

2

14

4

JN'.l

,CH

:-1

.,. C

ON

STA

NT

0

03

35

0

02

3

INX

D

E 0

04

14

0

30

3

31

6

00

5

JMP

,l!E

LP

0

00

33

51

0

32

LD

AX

D

E 0

04

14

3

00

0

NO

P N

C

l 0

03

35

2

31

5

06

2

00

5

CA

L, C

i!EK

N

CHM

0

04

14

4

37

6

22

3

CP

I X

5 If

X5

go

b

ack

a

ch

ara

cte

r 0

03

35

5

33

2

35

0

00

3

JC,C

ON

ST

AN

T

00

41

46

3

02

1

60

0

04

JN

Z,C

TN

0

03

36

0

35

3

XC

HG

0

04

15

1

07

6

33

7

MV

I A

"~"

00

33

61

3

15

3

10

0

05

C

AL

,SU

RE

0

04

15

3

34

7

RST

O

UT

00

33

64

3

53

X

CH

G

00

41

54

0

53

D

CX

IJ

L

00

33

65

1

07

M

OV

B

,A

00

41

55

3

03

0

57

0

04

JM

P,I

ND

0

03

36

6

30

3

24

7

00

3

JMP

,GE

TN

ET

C

TN

0

04

16

0

17

5

MO

V

A,L

-0

A

SC

00

33

71

0

23

IN

:X

DE

00

41

61

3

76

3

20

C

PI

32

0

Low

to

p ad

dre

ss

Q)

<Q

<D

.... Cl

c

Page 16: dr. dobb's journal of - cini.classiccmp.org

"ti "'

00

41

63

3

12

2

00

0

04

JZ

,ER

R2

If

ov

er

72

ch

ara

cte

rs,

rep

ort

0

04

36

6

30

3

36

0

00

4

JMP

, PR

itl'l

'X'l'

"" "' 0

04

16

6

04

3

rnx

HL

erro

r

CH

EK

LT

R

00

43

71

0

67

ST

C

Ch

eck

if a

ch

ara

cte

r is

a

STO

R

00

41

67

1

60

M

OV

M

,D

00

43

72

0

77

CM

C le

tter

en

00

41

70

3

03

0

57

0

04

JM

P,

INO

0

04

37

3

37

6

30

1

CP

I 3

01

E

RR

! 0

04

17

3

00

6

26

1

MV

I :a

"l

II

00

43

75

3

32

0

04

0

05

JC

,NO

TA

P

00

41

75

3

03

2

26

0

04

JM

P,E

RH

. 0

05

00

0

06

7

STC

E

RR

2 0

04

20

0

00

6

26

2

MV

I B

11

211

0

05

00

1

37

6

33

3

CP

I 3

33

0

04

20

2

30

3

22

6

00

4

JMP

,ER

R

00

50

03

3

11

R

ET

ER

R3

00

42

05

0

06

2

63

M

VI

B

"3

"

NO

T A

P O

OS

004

07

7

CMC

a 0

04

20

7

30

J 2

26

0

04

JM

P,E

RR

0

05

00

5

31

1

RE

T

~

ER

R4

0

04

21

2

00

6

26

4

MV

I B

"4

" 0

05

00

6

00

0

NO

P

c 0

04

21

4

10

3

?.26

0

04

JM

P,E

RR

V

AR

S TO

R

00

50

07

-00

50

42

0

00

va~iable

sto

rag

e

0 E

RR

S 0

04

21

7

00

6

?65

M

VI

D

115"

TE

RM

0

05

04

3

37

6

21

5

CP

I u

cRn

C

hec

k fo

r sta

tem

en

t te

rmin

ato

r r:r

0

04

22

1

30

3

22

6

00

4

JMP

,ER

R

00

50

45

3

12

0

60

0

05

JZ

,YE

S

(CR

o

r :

) er

E

RR

6 0

04

22

4

00

6

26

6

MV

I B

11

6"

0

05

05

0

37

6

27

2

CP

I II

:

It

Ill

ERR

0

04

22

6

31

7

RST

C

RL

F P

rin

t '~

ERRl

'l

00

50

52

3

12

0

60

0

05

JZ

,YE

S

t..

mess

ag

e

0 0

04

'22

7

02

1

07

7

00

3

LX

I D

E:E

RR

"

1E

RR

11

00

50

55

0

67

ST

C

"" 0

04

23

2

31

5

36

0

00

4

CA

L, P

RIN

TX

'l'

00

50

56

0

77

CM

C ... :I

0

04

23

5

17

0

MO

V

A,B

0

05

05

7

31

1

RE

T

.. 0

04

23

6

3.17

R

ST

OU

T Y

ES

00

50

60

0

67

ST

C

0 0

04

23

7

00

0

NO

P 0

05

06

1

31

1

RE

T

.... A

T+

00

42

40

0

21

1

05

0

03

L

XI

DE

n A

T

n C

HEC

KN

0

05

06

2

06

7

STC

('

) 0

04

24

3

31

5

36

0

00

4

CA

L,P

R

IN''l'

XT

0

05

06

3

07

7

CMC

0 0

04

24

6

07

2

] 2

1

00

3

LD

l\:ST

AT

I'I

00

50

64

3

76

2

60

C

PI

26

0

3 1:1

00

42

51

1

07

M

OV

B

,1\

00

50

66

3

32

0

75

0

05

JC

,NO

TA

c:

00

42

52

3

15

1

74

0

05

C

AL

,PB

INB

CD

0

05

07

1

06

7

STC

...

00

42

55

3

07

R

ST

00

0

00

50

72

3

76

2

72

C

PI

27

2

~ M

KB

IN

00

42

56

3

25

PU

SH

DE

Get

valu

e o

f A

SC

II

Nu

mb

ers

NO

T

00

50

74

3

11

R

ET

('

) 0

04

25

7

05

3

DC

X

HL

NO

TA

00

50

75

0

77

CM

C

"' 0

04

26

0

17

6

MO

V

A,M

0

05

07

6

31

1

RE

T

:!l.

00

42

61

3

26

2

60

S

UI

26

0

00

50

77

0

00

0

00

0

00

N

OP

:;:;

00

42

63

1

07

M

OV

B

,A

IBC

DB

IN

00

51

02

0

76

0

12

M

VI

A 0

12

B

CD

to

B

IN su

bro

uti

ne

"' :I 0

04

26

4

05

3

DC

X

HL

00

51

04

2

00

A

DD

B

" 0

04

26

5

17

6

MO

V

A,M

0

05

10

5

10

7

MO

V

B,A

"' 0

04

26

6

31

5

06

2

00

5

CA

L,C

HE

KN

0

05

10

6

01

5

DC

R

B

QO

00

42

71

3

32

3

03

0

04

JC

,ST

OC

0

05

10

7

30

2 1

02

0

05

JN

Z,B

CD

BIN

0 0

04

27

4

01

6

00

0

MV

I C

0

00

51

12

0

00

0

00

0

00

N

OP

..., 0

04

27

6

03

6

00

0

MV

I E

0

SEC

0

05

11

5

11

3

MO

V

C,E

.... ::l

'" 0

04

30

0

30

3

33

0

00

4

JMP

, IN

K2

00

51

16

1

73

M

OV

A

, E

0 ST

OC

0

04

30

3

32

6

26

0

SU

I 2

60

0

05

11

7

37

6

37

7

CP

I 3

77

a.

0

00

43

05

1

17

M

OV

C

,A

TH

I 0

05

12

1

31

0

RZ

:I

E

NT

0

04

30

6

05

3

DC

X

HL

00

51

22

0

76

1

44

M

VI

A 1

44

,.,. o;·

0

04

30

7

17

6

MO

V

A,M

0

05

12

4

20

0

AD

D

B

00

43

10

3

15

0

62

0

05

C

AL

,CH

EK

N

00

51

25

1

07

M

OV

B

,A

OJ

00

43

13

3

32

3

23

0

04

JC

,ST

OE

0

05

12

6

01

5

DC

R c

0 x 0

64

31

C

03

6

00

0

MV

I E

0

00

51

27

3

03

1

21

0

05

JM

P,T

HI

w

00

43

20

3

03

3

27

0

04

JM

P,I

NK

3

LIS

T

00

51

32

0

21

0

01

0

07

L

.'<I

DE

:PR

OG

+l

Lis

t C

omm

and

.... ST

OE

0

04

32

3

17

6

MO

V

A,M

N

EX

N

00

51

35

0

32

LD

AX

D

E _o

0

04

32

4

32

6

26

0

SU

I 2

60

0

05

13

6

37

6

37

7

CP

I 3

77

:5:

00432~

13

7

MO

V

E,A

0

05

14

0

31

2

01

3

00

1

JZ,L

PU

B

"' IN

K3

00

43

27

0

43

IN

X

HL

00

51

43

1

07

M

OV

B

,A

:I

INK

2 0

04

33

0

04

3

INX

H

L 0

05

14

4

31

5

17

4

00

5

CA

L,P

BIN

BC

D

0 0

04

33

1

04

3

INX

H

L 0

05

14

7

07

6

24

0

MV

I A

"

SP

11

"O

00

43

32

3

15

1

02

0

05

C

AL

oDC

DB

IN

00

51

51

3

47

R

ST

OU

T

"' 0

04

33

5

17

0

MO

V

A,B

0

05

15

2

02

3

INX

D

E ..., "

00

43

36

0

62

1

20

0

03

S

Tl\

:BIN

0

05

15

3

03

2

LDA

.X

DE

(')

00

43

41

3

21

PO

P D

E OU

0

05

15

4

34

7

RST

O

UT

)>

00

43

42

3

11

R

ET

0

05

15

5

37

6

21.5

C

PI

"CR

"

w

GET

AD

R

00

43

43

3

45

PU

SH

HL

Get

Ad

dre

ss o

f v

ari

ab

le

00

51

57

3

02

1

67

0

05

JN

Z,M

RE

N

""' 0

04

34

4

02

1

00

7

00

5

LX

I D

E:V

AR

STO

R

00

51

62

0

23

IN

',{

DE

0 0

04

34

7

32

6

30

1

SU

I 3

01

0

05

l63

3

17

R

ST

CR

LF

I\)

01

00

43

51

0

46

0

00

M

VI

H 0

00

0

05

16

4

30

3

13

5

00

5

JMP

,NE

XN

0

04

35

3

15

7

MO

V

L,A

M

R.E

N

00

51

67

0

23

IN

X

DE

00

43

54

0

31

D

AD

D

E 0

05

17

0

03

2

LDA

X

DE

00

43

55

3

53

X

CH

G

00

51

71

3

03

1

54

0

05

JM

P,O

U

00

43

56

3

41

PO

P H

L PB

INB

CD

0

05

17

4

30

5

PUSH

BC

P

rin

t B

inary

nu

mb

er

00

43

57

3

11

R

ET

0

05

17

5

32

5

PUSH

D

E P

RIN

TX

T

00

43

60

0

32

LD

AX

D

E P

rin

t te

xt

po

inte

d to

b

y D

E 0

05

17

6

02

6

00

0

MV

I D

00

0

)>.

00

43

61

3

76

3

77

C

PI

37

7

00

52

00

0

16

0

00

M

VI

C

00

0

't:l

00

43

63

3

10

R

Z

00

52

02

1

70

M

OV

A

B

.... .. ::::.

: 0

04

36

4

34

7

RS

T

OU

T IF

IR

00

52

03

3

26

1

44

S

UI

14

4

00

43

65

0

23

IN

X

DE

00

52

05

3

32

2

14

0

05

J

C,I

SE

C

.... \!) " 0)

Page 17: dr. dobb's journal of - cini.classiccmp.org

):.

00

52

10

0

14

lN

C

C

PH

I 0

06

01

6

04

3

INX

H

L "t:

I 0

05

21

1

30

3

20

3

00

5

JMP

,IF

IR

00

60

17

0

76

2

15

M

VI

A

"CR

" ~- --

ISE

C

00

52

14

0

06

1

44

M

VI

B 1

44

0

06

02

1

02

2

STA

X

D

00

52

16

2

00

A

DD

B

0

06

02

2

31

5

16

2

00

3

CA

L,E

XP

RS

-0

05

21

7

10

7

MO

V

B,A

0

06

02

5

32

1

POP

DE

(Q "'

00

52

20

0

76

2

60

M

VI

A

26

0

00

60

26

3

61

PO

P PS

W

0)

00

52

22

2

01

A

DD

C

0

06

02

7

37

6

24

3

CP

I "A

" C

hec

k r

ela

tio

nal

op

era

tor

00

52

23

3

76

2

60

C

PI

26

0

00

60

31

3

12

1

40

0

03

JZ

,NO

TE

Q

00

52

25

3

12

2

71

0

05

JZ

,NP

0

06

03

4

37

6

27

4

CP

I "<

" 0

05

23

0

34

7

RS

T

OU

T 0

06

03

6

31

2

05

1

00

6

JZ,L

ES

ST

H

GOM

0

05

23

1

01

6

00

0

MV

I C

00

0

EQU

0

06

04

1

17

3

MO

V

A,E

C

hec

k if =

0

05

23

3

17

0

MO

V

A,B

0

06

04

2

27

1

CMP

C

ITH

R

00

52

34

3

26

0

12

S

UI

01

2

00

60

43

3

12

0

41

0

01

JZ

,EX

EC

c

00

52

36

3

32

2

45

0

05

JC

,FO

R

00

60

46

3

03

0

13

0

01

JM

P,L

PU

B

.. 0

05

24

1

01

4

INC

C

L

ESS

TH

0

06

05

1

17

3

MO

V

A,E

C

hec

k if <

c

00

52

42

3

03

2

34

0

05

JM

P,I

TH

R

00

60

52

2

71

CM

P C

0

FOR

0

05

24

5

00

6

01

2

MV

I B

01

2

00

60

53

3

22

0

13

0

01

JC

, E.'<

EC

cr

00

52

47

2

00

1\

DD

B

0

06

05

6

30

3

04

1

00

1

JMP

,LP

UB

er

"' 0

05

25

0

10

7

MO

V

B,A

0

06

06

1

00

0

NO

P <

-0

05

25

1

07

6

26

0

MV

I A

2

60

V

AL

00

60

62

3

25

PU

SH

DE

Get

ad

dre

ss o

f m

emo

ry l

ocati

on

0

00

52

53

2

01

i\D

D

C

00

60

63

0

21

1

51

0

06

L

XI

DE

:EX

PR

c ..

00

52

54

3

76

2

60

C

PI

26

0

SHM

E 0

06

06

6

04

3

INX

H

L :I

0

05

25

6

27

6

00

5

JZ

,UN

0

06

06

7

17

6

MO

V

A,M

"' -

IPR

0

05

26

1

34

7

RS

T

OU

T 0

06

07

0

02

2

STA

X

DE

0 D

PR

00

52

62

0

76

2

60

M

VI

A

26

0

00

60

71

3

15

0

43

0

05

C

AL

,TE

RM

... n

00

52

64

2

00

A

DD

B

0

06

07

4

31

5

34

2

00

6

CA

L,P

LIN

0

00

52

65

3

47

R

ST

OU

T 0

06

07

7

37

6

25

4

CP

I ",

.. 3

00

52

66

3

21

PO

P D

E 0

06

10

1

30

2

06

6

00

6

JNZ

,SM

HE

"C

0

Q5

26

7

30

1

POP

BC

0

06

10

4

31

5

34

7

00

6

CA

L,D

CX

N

c 0

05

27

0

31

1

RE

T

00

61

07

3

15

1

62

0

03

C

AL

,EX

PR

S

... !!l N

P

00

52

71

0

26

0

01

M

VI

D 0

01

0

06

11

2

30

5

PUSH

B

C

n 0

05

27

3

30

3

23

1

00

5

JMP,

CO

M

00

61

13

0

21

1

51

0

06

L

XI

DG

:EX

PR

"' IN

U

C0

52

76

1

17

M

OV

C

,A

MIG

0

06

11

6

04

3

INX

H

L ;;;·

0

05

27

7

25

7

XR

A

A

00

61

17

1

76

M

OV

A

,M

... 0

05

30

0

27

2

CMP

D

00

61

20

0

22

ST

AX

D

E :r

., 0

05

30

1

17

1

MO

V

A,C

0

06

12

1

31

5

04

3

00

5

CA

L,T

ER

M

:I

00

53

02

3

02

2

62

0

05

JN

Z,D

PR

0

06

12

4

31

5

34

2

00

6

CA

L,P

LIN

;:;·

0

05

30

5

30

3

26

1

00

5

JMP

,IP

R

00

61

27

3

76

2

51

C

PI

")"

"' l2D

S

UR

E

00

53

10

3

05

PU

SH

BC

C

all

s M

KB

IN w

ith

sa

vin

g

BC

0

06

13

1

30

2 1

16

0

06

JN

Z,M

IG

00

53

11

3

15

2

56

0

04

C

AL.

MY

..DIN

0

06

13

4

31

5

34

7

00

6

CA

L,D

CX

N

0 0

05

31

4

30

1

POP

BC

00

61

37

3

15

1

62

0

03

C

AL

,EX

PR

S

.. ... 0

05

31

5

31

1

RE

T

00

61

42

1

71

M

OV

A

,C

:r

HE

LP

00

53

16

0

43

IN

X

HL

Ad

ds

37

7 te

rmin

ato

r at

en

d o

f 0

06

14

3

30

1

POP

BC

0 c..

00

53

17

1

60

H

OV

A

,B

INP

UT

T

ex

t 0

06

14

4

10

1

MO

il B

,C

0 0

05

32

0

04

3

INX

H

L 0

06

14

5

11

7

MO

V

C,A

:I

... 0

05

32

1

06

6

37

7

MV

I M

37

7

00

61

46

3

21

PO

P D

E ;;;·

0

05

32

3

31

1

RE

T

00

61

47

3

11

R

ET

O:

l IF

0

05

32

4

02

1

15

1

00

6

LX

I D

E:E

XP

R

IF S

tate

men

t 0

06

15

0

25

3

DB

11

..f..•

0 N

GO

0

05

32

7

04

3

INX

H

L F

irst

ex

pre

ssio

n

EX

PR

00

61

51

-00

62

07

0

00

E

xp

ress

ion

b

uff

er

)(

00

53

30

1

76

M

OV

A

,M

TE

XT

0

06

21

0-0

06

32

0

00

0

Lin

e b

uff

er

(In

pu

t te

xt)

w

0

05

33

1

37

6

24

3

CP

I "#

" F

IX

00

63

21

0

21

1

51

0

06

L

XI

DE

:EX

P

... 0

05

33

3

31

2

36

1

00

5

JZ,C

OM

P

MR

EN

00

63

24

1

76

M

OV

A

,M

Mo

st o

f th

e fo

llo

win

g is

,o

0

05

33

6

37

6

27

5

CP

I "=

" 0

06

32

5

02

2

STA

X

DE

to p

atc

h u

p m

ista

kes in

$

00

53

40

3

12

3

61

0

05

JZ

,CO

MP

0

06

32

6

31

5

04

3

00

5

CA

L,T

ER

M

the o

rig

inal

pro

gra

m

., 0

05

34

3

37

6

27

4

CP

I "<

II

00

63

31

3

03

2

42

0

01

JM

P,B

AC

K

:I 0

00

53

45

3

12

3

61

0

05

JZ

,CO

MP

D

IN

00

63

34

3

32

2

17

0

04

JC

,ER

R5

0

05

35

0

31

5

04

3

00

5

CA

L,T

ER

M

00

63

37

0

22

ST

.1\X

D

E .,,

00

53

53

3

15

33

•1

DO

G

CA

L,D

IN

00

63

40

0

23

U

IX

DE

"' .. 0

05

35

6

30

3

32

7

00

5

JMP

,NG

O

00

63

41

3

11

R

ET

'11

:' C

OM

P 0

05

36

1

36

5

PUSH

PS

W

PL

IN

00

63

42

0

23

IN

X

DE

n 0

05

36

2

07

6

21

5

}IW

I .n..

"

CR

'1 0

06

34

3

33

2

21

7

00

4

JC,E

RR

5

)>

00

53

64

0

22

ST

!.X

DE

00

6j4

6

31

1

RE

T

(.I)

0

05

36

5

31

5

16

2

00

3

CA

L,E

XP

RS

D

CX

N

00

63

47

0

33

D

CX

D

E

"" 0

05

37

0

30

5

PUSH

B

C

00

63

50

0

76

2

15

M

VI

A

"CR

" 0 N

0

05

37

1

02

1

15

1

00

6

LX

I D

E:&

".P

0

06

35

2

02

2

STllX

D

E U

1 N

XT

VR

0

05

37

4

04

3

INX

H

L S

eco

nd

ex

pre

ssio

n

CIN

0

06

35

4

04

3

IN"..

< H

L 0

05

37

5

17

6

MO

V

A,M

0

06

35

5

30

3

26

3

00

2

JMP

,LD

0

05

37

6

37

6

27

3

CP

I ..

, II

D

MS

00

63

60

3

05

PU

SH

BC

00

60

00

3

12

0

16

0

06

JZ

,PH

I 0

06

36

1

31

5

05

4

00

4

CA

L,I

l'<PX

T

00

60

03

3

15

0

43

0

05

C

l•L,T

E:R

.M

00

63

64

3

01

PO

P BC

0

06

00

6

33

2

217

00

4

JC,E

RR

5

00

63

65

3

11

R

ET

0

06

01

1

02

2

STA

X

DE

00

63

66

-00

63

77

0

00

E

xtr

a

ap

ace fo

r u

ser's

u

se.

.,, 0

06

01

2

02

3

INX

D

E 0

07

00

0+

M

INO

L

Pro

gra

ms

"' .. 0

06

01

3

30

3

37

4

00

5

J!1P

,NX

TV

R

., ... ....,

·-

Page 18: dr. dobb's journal of - cini.classiccmp.org

System monitor for 8080-

based • microcomputers by Charlie Pack, 25470 Elana Rd., Los Altos Hills CA 94022

After developing an 82-byte octal loader using nothing but the switch panel on my Altair 8800, I concluded that a system monitor was needed to provide better communications between myself and my machine. The required functions were: (1) display the contents of one byte or any segment of memory in octal, (2) display the contents of all registers, (3) enter programs in octal from a keyboard, (4) load and store programs or data, and (5) jump to a program. The 1/0 device to be supported was an ASR-33 Teletype with paper­tape reader and punch. The Monitor described in this article meets these requirements.

Since the Monitor has several hundred statements, and the memory in my computer is limited, I needed a cross­assembler that would run on the computers and with the soft­ware to which I had access. So, I wrote one-would you be­lieve-in COBOL?!! The program listing for the Monitor was printed musing my COBOL cross-assembler. Since COBOL is rather inefficient at non-structured string handling and sub­scripting, I made the source format fixed and eliminated punctuation. Register operands were made a part of the in­struction code, for example MOV AM moves a byte from memory to accumulator. Otherwise, the microprocessor in­structions are normal. The only pseudo-instructions used are ORG, DB, and DW. ORG sets the location counter; DB de­fines a single byte, and DW defines a doubleword (two bytes). Since it is difficult to do octal arithmetic in COBOL, the bells and whistles were left out of the cross-assembler.

A paper tape of this system is being delivered to the Program Repository at the Community Computer Center, 1919 Menalto, Menlo Park CA 94025.

"' -IC

-IC

"' -IC

"' rn a: w I­::> Q. Y. a u 0 a u .... ::E

0 w en ... m I

0 co 0 tC·

CY. 0 LL

er 0 ..... .... z 0 -:;:

:::E w 1-rn >­en

-IC

N (\J 0 ::t ~·

. ... u

Cl)

...J

..J .... ::i:

rn 0 1-..J ... en 0 ...J

a ..., 0 0::

... z w ..J w

:..:: u ..: Q.

w .... ..J fl:' ..., r u

>­ID

z w I­I­..... CY. 3:

3: w ..... > CY. w > 0

:L w l­et)

>­en

c 0

0 0

en w en 0 a.. 0:: :::> a..

. -0

C> 0

Cf.) w ..: :x: :x: u

I-

:::> w rn er

0 ::E

er er w w I- :x: :::> I-ll. er :::E :::> 0 LL. u 0 0:: u m .... :::E ::E ...,

fl:' 0 {!) w • 0 en _. o: ..: w a. a::> I WCY.

0 _J w co r 0 w I-­co(!) 0 ... z. :::> >­... I!> ID

z Cl<O z ..J w ... U)

w :::> a: z w .... w V> r :xi :::> u

<Z W:::E <O'. r u 1-W

r ,_ z I- 4 w :x: Wl-1-3: ..., I- >­w ..J 0: CL -<l <(

z a: U) .... co ZTH 0 a: ..J >-' LL 1-1-W <( z UI-.., .... a: 1-z u :J: • :::> c Cl) :::E _J a: :::E :L<l:aJ<( 0 ......i :::> 0:: u ir rn t!>

w 0 w U) ... 0:: 0 a. ...... ..., a > 'Z a 0 a: .... w 0'.0 :r: a. (/) 1-

w w o 0 a.. ...... l->-1-er

I- .... 0 ~ lJ..! _J ~_J ...... Cf)

w u er 0:: t- c:( w 0 LL I­I-... w .... (!) a: z ..., z a. OH~O:::

:L>t!>W {!) I­

L ,....._ => Z w 0 co ...... I-COW Cl)C 0 0 >-ct) ... rn <n o

.... W _! w <(Cl I.WHO J-.1>~

....c LL. a: 0 00'.0.. w

0 (/) w 0 :::> cnorn Do ..JW a. co ...: ct; Q'. :x; :::> erz a.. Q'. 0 ...

.... I- u z ...... ....... t- z 0:: ... ..J 0 0 ::i:: .... :L 1-.... WWW :Z :i:rro 1-1-1-:::E

r.n LJ .... J­en ..... a:: w 1-u ... 0:: <(

r u

..J .. z 0 ..... 1-u z :::> LL

N 0

0 0

u {!) ..... z {!) .... a O...J :::> w ..J w Q. ur...: Zl-1-...

LL er .. aw

>- Q. erw...: 0 (/) 11. :::E ::> w..: ::c: ::Eu ....

W>-< LL. ID 3: 0

............. (/) w .... W 0:: I I-..: a:: >- (/) ID>-<

er co 0 z ..O::E< r-. w

:::E Cl)

I- cc rn a: er w r HIU LL I- :::>

c rn uJ z rec ... I- w '-'OZ

I- ... rn r w= u I!> en ...: ...: ..... ::E Q.

rnw W<O'.ll. w= >­~ 1-row I- w ..J

1-W O'....: 1-w u 3: 0...: O...J _J w I-

Q: O'. w 0 :r:oo.. I- 2' 11. .. -:z rn .... o

WO lL'_:~

a co ...... :L 0 Cl)WW w-<n z °' rn {!) .......... 0 I rn 1-W W

a:o 0 w w (/) z Cf) ....... {!) ..... I- a:: rn .... o w l-o I- ....

<ZZ rn I 0 .... I- :L

a:: aw owr I- Cl­,_.z zw CJ ::r- • :::E ::E rn

ow ::;: urn LU W Cl)

I- a: LU r.n Q'. >- ,_ a (/) 0 0

z ... 0 ({) r.n Cl 0 ......... co ..J

I- <( W .... > r I- 0:: I

•OU Ll. <i LL Z ow :::i

0: r.n a. 0 <( ~

• u 0 -Y'WZ

u I. <l 2. < u 0 I- Q. ~Cl)ILLJ

(/) LJ c. Q:WH< WIIW > .,_ 3.. Cl:

(/)

LU ...... 1-.... __J

..... (D <{

a. <(

u

LL a

>­a: <{

:£ :;:. :::i (/)

. "' 0

0 0

rn z 0 .... 1-u z :::> LL

w Cl)

w I I-

::E 0:: 0 LL Q'.

w a.

0 I-

..... IJ..I I­>­ID

r u cc w a:: 0 LL.

Cl)

1-.... {!) .... 0

..J w <(I­I->­u co 0

er WW WQ. er r rn t- ..... ..... LL(!) c .....

0 Q. ::::i ..J a""' er ,_ {!) u

0

(Q

"' 0)

L[)

N 0 .... en <t u .io: ... "' c..

~ c: "' 2 0 ... M

x 0 al

.~ .. c:

. (/) ..... <( ..

-''-'a

w 0 Q._ "ti .. 0 I- .c:

...: er Q'

l->-< •W ucrowo.. oocoa....:

:I: >-<tCl. ZWWl­

.. 01 olll

.~I H~ Y'. 0 C:

O'.'.W O> cr LL .,WI -;: G ~O L~ .~ ~ ::::. w I- 00..::: c'.3 z 1-zcr o..

~ -~~u_~z ~ (/) (!) {!) (/) 0:: 0 ::i

W(J)WW::E.LL Cl. rwa::oo< lf.J E 1-cr a:oo:I' o

0..J">-{!)~2. ... (..) ;!;C--lZO<l:::t

3<1-ct<l~~~ 0 ..J>-LLLL Oll:: ca 4zoowcra. c:

<f l!>O.. ... Cl) (/) U) 4 CY :I

~:;~~~~o ~ <t W l.J..I 7 <f .. in ~lJ.Jl-.,_<f<t'a- ..c :I:.1-ZZ..Jl-<t .C 0>-00 I 40. 0 urnuwwo C

z >-1-- W l.U W H > 0:: ... zzrr.Icr<i: C WOJ-1-U..CXZ er <z._, UJW>->-L~LI) LLZ<l<t ;:tJ l.L. ..... ..J..JO'. w H :i. n....a WOO'.'. O<t(f)C/J.,_40

z~~~~s~ co w

~-'"'---- ~ Cl)41DUOWLL C..

Page 19: dr. dobb's journal of - cini.classiccmp.org

GJ

JUM

P TO

A

USE

R-S

LlP

PLIE

D

PRO

GRA

M

AT

ANY

AD

DR

ESS.

00

.0Q

. SU

BR

OU

TIN

E L

I9R

AR

Y.

SUB

RO

UT

INE

S AR

E A

VA

ILA

BLE

~ITHIN

THE

MO

NIT

OR

~HICH

CAN

BE

CA

LLED

BY

U

SER

PR

OG

RAM

S TO

PE

RFO

RM

TH

ESE

FUN

CT

ION

S:

Al

DIS

LAY

TH

E C

ON

TEN

TS

OF

ONE

BYTE

OR

O

F AN

Y SE

GM

ENT

OF

MEM

ORY

IN

OCT

AL

OR

AS

CII

, OR

D

ISPL

AY

TH

E C

ON

TEN

TS

OF

ALL

R

EG

IST

ER

S.

Bl

LOA

D

AND

STO

RE

RIN

AR

Y

DATA

ON

PU

NCH

ED

PAPE

R

TA

PE.

' C

l PE

RFO

RM

I/

O

OPE

RA

TIO

NS

ON

TELE

TYPE

(O

R

OTH

ER

SE

RIA

L)

KEY

BOA

RD

AND

PRIN

TE

R

OR

DIS

PLA

Y.

01

.00

. H

ARD

WA

RE REQUIRE~ENTS

AND

IMPL

EM

EN

TA

TIO

N.

THE

MO

NIT

nR

RE

OU

IRE

S AN

80

80-R

AS

ED

M

ICR

OPR

OC

ESSO

R

CSU

CH

AS

AN

ALT

AIR

88

00

OR

IMSA

I 8

08

0)

EQ

UIP

PED

W

ITH

AT

LE

AST

1K

O

F M

EMO

RYJ

A T

ELET

YPE

M

AC

HIN

E O~

OTH

ER

SER

IAL

D

ISPL

AY

W

ITH

AT

LE

AST

72

C

HA

RA

CTE

RS

PER

L

INE

; AN

D A

SU

ITA

RL

E

SER

IAL

I/

O

INT

ER

FAC

E.

THE

DIS

PLA

Y

DEV

ICE

SHO

ULO

RE

SE

T UP

FO

R FU

LL

DU

PLEX

O

PER

ATI

ON

ON

PORT~

0 AN

D 1

. TH

E M

ON

ITO

R

AS

SUPP

LIE

D

USE

S ST

ATU

S B

IT

0 (T

HE

RIG

HTM

OST

B

ITJ

FOR

REC

EIV

ED

DA

TA

AV

AIL

AB

LE

AND

STA

TUS

BIT

7

(TH

E 'L

EFTM

OST

B

IT)

FOR

TRA

NSM

ITTE

R

RU

FFER

EM

PTY

. IN

BO

TH

CA

SES

A

"HIG

H"

Cl)

M

EAN

S BU

SY

OR

NOT

REA

DY

ST

ATU

S AN

D A

"LO

W"

(OJ

MEA

NS

REA

DY

ST

AT

US.

TH

ESE

CO

NV

ENTI

ON

S AR

E U

SED

BY

MIT~

ON

TH

EIR

S

IO

CR

EV.

1)

SER

IAL

IN

TE

RFA

CE

B

OA

RD

S.

01

.02

. IM

PLE

ME

NT

AT

ION

.

THE

MO

NIT

OR

H

AS

BEEN

RU

N ON

AN

A

LTA

IR

8800

W

ITH

8~

OF

STA

TIC

RA

M,

AN

SIO

•A

BOA

RD

(RE

V.

1),

AN

O AN

A

SR

•33

TELE

TYPE

SE

T U

P FO

R R

S-2

32

INT

ER

FAC

E.

IT

rs

ALS

O

OPE

RA

TIN

G

AT

MY

HOM

E ON

AN

A

LTA

IR

8800

W

ITH

8K

OF

D

YN

AM

IC

RAM

, A

PR

OC

ESSO

R

TECH

NO

LOG

Y

3P+

S

I/O

50

AR

D

(MO

DIF

IED

SO

TH

E ST

ATU

S B

ITS

AR

E TH

E SA

ME

POL

AR

ITY

AS

TH

AT

USE

D

BY

MIT

S ON

T

HE

IR

SIO

B

OA

RD

S),

AND

AN

AS

R-3

3 TE

LETY

PE

SET

UP

FOR

20

MA

. C

UR

REN

T LO

OP

OPE

RA

TIO

N.

02

.00

, O

PER

ATI

NG

IN

STR

UC

TIO

NS.

02

.01

. LO

AD

ING

TH

E M

ON

1TO

R.

TO

LOA

D

THE

MO

NIT

OR

FR

OM

PAPE

R

TA

PE,

USF

TH

E B

OO

TSTR

AP

ON

THE

LAST

PA

GE

OF

THE

PRO

GRA

M

SOU

RC

E L

IST

ING

. LO

AD

TH

E B

OO

TSTR

AP

USI

NG

TH

E CO

NTR

OL

PAN

EL

, ST

AR

TIN

G

AT

LJC

AT

!ON

0

03

,32

0.

BE

SUR

E AN

D CH

ECK

IT

W

HEN

YO

U'R

E F

INIS

HE

D,

BY

USI

NG

TH

E EX

AM

INE

SWIT

CH

. TH

EN

LOA

D

ANO

STA

RT

THE

PAPE

R

TAPE

PE

AD

ER

AND

SwIT

CH

TO

R

UN

, IN

TH

AT

OPO

ER

. N

OTE

TH

AT

THE

PAPE

R

TAPE

SH

OU

LD

HA

VE

ABO

UT

5 IN

CH

ES

OF

LEA

OER

W

H1CH

C

ON

SIST

S OF

N

ULL

C

HA

RA

CTE

RS.

WHE

N TH

E M

ON

ITO

R

IS

LOA

DED

, A

QU

ESTI

ON

M

ARK

C?J

SH

OU

LD

BE

DIS

PLA

YE

D.

IF

THE

MO

NIT

OR

D

ISPL

AY

S ON

E OR

TW

O C

HA

RA

CTE

RS

OF

GA

RB

AG

E,

PRE

SS TH~

CA

RR

IAG

E RE

TURN

CC

R)

KEY

AND

A ?

W

ILL

SE

DIS

PLA

YE

D.

IF

NO

THIN

G

IS

DIS

PLA

YE

D,

AND

THE

TELE

TYPE

OR

V

IDEO

U

NIT

H

AS

NOT

SHO

wN

AN

Y SI

GN

oF

L

IFE

, TH

E M

ON

ITO

R

IS

NOT

L0A

DEO

C

OR

RE

CT

LY

. IF

TH

E PR

OBL

EM

PE

RS

IST

S,

TRY

S

ING

LE

-ST

EP

PIN

G

THRO

UG

H

THE

BOO

T LO

AD

ER.

YOU

MAY

H

AV

E TH

E W

RONG

A

DD

RES

S PO

RTS

OR

ST

ATU

S R

ITS

.

02

.02

. EN

TRY

OF

COM~ANDS

AND

AD

DR

ESS

PAR

AM

ETER

S.

THE

MO

NIT

OR

IS

IN

COM~AND

MOD

E W

HEN

A Q

UES

TIO

N

MAR

K (?

) IS

D

ISPL

AY

ED

. T

HIS

PR

OM

PT

TE

LL

S YO

U IT

IS

RE

AD

Y

FOR

A C

OM

MA

ND

. EA

CH

FUN

CTI

ON

TO

BE

PE

RFO

RM

ED

BY

THE

MO

NIT

OR

IS

ID

EN

TIF

IED

RY

A

1-C

HA

RA

CTE

R

ALP

HA

BET

IC

COM

MA

ND

. A

COM

MAN

D IS

U

SUA

LLY

FO

LLO

WED

BY

ON

E OR

TW

O A

DD

RES

S PA

RA

MET

ERS.

AN

AD

DR

ESS

PAR

AM

ETER

IS

A

6•D

IGIT

S

PL

IT

OCT

AL

NU

MB

ER.

THE

FIR

ST

3

DIG

ITS

A

RE

THE

MEM

ORY

AD

DR

ESS

WIT

HIN

A

PA

GE

(MA

XIM

UM

V

ALU

E JS

O

CTA

L 3

77

) AN

O TH

E LA

ST

3 D

IGIT

S

ARE

THE

MEM

ORY

PAG

E N

UM

9ER

. A

PA

GE

IS

A 2

56•B

YT

E

SEG

MEN

T O

F A

DD

RES

SAB

LE

MEM

ORY

. TH

E PA

GE

NU

MBE

R CA

NN

OT

EXC

EED

TH

E H

IGH

EST

NU

MBE

RED

PA

GE

OF

EX

IST

ING

M

EMO

RY,

I.E

. 01

7 FO

R 4K

, 03

7 FO

R B

K,

AND

SO

ON

. EX

AM

PLES

O

F A

DD

RES

S PA

RA

MET

ERS

FOLL

OW

:

00

00

00

IS

LO

CA

TIO

N

0 W

ITH

IN

PAG

E O

0

01

00

0

IS

LOC

ATI

ON

1

WIT

HIN

PA

GE

0 3

77

00

0

IS

LOC

ATI

ON

25

5 (D

EC

IMA

L)

WIT

HIN

PA

GE

0 00

0001

IS

LO

CA

TIO

N

0 W

ITH

IN

PAG

E I

Ap

ril,

1

97

6

Dr.

D

ob

b's

Jo

urn

al

of

Co

mp

ute

r C

ali

sth

en

ics

&

Ort

ho

do

nti

a,

Bo

x 3

10

, M

en

lo

Par

k

CA

9

40

25

P

age

19

Page 20: dr. dobb's journal of - cini.classiccmp.org

3770

17

IS

LOC

ATI

ON

25

5 W

ITH

IN

PAG

E 15

(D

EC

IMA

L)

• TH

E H

IGH

EST

NU

MBE

RED

LO

CA

TIO

N

IF

YOU

HAVE

4K

OF

M

EMO

RY.

NO

TE

THAT

TH

E NUM~ERING

OF

AD

DR

ESSE

S AN

D PA

GES

B

EGIN

S W

ITH

o,

NO

T 1

.

IF

WH

ILE

ENTE

RIN

G

AN

AD

DRE

SS

YOU

MAK

E A

MIS

TAK

E,

YOU

CAN

TYPE

~

(UPP

ER

-CA

SE

P ON

A

TEL

ETY

PE

MA

CH

INE)

AT

AN

Y TI

ME

TO

RETU

RN

TO

COM

MAN

D M

OD

E.

THEN

, YO

U CA

N R

E•T

YPE

TH

E CO

MM

AND

AND

RE-

ENTE

R

THE

CORR

ECT

AD

DR

ESS.

NO

EM

BED

DED

SP

AC

ES

ARE

PER

MIT

TED

BE

TWEE

N

A

COM

MAN

D AN

D AN

A

DD

RES

S,

BETW

EEN

TW

O A

DD

RES

SES,

OR

W

ITH

IN

AN

AD

DR

ESS.

AN

IN

VA

LID

CH

ARA

CTER

TY

PED

W

HIL

E EN

TER

ING

AN

A

DD

RES

S IS

NO

T "E

CH

OED

" AN

D IS

. IGNO~ED

av

THE

SYST

EM.

AFT

ER

THE

AD

DRE

SS PARA~ETERS

HAVE

BE

EN

ENTE

RED

AS

R

EQU

IRED

FO

R TH

E PA

RTI

CU

LAR

CO

MM

AND,

TH

E M

ON

ITO

R W

AIT

S FO

R YO

U TO

PR

ESS

CR

(CA

RR

IAG

E RETUR~)

TD

BEG

IN

THE

COMMA~D

FUN

CT

ION

, OR

TO

TY

PE

AN ~

TO

ABO

RT

AND

RETU

RN

TO

COM

MAN

D M

ODE.

TH

E PU

RPO

SES

OF

TH

IS

EXTR

A

MA

NEU

VER

AR

E TO

AL

LOW

TH

E O

PERA

TOR

TO

READ

Y AN

r-

o D

EVIC

E (S

UC

H

AS

A P

APE

R

TAPE

PU

NC

H]

IF

RE

QU

IRE

D,

OR

TO

SIG

HT

-VE

RIF

Y

THE

AD

DR

ESS.

02

.03

. D

ESC

RIP

TIO

N

OF

COM

MAN

D FU

NC

TIO

NS.

02

.03

.01

. EX

AM

INE

CE

).

EB6B

8RB

EX

AM

INES

TH

E C

ON

TEN

TS

OF

THE

MEM

ORY

BYTE

AT

LO

CA

TIO

N

RB

BB

8B.

THE

CO

NTE

NTS

OF

TH

E M

EMOR

Y BY

TE

IS

DIS

PLA

YED

AS

A

GRO

UP

OF

3 O

CTA

L D

IGIT

S.

ANY

EX

IST

ING

A

DD

RESS

CA

N BE

EX

AM

INED

.

FOR

EXA

MPL

E EO

OO

OO

O

FOLL

OW

ED

BY

A C

R (C

AR

RIA

GE

RET

UR

N)

WIL

L D

ISPL

AY

30

3 CS

EE

PRO

GRA

M

LIS

TIN

G).

02

.03

.02

. JU

MP

TO

PRO

GRA

M

(J).

JBSR

BB

B

RES

ULT

S IN

A

JU

MP

TO

LOC

ATI

ON

BR

BBBB

TO

TU

RN

CON

TRO

L OV

ER

TO

A U

SER

-SU

PPL

IED

PR

OG

RAM

. TH

E LO

CA

TIO

N

SP

EC

IFIE

D

MUS

T BE

AN

A

DD

RESS

W

ITH

IN

EX

IST

ING

M

EMOR

Y BU

T NO

T W

ITH

IN

THE

MO

NIT

OR

AR

EA.

IF

THE

USE

R PR

OG

RAM

IS

VE

RY

CO

MPL

EX,

IT

SHO

ULD

HA

VE

ITS

OWN

STA

CK

AREA

AS

TH

E M

ON

ITO

R HA

S ON

LY

37

BY

TES

IN

ITS

STA

CK

. TH

E U

SER

PROG

RAM

M

AY

GO

BACK

1

0

THE

MO

NIT

OR

IN

COM

MAN

D M

ODE

BY

ISSU

ING

A

RET

(R

ETU

RN

) IN

STR

UC

TIO

N

OR

BY

A J

UM

P TO

LO

CA

TIO

N

00

0,0

00

.

FOR

EXA

MPL

E J0

00

00

3

FOLL

OW

ED

BY

CR

WIL

L R

ESU

LT

IN

A J

UM

P TO

LO

CA

TIO

N

0 IN

PA

GE

3.

02

.03

.03

. K

EYBO

ARD

O

CTA

L LO

AD

ER

(K).

KBB

BBBB

IN

VO

KES

TH

E K

EYBO

ARD

O

CTA

L LO

AD

ER.

THE

USE

R K

EYS

IN

THRE

E A

SCII

D

IGIT

S FO

R EA

CH

BYTE

OF

M

EMO

RY,

STA

RTI

NG

AT

LO

CA

TIO

N

88

89

88

AN

D IN

CR

EMEN

TIN

G

THRO

UG

H

CO

NSE

CU

TIV

E M

EMOR

Y L

OC

AT

ION

S.

EACH

G

ROU

P OF

3

DIG

ITS

CAN

HAVE

AN

Y O

CTA

L V

ALU

E FR

OM

000

TO

37

7.

VA

LID

D

IGIT

S AR

E "E

CH

OED

" TO

TH

E D

IS0

LAY

; IN

VA

LID

CH

ARA

CTER

S AR

E IG

NO

RED

AN

D AR

E NO

T ST

OR

ED

IN

MEM

ORY

. EN

TRY

OF

A

CR

AFT

ER

<EY

ING

IN

TH

E B

EGIN

NIN

G

AD

DRE

SS

IS

OPT

ION

AL

.

THE

SPA

CE

BAR

CSP

) AN

O C

AR

RIA

GE

RETU

RN

(CR

) K

EYS

MAY

BE

U

SED

AT

AN

Y TI

ME

TO

FORM

AT

THE

DIS

PLA

Y

AS

RE

QU

IRE

D,

WIT

HO

UT

AFF

ECTI

NG

DA

TA

IN

MEM

ORY

. ON

A

TEL

ETY

PE

MA

CHIN

E YO

U M

UST

E~TER

A C

Q TO

K

EEP

FROM

O

VER

PRIN

TIN

G

THE

LAST

CH

ARA

CTER

ON

TH

E L

INE

. ~HEN

YOU

ARE

FIN

ISH

ED

, TY

PE

@ T

O RE

TURN

TO

CO

MM

AND

MOD

E (T

HF

@ I

S

NOT

STO

RED

IN

M

EMO

RY

).

THE

KEY

BOA

RD

OCT

AL

LOA

DER

A

LSO

A

LLO

WS

THE

USE

R TO

BA

CK

SPA

CE

ONE

OCT

AL

DIG

IT

OR

ONE

BY

TE,

BY

TYPI

NG

A

SA

CK

ARRO

W

(UPP

ER

-CA

SE

0 ON

A

TEL

ETY

PE

MA

CH

INE

). IF

A

BY

TE

HAS

BEEN

PA

RTI

ALL

Y

ENTE

RED

, TH

E BA

CK

ARRO

W

WIL

L B

AC

K-S

PAC

E ON

E O

CTA

L D

IGIT

. FO

R EX

AM

PLE:

2

123

RES

ULT

S IN

12

3 (O

CTA

L)

BE!

NG

ST

OR

ED1

26

46

RES

ULT

S IN

24

h B

EIN

G

STO

RED

. IF

A

BY

TE

HAS

BEEN

C

OM

PLET

ED,

THE

BACK

AR

ROW

W

ILL

BAC~=SDACE

ONE

BY

TE.

IT

JS

POSS

IBL

E

TO

BA

CK

•SPA

CE

ANY

NUM

BER

OF

BY

TES

AS

LONG

AS

TH

E AR

EA

OC

CU

PIED

BV

TH

E M

ON

ITO

R IS

NO

T V

IOL

AT

ED

. B

AC

K-S

PAC

ING

IS

NO

T D

EST

RU

CT

IVE

. FO

R EX

AM

PLE:

USE

R EN

TER

S K

0000

03

303

055

045

000

USE

R EN

TER

S K

0200

17

060

063

065

067

02

.03

.04

. LO

AD

BIN

AR

Y

DATA

C

L).

303

045

000

IS

STO

RED

(3

B

YTE

S)

BEG

INN

ING

AT

LO

CA

TIO

N

0 W

ITH

IN

PAG

E 3

. 06

1 --

061

063

065

067

IS

STO

RED

(4

B

YTE

S)

BEG

INN

ING

AT

0

20

,01

7.

LAB

8RPB

EEEE

EE

LOA

DS

BIN

AR

Y

DATA

i

ROM

PA

PER

T

APE

, BE

GTN

NTN

G

AT

END

ING

LO

CA

TIO

N

EEEE

EE

AND

PRO

CEE

DIN

G

BACK

WA

RDS

(DEC

REM

ENTI

NG

) TO

Pag

e 2

0

Dr.

Do

bb

's J

ou

rnal

of

Co

mp

ute

r C

alis

then

ics

&

Ort

ho

do

nti

a,

Bo

x 3

Hl,

Men

lo

Par

k C

A 9

40

25

A

pri

l,

19

76

Page 21: dr. dobb's journal of - cini.classiccmp.org

BEG

INN

ING

LO

CA

TIO

N

B98

BB

B

INC

LU

SIV

E.

THE

AD

DRE

SS

RAN

GE

MUS

T BE

IN

E

XIS

TIN

G ~EMORY,

BUT

NO

PART

OF

IT

CA

N 8E

W

ITH

IN

THE

MO

NIT

OR

AR

EA.

THE

RFQ

UIR

ED

PRO

CED

llRE

rs:

A)

LOAD

TA

PE

IN

REA

DER

. A

) EN

TER

THE

AD

DR

ESSE

S AS

SH

OWN

ANO

MAK

E SU

RE

THEY

AR

E CO

RREC

T BY

SI

GH

T V

EQ

IFIC

AT

ION

. C

l TY

PE

CR

[OR

TY

PE@

TO

RE

TURN

TO

CO

MM

AND

MO

DE)

. D

l ST

AR

T TH

E R

EAD

ER.

EACH

CH

ARA

CTER

PO

SIT

ION

ON

TH

E PA

PER

TA

PE

WIL

L O

CCU

PY

ONE

RYTE

OF

M

EMO

RY;

THJS

C

EEEE

EE

-BB

BBBB

+

1

l B

YTE

S W

ILL

BE

LOA

DED

. TH

E TA

PE

MUS

T Hl

i.VE

A L

EAD

ER

[AN

Y

LEN

GTH

) W

HIC

H

CD

NTA

HIS

AL

L /\J

llLL

CHA

RACT

ERS

(BIN

AR

Y

ZER

OES

) AN

D W

HIC

H

WIL

L NO

T BE

TR

AN

SFER

RE.D

TD

M

EMO

RY.

TRA

NSF

ER

OF

DATA

TO

M

EMOR

Y B

EGIN

S AT

TH

E FI

RST

N

ON

-NU

LL CH~RACTER

ON

THE

TA

PE,

ONCE

TH

E FI

RST

N

ON

•NU

LL

CHA

RACT

ER

HAS

BEE~

ENCO

UN

TERE

D

AND

STO

RED

IN

M

EMO

RY,

ALL

CHA

RACT

ERS

(IN

CL

UD

ING

N

ULL

S)

AFT

ER

THA

T AR

E TR

AN

SFER

RED

TO

D

ECR

EASI

NG

MEMO~Y

LO

CA

TIO

NS.

TH

ERE

IS

NO CHECKSU~

RO

UT

INE

; TH

E M

ON

ITO

R A

SSU

MES

TH

E TA

PE

IS

CORR

ECTL

Y

FORM

ATT

ED

AND

CO

NTA

INS

THE

CORR

ECT

NUM

BER

OF

DATA

C

HA

RA

CTE

RS.

FON

EXA

MPL

E,

TO

LOAD

32

BY

TES

OF

DATA

B

EGIN

NIN

G

AT

02

0,0

03

AN

D EN

DIN

G

AT

05

7,0

03

TH

E U

SER

WOU

LD

TYPE

l0

20

00

30

57

00

3

FOLL

OW

ED

BY

A C

R AN

D TH

EN

STA

RT

THE

REA

DER

. W

HEN

LOA

DIN

G

IS

CO

MPL

FTE

THE

MO

NIT

OR

AU

TOM

ATI

CALL

Y

RET

UR

NS

TO

COM

MAN

D M

OD

E.

02

.03

.0S

. M

EMOR

Y DU

MP

(M).

MB

BSB

BB

EEEE

EE

DIS

PLA

YS

ALL

MEM

ORY

LOC

ATI

ON

S BE

TWEE

N

BEG

INN

ING

A

DD

RESS

BB

AB3

B AN

D EN

DIN

G

AD

DRE

SS

EEEE

EE

INC

LU

SIV

E.

ANY

AREA

W

ITH

IN

EX

IST

ING

M

EMOR

Y M

AY

BE

DIS

PLA

YE

D,

ONE

GRO

UP

OF

3 O

CTA

L D

IGIT

S FO

R EA

CH

BY

TE.

EACH

L

INE

D

ISPL

AY

ED

WIL

L SH

OW

16

BY

TES

OF

MEM

ORY

, PL

US

THE

AD

DRE

SS

OF

THE

FIR

ST

BYTE

ON

TH

E L

INE

IN

S

PL

IT

OC

TAL.

FOR

EXA

MPL

E,

M00

0000

0030

00

FOLL

OW

ED

BY

A C

R W

ILL

DIS

PLA

Y

(RE

FER

TO

PR

OGRA

M

LIS

TIN

G):

00

0,0

00

: 30

3 05

0 00

0 00

0

02

.03

.06

. R

EG

IST

ER

DU

MP

(Rl.

R

CA

USE

S TH

E C

ON

TEN

TS

OF

THE

RE

GIS

TE

RS

TO

BE

DIS

PLA

YED

(I

N

OC

TAL)

IN

TH

E FO

LLO

WIN

G

OR

DER

: PS

W

A

C

B

E

D

L

H

THE

DIS

PLA

Y

BEG

INS

IMM

EDIA

TELY

A

FTER

TH

E "R

" COM~AND

IS

TYPE

D;

NO

PAR

AM

ETER

S AR

E R

EQ

UIR

ED

. N

OTE

TH

AT

THE

RE

GIS

TE

RS

ARE

NOT

DIS

PLA

YED

IN

SE

QU

ENC

E!

TH

IS

IS

BECA

USE

OF

TH

E W

AY

IN

WH

ICH

TH

EY

ARE

"PU

SHED

" ON

TH

E ST

AC

K.

WHE

N TH

E R

EGIS

TER

DU

MP

IS

INV

OK

ED

BY

THE

MO

NIT

OR

THE

CO

NTE

NTS

OF

TH

E PS

W

AND

ACC

UM

ULA

TOR

WIL

L AL

WAY

S BE

12

6 12

2 AN

D TH

EREF

OR

E AR

E OF

L

ITT

LE

V

ALU

E.

HO

WEV

ER,

THE

RE

GIS

TE

R

DIS

PLA

Y

SIJB

RO

UTI

NE

CAN

ALS

O

BE

CALL

ED

FROM

A

USE

R PR

OG

RAM

.

02

.03

.07

. SA

VE

BIN

AR

Y

DATA

C

SJ.

SBB

BB

BB

EEEE

EE

SAV

ES

BIN

AR

Y

DATA

ON

PA

PER

T

APE

, B

EGIN

NIN

G ~T

END

ING

LO

CA

TIO

N

EEEE

EF

AND

PRO

CEE

DIN

G

BACK

WA

RDS

(DEC

REM

ENTI

NG

) TO

B

EGIN

NIN

G

LOC

ATI

ON

B

9RB

BB

IN

CL

USI

VE

. TH

E A

DD

RESS

RA

NG

E M

UST

BE

IN

EX

IST

ING

M

EMO

RY,

THE

RER

UIR

ED

PRO

CED

URE

IS

: A

) LO

AD

BLAN

K PA

PER

TA

PE

IN

THE

PUN

CH

. B

) EN

TER

THE

AD

DR

ESSE

S AS

SH

OWN

AND

MAK

E SU

RE

THEY

AR

E CO

RREC

T BY

SI

GH

T VERI~ICATION.

C)

TYPE

CR

(O

R T

YPE

@

TO

RETU

RN

TO

COM

MAN

D M

OD

El.

THE

PUN

CH

WIL

L H

EGIN

A

UTO

MA

TICA

LLY

BY

PU

NC

HIN

G

OUT

A 5

•IN

CH

LE

AD

ER

CO

NTA

ININ

G

NU

LL

CH

AR

AC

TER

S (B

INA

RY

Z

ER

OE

S).

AFT

ER

THA

T,

ONE

CHA

RACT

ER

POSI

TIO

N

ON

THE

TAPE

IS

PU

NCH

ED

FOR

EACH

BY

TE

OF ~EMORY

UN

TIL

(EE

EE

EE

=

BB

BBBR

+

1)

R

YTE

S HA

VE

BEEN

PR

OC

ESS

ED

.

THE

BYTE

AT

LO

CA

TIO

N

EEEE

EE

CAN

NO

T BE

ZE

RO

BECA

USE

ZE

RO

ES

(NU

LL

S)

ARE

USE

D

TO

REP

RES

ENT

THE

LEA

DER

. A

3•I

NC

H

TRA

ILER

OF

N

ULL

S IS

PU

NCH

ED

AT

TrlE

EN

D TO

"E

JEC

T"

THE

TAPE

SO

TH

E U

SER

CAN

CUT

IT

OFF

. TH

ERE

IS

NO

CrlE

CKSU

M

RO

UTI

NE

BUT

THE

OU

TPU

T W

ILL

BE

PRO

PER

LY

FORM

ATT

ED

FOR

USE

W

ITH

TH

E "L

" CO

MM

AND.

FOR

EXA

MPL

E,

TO

STO

RE

32

BY

TES

OF

DATA

B

EGIN

NIN

G

AT

LOC

ATI

ON

0?

.0,0

03

AND

END

ING

AT

0

57

,00

3

THE

USE

R W

OULD

TY

PE

$0

20

00

30

57

00

3

FOLL

OW

ED

BY

A C

R.

WHE

N TH

E PR

OC

ESS

IS

COM

PLET

E TH

E M

ON

ITO

R lU

TOM

ATI

CA

LLY

RE

TURN

S TO

CO

MM

AND

MO

DE.

IT

IS

POSS

IBL

E

TO

PUN

CH

OUT

A C

OPY

OF

TH

E M

ON

ITO

R IT

SEL

F RY

U

SIN

G

THE

COM

MAN

D S

00

00

00

37

70

02

HO

WEV

ER,

GA

R8A

GE

WIL

L BE

LE

FT

IN

THE

STA

CK

AREA

(0

00

,00

3

THRJ

UG

H

00

0,0

47

) ON

TH

E T

APE

.

02

.03

.0B

. RE

TURN

TO

CO

MM

AND

MOD

E (@

).

@

MAY

BE

TY

PED

AT

AN

Y TI

ME

TO

RETU

RN

TO

COM

MAN

D M

OD

E,

EXC

EPT

WHE

N TH

E M

ON

ITO

R IS

IN

TH

E PR

OC

ESS

OF

TYPI

NG

C

HA

RA

CTE

RS,

Ap

ril,

1

91

6

Dr.

Do

bb

's J

ou

rnal

of

Co

mp

ute

r C

alis

then

ics

&

Ort

ho

do

nti

a,

Bo

x 3

10

, M

enlo

P

ark

C

A 9

40

25

P

age

21

Page 22: dr. dobb's journal of - cini.classiccmp.org

PLJ~CHING

OUT

A P

APE

R

TA

PE,

OR

DIS

PLA

YIN

G

CH

AR

AC

TER

S ON

TH

E V

IDEO

SC

REE

N.

TO

INTE

RR

UPT

TH

E M

ON

ITO

R D

UR

ING

O

UTP

UT

IT

IS

NEC

ESSA

RY

1

0

STO

P TH

E CO

MPU

TER

AND

RE-

STA

RT

THE

pqoG

RA

M

AT

LOC

ATI

ON

0

00

,00

0.

02

.04

. ER

ROR

MES

SAG

ES.

THE

MO

NIT

OR

USE

S SE

VER

AL

ERRO

R M

ESSA

GES

. A

FTER

TH

E ER

ROR

MF.

qSA

GE

IS

DIS

PLA

YE

D,

THE

MO

NIT

OR

RETU

RNS

TO

COM

MAN

D M

ODE

AND

DIS

PLA

YS

A Q

UES

TIO

N MAR~

C?)

. A

DE

SCR

IPT

ION

OF

EA

CH

ERRO

R M

ESSA

GE

FOLL

OW

S:

WHA

T?

--AN

IN

VA

LID

CO

MM

AND

WAS

TY

PED

IN

.

>

MEM

--

AD

DRE

SS

IS

OU

TSID

E E

XIS

TIN

G

MEM

ORY

. PO

SSIB

LY

TH

E PA

GE

~UMBER

AND

L~CATION

WIT

HIN

TH

E PA

GE

WER

E R

EVER

SED

, SU

CH

AS

0023

77

INST

EAD

OF

3

77

00

2.

TH

IS

COU

LD

ALS

O

HA

PPEN

W

HEN

USI

NG

TH

E K

EYBO

ARD

O

CTA

L LO

AD

ER

IF

THE

UPP

ER

LIM

IT

OF

EX

IST

ING

M

EMOR

Y HA

S BE

EN

REA

CH

ED.

L >

H

-~

WHE

N AN

A

DD

RESS

RA

NGE

HAS

BEEN

TY

PED

IN

, TH

E LO

WER

A

DD

RESS

C

BB

BB

BB

) IS

G

REA

TER

THAN

TH

E U

PPER

A

DD

RESS

C

EE

EE

EE

)1

THER

E•

FORE

TH

E A

DD

RESS

RA

NGE

IS

NOT

VA

LID

.

V M

ON

AD

DR

ESS

VIO

LATE

S M

ON

ITO

R A

REA

. T

HIS

CO

ULD

H

APP

EN

IF

AN

INC

OR

REC

T A

DD

RES

S IS

TY

PED

IN

, OR

IF

TH

E K

EYBO

ARD

O

CTA

L LO

AD

ER

IS

IN

USE

AN

D TH

E U

SER

INA

DV

ERTE

NTL

Y

TRIE

D

TO

BA

CK

SPA

CE

INTO

TH

E M

ON

ITO

R A

REA

.

03

.00

. SU

AR

OU

TIN

E L

IRR

AR

Y.

03

.0!.

G

ENER

AL

INFO

RM

ATI

ON

AB

OUT

SUB

RO

UT

INE

S.

THE

MO

NIT

OR

CO

NTA

INS

A N

UMAE

R OF

SU

BR

OU

TIN

ES

WH

ICH

M

AY

RE

CA

LLFD

FR

OM

USE

R PR

OG

RA

MS.

EX

CEP

T W

HERE

O

THER

WIS

E N

OTE

D,

ALL

GEN

ERA

L PU

RPO

SE

RE

GIS

TE

RS

(R,

C,

D,

E,

H A

ND

L)

ARE

EIT

HE

R

SAV

FD

OR

NOT

USE

D:

THER

EFO

RE

AFT

ER

A S

UB

RO

UTI

NE

IS

EXEC

UTE

D

THOS~

RE

GIS

TE

RS

WIL

L HA

VE

THE

SAM

E C

ON

TEN

TS

AS

THEY

D

ID

BEF

OR

E TH

E SU

BR

OU

TIN

E W

AS

EXEC

UTE

D.

AS

A R

ULE

, TH

E A

CCU

MU

LATO

R AN

D PS

W

ARE

NOT

SAV

ED.

03

.02

. D

ESC

RIP

TIO

N

OF

SUB

RO

UT

INE

S.

03

.02

.01

. RE

GD

MP

DIS

PLA

YS

THE

CO

NTE

NTS

OF

AL

L R

EG

IST

ER

S (E

XC

EPT

SP

AND

PC)

IN

T~IE

FO

LLO

WIN

G

OR

DER

:

PSW

A

c

B

E

D

L (N

OTE

D

on-B

AL

L

SEQ

UE

NC

E!)

IN

AD

DIT

ION

TO

TH

E G

ENER

AL

PUR

POSE

R

EG

IST

ER

S,

PSW

AN

D A

ARE

SA

VED

, SO

TH

E D

ISPL

AY

ED

CO

NTE

NTS

OF

TH

ESE

ARE

MEA

NIN

GFU

L.

03

.02

.02

. O

UT3

D

ISPL

AY

S 3

OCT

AL

DIG

ITS

WH

ICH

R

EPR

ESEN

T TH

E CO

NTE

NTS

OF

TH

E A

CCU

MU

LATO

R.

03

.02

.03

. M

DUM

P D

ISPL

AY

S TH

E C

ON

TEN

T9

OF

MEM

ORY

, 3

OCT

AL

DIG

ITS

PER

BY

TE.

THE

STA

RTI

NG

CL

OW

ER)

AD

DRE

SS

MUS

T BE

LO

AD

ED

IN ~EGS.

D A

ND

E,

ANO

THE

END

ING

C

UP?

ER)

AD

DRE

SS

MUS

T BE

L

OID

En

IN

RE

GS.

H

AND

L

.

03

.02

.04

. PT

INP

LOA

DS

DATA

FR

OM

PAPE

R

TAPE

CS

EE

THE

DE

SCR

IPT

ION

OF

TH

E "L

" CO

MM

AN

D).

THE

STA

RTI

NG

CL

OW

ER)

AD

DRE

SS

MUS

T BE

LO

AD

ED

IN

RE

GS.

D

AND

E

, AN

D TH

E EN

DIN

G

(UPP

ER

) A

DD

RESS

M

UST

RE

LOA

DED

IN

R

EGS.

H

ANO

L

.

03

.02

.05

. PT

OU

T SA

VES

DA

TA

ON

PAPE

R

TAPE

CS

EE

THE

DE

SCR

IPT

ION

OF

TH

E "S

" CO

MM

AN

D).

THE

STA

RTI

NG

(L

OW

ER)

AD

DRE

SS

MUS

T BE

LO

AD

ED

IN

RE

GS.

D

AND

E

, AN

D TH

E EN

DIN

G

(UPP

ER

) A

DD

RESS

M

UST

BE

LOA

DED

IN

R

EG

S.

H A

ND

L.

03

.02

.06

. IN

CH

G

ETS

ONE

CH

AR

AtT

ER

FROM

TH

E K

EYBO

ARD

AN

D PU

TS

IT

IN

THE

ACC

UM

ULA

TOR.

TH

E LE

FTM

OST

B

IT

(BIT

7)

IS

ZE

ROED

OU

T AN

O IS

NO

T U

SED

BY

TH

E M

ON

ITO

R.

SOM

E D

EVIC

ES

USE

TH

AT

BIT

AS

A

PA

RIT

Y

BIT

.

03

.0?.0

7.

DU

TSTR

D

ISPL

AY

S A

CHARACTE~

STR

ING

UP

TO

25

6 BY

TF.S

IN

LE

NG

TH.

AT

ENTR

Y,

REG

S.

H A

ND

L M

UST

CO

NTA

IN

THE

REG

INN

ING

A

DD

RESS

OF

TH

E ST

RIN

G.

THE

FIR

ST

BYTE

OF

TH

E ST

RIN

G

MUS

T BE

TH

E LE

NG

TH

OF

THE

STR

ING

W

ITH

OU

T TH

E LE

NG

TH

BY

TE.

THE

LEN

GTH

BY

TE

IS

N8T

D

ISPL

AY

ED

.

FOR

EXA

MPL

E,

TO

DIS

PLA

Y

THE

LETT

ERS

"AB

C"

THE

STR

ING

W

OULO

CONTAI~

(IN

O

CTA

L)

003

101

102

103

• R

EG

S.

H A

ND

L S

HO

ULD

PO

INT

TO

Pag

e 2

2

Dr.

D

ob

b's

Jo

urn

aij

of

Co

mp

ute

r C

alis

then

ics

&

Ort

ho

do

nti

a,

Bo

x 3

10

, M

enlo

P

ark

C

A 9

40

25

A

pri

l,

19

16

Page 23: dr. dobb's journal of - cini.classiccmp.org

THE

BYTE

TH

AT

CO

NTA

INS

00

3.

WA

RN

ING

: IF

TH

E LE

NG

Trl

BYTE

C

ON

TAIN

S Z

ER

O,

256

BY

TES

WIL

L RE

D

ISPL

AY

ED

. A

LSO

N

OTE

TH

AT

LIN

E

FEE

D,

CA

RR

IAG

E RE

TURN

AN

D O

THER

SP

EC

IAL

C

HA

RA

CTE

RS

WIL

L PE

RFO

RM

T

HE

IR

NnR

MA

L FU

NC

TIO

NS

ON TH~

OU

TPU

T D

EVIC

E B

EIN

G

USE

D.

03

.02

,08

. O

UTN

EW

STA

RTS

A

NEW

L

INE

ON

TH

E O

UTP

UT

DE

VIC

E.

A C

R IS

IS

SU

ED

, FO

LLO

WED

BY

A

LF

CLI

NE

FE

ED

).

03

.02

.09

. O

UTS

P S

KIP

S

ONE

CH

AR

AC

TER

PO

SIT

ION

ON

TH

E O

UTP

UT

DE

VIC

E.

A S

P (S

PAC

E)

IS

ISS

UE

D.

03

.02

.10

. D

UTC

H

SEN

DS

ONE

CH

AR

AC

TER

TO

TH

E D

ISPL

AY

D

EV

ICE

. TH

E C

HA

RA

CTE

R

TO

BE

OU

TPU

TTED

M

UST

BE

IN

TH

E A

CCU

MU

LATO

R AT

E

NT

RY

. AN

Y OF

TH

E 25

6 PO

SSIB

LE

B

IT

CO

MB

INA

TIO

NS

CAN

BE

OU

TPU

TT

ED

. SP

EC

IAL

C

HA

RA

CTE

RS

CL

F,

CR

, E

TC

.]

wIL

L

PER

FOR

M

TH

EIR

NO

RMAL

FU

NC

TIO

NS.

TH

E PS

w

AND

ACC

UM

ULA

TOR

ARE

SAV

ED

.

04

.00

. M

OD

IFIC

AT

ION

S TO

TH

E M

ON

ITO

R.

04

.01

. M

EMOR

Y S

IZE

.

THE

eoeo

M

ON

ITO

R W

ILL

RUN

IN

ANY

COM

PUTE

R W

ITH

1~

OR

MOR

E O

F M

EMO

RY.

THE

AD

DR

ESS

INPU

T R

OU

lIN

E.

HO

WEV

ER,

CO

MPA

RES

U

SER

­EN

TER

ED

AD

DR

ESSE

S W

ITH

A

CO

NST

AN

T TO

D

ETER

MIN

E IF

TH

EY

ARE

WIT

HIN

E

XIS

TIN

G

MEM

ORY

. T

HIS

C

ON

STA

NT

rs

LAB

ELLE

D

MTO

PH

AND

IT

RE

SID

ES

AT

LOC

ATI

ON

0

02

,37

7.

THE

VA

LUF

OF

TH

IS

RYTE

SH

OU

LD

EQU

AL

THE

NU

MBE

R O

F TH

E H

IGH

EST

PA

GE

IN

MEM

ORY

. PA

GES

A

RE

256-

RY

TE

C

UN

TIG

lJO

US

SEG

MEN

TS

OF

MEM

ORY

AND

ARE

NU

MRE

RED

R

EGtN

NTN

G

WIT

H

0 FO

R TH

E PA

GE

WH

ICH

B

EG

INS

AT

THE

LOW

EST

POSS

IBL

E

MEM

ORY

LO

C,T

ION

. SO

IF

YO

U HA

VE

IK

OF

MEM

ORY

YOU

HA

VE

4 PA

GE

S,

THE

HIG

HES

T 3E

ING

PA

GE

00

3.

FOR

4K

OF

MEM

ORY

THE

HIG

HE

ST

IS

PAG

E 01

7 (O

CT

AL

),

FOR

8K

IT

IS

03

7,

FOR

12K

IT

IS

05

7 AN

D so

O

N.

MAK

E SU

RE

THE

VA

LUE

OF

THE

~YTE

AT

MTO

PH

rs

CO

RR

ECT

FOR

THE

AMOU

NT

OF

MEM

ORY

YOU

HA

VE.

04

.02

. IN

PUT

-OU

TPU

T,

IF

YOIJR

H

ARD

WA

RE

CO

NFI

GU

RA

TIO

N

DO

ESN

'T

CON

FORM

TO

TH

E M

ITS

SID

RO

ARD

R

EV

. 1

SP

EC

IFIC

AT

ION

S,

AND

YOU

NEE

D

TO

MO

DIF

Y

THE

MO

NIT

OR

, TH

ERE

ARE

FOU

R A

REA

S TO

C

ON

SID

ER

: SU

BR

OU

TIN

ES

PT

JNP

, IN

CH

4~

!0

nUT

CH

, AN

D TH

E BO

OT

LOA

DER

. A

SID

E

FROM

TH

E BO

OT

LOA

DER

AN

D PT

INP

~HICH

on

TH

EIR

OW

N IN

PU

T,

ALL

O

THER

R

OU

TIN

ES

THA

T N

EED

I/

O us~

INC

H

ANO

DU

TCH

. EX

ACT

LY

WHA

T CH

AN

GES

AR

E N

EED

ED

DEP

END

S ON

W

HAT

AD

DR

ESS

POR

TS

YOU

WIS

H

TO

USE

, PO

LAR

ITY

OF

TH

E ST

ATU

S R

ITS

AND

WH

ICH

ST

ATU

S B

ITS

YOU

WIS

H

TO

USE

. C

ON

SULT

TH

E L

ITE

RA

TU

RE

FO

R YO

UR

SER

IAL

r-

o R

OA

RD

.

I RE

COM

MEN

D

THE

FOLL

OW

ING

PR

OC

EDU

RE

FOR

MA

KIN

G

CHA

NG

ES

TO

THE

J/O

: A

l LO

AD

TH

E R

OO

TSTR

AD

PR

OG

RAM

(L

AST

PA

GE

OF

PRO

GRA

M

SOU

RC

E L

IST

ING

) AN

D M

AKE

THE

NEC

ESSA

RY

CH

AN

GES

TO

TH

E IN

00

0 AN

D A

NI

JNST

RU

CT

ION

S.

ALS

O

PATC

H

IN

A H

LT

(16&

) IN

PL

AC

E O

F TH

E PC

HL

(35

1)

INST

RU

CT

ION

. B

J SI

NG

LE

ST

EP

THRO

UG

H

THE

LOA

DER

TO

M

AKE

SUR

E IT

W

ILL

WOR

K C

nRR

EC

TL

Y.

CJ

LOA

D

THE

MO

NIT

DR

I W

HEN

FIN

ISH

ED

TH

E CP

U

SHO

ULD

H

AL

T.

D)

PATC

H

IN

THE

REQ

UIR

ED

CHA

NG

ES

Tn

THE

MO

NIT

OR

IN

SUB

RO

UTI

NES

P

TIN

P,

INC

H

AND

DU

TCH

. E

) ST

AR

T AT

LO

CA

TIO

N

00

0,0

00

AN

D SI

NG

LE

ST

EP

TO

MAK

E SU

RE

THE

I/0

W

ILL

WOR

K C

OR

REC

TLY

. F

l R

E•S

TA

RT

AT

0

00

,00

0

AND

SWIT

CH

TO

R

UN

. TH

E M

ON

ITO

R

SHO

ULD

EN

TER

CO

MM

AND

MOD

E AN

D TY

PE

A Q

UES

TIO

N

MAR

K (?

).

o5

.00

. SO

FTW

ARE

SU

PPO

RT

.

I IN

TEN

D

TO

USE

TH

E M

ON

ITO

R FO

R FU

RTH

ER

PRO

GRA

M

DEV

ELO

PMEN

T AN

D TH

EREF

OR

E W

ILL

SlJP

POR

T

IT

FOR

A R

EASO

NA

BLE

PE

RIO

D

OF

TI~E

(SA

Y,

AT

LEA

ST

A Y

EAR

OR

SO

).

IF

YOU

HAVE

PR

OA

LEM

S W

ITH

IT

, I

DO

N'T

M

IND

SE

ING

C

ALL

ED

AT

HOM

E -

THE

PHO

NE

IS

(41

5)

94

1-0

49

5

•EV

EN

ING

S

BETW

EEN

7

AND

10

PM

PRE

FER

RE

D.

UN

DER

C

ON

SID

ER

AT

ION

AR

E SU

RST

AN

TIA

L

ENH

AN

CEM

ENTS

TO

TH

E M

ON

ITO

R AN

D TO

TH

E SU

3RO

UT

INE

L

IBR

AR

Y,

INC

LU

DIN

G

I/O

SU

PPO

RT

FOR

"TV

~YPEWRITER",

PAR

ALL

EL

INT

ER

FAC

E

AND

AC

RI

DEC

IMA

L A

RIT

HM

ET

IC

RO

UT

INE

S;

CH

AR

AC

TER

ST

RIN

G

MA

NIP

UL

AT

ION

! AN

D PO

SSIB

LY

A

TEX

T E

DIT

OR

. A

NO

THER

V

ERSI

ON

(1

.1)

OF

TH

IS

MO

NIT

OR

IS

A

LSO

O

PER

ATI

ON

AL

AND

RE

SID

ES

IN

HIG

H

MEM

ORY

; C

ON

SID

ER

AT

ION

IS

B

EIN

G

GIV

EN

TO

BU

RN

ING

IT

IN

TO

ROM

. V

ERSI

ON

1

.1

IS

DES

IGN

ED

TO

ENH

AN

CE

ALT

AIR

B

ASI

C

AND

ALT

AIR

M

ON

ITO

R-A

SSE

MB

LE

R-E

DIT

OR

.

Ap

ril,

1

91

6

Dr.

Do

bb

's J

ou

rnal

of

Co

mp

ute

r C

alis

then

ics

&

Ort

ho

do

nti

a,

Bo

x 3

10

, M

enlo

P

ark

C

A 9

40

25

P

age

23

Page 24: dr. dobb's journal of - cini.classiccmp.org

"tl "' "' co I\)

STM

T PG

•AD

OR

OB

JEC

T C

OD

E s

0 U

R

C:

E

S T

A T

E M

E

N T

PA

GE

-I»

1 w

808

0 SY

STEM

M

ON

ITO

R V

ERSI

ON

1

,;0

0

4•

19 ..

76

2

"' J

"' W

RIT

TE

N

BV

CH

AR

l..lE

PA

CK

4 Ill

25

47fl

Ei

..EN

A

ROAD

0

5 "'

LOS

ALT

OS

HIL

LS

, C

A,

9402

2 ~

6 PH

ON

f.I

(4

15

) 941~0495

EVEN

ING

S ..

0 7

if

0 fT

e <11

T

HIS

PR

OG

RAM

O

CC

UPI

ES

MEM

ORY

PAG

ES

000

THRO

UG

H

002

0 fT

9

"' M

EMOR

Y l..

OC

ATI

ON

S 0

00

,00

3

THRO

UG

H

00

0,0

47

AR

E U

SED

.,,·

'-

HJ

"' fD

R

THE

PRO

GRA

M

STA

CK

, 0

11

c:

"' ~

12

00

0

00

0

303

050

00

0

JMP

BEG

IN

::J ~

13

"' 0

14

000

!215

0 OR

G 05

0kl1

210

.... (")

15

00

0

050

06

i 05

0 00

0 B

EGIN

LX

I SP

B

EGIN

IN

ITIA

LIZ

E

STA

CK

PO

INT

ER

0

16

"' 3 "C

17

l!l0

11l

053

31

5

34

6

00

2

CALL

OU

TNEW

ST

AR

T A

NEW

l.I

NE

c:

18

00

111

05

6

076

07

7

MVI

A

07

7 ?

... ~ 1

9

llH30

06

0 3

15

36

2 00

2 CA

LL

OU

'fCH

D

ISPL

AY

A

7

('")

20

0C

0 0

63

3

15

3

15

r.5

02

GE T

C OM

CA

LL

INC

H

GET

CHA

RACT

ER

FROM

KE

YBOA

RD

., ;:;;·

21

(il\'1

0 06

6 37

6 0

15

C

PI

015

CARR

I A

GE

RE T

URN

7 ....

22

00

0 07

0 3

12

0

50

0

00

JZ

B

EGIN

JM

P IF

TR

UE

:;;

ID

23

0

00

0

7 3

376

040

CPI

0

40

SP

AC

E 7

::J

n 24

0

00

0

75

3

32

0

63

00

0 JC

G

ETCO

M

JMP

IF

TRU

E "' RO

2

5

000

10

0

31

5

36

2

i:llil

2 CA

LL

OUT

CH

"EC

HO

" CH

ARA

CTER

0 26

0

00

1

03

3

15

11

I

000

CALL

TE

STC:

H

... 27

0

00

1

06

30

3 0

50

00

0 JM

P B

EGIN

... :;

; 2

8

Ill

0 c.

29

00

11!

111

37

6

10

5

TES

TCH

C

PI

!05

E:

EXA

MIN

E ON

E B

YTE

? 0

30

(110

0 I

! 3

31

2

I 71

V.llil

0 JZ

EX

AM

IN

JMP

IF

TRU

E ::

I .... 31

11J

l?J0

'116

3

76

1

12

C

PI

! 1

2

JsJU

MP

TO

PRO

GRA

M?

;;;·

::n

000

120

312

20

6

00

0

JZ

JUM

P TO

JM

P IF

TR

UE

DJ

33

11l0

ill

12

3

376

I I

3 C

PI

11

3

lhK

E. Y

f:lOA

RD

OCT

AL

LOA

D?

0 x 34

00

0 1

25

3

12

23

0 00

0 JZ

O

CTA

L JM

P IF

TR

UE

w

35

Q

\01'

\ 13

17'

376

11 4

C

PI

11

4

Lcl.O

AD

tH

NA

RY

?

... • o

36

011l

0 1

32

3

12

07

6 01

212

JZ

LOA

DER

JM

P IF

TR

UE

s: 37

0

00

13

ti 37

6 1

15

C

PI

11 5

M~MtMORY

DU

MP?

"' 3

8

00

0

137

31

2

366

00

1

JZ

M~MORV

JMP

IF

TRUE

:: ::J

0 3

9

01il0

!4

2

376

12

2

CPI

1

22

lh

RE

:.GIS

HR

D

UM

P?

-c

4i!

) 0

00

1

44

31

2 0

42

llH

:l1

JZ

RE:.G

DMP

JMP

IF

TRU

E "'

41

QI lil

l1J

14

7

37

6

12

3

CPI

12

3 s .

. sro

RE

B

INA

RY

? ~ .,,. (")

42

0

kl 0

1 51

3

12

17

6 rtl

02

JZ

p u f

~ c 1-i

JMP

IF

TRU

E )>

43

0

00

1

54

0

41

1

62

00

0 LX

I H

BA

DC

OM

LOAD

A

DD

RESS

OF

M

ESSA

GE

(.ti

4

4

000

15

7

30

3

331

00

2

JMP

OU

TS T

R D

ISPL

AY

ER

ROR

MSG

0 AN

O RE

TURN

TO

CO

MM

AND

MOD

E -I»

4

5

0011

l 1

62

00

6 0

40

BA

DCOM

ow

00

6114

121

LEN

GTH

OF

M

SGd

AND

SP

0 I\)

46

0

00

1

64

1

27

1

! 0

ow

12

71

10

W

ANO

H

(J

I

47

00

0

16

6

111l 1

1

24

ow

1

01

12

4

A A

ND

T

48

0

00

1

70

0

77

D

B 07

7 7

49

Iii

50

"'

RO

UTI

NE

TO

EXA

MIN

E ON

E B

VT

E

51

"' )::

. 5

2

00

0

P' 1

3

15

1

45

0

01

EX

AM

IN

01..1

.. A

DD

RlN

G

ET

AD

DRE

SS

IN H~L

'l:J

53

0

00

1"

4 J1

5

34

5

00

1

CAl..L

W

A lT

PR

ESS

CR

TO

CO

NTI

NU

E .... ..,':

::.:.

54

0

00

1

77

3

15

3

60

01

1l2

CAl..L

OU

TSP

SK

IP

ONE

SPA

CE

ON

OU

TPU

T D

EVIC

E .... (0

" 0)

Page 25: dr. dobb's journal of - cini.classiccmp.org

ho

1J ..,

STM

T PG

., A

DOR

OB

JEC

T CO

DE

s 0

u R

C E

S

T A

T E

M E

N T

'•

.- .... <.o

55

0

00

2

02

P

'6

MOV

AM

M

OVE

BYTE

TO

AC

CUM

Ul.A

TOR

'8

0)

56

00

0

20

3

30

3

10

0

li:llil

1 JM

P O

UTJ

D

ISPL

AY

3

OCT

Ai.

DIG

ITS

AND

57

.. RE

TURN

TO

CO

MM

AND

MOD

E •

58

..

59

"' RO

UTI

NE

TO

GIV

E CO

NTR

OL

TO

A USER~SUPP!.IED

PROG

RAM

6i

/J

II'

0 6

1

0011

) 2~6

J15

14

5 0

01

JU

MP

TO

CALL

A

OD

RIN

GE

T A

DD

RESS

IN

RE

GS',

; H

AND

I.

~

62

00

0

211

07

2

37

6

00

2

I.DA

MBD

TH

MAK

E SU

RE

AD

DRE

SS

IS

NOT

0 6

3

00

0

21

4

075

OCR

A

WIT

HIN

M

ON

ITO

R A

REA

i 0

6.:1

li'H

'J0

21

5

274

CMP

H

er

65

0'

31i'l

21

6

32

2

27

3

00

2

JNC

VMON

er

.,,· 66

00

1il

221

315

34

5

00

1

CALL

W

AIT

USE

R PR

ESSE

S CR

TO

CO

NTI

NU

E '-

67

0

00

22

4 3

15

3

46

0

02

CA

LL

OUTN

EW

STA

RT

A N

EW

LIN

E ON

O

UTP

UT

DEV

ICE

0 c: 6

8

00

0

227

35

1

PCH

I. GO

TO

U

SER

PROG

RAM

... :J

~

69

..

0 712

1 •

KEYB

OARD

O

CTA

i. LO

ADER

RO

UTI

NE

.... 71

"'

(")

72

11

100

23

0

31

5

14

5

01i'l

1 OC

T .O.

L C

AL

L

AD

DH

!N

GET

Bt::

G!N

NIN

G

AD

DRE

SS

0 3 73

..

"tl

74

012112

1 2

33

0

72

37

6 0

02

O

C H

J10

LD

A M

BOTH

M

AKE

SURE

A

DD

RESS

IS

NO

T c: ....

75

12

100

2315

0

75

OC

H A

W

ITH

IN

MO

NIT

OR

ARE

A!

~ (")

76

0

00

23

7 27

4 C

MP

H

"' n

0111

0 24

121

32

2

273

0121

2 JN

C VM

ON

78

;.

::r

79

00

0

24

3

001

0121

0 00

2 O

CT1

2120

LX

I B

12

1000

02

C,,1

2100

9 B

,.012

!2

CD

:J

8121

00

0

246

1212

1 0

00

l:

l00

LX

I

D

0012

1000

E"ill0~1Dm000

~ 81

00

12!

251

31

5

31

5

00

2

OC

T03

0 CA

LL

INCH

QO

82

13

00

25

4

37

6

0 IH

l C

PI

1216

0 <

121

7 0

SJ

00

0

25

6

332

347

r.rnra

JC

OC

T10

0 JM

P IF

TR

UE

~

84

01

2112

! 26

1 3

76

0

70

C

PI

11l7

0 I>

7

? ..

+

::r

0 8

5

0121

0 2

63

32

2 .3

47

0012

1 JN

C OC

T H

JriJ

JMP

If

TRUE

a.

8

6

26

6

MOV

CB

0 01

illll

1 I

0 :J

87

11

l011l

26

7

1211

5 OC

R c

... o;·

88

lll

llllll

2

70

0

I 5

OCR

c FI

RS

T D

IGIT

? IJJ

8

9

!lllz

ril

27 i

30

2

3 Ql

1

01i'l0

JN

Z O

CT

040

JMP

IF

NOT

0 91

1J 0

00

2

74

3

76

11

l64

CPI

06

4 >

3?

>< (,

J

91

(ll(b[~

27

6

32

2

25

1

00

0

JNC

oc n

:rn

· JM

P ff

TR

UE;

IN

VA

LID

CHM·~.

_,

92

11l01

1l 3

e! 1

31

5

36

2

00

2

OC

T04

0 CA

LL

DUTC

H "E

CH

O"

THE

CHA

RACT

ER

-° 9

3

0i:l0

31

114

34

6

00

7

AN

l 0

07

ZE

RO

1.EF

TMO

ST

5 B

ITS

$;

94

0

00

3

06

1

10

MO

V CB

CD

:J

9

5

00

0

307

01

5

DCR

c

THIR

D

DIG

!T?

0 9

6

00

0

31'!1

3

72

:n

s llll

1l0

JM

oc: r

n6

0

JMP

IF

TRUE

-0

97

lll

00

3

13

0

15

DC

R c

SECO

ND

D

IGIT

? '" ~

98

31

4

J72

3

22

""

00

0

00

0

JM

OC

:'l'05

flJ

JM?

IF

TRUE

("

) 9

9

00

0

JP

' 01

217

R l.C

R

OU

TE

)>

1

00

01

ilf2l

32

0

00

7

RLC

I.EFT

(!

) i !

11 l

0121

0 32

1 0

07

RL

C 3

BIT

S

.,. 0 1

02

01

210

J22

0

07

O

C1 0

5121

RL

C R

OTA

TE

i\l

(J1

10.s

0

00

3

23

liH

l7

RLC

LEFT

1

04

0

00

3

24

01

117

RLC

3 B

ITS

10

5

00

0

325

26

2

OCT

0612

1 OR

A D

!0

6

00

0

326

12

7

MQV

DA

"OR

" v;

ITH

DA

TA

BYTE

1e

J7

liHH

l 32

7 [2

105

DCR

B

DEC

REM

ENT

DIG

IT

COU

NTE

R -0

1

lil8

0

00

3

30

3

62

2

5!

1211

2!0

JP

OC

Ti/J

30

JMP

I~

NOT

LAST

D

IGIT

"' "' "' N

(J

1

Page 26: dr. dobb's journal of - cini.classiccmp.org

,, .. I.Cl

STM

T PG

•AD

DR

O

BJE

CT

CD

COOE

s

0 u

R C

E

S T

A T

E H

E N

T

N a>

10

9

000

333

162

HOV

MD

MOV

E BY

TE

TO

MEM

ORY

110

000

334

04

3

1 N

X

H

INCR

EMEN

T M

EMOR

Y PO

INTE

R

111

000

Jj~

072

37

7

00

2

LOA

MTO

PH

112

000

340

274

CMP

H

STIL

L

INSI

DE

E

XIS

TIN

G

MEM

ORY?

c

11 J

0

00

34

1 33

2 26

3 00

1 JC

AD

>MEM

RE

TURN

TO

CO

HMAN

O M

ODE

IF

NOT

... 11

4 0

00

34

4 30

3 24

3 0

00

JM

P O

CT

020

c 11

5 00

0 3.

47

376

015

OC

T10

0 C

PI

015

CA

RR

IAG

E R

ETU

RN

? 0

116

000

351

312

376

000

JZ

OC

T11

0 JM

P ff

TR

UE

CT

CT

117

00

0

354

376

040

CPI

04

0 SP

AC

E?

,,,· 1

18

00

121

356

312

004

001

JZ

OC

T12

0 JM

P IF

TR

UE

'- 0 11

9 0

00

36

1 37

6 ,1

37

CPI

13

7 BA

CI<

ARRO

W?

c ... 12

0 0~

H'J

363

312

012

001

JZ

OC

T15

0 JM

P IF

TR

UE

:I ~

121

00

0

366

376

100

CPI

10

0 n

0 12

2 21

00

370

302

251

00

0

JNZ

OC

T03

0 JM

P IF

NO

T •

INV

ALI

D

CHA

RACT

ER

.... 12

3 00

0 37

3 30

3 36

2 00

2 JM

P OU

T CH

JM

P IF

TR

UE

• "E

CH

O"

THE

CH

AR

• ('

) 0

124

• A

CTER

AN

D R

ETU

RN

-TO

CO

MM

AND

MOO

E 3

125

000

376

315

3~6

002

OC

T11

0 CA

LL

OUT

NEW

ST

ART

A

NEW

L

INE

ON

O

UTP

UT

DEV

ICE

"C c

126

001

001

303

251

000

JMP

OCT

03ii:

l ... ~

127

001

004

315

362

002

OC

T12

0 CA

LL

OUT

CH

"EC

HO

'' TH

E CH

ARA

CTER

('

) 12

8 00

1 0

07

30

3 25

1 00

0 JM

P O

CT

030

.. 12

9 00

1 01

2 31

5 36

2 id

02

OC

T15

0 CA

LL

OU

TCH

·

"EC

HO

" TH

E CH

ARA

CTER

;;;

· 13

0 00

1 01

5 11

0 M

OV

CB

... :I"

tJ 1

00

1 01

6 01

5 OC

H C

TH

IRD

O

CTA

L D

IGIT

? CD

:I

13

2 00

1 01

7 37

2 03

2 00

1 JM

O

CT

160

JMP

IF

TRU

E ('j

' ,,, 13

3 00

1 02

2 01

5 OC

R c

SECO

ND

O

CTA

L D

IGIT

? l(O

13

4 00

1 0

2J

372

243

000

JM

OC

T02

0 JM

P IF

TR

UE

• ST

AR

T T

HIS

BY

TE

• 0

135

* O

VER

A

GA

IN,

... ... 13

6 00

1 02

6 05

3 DC

X H

GO

BA

CK

AND

RE•

OO

PR

EVIO

US

BY

TE-

:I"

0 13

7 00

1 02

7 30

3 23

3 00

0 JM

P O

CT

010

a.

0 13

8 00

1 03

2 00

4 O

CT

160

INR

B

GO

BA

CK

TO

FIR

ST

DIG

IT

:I

139

0211

03

3 17

2 M

OV

AD

:! . ..

14 21

00

1 03

4 34

6 30

0 A

NI

300

ZERO

OU

T SE

CON

D

OCT

Ai.

DIG

IT

ttl

141

0 0

1 03

6 12

7 M

OV

DA

0 14

2 00

1 03

7 30

3 25

1 00

0 JM

P O

CT

030

x w

143

• ....

144

• R

EGIS

TER

DU

MP

RO

UTI

NE

.o s:

145

• CD

14

6 •

TH

IS

SUB

RO

UTI

NE

MAY

BE

CA

LLED

FR

OM

A U

SER

PROGRAM~

:I

147

• 0 ,,

148

001

042

345

REG

DM

P PU

SH

H

PUSH

A

LL

RE

GIS

TE

RS

ON

THE

STA

CK

.. 14

9 00

1 04

3 32

5 PU

SH

D

... .,,..

150

001

044

305

PUSH

B

('

) 15

1 00

1 04

5 36

5 PU

SH

A

)>

152

001

046

041

000

000

LXI

H

0000

00

tP

153

001

051

1117

1 DA

O SP

ST

ACK

PO

INTE

R

HAS

AOOR

OF

FI

RST

R

EG,

""' 0 15

4 00

1 05

2 0

M

007

MVI

B

00

7 CO

UN

TER

DEC

REM

ENTS

FR

OM

007

TO

000

N

U1

155

001

054

315

346

002

CALL

OU

T NE

W

STA

RT

A N

EW

1.lN

E

ON

OU

TPU

T D

EVIC

E 15

6 00

1 05

7 31

5 36

0 00

2 RE

GDM

Q CA

LL

OU T

SP

SKIP

ON

E SP

AC

E ON

O

UTP

UT

DEV

ICE

157

01H

05

2 17

6 M

DV

AM

158

001

063

315

100

001

CALL

O

UT3

D

ISPL

AY

3

OCT

AL

DIG

ITS

CONE

B

YTE

) 15

9 00

1 06

6 04

3 lN

X

H

POIN

T TO

N

EXT

BYTE

}:

. 16

0 00

1 06

7 00

5 OC

R B

D

ECRE

MEN

T CO

UN

TER

'I:>

t61

001

070

362

057

001

JP

REGD

MQ

LOO

P BA

CK

IF

NOT

ZERO

~.

,-16

2 00

1 07

3 36

1 PO

P A

R

ESTO

RE

41.L

R

EG

IST

ER

S .....

IQ

....,

0

)

Page 27: dr. dobb's journal of - cini.classiccmp.org

h 'ti ::!.

STM

T PG

.. AO

OR

OB

JEC

T CO

DE

s 0

u R

C E

S

T A

T E

M E

N T

,- ....

!63

0

01

0

7 4

:rn

1

POP

8 co

" 1

64

0

0!

07

5

32

1

POP

D

0)

16

5

00

1

07

6

34

1

POP

H

!66

0

01

0

n

311

RU

t6

7

"' !6

8

• R

OU

TIN

E TO

O

UTP

UT

J O

CTA

L D

IGIT

S (1

BY

TE

OF

MEM

ORY)

1

69

TO

SVST

EM

OU

TPU

T D

EVIC

E0

BVTE

TO

BE

O

UTP

UTT

ED

IS

IN

RtG

. &.

• C

l P

'il

• ~

Pl

.. TH

IS

SUB

RO

UTI

NE

MAY

BE

CA

LLED

FR

OM

A U

SER

PROGRAM~

0 1

72

0

w

0-

173

QJ l1

J 1

10

0

30

5

OU

TJ

PUSH

B

PU

SH

REG

S.

B A

ND

C O

N TH

E S

UC

K

0- ,,,·

P'4

0

01

10

1 3

25

PU

SH

D

PUSH

RE

GS

0 D

AND

E

ON

'i'HE

STA

CK

c..

.. 17

5 0

01

1

i;,2

00

6

0t:

l2

MVI

8

00

2

OCT

AL

DIG

IT

COU

NTE

R 0 c:

1

76

0

01

H

H

127

MDV

DA

SA

VE

BYTE

TD

BE

O

UTP

UTT

ED

~

::l

17

7

GliJ

1 1

05

1

72

O

UTJ

A

MDV

AD

LO

AD

BYTE

IN

ACCUM~

~

0 !7

6

e0

1

106

1 i

0 M

OV

CB

.... p

g

001

1i1J

7 0

15

OC

R C

TH

IRD

O

CTA

L D

IGIT

? ("

) 18

0

001

11 0

3

72

1

27

0

01

JM

O

UT3

C JM

P IF

TR

UE

0 3 1

s1

00

! 11

J

015

DCR

c SE

CON

D

OCT

AL

DIG

IT?

" !8

2

00

1

114

J72

12

4 0

01

JM

O

UT3

8 JM

P IF

TR

UE

c: ....

18

3

00

1

IP

34

6

300

AN?

30

0

ZERO

AL

L B

ITS

THAT

DO

NO

T "' ~

18

4

APP

LY

TO

FIR

ST

(LEP

TMO

ST)

;,

(")

i85

O

CTA

L D

IGIT

• "'

.. iii

' j8

6

001

1 2

1 lil

Ii'

RRC

SHIF

T

..+

::T

!87

01

111

122

01

7

RRC

RIG

HT

CD

::l

j88

0

01

12

3

01

7

RRC

3 B

ITS

..,

1fl9

0

01

12

4 0

17

o

un

i;

RRC

SHIF

T

"' !20

19

0

001

125

017

RRC

RIG

HT

0 1

9 i

00

! 1

26

0

i7

RRC

3 B

ITS

...

19

2

00

1

12

7

34

6

0G7

OU

T3C

AN

I 0

07

ZE

RO

OUT

UN

NEE

DED

B

ITS

..+

::T

1

93

01

2l i

131

36

6

060

ORI

0

60

CONV~RT

DIG

IT

TO

ASC

II

0 a.

19

4

001

13

3

31

5

36

2

00

2

CALL

DU

TCH

OU

TPU

T TH

E D

IGIT

0 ::

l 1

95

0

01

1

36

01

115

DCR

8 D

ECRE

MEN

T D

IGIT

CO

UN

TER

... Qi'

!96

01

111

137

36

2

111! 5

0

01

JP

O

UT3

.li

JMP

IF

NOT

ALL

J D

IGIT

S to

19

7 "'

HAVE

BE

EN

OU

TPU

TTED

Y

ETe

0 !9

8

012!

1 1

42

32

1 PO

P D

RE

STO

RE

REG

S.

D A

ND

E

x w

t99

00

1 1

43

30

1 PO

P B

R

ESTO

RE

RE

GS,

B

ANO

C

....

212112

1 0

01

1

44

31

1 RE

T RE

TURN

TO

CA

LLER

.0

21

2li

"' $:

2

02

w

RO

UTI

NE.

TO

O

BTA

IN

A 6~DIGIT

SPL

IT

DC

:Hl.

AD

DRE

SS

CD

::l

203

,. FR

OM

THE

SYST

EM

KEY

BOA

RD

0 2

04

"'

.,, 2

05

01

211

14

5

3121

5 A

DD

RIN

PU

SH

8 PU

SH

RE.G

S.

8 AN

D C

ON

THE

STA

CK

"" ~ ;:

-2

06

em

1

14

6

00

1

00 i

002

l.X I

B

00

1012

12

Cc0

01,B

:ii0

02

(")

201'

i1J

ei i

15

1

3121

5 A

DLU

Pi

PUSH

B

}>

2

06

1i'1

0 !

15

2

04

6

1210

0 M

VI

H

001t

'i GE

T LO

W

ADDR

FI

RST

IN

REG~

H A

ND

c.g

20

9

.. TH

EN

TRA

NSF

ER

TO

REG

. L

·• ""' 0

210

0121

1 !5

4

31

5

Ji5

0

02

A

DLU

P2

CALL

IN

CH

N

tl1

21

1

1i'10

! 1

57

37

6 112

1111

CPI

1

00

ill

RETU

RNS

TO

COM

MAN

D M

OOE

21

2

CH

l! Ii

i 1

3!2

31

213

01H

JZ

A

DQ

UIT

21

3 0

tH

16

4

37

6

0612

1 C

PI

0612

1 LE

SS

TH/l.N

0?

2

14

01

1l 1

16

6

332

15

4

00

1

JC

AD

L.U

P2

JMP

IF

TRU

E;

INV

ALI

D

CHA

RACT

ER

21

5

00

! P

1

37

6

07

0

CPI

em~

GRE

ATE

R TH

AN

71

" 2

16

0

0!

P.5

3

22

1

54

11

101

JNC

AD

LUP2

Jf'

1P

IF"

TRU

E;

INV

ALI

D

CH

AR

AC

TE

R

'" "' co N

'-.!

Page 28: dr. dobb's journal of - cini.classiccmp.org

"'<!

S Tf"

1 T

PG.,A

OD

R O

BJE

CT

CODE

s

0 u

R C

E

S T

A T

E M

E N

T

Ol "" (I)

21

7

t'HH

P

'6

11

0

MO

V

CB

1\.1

21

8

00

1

1 :n

IZI 15

OC

R c

00

21

9

t'l0

1

23

0

0!5

DC

R c

FIR

ST

OCT

AL

DIG

IT?

22

0

00

! 2

0!

30

2

21

1

00

1

JNZ

A.OE

CHO

JM

P IF

NO

T 2

21

0

01

2

eJ 4

37

6

06

4

CPI

0

64

GR

EA iE

R

THAN

3?

2

22

(,'I

l7J I

20

6

32

2

15

4

00

1

JNC

AD

LUP2

JM

P IF

TR

UEi

IN

VA

L.ID

C

HA

RA

CTE

R

0 2

2J

00

1

21

1

31

0

36

2

00

2

AD

EC:H

O

CALL

OU

T CH

"E

CH

O"

THE

DIG

IT

~

22

4

liH'li

2

14

3

46

0

07

A

NI

11lli:l

i' ZE

RO

OUT

LEFT

MO

ST

5 El

ITS

0

22

5

00

1

21

6

I I 0

M

OV

CB

0 2

26

(/)

llJ l

21

7

1211

5 DC

R c

THIR

D

OCT

AL

DIG

IT?

0-

0-

22

7

00

1

22

0

37

2

23

5

00

1

JM

A DO

R AH

JM

P IF

TR

UE

,,;

22

8

00

1

22

3

01

5

OCR

c SE

CON

D

OCT

AL

DIG

IT?

<..

0 ~29

11J0

1 22

4 37

2 23

2 {ij

i?l 1

JM

A

DRO

T3

JMP

IF

TRUE

: c

23

0

0 iZJ

1 2

27

0

07

RL

C RO

TA T

E ~

::I !':.

23

! i7l

0 !

23

0

00

7

Rl.C

LE

FT

0

23

2

1210

1 23

1 121

1217

Rl.C

3

BU

S

.... 2

33

0

0!

23

2

00

7

AD

ROTJ

RL

C R

OT

AT

E

(')

0 2

34

0

01

2

33

00

7 RL

C LE

FT

3 2

35

12

101

23

4

121121

7 RL

C 3

BIT

S

'lJ c:

23

6

1210

i 2

35

2

64

AD

ORAH

OR

A H

"O

R"

WIT

H

... 2

37

0

l'li

23

6

147

MOV

HA

A

DD

RESS

REG~

~ (')

23

8

t!H'.11

2

37

0

05

DC

R B

D

ECRE

MEN

T D

IGIT

CO

UN

TER

"' 2

39

0

01

2

40

3

62

1

54

0

!i:l 1

JP

AD

LUP2

JM

P !f

NOT

LAST

D

IGIT

iii

' 2

40

0

01

2

43

30

1 PO

P B

.... :r

2

41

0

01

2

44

0

15

OC

R c

HAVE

BO

TH

HI

&

LO

AODR

0 BE

EN

EN

TER

ED

? "' ::I

24

2

0111

1 2

45

3

72

2

54

0

01

JM

A

DH

-ST

JMP

IF

TRUE

... "'

20

0

01

25

1?.l

!54

M

OV

l..H

MOV

E TO

LO

W

AD

DRE

SS

REG

ISTE

R

i20

24

4

0 ill

! 2

51

3

03

H

i!

121 ill

I

J~P

AD

LUPi

0

24

5

l?!0

l 2

54

0

72

3

71

0

02

AD

TE S

T LO

A M

TOPH

...

24

6

11l 12

11

25

7

27

4

CMP

N

IS

AODR

W

ITH

IN

EX

IST

ING

M

EMOR

V?

.... :;;"

0

24

7

00

i 26

11!

32

2

311

00

1

JNC

ADEX

Ir

JMP

!F

TRU

E 0.

. 0

24

6

li'l0

i 2

63

li'J

41

27

4

1210

1 AD

>MEM

LX

I H

A

DM

SGi

LOAD

A

DD

RESS

OF

ER

ROR

MES

SAG

E "'

2i:

g

0121

1 2

66

3

15

3

31

0

02

CA

LL

OU

TS T

R

DIS

PLA

Y

AN

ERRO

R M

ESSA

GE

... Qi'

25

0

iZi 0

1 2

71

31

213

11!5

0 01

210

JMP

BEG

IN

BACK

TO

CO

MM

AND

MOD

E OJ

2!

:) 1

0iH

27

4 "1

06

121411

! AD

MSG

1 ow

0

06

04

0

LEN

GTH

OF

MSG~

AND

S?

0 x 2

52

12

!01

27

6

07

6

1i!J.d

l1J

ow

07

60

40

>

AN

D SP

w

2

53

0

01

31

210

115

... 1

05

ow

1

15

10

5

M A

ND

E

.o

25

4

tzl0

1 31

1J2

U5

D

l:l 1

15

M

S'

25

5

'1HIJ

1 3

03

3

15

3

62

(1

1(/)2

A

DG

lUIT

CA

LI..

OU

'fCH

"E

CH

O"

THE

CHA

RACT

ER

"' 2

56

0

01

3

06

3

03

lll

50

00

0

JMP

BEG

IN

BACK

TO

CO

MM

AND

MOD

E ::I

2

57

01

2l 1

31

1

30

1

A DE

X IT

P

OP

B

RE

STO

RE:

REG

S.

B A

ND

C

0 "tl

25

8

00

1

31::!

J1

1

RET

"'

?5

9

"' A

DD

RESS

CO

MPA

RE

RO

UTI

NE

~ """

2611

1 11'

('

) 2

61

~

LOW

A

DD

RESS

VA

LUE

IS

IN

RE

GS,

D.

,.E

)>

l!)

26

2

• H

IGH

A

DD

RESS

VA

LUE

rs

IN

REG

S,

H .. L

.,.

26

3

• R

OU

TIN

E RE

TURN

S TO

CO

MM

AND

MOD

E IF

TH

E 0 1\.

1 2

64

VALU

E.

IN o~E

EXCE

EDS

THE

VALU

E IN

H~L~

O'I

26

5

• 2

66

01

111

31

3

P'2

AD

COM

P M

OV

AD

26

i'

rll 11

11

31

4

27

4

CMP

H

D:H

CO

MPA

RE

MEM

ORY

PAG

E 1$

26

8

li10

1 3

15

33

111

RC

RETU

RN

!F

OJK

d 2

69

11

101

31

6

:rn2

32

5

0111

1 JN

Z AD

L.>H

O>

H •

ERRO

R )>

, 2

70

l2J

QJ 1

32

1

1)'

3

MOV

AE

'b

2

71

01

111

32

2

27

5

CMP

L. E

:L

COM

PARE

A

DD

RESS

W

ITH

IN

PAG

E ~.

,-2

72

0

01

3

23

3

30

RC

RE

TUR

N IF

O

,K,

-2

73

0

01

3

24

3

10

RZ

RE

TURN

IF

0

,K,

co " 0)

Page 29: dr. dobb's journal of - cini.classiccmp.org

h "tJ

27

4

[1)0

1 3

25

0

41

3

36

01

211

ADLi

>H

l. X

I H

A

DM

SG2

LOAD

A

DD

RESS

OF

ER

ROR

MES

SAG

E ~.

275

\{) 01

33

121

31

5

331

fG10

2 CA

LL

OU

TS T

R D

ISPL

AY

AN

ER

ROR

MES

SAG

E ,- ....

27

6

0121

1 3

33

31

213

05

0

000

JMP

BEG

IN

BACK

TO

CO

MM

AND

MOD

E \I

) 2

77

0

01

3

36

12

106

1214

111

/\DM

SG

2 ow

11

0604

0 LE

NG

TH

OF'

MSG

, A

ND

SF

' '>

I C

l') 2

78

fil

fil t

34

0

1 I

4 11

J40

ow

11

40

40

L

AN

D SP

2

79

0

0!

34

2

07

6

121412

1 DW

0

76

04

0

>

AND

SP

28

0

00

1

34

4

11

0

DA

11

0

H

28

1

.. 2

82

~

AFT

ER

ENTE

RIN

G

THE

AD

DR

ESS;

T

HIS

R

OU

TIN

E AL

LOW

S TH

E USE~

28

3

" TO

EN

TER

CR

TO

CO

NTI

NU

E OR

Ii

TO

RE

TURN

TO

CO

MM

AND

MO

DE.

0

28

4

.,, TH

E PU

RPO

SE

OF'

TH

IS

!S

TO

ALLO

W

THE

USE

R YO

V

ERIF

Y

THE

.... a 2

85

.,,

AD

DR

ESSC

ES)

HE

HA

S

TYPE

D

IN I

BE

FO

RE

TH

E S

PE

CIF

IED

O~ERATION

0 2

86

"

BE

GIN

S,

er

28

7

er

.. ,,,·

28

8

00

1

34

5

315

315

00

2

WA

IT

CALL

IN

CH

GET

CH

ARA

CTER

FR

OM

KEY

BOA

RD

'-2

89

0

0!

35

0

37

6

01

5

CPI

0

15

C

AR

fdA

GE

RET

UR

N?

0 c: 2

90

0

01

3

52

3

10

RZ

RE

TUF

HJ

IF

TRU

E ~ "

29

1

00

1

35

3

37

6

10

0

CPI

!0

0

,, 'i

~

0 2

92

0

01

3

55

30

2 3

45

0

01

JN

Z \.I

A IT

LO

OP

IF

NOT

.... 2

93

0

01

:!

60

3

15

3

62

0

02

C

Al.I.

. OU

T CH

"E

CH

O"

THE

CHA

RACT

ER

AND

(")

29

4

00

1

36

3

30

3

05

0

00

0

JMP

BEG

IN

GO

BACK

TO

CO

MM

AND

MOD

E 0 3

29

5

" "C

l 2

96

..

Mf.M

ORY

DUM

P c: ..+

"' 2

97

..

~

29

8

0f/J

1 3

66

3

15

1

45

0!1

.11

MEM

ORY

CALL

A

DD

RIN

("

) Q

l 2

99

0

0!

37

1

35

3

XCHG

G

ET

I.OW

A

DD

RESS

RA

NGE

IN

OmE

iii'

300

00

1

37

2

31

5

14

5

ilHH

CA

LL

AD

DRI

N

GET

H

IGH

A

DD

RESS

R

AN

GE

IN

H~

t..

.... :r

311!

1 12

1111

1 3

75

J1

5

31 J

11

llil1

CALL

AD

COM

P CH

ECK

O~E

NOT

> H~L

C1)

::I

30

2

00

2

00

0

:.us

34

5

11!0

1 CA

LL

WA

IT

USE

R EN

TER

S CR

TO

C

ON

TIN

UEJ

n

30

3

"' .,,

f/.O

30

4

11

Tr.E

FO

LLO

WIN

G

RO

UTI

NE

MAY

BE

CA

LLED

FR

OM

A U

SER

PRD

GRA

MJ

0 3

05

~

USE

R M

UST

LOAD

TH

E ST

AR

TIN

G

Cl.O

WC.

R)

AD

DR

ESS

IN

o .. e:

AN

D TH

E ...

311H

i .,

END

ING

C

HlG

HER

) A

DD

RES

S IN

H

•L.

DIS

PLA

Y

Or

MEM

ORY

CO

NTE

NTS

.... :r

0

3iil7

"'

PRO

CEE

DS

FROM

TH

E 6E

GIN

NJN

G

TO

THE

END

ING

A

DD

RES

SESe

IN

CL.

US

I VE•

a.

0

30

8

;,

" 31

219

00

2

00

3

3121

5 M

DUM

P PU

SH

B

PUSH

R

EGS,

B

AND

C

ON

THE

SU

CK

.....

c;;·

31

11!

vH'12

0;

J4

32

5

PUSH

D

PU

SH

REG

S,

D A

ND

E O

N TH

E S

UC

K

()J

3 I

1 0

02

llJ

llJ5

31

5

34

6

00

2

M1210

I 0

CA

LL

OUT

NEW

S

TA

RT

A

NEW

L

INE

ON

O

UTP

UT

DEV

ICE

0 x 3

12

0~2

01

0

17

2

MOV

AD

w

3

!3

00

2

~

01

I

315

!012

l 0

01

CA

LL.

OU

T3

DIS

PLA

Y

MEM

ORY

PAG

E N

O.

.0

31

4

002

01

4

07

6

05

4

MVI

A

0

54

$

315

002

01

6

31

5

36

2

002

CALL

D

UTC

H

DIS

PLA

Y

A

CO

MM

A

( , )

"' 3

16

0

0 2

02

1

173

t-<QV

AE

"

31 i'

0

02

0

22

3

15

1

00

0

0!

CALL

O

Ui3

D

I SP

LAV

MEM

ORY

AD

DRE

SS

W Ii

HIN

PA

GE

0 "'O

31

8

00

2

02

5

0 7

6

1117

2 M

VI

A

07

2

"' 3

19

0

02

0

27

3

!5

36

2 ~H

l2

CALL

D

UTC

H

DIS

PLA

Y

A C

OLO

N

( :

) ~

;<;'

32

ll

00

2

03

2

00

6

020

MVI

B

li'J

20

SET

COU

NTE

R TO

D

ISPL

AY

1(

.1

(")

32

1

.. 5Y

TE

S

CIN

O

CTA

L)

PER

l.,IN

E,

)>

32

2

00

2

'7134

3

!5

36

0

002

M12

1020

c A

LL

OU T

SP

SKIP

ON

E CH

ARA

CTER

PO

SIT

ION

ON

O

UTP

UT

OEV

IC:E

tr>

.J>

, 3

23

0

02

03

7 0

32

LD

AX

D

LOAD

M

EMOR

Y BY

TE

INTO

A

CCU

M,

0 3

24

0

02

0

•HJ

31

5

1 "1

0 0

01

CA

LL

ou

n

DIS

PLA

Y

3 O

CT&

L D

IGIT

S (O

NE

BY

TE)

N

CJ'l

32

5

cm 2

'71

4 j

17

4

MOV

AH

32

6 0

02

12l

4 4

27

2

CMP

D

COM

PARE

D

•E

WIT

H

H•L

d IF

D~E

327

00

2

04

5

33

2

07

3

00

2.

JC

MEX

IT

IS

NO

T LE

SS

THAN

Hw

L0

MEM

ORY

32

8

0f'

l2

05

0

30

2

06

3

00

2

JNZ

Mli'H

i'J.j0

DU

1'1P

IS

CO

MPL

ETE,

3

29

12

102

053

17

5

MOV

~I

. "'O

3

30

ei

n fl

54

2

7 3

CM

P E

Q

l 3

31

N

'l2

1215

5 3

32

0

73

00

2 JC

M

OIT

ca

"' N w

Page 30: dr. dobb's journal of - cini.classiccmp.org

c ... '- 0 c ., ::I .. 0 .... f20

0 ... .... :::r

0 Cl. c :I .. iii'

STM

T 3

32

3

33

3

34

3

35

3

36

33

7 33

8 3

39

3

40

3

41

3

42

3

43

3

44

3

45

3

46

3

47

3

48

3

49

3

50

3

5!

35

2

35

3

354

35

5

35

6

357

35!J

3

59

36

0 3

61

3

62

3

63

3

64

3

65

3

66

3

67

3

68

3

69

3

70

37

1 3

72

3

73

3

74

3

75

3

76

3

77

37

8 :.5

79

38

0

38

1

38

2

38

3

38

4

38

5

38

6

387

38

8

pt; .

. AOD

R 11

J02

06

0

00

2

06

3

30

2

064

00

2

06

5

00

2

0711

l i2

Hil2

0

73

0

02

0

74

01

112

07

5

11l02

11

l76

00

2

10

1

011l2

1

02

01

1l2

10

5

00

2

11

0

00

2

11

3

00

2

11

4

00

2

115

11llll

2 12

121

00

2

12

3

00

2

12

6

1210

2 12

7 00

2 1

3!

itHl2

1

33

IH

!2

13

6

00

2

14

0

002

142

tH:l2

t

45

0

02

!4

6

00

2

14 i'

00

2

15

0

1210

2 1

5J

00

2

I 54

0

02

1

!;5

0

02

16

0 0

02

!6

1

002

163

00

2

16

4

1210 2

16

"/

00

2

17

1

00

2

17

" 0

02

1

75

0(11

2 1

'76

002

20

! 00

2 20

2 lll

iil2

20

5

00

2

21

0

OBJE

CT

CODE

3

12

(2

1/'J

00

2

t'i2

3

00

5

31/J2

0

34

0

02

3

03

11

l05

00

2

32

! Jl

iH

311

31

5

14

5

011l1

3

53

31

5 14

5 01

1l1

31

5

31

3

00

! 07

2 3

76

1H

l2

075

2 i'2

3

22

27

3 00

2 3

15

3

45

0

01

J1

.5

:.Hi2

0

02

34

5

33

3

00

0

34

6

201

30

2

12

7

00

2

333

00

1

37

6

0121

0 3

12

1

27

0

02

1

67

1

72

2

74

3

32

16

1ll

00

2

11'3

2

75

3

22

1

74

12

102

05

3

33

3

00

0

0 ii

' 33

2 16

1 0

02

3

33

0

01

3

03

14

5 11

102

34

1

311

:HS

1

45

0

01

3

53

3

15

1

45

00

1 31

5 3

13

00

1 3

15

34

5 00

1

S

0 U

R C

E

JZ

S T

A

T E

M ~

N T

Ml1

J030

!N

X

D

OCR

B

JNZ

JMP

ME

XIT

PO

P D

PO

P B

R

ET

w

BIN

AR

Y

LOllD

ER

LOAD

ER

CALL

XC

HG

CALL

CA

LL

I.DA

DCR

A

C~P

D

JNC

CALL

CA

LL

Ml1l

l1l21

1l M

12J0

111l

AD

DR

IN

AD

Dkl

N

ADCO

MP

MBO

TH

VMON

W

A IT

OU

T CH

INC

REM

ENT

LOW

RA

NG

E A

DD

RES

S PO

INT

ER

D

ECRE

MEN

T CO

UN

TER

LOO

P BA

CK

~ M

ORE

SPA

CE

AV

AIL

AB

LE

ON

LIN

E

LOO

P SA

CK

TO

STA

RT

NEW

LI

NE

RES

TOR

E D

AND

E

R

ESTO

RE

B A

ND

C

GET

LOW

A

DD

RESS

RA

NG

E IN

REGS~

D•E

G

ET

HIG

H

AD

DR

ESS

RANG

E IN

R

EGS,

H

•L

C~ECK

D·E

NO

T >

H

•L

MAK

E SU

RE

LOW

A

DD

RESS

IS

NO

T W

ITH

IN

MO

NIT

OR

AR

EA!

USE

R PR

ESSE

S CR

TO

CO

NTI

NU

E "E

CH

O"

THE

CH

AR

AC

TER

• TH

E ~OLLOWING

PAPE

R

TAPE

IN

PUT

RO

UTI

NE

MAY

BE

CA

I.LED

FR

OM

A

t U

SER

PROGRAM~

USE

R M

UST

LOA

D

THE

STA

RT

ING

CL

OWER

J A

DD

RES

S •

IN

REG

S0

D=E

AN

D TH

E EN

DIN

G

(HIG

HE

R)

AD

DR

ESS

IN

RE

GS,

H

•Lo

• ~ATA

IS

REA

D

STA

RTI

NG

AT

TH

E H

IGH

EST

LOC

ATI

ON

AN

D W

ORK

ING

BA

CKW

ARDS

,

PTIN

P PU

SH

H

LD02

0 IN

A

NI

JlllZ

IN

C

PI

JZ

LD

030

MOV

MA

M

OV

AD

CMP

H

JC

MOV

AE

CM

P I.

JNC

LD

040

DCX

H

LD

05

0

IN

RRC

JC

IN

JMP

LDEX

IT

POP

Ii

RET

"'

01!H

'l 2

01

L

D02

0 0

01

00

0 1.

DP\

20

LD

040

LDEX

!T

000

LD

050

001

LD

0J0

PUSH

R

EG

S,

H A

ND

l ON

TH

E ST

ACK

INPU

T ST

ATU

S C

HA

NN

Ei.

DATA

A

VA

ILA

BLE

? JM

P IF

NO

T IN

PUT

DATA

CH

ANNE

L ON

LE

AD

ER?

JMP

IF

TRU

E M

OVE

BYTE

TO

M

EMOR

Y D

ETER

MIN

E IF

WE

AR

E FI

NIS

HE

D

D

I H

E B

L

DEC

REM

ENT

MEM

ORY

AD

DR

ESS

INPU

T ST

ATU

S CH

AN

NEL

D

ATA

A

VA

ILA

BL

E?

JM

P BA

CK

IF

NOT

INPU

T DA

TA

CHA

NN

EL

RES

TOR

E R

EG

S,

H A

NO

b

• R

OU

TIN

E TO

ST

OR

E B

INA

RY

ON

PA

PER

TA

PE

PUNC

H CA

LL

XCHG

CA

LL

CALL

CA

LL

AD

DRl

N

.A D

ORI

N

ADCO

MP

WA

IT

GET

LO

W

AD

DR

ESS

RAN

GE

IN

REG

S0

D A

NO

E

GET

H

IGH

A

DD

RES

S RA

NG

E IN

REGS~

H A

ND

L

CHEC

K

D•E

NO

T >

H

"L

USE

R PR

ESS

ES

CR

TO

CO

NTI

NU

E

Page 31: dr. dobb's journal of - cini.classiccmp.org

n ..

~

J89

00

2 21

3 31

5 34

6 00

2 CA

LL

OUT

NEW

ST

AR

T A

NEW

L

INE

'ON

O

UTP

UT

DEV

ICE

'1::1 ...

390

• -, ,_

391

• TH

E FO

LLO

WIN

G

PAPE

R

TAPE

O

UTP

UT

RO

UTI

NE

MAY

BE

CA

LLED

FR

OM

... 39

2 •

A U

SER

PRO

GRA

M,

USE

R M

UST

LOAD

TH

E ST

AR

TIN

G

CLO

WER

) A

DD

RESS

IQ

" 39

3 •

IN

REG

S,

D A

ND

E A

ND

THE

END

ING

(H

IGH

ER

) A

DD

RESS

IN

R

EG

S,

H A

ND

Lt

Cl)

394

• DA

TA

IS

OU

TPU

TTED

ST

AR

TIN

G

WIT

H

THE

HIG

HES

T A

DD

RESS

AN

D W

ORK

ING

39

5 •

BACK

WA

RDS,

39

6 •

397

00

2

216

305

PT O

UT

PUSH

B

SA

VE

REG

S,

B A

ND

C O

N TH

E ST

ACK

39

8 00

2 21

7 34

5 PU

SH

H

SAV

E R

EG

S,

H A

ND

L O

N TH

E ST

ACK

0

399

0"2

22

0 00

6 06

2 M

VI

B

1'!62

PU

NCH

OU

T S

INC

HES

OF

LE

AD

ER

(NU

LL

S)

... 40

0 00

2 22

2 07

6 00

0 MV

I

A

000

0 40

1 02

12

224

315

362

00

2

PCH

020

CALL

OU

T CH

0

40

2

01'12

22

7 00

5 OC

R B

CT

CT

4;>

13

00

2

230

302

224

002

JNZ

PCH

020

"' 40

4 c..

. •

0 40

5 00

2 23

3 17

6 PC

H03

0 M

DV

AM

PUN

CH

OUT

ALL

DA

TA

IN

USE

R•S

PEC

IFIE

D

AR

EA,

c :; 40

6 00

2 23

4 31

5 36

2 00

2 CA

LL

OUT

CH

~

407

002

237

172

MDV

AD

0

408

002

240

274

CMP

H

DcH

.....

n

409

002

241

332

251

002

JC

PCH

040

0 41

0 00

2 24

4 17

3 M

DV

AE

3 41

1 00

2 24

5 27

5 CM

P L

E

J L.

"C

c 41

2 00

2 24

6 32

2 25

5 00

2 JN

C PC

H05

0 .... ~

413

00

2

251

053

PCH

040

DCX

H

(")

414

002

252

303

233

002

JMP

PCH

030

"' 41

5 iii

' •

.... 41

6 00

2 25

5 00

6 03

6 PC

H05

0 M

VI

B

036

PUN

CH

OUT

3 IN

CH

ES

OF

TRA

IL.E

R

(NU

LL

S)

• ::r

"' 41

7 00

2 25

7 07

6 00

0 M

VI

A

000

SER

VES

TO

"E

JEC

T"

DATA

FO

R RE

MOV

AL

.FRO

H

PUN

CH

, :l

n 41

8 (11

02

261

315

362

002

PCH

060

CALL

OU

T CH

"'

419

002

264

005

OCR

B

J20

420

002

265

302

261

002

JNZ

PCH

060

0 42

1 00

2 27

0 34

1 PO

P H

R

ESTO

RE

REG

S;

H A

ND

L. ... ....

422

002

271

301

POP

B

RES

TOR

E R

EG

S.

B A

NO

c ::r

0

423

002

272

311

RET

0..

0 42

4 :l

.... 42

5 •

RO

UTI

NE

TO

PRIN

T AN

ER

ROR

MES

SAG

E IF

AN

iii

' 42

6 •

OPE

RA

TIO

N

TR

IES

TO

VIO

LATE

TH

E M

ON

ITO

R AR

EAw

cc

427

• 0 x

428

002

273

315

346

002

VMON

CA

LL.

OUT

NEW

ST

AR

T NE

W

LIN

E ON

O

UTP

UT

DEV

ICE

w

429

002

276

041

307

002

LX I

H

V

MSG

J A

DD

RESS

OF

M

ESSA

GE

... ,o

430

002

301

315

331

002

CALL

O

UTS

TR

DIS

PLA

Y

THE

ERRO

R M

ESSA

GE

:s: 43

1 00

2 30

4 30

3 0

50

00

0 JM

P B

EGIN

AA

CK

TO

COM

MAN

D M

ODE

"' 43

2 00

2 30

7 00

5 12

6 V

MSG

3 ow

01

1512

6 LE

NG

TH

OF

MSG

; AN

D V

:l

0 43

3 00

2 31

1 04

0 11

5 ow

04

0115

SP

AN

D M

"D

43

4 00

2 31

3 11

7 11

6 ow

11

7116

0

AND

N

"' 43

5 ...

.. ;;

-43

6 ;,

KEY

BOA

RD

INPU

T R

OU

TIN

E •

MAY

BE

CA

LLED

FR

OM

A U

SER

PROG

RAM

("

) )>

43

7 •

C.D

438

002

310

333

000

INC

H

IN

000

INPU

T ST

ATU

S CH

AN

NEL

.,..

439

002

317

346

201

AN

I 20

1 IS

DA

TA

AV

AIL

AB

LE?

0 N

440

002

321

302

3\5

00

2 JN

Z IN

CH

JM?

IF

NOT

U1

44l

002

324

333

001

IN

001

INPU

T DA

TA

CHA

NN

EL

442

002

326

346

177

AN

! 17

7 ZE

RO

OUT

PAR

ITY

B

IT

443

002

330

311

RET

444

• 44

5 •

OU

TPU

T R

OU

TIN

ES

MAY

BE

CA

LLED

FR

OM

A U

SER

PROG

RAM

"D

44

6 •

"' cc "' w ...

Page 32: dr. dobb's journal of - cini.classiccmp.org

"ti "' tC 0

) w

N

0 ... (")

0 3 "O

c:

(")

Ql

V> .... ::;

CD

:::

n Cll "" 0 ~ ... ::;

0 0..

0 ::: .... "'

STM

T 4

47

4

48

4

49

4

50

C1

'-l2

331

40

1

00

2

33

2

45

2

02

2

33

3

45

3

1210

2 3

34

<!

54

00

2

33

5

45

5

00

2

34

0

45

6

1210

2 34

1 4

57

0

02

3

44

4

56

0

02

3

45

4

59

4

60

01

212

34

6

46

1

00

2

35

0

462

00

2

35

3

46

3

00

2

35

5

46

4

00

2

36

0

465

1210

2 36

2 4

66

0

02

3

63

4

67

0

02

3

65

.a

68

00

2

36

7

46

9

00

2

37

2

47

0

00

2

37

3

471

00

2

37!:>

4

72

47

3

00

2

37

6

47

4

00

2

3"17

4

75

4

76

4

77

4

78

4

79

4

80

0

03

3

20

48

1 0

03

3

20

4

82

r/!

03

32

3

48

3

1210

3 3

25

4

84

11

J03

32

7

48

5

00

3

33

2

48

6

00

3

33

4

48

7

1210

3 3

36

4

88

0i

lJ3

34

1

48

9

00

3

34

2

49

0

00

3

34

3

491

liHl3

3

45

4

92

0

03

3

46

4

93

0

03

35

! 4

94

01

213

35

2

49

5

00

3

35

5

49

6

00

3

35

6

49

7

1210

3 3

60

4

98

0

03

3

62

4

99

0

03

3

65

51

1J0

00

J 3

67

OB

JEC

T CO

DE

3Vl5

1

06

0

43

17

6 31

5 3

62

0

02

0

05

3

02

3

33

0

02

31

111

311

1"!7

6 0

15

3

15

3

62

0

02

12

176

01

2

30

3 3~2

li:li1l

2 0

76

0

40

3

65

33

3 0

00

3

46

2

00

30

2 3

63

01

1J2

361

32

3

00

1

31

1

04

i M

H!'J

1:'0

3 3

33

0V

l0

34

6

20

! 3

02

3

23

0

03

3

33

11

101

37

6

00

0

31

2

32

3

00

3

05

3

i67

0

76

01

110

27

5

33

2

35

6

00

3

27

4

33

2

35

6

00

3

35

! 3

33

0

00

3

40

0

0 !

3121

2 3

56

0

03

33

3 00

! 3

03

3

41

0

03

S 0

U

R

C

E

S T

A T

E M

E N

T

* O

UTS

iR

OU

TPU

TS

A C

HA

RACT

ER

STR

ING

UP

TO

25

5 BY

TES

IN

LEN

GTH

" :

STR

ING

TO

BE

O

UTP

UTT

ED

MUS

T BE

PR

ECEE

DED

BV

A

DN

E•B

VTE

LE

NG

fH

FIE

LD

.

OU

TSTR

PU

SH

B

MDV

8M

O

UTS

TS

INX

H

M

OV

AM

CALL

D

UTC

H

OCR

B

JNZ

OU

TSTS

PO

P B

RE

T

OUTN

EW

MVI

A

CA

LL

MVI

A

CUT

SP

OU

TCH

CU

TLU

P

"'

JMP

MVI

A

PU

SH

A

IN

AN

! JN

Z P

OP

A

OU

T R

ET

MBO

TH

DB

MTO

PH

D

B

11l 1

5

OUT

CH

01

2

OUTC

H 0

40

00

0

2121

0 O

UTl

..UP

00

3

03

7

PUSH

B

AND

C

ON

THE

STA

CK

LEN

GTH

F

ieL

D

TO

COU

NTE

R PO

INT

TO

NEXT

CH

ARA

CTER

N

EXT

CHA

RACT

ER

TO

ACC

UM

. O

UTP

UT

THE

CHA

RACT

ER

DEC

REM

ENT

THE

COU

NTE

R LO

OP

BACK

IF

NO

T FI

NIS

HE

D

RES

TOR

E B

AND

C

STA

RTS

A

NEW

L

INE

ON

O

UTP

UT

DEV

ICE

SKIP

S ON

E CH

ARAC

TER

POSI

TIO

N

ON

OU

TPU

T D

EVIC

E

INPU

T ST

ATU

S CH

AN

NEL

R

EAD

't'?

JMP

IF

NOT

OU

TPU

T DA

TA

CHA

NN

EL

LOW

EST

MEM

ORY

PAG

E A

VA

ILA

BLE

TO

U

SERe

f H

IGH

EST

MEM

ORY

PAG

E A

VA

ILA

BLE

TO

US~R;

* B

OO

TSTR

AP

LOA

DER

FO

R SY

STEM

M

ON

ITO

R V

ERSI

ON

1

.0

• (T

O

BE ~OADED

FROM

SY

STEM

CO

NTR

OL

PAN

EL

)•

• R

EQU

IRES

42

BY

TES

OF

MEM

ORY

,

ORG

LX I

H

B

LX

NP1

IN

A

NI

JNZ

IN

CPI

JZ

BL

MOV

E DC

X H

M

OV

Ml\

MVI

A

CM

P L

JC

CM

P H

JC

PC

HL.

B

LIN

P2

IN

AN

! JN

Z IN

JM

P

32

0!0

03

00

0ill1

213

00

0

20

1

BU

NP

1

12!0

1 0

00

B

Ll N

P 1

00

0

BL

INP

2

BL

INP

2

IZl0

0 0

01

B

LIN

P2

IZl0

1 BL

.MOV

E

HIG

HES

T A

DD

R.

~ 1

OF

MO

NIT

OR

INPU

T ST

ATU

S CH

AN

NEL

IS

DA

TA

AV

AIL

AB

LE?

JUM

P IF

NO

T IN

PUT

DATA

CH

AN

NEL

ON

Lf

::AD

ER7

JUM

P IF

TR

UE

DEC

R,

MEM

ORY

AD

DRE

SS

MOV

E BY

TE

TO

MEM

ORY

HAS

LOW

EST

AD

DRa

BE

EN

LOA

DED

? JU

MP

IF

NOT

JUM

P TO

M

ON

ITO

R IN

PUT

STA

TUS

CHA

NN

EL

IS

DATA

A

VA

ILA

BLE

? JU

MP

IF

NOT

INPU

T DA

TA

CHA

NN

EL

TOTA

L NU

MBE

R OF

ST

ATE

MEN

TS

m

0500

ER

ROR

STA

TEM

ENTS

~

0000

Page 33: dr. dobb's journal of - cini.classiccmp.org

DR. DOBB'S JOURNAL OF COMPUTER CALISTHENTICS AND ORTHODONTIA is published ten time per year' monthly except in July and December.

U.S. Subscriptions: For foreign subscriptions:

D $1.50 for a single copy: Vol. __ , No.__ D add $4.00 per year for surface mail, or D $3.00 for the first three issues D add $12.00 per year for air mail D $10.00 per year (10 issues/year): Begin with Vol. __ No. __

Payment must accompany the subscription. We do not invoice for subscriptions or single orders. Send to: PCC

Necessary Information: P.O. Box 310 Menlo Park, Ca. 94025

Name (last name first)----------------------------

Mailing Address ------------------------------

City ____________ State ________ Zip Code ________ _

D yes D no: This information may be published in directories and lists of individuals interested in computers in non-commercial environments.

Optional Information:

Equipment that you have or are planning on purchasing, immediately:

Make & model _____________ Manufacturer _____________ _

CPU model _____________ CPU Manufacturer __________ _

I/ODevices _____________________________ ~

Mass storage peripherals

Primary areas of interest concerning non-commercial and home computers:

Questions: What would you like to see published in DR. ooss·s JOURNAL? It will help guide us if you will rate these, 1 to 10 (1 - minimally desire; 10 - super-eager to see) or 0 (would prefer we not waste space publishing it).

___ Schematics and acticles from all of the computer club newsletters __ Short news articles directly related to home computers __ Short news articles concerning computers in general, particularly their social implications __ Indices to all articles in all other computer hobby publications __ Indices to selected articles from other computer, electronic, and trade publications __ Letters having technical, critical, or entertaining content __ Classified ads (as opposed to display advertising) __ Suggestions and "blue skying" about what can be done with home computers in the foreseeable future. ~

OVER~

April, 1976 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 Page 33

Page 34: dr. dobb's journal of - cini.classiccmp.org

Directories of:

__ Users of home computers and their equipment __ Computer clubs __ Computer stores and distributers __ Sources of used equipment __ Manufacturers of computer kits __ Microprocessor and minicomputer manufacturers

Source code listings and documentation: For which microprocessors?

--Nearly full-sized (much less can be published)

--Reduced as m recent issues (more difficult to read, but more info included in each issue)

What kind of software would you like to see developed and placed in the public domain?

Importance Rating Software Description

Place

13-cent

stamp

here

I DR DOBB'S JOURNAL OF

COMPUTER CALISTHENICS & ORTHODONTIA

PCC BOX 310 MENLO PARK CA 94025

I To use this as a self-ma;ler: 1. Fold it so this third covers the top third. 2. Place the proper postage, above. 3. If you are subscribing, insert your check so that it crosses a fold. 4. Staple this closed with a single staple, making sure that the staple pierces the check. (Better still, stick ail of this in your own envelope, and mail it to us.)

What else would you like to see us publish? Please use another page or ten, if you need them.

Page 34 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 April, 1976

Page 35: dr. dobb's journal of - cini.classiccmp.org

BOOK TORE ACTIVE FILTER COOKBOOK Don Lancaster. 1975. 240 pp. $14.95.

ADVANCED APPLICATIONS FOR POCKET CALCULATORS Jack Gilbert. 1975. 304 pp. $5.95.

ALPHA-NUMERIC MUSIC WITH AMPLITUDE CONTROL Malcolm Wright. 1975. 23 pp. $2. Xeroxed.

BIOFEEDBACK: Turning on the Power of your Mind Marvin Karlins & Lewis Anderson. 1973. 190 pp. $1.25.

BIOFEEDBACK AND THE ARTS Edited by David Rosenboom. 1976. 163 pp. $12.95. Hardbound.

BASIC Albrecht, Finkel, & Brown. 1973. 325 pp. $3.95.

BASIC BASIC James Coan. 1970. 256 pp. $3.95.

BASIC PROGRAMMING Kemeny & Kurtz. 1961, 1971. 150 pp. $6.95.

THE BEST OF CREATIVE COMPUTING, Vol. 1 David Ahl, editor. 1976. 328 pp. $8,95.

BODY TIME Gay Gaer Luce. 1973. 411 pp. $1.25.

THE BUGBOOK I & II with INSTRUCTOR'S WORKBOOK Rony, Larsen, & Braden. 1974. $16.95. 2 volumes+ workbook.

THE BUGBOOK III Rony, Larsen, & Titus. 1975. $14.95.

CALCULATOR CALCULUS George McCarty. 1975. 254 pp. $8. 75.

COMPUTER LIB/DREAM MACHINES Theodore Nelson. 1974. 18.6 pp. $7.

COMPUTERS & COMPUTATION Scientific American. 1950 - 1971. 280 pp. $6.

ELECTRONIC PROJfiCTS FOR MUSICIANS Craig Anderton. 1975. 134 pp. $6.95.

FUNDAMENTALS & APPLICATIONS OF DIGITAL LOGIC CIRCUITS Sol Libes. 1975. 192 pp. $5.98.

FUN & GAMES WITH THE COMPUTER Edwin Sage. 1975. 360 pp. $5.95.

GAMES, TRICKS, & PUZZLES FOR A HAND CALCULATOR Wallace Judd. 1974. 100 pp. $2.95.

GAMES WITH THE POCKET CALCULATOR Thiagaragan & Stolovitch. 1976. 64 pp. $2.

GETTING THE MOST OUT OF YOUR ELECTRONIC CALCULATOR William Hunter. 1974. 204 pp. $4.95.

INTRODUCTION TO MICROCOMPUTERS Adam Osborne & Associates, Inc. 1975. 384 pp. $7.50.

MATH WRITING & GAMES IN THE OPEN CLASSROOM Herbert Kohl. 1974. 252 pp. $2.45.

MY COMPUTER LIKES ME WHEN I SPEAK IN BASIC Bob Albrecht. 1972 64 pp. $2.

MICROPROCESSOR& MY COMPUTER LIKES ME WHEN I SPEAK IN BASIC Bob Albrecht. 1972. 64 pp. $2.

MICROPROCESSOR/MICROPROGRAMMING HANDBOOK Brice Ward. 1976. 294 pp. $6.95.

NEW MIND, NEW BODY; BIO-FEEDBACK: New Directions for the Mind

Barbara Brown, Ph.D. 1974. 523 pp. $2.50.

101 BASIC COMPUTER GAMES David Ahl, editor. 1974. 250 pp. $7.50.

PRINCIPLES & PRACTICE OF ELECTRONIC MUSIC Gilbert Trythall. 1973. 214 pp. $6.95.

PROBLEMS FOR COMPUTER SOLUTION Gruenberger & Jaffray. 1965. $7.95.

PROBABILITY D.J. Koosis. 1973. 163 pp. $2.95.

PROFESSOR GOOGOL'S MATH PRIMER Sam Valenza Jr. 1973. 144 pp. $3.25.

PROF E. McSQUARED'S (ORIGINAL FANTASTIC & SATISFYING CALCULUS PRIMER)

Swann & Johnson. 1975. 111 pp. $2.95.

PROGRAMMING PROVERBS Henry Ledgard. 1975. 134 pp. $5.95.

PCC GAMES' PROGRAM LISTINGS PCC. 1974. 31 pp. $2.

STATISTICS D.J. Koosis. 1972. 282 pp. $3.95.

TEACH YOURSELF BASIC' Volumes 1 & 2 Tecnica Education Corp. 1970. 64 pp each. $1.95 each.

TTL COOKBOOK Don Lancaster. 1974. 328 pp. $7.95.

TV TYPEWRITER COOKBOOK Don Lancaster. 1976. 256 pp. $9.95.

II CYBERNITIC FRONTIERS Stewart Brand. 1974. 96 pp. $2.

THE UNIVERSAL TRAVELER Don Koberg & Jim Bagnall. 1974. 128 pp. $4.95.

WHOLE EARTH EPILOG Stewart Brand, editor. 1974. 318 pp. $4.

MIAT TO DO AFTER YOU HIT RETURN or PCC'S FIRST BOOK OF COMPUTER GAMES

PCC. 1975. 157 pp. $6.95.

List title and quantity for each item you wish to order. (Orders to be shipped within California require a sales tax remittance of 6%.) For orders less than $10, a~d $1 for postage and handling; for orders $10 and more, add $2. Send your order, along with your check or money order, to: PCC, Box 310, Menlo Park CA 94025. Thank you.

April, 1976 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia, Box 310, Menlo Park CA 94025 Page 35

Page 36: dr. dobb's journal of - cini.classiccmp.org

DR DOBB'S JOURNAL OF

COMPUTER CALISTHENICS & ORTHODONTIA

PCC Box 310 Menlo Park CA 94025

SOFTWARE CONTEST

Sponsored by People's Computer Company P.O. Box 310. Menlo Park, Ca. 94025

FIRST PRIZE: $500 certificate for hardware from CROMEMCO

SECOND PRIZE: $250 certificate for hardware from CROMEMCO

OBJECT: Develop a program resulting in a new and interesting display using the Crnmemco

RULES:

TV Dazzler. (The Dazzler is an interface that permits a home color TV set to be a graphic terminal for certain microcomputers.)

@ All entries must use the Cromemco Dazzler display and must not require more than 20K of computer memory.

~ All entrie.; will be judged by People's Computer Company or.

1 - originality

2 - general user appeal 3 - clarity of documentation

e Entries should include source code and object code on punched paper tape. A listing of an appropriate bootstrap loader should also be provided.

111 Software should be compatible with MITS REV 1 serial 1/0 port convention for 1/0 require-ments (i.e., data transfer is on port 1, bit 7 [active low] of input port 0 is used to indic;ite receiver ready, and bit 0 [active low] of input port 0 is used to indicate transmitter empty).

Microcomputers can be incredibly versatile. The Dazzler adds the dimension of full-color graphic display to the microcomputer.

What can you develop? - games? - business? - education? - art? - others?

SEND All ENTRIES TO: PEOPLE'S COMPUTER CO P.O. Box 310 Menlo Park, Ca. 94025

ENTRIES MUST BE RECEIVED BY SEPT, 30, 19~§: