leased drive covers keeps them from • LOAD.COM-Generates .COM assessment that its market is among being opened until the motor is off, file from the .HEX file. engineers and assembly-language spe- minimizing the risk of disk damage. • MOVCPM.COM-Makes CP/M cialists. Again, if you ever need the ca- While the drives themselves are system image in memory. pability, you at least have it- quiet, the noise of the switching mech- • PIP.COM-File transfer utility. assuming that you know what to do anisms used when moving from drive • STAT.COM—File attributes and with it. to drive might be disconcerting. status ability. The amount of time a drive remains • SUBMIT.COM-Batched User Interface selected (and the jewel is illuminated) command processor. The Zorba may be a technician's after a disk-oriented corrmiand has • XSUB.COM-Extension. dream—and a user's nightmare. The been completed might seem annoy- • DUMP.COM-ASCII file "hex machine is fast, but how fast does it ing—it's only six seconds. Again, the dump" utility. need to be? The WordStar operator reason for having it that way is cannot type as fast as the machine can valid—on disk-to-disk operations or "Utilities" and Basic: accept the text. The CalcStar operator repetitive disk operations, speed may • M80.COM—8080 or Z-80 macro has no great interest in speed. This be gained by avoiding the assembler, .REL output. machine's primary orientation is tech- start/stop/start cycle at the disk drive. • L80.COM-Linker for .REL files, nical, unless Telcon recognizes that it Eight-inch drives may be connected generates .COM files. has severely limited its market in this to the system, allowing the transfer- • CREF80.COM—Cross-reference manner. ring of programs and data to the small- utility for M80 assembler. To the end they have chosen, er media. By the time this is published, • LIB80.COM-.REL file librarian. Telcon has implemented CP/M 2.2 even more horizontal compatibility • CBAS2.COM-CBasic and has accompanied the machine will have been added to the product. language. with the usual ten pounds of technical Telcon may well be limiting its mar- • CRVN2.COM-CBasic compiler literature. If the prospective nontech- ket by its emphasis on the Zorba as a language. nical purchaser judges the machine on programmer's machine. To this point • XREF.COM-CBasic compiler lan- the strength of the documentation, Telcon has been successful enough to guage. Zorba will not make the sale. build a multimillion-dollar backlog of The documentation, while appear- orders. But those orders are probably Telcon-supplied Programs ing to be accurate and complete, is dry from individuals with assembly-lan- and Sources: and dull. When the user is told that guage orientation, rather than the • SGEN.COM-SYSGEN.COM re- the application program is something nonprogrammer whose interest is placement; copies disk "system." that can be developed quickly or that more in using it for accounting or • PATCH.COM-Run to install it can take many years, bye-bye user. other office duties. system patches. Take the novice user and place under In anticipation that you may wish to • PATCH.Z80- for his nose the intense documentation of alter some of the CP/M software, Tel- PATCH.COM. the "innards" of CP/M, complete with con has provided the source code for • SETUP.COM—System configurator Assembler instructions, memory the CP/M input/output control system program. maps, macro calls, Macro-80 coding (which is referred to as the "Source of • SETUP.Z80-Source code for SET- and CBasic instruction, and he'll go the Bios"). UP.COM. buy something that he can simply turn For the programmer familiar with • FORMAT.COM-Universal disk on and use. Telcon must market its en- Z-80 assembly language, this is a formatter. tire offering, not just part of it. nice feature. Many users, however, • FORMAT.Z80-Source code for With the documentation presented couldn't care less. They would rather FORMAT.COM. for review, there was absolutely no in- have the MBasic. MBasic is available •TRACKRD.COM-Special disk- struction on WordStar, CalcStar or for the machine but is not, at this reading program for engineers. anything other than those things of in- writing, part of the marketed bundle. • TRACKRD.Z80—Source code for terest to the technical person. Telcon Telcon is being nonspecific about its TRACKRD.COM. must work on tutorial materials for all marketing plans for MBasic. For the • RELOAD.COM-Utility for Bios application packages. Despite its pro- majority of prospective purchasers, I generation. testations to the contrary, CBasic is not would recommend MBasic over the • SYSEQU.Z80-Part of Format, Set- that easily assimilated by a novice "Source of the Bios," although in so up and Patch source files. user. CBasic may mean "compiled" doing I must declare a bias. •CPMBIOS.Z80-CP/M Bios source Basic, but we all know that it really file. means "Consultant's Basic." Technical • CPMEQU.Z80-Part of CP/M Bios Zorba and its other - System materials included with the source file. based products (Nomis-9, Nomis-12, Zorba include elements from Digital • GEN.SUB—Submit procedure for GC-lOO, VCS-780 and a variety of Research's CP/M 2.2, Microsoft's util- Bios generation. other communications-based inter- ities and Basic, and Telcon-supplied • GEN2.SUB-Part of GEN.SUB. face gear) will make an impact on the programs and source code files. • KEY.MAC-Keyboard PROM burgeoning portable-computer mar- contents; can be assembled. ket. How large an impact it will make CP/M 2.2: • CPMBOOT.ZSO-Monitor PROM will depend on the focus applied by •ASM.COM-8080 Assembler, contents; can be assembled. Telcon in the upcoming months. .HEX output. • DISK.DOC-Explains files on disk. Revamping the materials for the • DDT.COM-.COM file debugger. The decision to provide so much user, rather than the programmer, • ED.COM-Source File Editor. source code is a reflection of Telcon's may make the difference. • 50 Microcomputing, July 1983 BASIC® JFTTRDiSCAL A NO-HOLDS-BARRED COMPARISON.

Full support for Activity analyzer EASE-OF-USE By dividing Here's the real shocker! indexed files prints program programs into modules, JRT Pascal use histogram makes even very complex programs— Features Basic JRT Pascal CRT screen of nearly any size—a breeze to manage. formatting & 14 digit BCD Pascal code is self-documenting: Structured full cursor FLOATING POINT program sections are identified by programs No \fes control arithmetic meaningful names, not line numbers. Separate "Chaining" Structured Facilities for True Error messages are verbal, not number compiled procedures formatting dynamic storage codes. JRT offers 12 data types (to modules with printed reports Basic's 2 or 3), and it has both regular auto-loading Advanced & purging File variables assembly Interface and hex numbers. & GET/PUT Arithmetic Usually 14 digits Fast one-step For power—the ability to POWER precision 6 or 7 Dynamic arrays compiler; write better, clearer programs, faster- digits no link needed Pascal is the run-away winner. Example: SEARCH Indexed files No >fes JRT simplifies programming by procedures for fast Efficient accomplishing complicated operations Maximum 255 64,000 table look-up compiler needs (for Basic) with one command: string size characters characters only 85K diskette Extended CASE space Basic JRT Pascal Loop statements 1 3 statements IFA$= 'VOR IFAIN[V..Z]THEN... Data types Usually 12 Maximum program Random files size: more than A$ = •W" OR 2 or 3 to 8 megabytes A$ = "X" OR 200,000 lines CASE statement No Yes with variable A$ = "Y" OR length records More than A$= "Z-THEN... Introduced 1965 1980 200 verbal 64K FLEXIBILITY JRTS wide variety of error messages Price ??? $29.95! dynamic strings data types reduces programming restrictions. Separate And the data types are not all fixed in size. compilation of There are 3 looping statements (Basic has 1). With JRT, very large auto-loading programs can be created and run, because program modules external can be spread over many diskettes. Common modules can . - " procedures be used for several programs. Basic generally limits No limits on strings to 255 bytes; JRT strings go up to 64K. \ procedure size, nesting or EFFICIENCY whereas Basic relies on a static, recursion inefficient memory map to allocate storage, JRT's dynamic storage fills every available main storage area; 175-page user there's no waste. With Basic, sub-routine modules must manual with 3-ring be linked together; with JRT, they can be linked— protective plastic binder but don't have to be. JRT's more powerful commands & SVt" or 8" run faster; typically, you'll write Pascal programs 3 to diskettes 10 times faster than In Basic. Exclusive: JRT lets you directly access the CP/M* for better Handy JRT Pascal total system control. reference card Statistic NOW... Consider our copy policy (If you want to procedures make copies, it's OK with us—so long as they're not for re-sale.) Check our astounding price: $29.95!— and satisfaction is guaranteed—or your money back. THE COMPLETE PASCAL FOR CP/M. Basic versus JRT Pascal: which comes out on top? Right! The coupon below is for your convenience. Or call. Today. jTrpTsoiao I Send JRT SYSTEMS or $299Name. 9 • to 45 Camino Alto/G2 phone 415/388-0530 • Mill Valley, CA 94941 Address. City .State. -Zip. Here's my $29.95; please send me JRT Pascal. I understand that if I'm • Check • C.O.D. • MasterCard • VISA ^ not completely satisfied, I can return it within 30 days—with the sealed {CA residents add sales tax. Add $6 for stripping outside North America.) ^ diskettes unopened—for a full refund. Card #. Exp. , I need the 5-1/4" diskettes for • Apple CPIM- • Heath, Hard Sector; 0 • Heath, Soft Sector; • Northstar; • Osborne; • Superbrain; Signature « • Televideo; • Xerox 820. I need • 8" SSSD diskettes. •QP/M is a TM. A 56K CP/M system is required. A Real-Time Compiler System The sometimes difficult relationship between and may soon improve. This hardware/software approach should work with nearly all languages and computer systems.

By Martin Reiffin

his is a new real-time compiler English words. These symbols are is slow and expensive. Tsystem for microcomputers. then analyzed by a parser to deter- It is generally accepted that the out- By "real-time," I mean that the com- mine if they are arranged in a relation put of the average professional pro- piler analyzes and translates source that conforms to the rigid grammatical grammer is only about five to ten lines code into machine code concurrently rules, or syntax, of the programming of debugged source code per day. as the programmer types in the pro- language. The recent widespread use of mi- gram at the keyboard. The idea is to The semantic analysis determines if crocomputers has compounded the eliminate much of the drudgery of the symbols conform to still other programming problem. Most users programming in a compiled language, rules not conveniently expressed by presently writing programs for micros such as Pascal, C, Fortran or PL/I. the language grammar. are not professionally trained as pro- The following description explains Performing these analyses is com- grammers. They are unwilling to the theory of the system and how it parable to parsing the words of an spend time and effort programming in can be implemented on any micro us- English sentence. If the sequence of a compiled language with present ing a microprocessor with interrupt symbols violates a syntactic or seman- microcomputer systems. capability. (The system status is pat- tic rule, an error has been committed Instead, the majority of personal ent-pending; it is not yet available to and the compiler must inform the computer programmers use Basic the end-user market.) programmer with an error message. interpreters. I have implemented the system on After translation, the compiled ob- A Basic interpreter is syntactically two S-100 computers: A Godbout sys- ject code usually is linked and sparse, cryptic in revealing errors, in- tem and a CCS/Cromemco system, us- loaded—joined with other object code capable of using local variables, in- ing the keyboard interrupt scheme. modules to form a complete machine- capable of passing parameters to sub- code program that can be executed by routines, unable to invoke subrou- Background the computer. tines by name, incapable of linking Since humans write programs in library modules and lacking in both and com- Description of the Prior Art data structures and flow-control struc- puters execute only machine language, In recent years, the increase in soft- tures. This makes it difficult to write it's often necessary to translate from ware costs, the lack of skilled pro- error-free programs for any but the one language to the other. grammers, the expansion of the com- simplest applications. Basic, there- When the programming language is puter market and the under-utilization fore, is regarded as a poor vehicle for high-level (that is, abstract in the sense of much available hardware has has- learning good programming technique. that it does not explicitly manipulate tened the adoption of high-level lan- These Basic interpreters are also too the computer registers and other hard- guages and concentrated efforts to slow for many applications. ware), the translation of the original make their use more efficient. Nevertheless, the mechanics of program is performed by other However, programming in a high- compilation with present microcom- programs, called compilers or inter- level language is still slow, tedious and puter systems are so inconvenient that preters. The original program is called inefficient. For example, a compiled Basic interpreters dominate the field. the source code, and the resulting language requires a repeated se- Prior Schemes program translation is called the ob- quence of steps: loading the editor, ject code. writing or editing the source code, Numerous attempts have been made In addition to translation, the com- loading the compiler, executing the to minimize the disadvantages of con- piler also must perform lexical, syn- compiler, loading the linker, exe- ventional compiler usage. One such tactic and semantic analyses of the cuting the linker, running the pro- scheme is the so-called "incremental source code. gram and repeating the sequence compiler." As each line of source code Lexical analysis is performed by a when errors appear. is entered at the console, it is analyzed scanner and is the process by which a During much of this time, the pro- for syntax without consideration of sequence of source code bytes are grammer waits for completion of the formed into meaningful symbols or loading or execution steps, and this Address correspondence to Martin Reifrin, 27 E tokens—in the same way that a se- waiting is both wasteful and boring. Gale ftoad Danbury CT 06S10. quence of characters is formed into As a result, the programming process 52 Microcomputing, July 1983 the context of the entire program. • The compilation should be per- variables and continue execution, all If the line is error-free, the program- formed in real-time as the source without requiring the prior insertion mer can enter the next line of code. code is entered or edited by the of write statements, breakpoints or Otherwise, an error message is dis- programmer. other debugging code into the source played and the error must be cor- • The system should be capable of program. rected before further lines are entered. implementing a modern block-struc- • The architecture should not impose After the entire program is entered, it tured language having a powerful syn- any additional requirements of unique undergoes further syntactic and se- tax, such as Algol, C, Pascal or PL/I. language syntax, complex editor mantic analyses with respect to the • There should be no waiting for disk mechanics or scheme-specialized pro- context-dependent rules, after which accesses during program writing, grammer expertise. code generation and execution may editing or compilation, except to the The primary object of my invention take place. extent necessary for initial entry or is to provide a novel computer system The incremental compiler scheme saving of source files. that closely approaches this ideal has some merit when used with those • An error message should be dis- architecture. languages that have few context-de- played instantly after a syntax error is pendent restraints, such as Basic. For entered at the console. modern structured languages, such as • Correction of source code errors Summary of the Invention Algol, Pascal, PL/I, C and Ada, the should be fast and easy, without The following is a summary of a pre- limited local analysis that can be per- reloading the editor, source file or ferred embodiment of my invention. formed after entry of each line is a compiler. The programmer invokes the real- relatively small portion of the total • Compilation should be finished time compiler-editor system by typing analysis required and is not worth the almost instantly after the last line of an its command file name at the key- overhead. error-free source program is entered. board console. The command file con- Another well-known scheme is "re- • The compilation should be com- taining the software portion of the peated recompilation." In this ap- plete in that no further syntactic or system is then read into memory from proach, the syntactic and semantic semantic analysis is required, and the a disk. The source buffer—a memory analyses after entry of each line in- absence of an error message should region that will contain the source clude all context-dependent rules and assure that the program has no errors. code—is initialized so that its first consider the entirety of the partial pro- • The programmer should be able to stored byte is a predetermined code, gram entered to that point. stop execution of the object code at which will be called a Pause Mark. Therefore, upon editing even a any time, examine the values of all Execution of the compiler then single byte of the source code, the en- tire source file must be recompiled from the beginning. Since this recom- pilation must be completed before new lines may be entered, the large GET IBM-PC Capacity at a Fraction of IBM'S Price! overhead of this scheme prohibits its New NETRONICS 16 Bit EXPLORER 88 PC Kit use with any but the smallest pro- Starts at Just ^^ Accepts All IBM Peripherals. grams. It's Irue! Now you can en|oy the power ot the • IBM compatible keyboaril...$299.95 Intel 8088-lhe same microiirocessor which ->- 10.00 pii. In an effort to avoid the overhead of powers the IBM PC-anil run any program com • IBM compatible color board...$299 9S piled lor Ihe IBM'PC...startiii9 at only S399.9S' -f 10.00 p&i. complete recompilation, a number of Take this easy, low cost way to learn IB bil • Additional ROM required...$35.00. • Special IBM compatilile system: with key- board. color graphics board, tloopy disk technology! Two-board system tealures; Set your own pace' Invest and learn, at the rale schemes of partial recompilation have i:ontroller. 84K RAM. cabinet, standard mother board witti S slol eipansion YOU want! Arid to your EXPLORER ie-PC: 1. 80se power suooly and a single 5V<" floppy dnve... bus; accepts any hardware designed tor Oeluie heavy-duty steel cabinel that houses been devised. These schemes general- S1899.9S-.- 25.00 pSi IBM PC: and either loo 5'." floppies or a 5'/." hard disk IBM compatible hard disks, buill-in modern ly involve a complex data structure for 2. e4K memory board, expandable to 25eK: with n 'c lloopy. This cabinel leatures a board, eprom burner, print outfer system plus with IBM compatible RS232 communica brusn - n sh tront panel and a wood-grained more will be available shortly. the source code and/or a complex cations port. O EXPLORER 88-PC Cabinet .S199.95 editor. Any disk-operating system which works on Ihe ^ 18.00 oil Over 100 EXCLUSIVE Products and Kits- IBM will work directly on Ihe EXPLORER e8-PC. including the 'Spe.ili Easy' universal voice A heavy-duty oper hi power upply and all programs compiled lor the IBM will run synthesizer, a Di:ignoslic card with built-in Programmers having sufficient ex- with fan that c. m be used i I youi cabi lit. logic probe lor me IBM-PC. terminals, moni- net or installed inio the Net cabi let IS pertise in the particular scheme being tors. the ELF and EXPIORER 85 computers, The system led in the Stai available as lollovi and much more, are ilescribed in our up- system features a user-fnendly operating systeir used may make a change in the source • 10 amp power supply for sys 2 ffop comin^catalog. It s yours FREE if you check that allows easy program generation and debug pies...S149.95 + 8.00 p«i. code requiring only a recompilation of ging. The commands include display/modify ibove -i- e

All This on ONE BOARD; space. repeatedly to the next buffer location • Keyboard port wilfi TYPE-AHEAD buHer and perform its lexical, syntactic and • 8275 CRT controller with light pen port When the programmer strikes a key • Two 2716 s-program & character rom's on the console keyboard, the central semantic analyses on the first line of • Optional 2716 for CHARACTER GRAPHICS • All screen & keyboard ram processor unit (CPU) executes the fol- source code stored in the buffer. • SIMULTANEOUS I/O or Memory mapped • Z-80 MPU-2 or 4 Mhz system clock lowing interrupt sequence (described The compiler may either display an • Easy to adapt Software • Uses only EASY-TO-GET pans for an 8080 or Z-80 microprocessor): error message or emit compiled object • Use in any S-100 system « 696 Bus Compliance; 08 M16 18 T200 upon completion of the instruction code, as is appropriate, until the com- • Build 'or less than $200 currently being executed, the proces- piler pointer reaches the new Pause Now includes crystal & heat sink. Introducing The VDB A sor enters the interrupt mode and Mark inserted at the end of the first Bare board with Documentation S49.S0 + $2.50 S&H (III. res add 6% tax) communicates its new status to the line of source code. Add 3% for Mastercard and Visa system by emitting an interrupt ac- When it reaches the new Pause Simnhwa^ PRODUCTS CO knowledge signal. Mark, the compiler again enters an P.O Box 601, HoffrTian Estates. IL 60195 Upon receipt of this signal, the infinite loop, without advancing the 312/359-7337 interrupt hardware gates an RST in- pointer, until the editor eventually struction onto the data bus. The pro- moves the Pause Mark to the end of Circle 288 on Reader Service card. cessor then executes the RST instruc- the next line, whereupon the compiler tion, which is a one-byte call to a is free to compile this next line of selected location in low memory source code. where a jump ("vector") to the inter- Control characters other than a car- rupt service routine comprising the riage return may be entered by strik- Wilh every box ol 3M or Nashu editor is stored. ing appropriate keys to perform the receive FREE a durable plastic convenient storage ol your diskettes. The interrupt service routine first conventional editing functions of a Order NOW. Oiler good lor a limited time Specify 3M or Nashua. saves the stack pointer and other CPU screen editor. For example, errors in Bolh quality disks Bolh competitively priced. registers. If the struck key corre- the present line of source code may be Specify Soft 10 or 16 Sector price/box of 10" sponds to an alphanumeric or other corrected by moving the cursor back- 1 side sngl/dbi der ity ... '26.00/boi noncontrol character, it is placed into ward. This does not affect the com- •34.00/box 2 sides dbl density the second location of the source code piler, which cannot advance beyond " :Specif y Soft or 32 Sector buffer immediately after the Pause the Pause Mark at the end of the pre- 81 side sngi density $28.00 1 side dbl density $32.00 Mark. The buffer pointer is then ad- vious line. Call or write for complete list of other products vanced to the next location, the CPU However, if by hitting the appropri- •NO HIDDEN SHIPPING CHARGES registers are restored, the CPU inter- ate control key the cursor is moved up All orders shipped freight prepaid rupt is enabled and the Ret instruction one or more lines to a position before r-S ^ is executed to return control to the the Pause Mark, a Recompile Flag is KEYSTONE INFORMATION PRODUCTS compiler. \ /lO Bloody Brook Road. Amh set so as to enter a recompile mode. \ / (603tail1l 673-228fi7.1.9?fl77 The compiler continues to execute In this event, upon return to the com- Checks VISA MC its infinite loop in which it repeatedly piler, the latter is reinitialized so that it reads the Pause Mark character in the may recompile the source code from Circle 145 on Reader Service card. first location of the source code buffer. the very beginning of the source buf- This sequence is repeated as the pro- fer. Subsequent editing or text inser- (sTmpl-simon) EXPLORING grammer strikes additional keys at the tions cause the editor to move the \SOFTWARE / CP/M keyboard; the successive characters Pause Mark to an updated location, are entered into successive locations adjacent to the end of the line preced- Explore the mazes of the CP/M ing the most recently edited line. operating system with this menu- in the source code buffer as the buffer driven 8-inch disk v^hich allows pointer advances. This sequence con- When the compiler finds a syntax you to (1) look into every hidden tinues until a key corresponding to a error in the source code, it displays an cranny of a CP/M disk; (2) change control character is struck. error message. The programmer may any ASCII or hex byte; (3) recover If this control character is a carriage then edit the source so as to correct the erased files; (4) create "autoload" return, the corresponding ASCII code error. Upon return from the editor, disks; (5) find and lock out bad sec- (13) is inserted into the buffer, the buf- the compiler is reinitialized to recom- tors; (6) reconstruct files from fer pointer is advanced, the Pause pile the source code. crashed disks. And more! $39.95. Mark code is then inserted into the The entered source code and emit- Hard-copy instructions included. For recommend- buffer location adjacent to the carriage ted object code preferably are stored ed parallel reading: CP/M PRIMER by Murtha and return code, and the original Pause in memory so that disk accesses will VVaite, $14 95 Send check lor prompt shipment. Add $2 25 per order for shipping. Return for refund if not Mark code in the first location is not unduly interfere with the editing satisfied CP/M is a registered trademark of Digital replaced by the ASCII code (32) for a and compilation processes. If the Research, Inc Requires two drives, 32K. blank space. source or object code buffer gets filled, TELEPRINT, INC. The Pause Mark location thus has its contents may be stored in a disk file P.O. Box 10A, Sylvania GA 30467 been advanced from its original point in the conventional manner employed to the end of the first line of the by editors and word processors such 3702 N. Wells St. D&N MICRO PRODUCTS, INC. Fort Wayne, Ind. 46808 (219)484-6414 TERMS $3.00 shipping, Foreign Ofders add 15%, Indiana residents add 5% sales tax.

COMPUTER MICRO-80 COMPUTER PRINTERS Z-80A CPU with 4Mhz clock and Okidata STANDARD CP/M 2.2 operating system. 64K ML82A,120cps,10"' .$409 low power static memory. Cen- ML83A,120cps,15" .$895 CP/M FOR OSI tronics parallel printer port. 3 serial ML84 Parallel,200 caps, 15".$1150 ports. 4" cooling fan.TwoS" single C.loth D&N-80 CPU CARD or double sided drives. 8510APProwriter,parallel ...$419 The D&N-80 CPU allows the owner IBM single density 3740 format for 120 cps, correspondence quality of an OSI static memory computer 243K or storage, double density 8510APD Prowriter, serial $585 to convert to Industrial Standard format for604K of storage. Double F10-40PUStarwriter, parallel $1319 IBM 3740 single density disk for- sided drives allow 1.2 meg on Letter quality daisy wheel mat and CP/M operating system. each drive. Satin finish extruded F10-40RU Starwriter, serial.. $1319 Double density disk operation is aluminum with vinyl woodgrain F10-55PUPrintmaster $1610 also supported for 608K of storage decorative finish. 8 slot backplane, parallel. Letter quality daisy on an 8" diskette. When used with 48 pin buss compatible with OSI wheel a 5Vi" disk system 200K of storage boards. F10-55RU Printmaster, serial $1610 is provided. Optional parallel MODEL 80-1200 $2995 DISK DRIVES AND CABLES printer and real time clock. Also 2 8" Single sided drives 8"ShugartSA801 $385 available for polled keyboard and MODEL 80-2400 $3495 single sided video systems. Compatible with 2 8" Double sided drives 8"ShugartSA851 $585 C2, C3, C4 and 200 series OSI com- puters. double sided MICRO-65 COMPUTER FLC-6 6 ft cable from D&N ....$69 INCLUDES CP/M 2.2 6502 CPU with 2Mhz clock and or OSI disk controller to 8" drive D&N-80-1 Serial 8" disk $595 DOS-65 operating system. 48K of 5y4"MPI B51 disk drive with. .$450 D&N-80-2 Video 5V4" disk $595 low power static memory. 2 serial cable, power supply and D&N-80-3 Video 8" disk $595 ports and 1 Centronics parallel cabinet. Specify computer type. Option 001 $ 60 port. 2 8" single or double sided FLC-5y4 cable for connection .$75 Parallel printer and drives. Satin finish extruded to 5Vi drive and D&N or OSI real time clock. aluminum with vinyl woodgrain controller, with data separator finish. 8 slot backplane, 48 pin buss and disk switch. Specify HARD DISK DRIVER $140 compatible with OSI. Will run OSI computer type Allows D&N-80 CPU board to con- 65D and 65U software. Includes trol OSI 40 or 80 meg hard disk unit. Basic E/65 a compiled BASIC for HARDWARE Will not destroy OSI files. Will also 6502 CPU. OSI COMPATIBLE allow for a true 56K CP/M system. MODEL 65-1 $2995 I0-CA1 ox Serial Printer Port. .$125 Specify 40 or 80 meg drive. 2 8" Single sided drives Specify Device #3 or #8 BUSSTRANSFER $135 MODEL 65-2 $3495 I0-CA9 Parallel Printer Port ..$150 Allows for D&N-80 and OSI CPU to 2 8" Double sided drives CMOS-MEM be in the computer at the same 64K CMOS static memory board, time. Toggle switch provides for BP-580 8 Slot Backplane $ 47 uses 6116 chips, 3 16K, 1 8K and 2 alternate CPU operation. OSI 48 pin Buss compatible 4K blocks, Partitionable for multi- DISKTRANSFER $100 MEM-CM9 MEMORY/ user, OSI type disk controller, 2 10 Utility program to transfer OSI FLOPPY CONTROLLER mapped serial ports for use with CP/M format disk to IBM 3740 24K memory/floppy controller card D&N-80 CPU. Ideal way to upgrade single density format. Will also uses 2114 memory chips, 1 8K and from cassette to disk. transfer IBM to OSI format. 1 16K partition. Supports OSI type 64K CMOS-MEM $500 SYSTEM HARDWARE disk interface 48K CMOS-MEM $405 REQUIREMENTS 24MEM-CM9 $325 24K CMOS-MEM $260 D&N-80 CPU, D&N FL470 or OSI 16MEM-CM9 $260 16KCM0S-MEM $210 470 controller, 48K memory at 8MEM-CM9 $180 BARE CMOS-MEM $ 50 0000-BFFF, 4K memory at DOOO- BAREMEM-CM9 $ 50 Controller add.$ 90 DFFF, two disk drive cables. Controller on assembled unit FORMATTRANSFER $15 210 mapped serial ports add. $125 add $ 90 on assembled memory board You supply software on 8" diskette BIO-1600 Bare 10 card $ 50 Z80-IO 210 mapped serial $160 D&N will transfer OSI CP/M format Supports 8K of memory, 2 16 bit ports for use with D&N-80 CPU to IBM 3740 CP/M format. Can also parallel ports, 5 serial ports, card transfer IBM 3740 CP/M format to with manual and Molex FL470 Disk Controller $155 OSI CP/M format. Original diskette connectors. Specify 5V* or 8" drive returned. as CP/M ED and WordStar. The use of the CPU. The UART also provides an code and stores it in the Object Buffer. bank-select memory schemes or the output port. Upon completion of entry and compi- advent of 16-bit microprocessors— Execution of an Out command by lation of the source code program, with their larger addressable memory the CPU results in the transmission on control of the CPU may be passed to space—will obviate the need for disk the data bus of a byte from the accu- the Interpreter for execution of the ob- storage until the compilation is finished. mulator to the UART, which then ject code if the latter is in the form of may serially transmit the byte to the intermediate code. Detailed Description CRT Console for display on the video The programmer may be given the The details of this invention are screen. option of saving the source code illustrative of one of the many forms it In the usual operating mode of a and/or object code in secondary stor- may take in practice. The invention conventional microcomputer system, age, such as disk or tape media. In- and novelty reside in neither the hard- the status of the input port is repeated- stead of generating intermediate code ware nor the software taken separate- ly tested by the CPU in a polling loop (p-code) for interpretation, the Com- ly, but rather in combination of both. until the input port status indicates piler may be of the type that emits The major hardware components of that a byte of data has been received executable machine code. the overall system are shown in Fig. 1. and is available in the UART-received The Compiler may require only a The CRT Console refers to any suit- data register. single pass through the source code, in able terminal having a keyboard for My invention instead employs an the manner of the usual recursive- entry of the source cocle to be compiled interrupt mode of operation, whereby descent Pascal compiler. If the Com- and for entry of editing commands to the CPU normally executes the com- piler requires more than one pass, the change the code. The terminal also piler until the UART receives a byte first pass should perform the syntax comprises a video display for imple- from the CRT Console. analysis so as to reveal all syntax mentation of a screen editor. The key- The "data available" line of the errors. board is preferably integral with the UART is then activated; this in turn The interrupt facility enables the video display, forming a unitary con- activates the Interrupt Controller to programmer to stop execution of the sole that has an RS-232C serial link to cause the CPU to execute the editor. machine-code program at any time, the remainder of the system. Upon entry of the received charac- examine the values of the variables This serial link is connected to the ter into the Source Buffer in main and then continue execution. No Input Port, which is preferably em- memory, or upon completion of an additional hardware is required for bodied as a UART (such as the 1602, editing command, a Ret instruction is this extra function, and the extra soft- AY-5-1013 or TMS 5501). Each key- executed by the CPU to cause it to ware is minimal. stroke on the keyboard of the CRT resume its execution of the Com- Console results in the serial transmis- piler from the point where it was Circuitry and Hardware sion to the UART of a train of bits con- interrupted. Fig. 2 refers to the circuitry and stituting the ASCII byte corresponding As the Compiler is executed, it hardware components directly in- to the struck key. should perform lexical, syntactic and volved in the interrupt operation. The UART reforms the bits into that semantic analyses of the program Upon striking a key, a train of pulses byte, which is transmitted in parallel source code stored in the Source Buf- constituting the byte corresponding to on the data bus to the accumulator of fer. The Compiler also emits object the struck key is emitted from the RS- 232C O. CRT CONSOLE A converter gate, CI, converts the pulse train from RS-232C levels to TTL (transistor-transistor-logic) levels to match the requirements of input port IN of the UART. The latter forms INPUT PORT the serial pulse train into an eight-bit byte, which is stored in the received data register of the UART. The latter then outputs a data-available signal at INTERRUPT CONTROLLER pin DAV, whose signal is transmitted by gate G1 to a vectored interrupt in- put VI of the Priority Encoder. Although only one input pin VI of CENTRAL PROCESSOR UNIT the latter is shown, this chip has vec- tored interrupt input pins to which other interrupting devices may be I connected. EDITOR COMPILER INTERPRETER The Priority Encoder arbitrates competing interrupt requests at its in- puts and determines the request hav- ing the highest priority. Its enable in- put EI is grounded as shown (Fig. 2). SOURCE BUFFER OBJECT BUFFER Assuming that the interrupt request from the Console and the UART win Fig. 1. Scliemadc diagram showing relation of the major hardware components constituting a preferred the priority contest, the Encoder then embodiment of the computer system in accordance with this invention. transmits a three-bit code, A0,A1,A2, to the respective inputs of the Inter- dudes the editor, as well as a sub- and either is in an infinite loop upon rupt Vector Register. routine, to store the contents of the reaching a Pause Mark in the source The other five inputs of the latter CPU registers. Control of the CPU is code buffer or is in the process of ana- are held positive by potential source then retained by the editor until either lyzing the source code in the buffer. + V, so that the resulting byte input to a character has been entered into the The occurrence of a Keystroke at this register chip constitutes an RST source code buffer or an editing oper- the terminal causes an Interrupt, call instruction. The signal at output ation has been completed. whereupon the CPU is vectored to the pin GS of the Priority Encoder is The editor includes an input instruc- interrupt service routine. The latter transmitted by gate G2 to the latch tion that, when executed, causes the includes a subroutine to perform the enable input LE of the hiterrupt Vec- CPU to place the address of the Save Registers procedure shown in tor Register. This causes the latter to UART's port on the Address Bus. This the drawing. latch the RST call instruction into its address is tested by the Comparator, The Editor is then executed by the internal flip-flops. and if it matches that of the port, the CPU. If the Keystroke corresponds to Activation of output pin GS of the output pin EOut is activated to signal a control character, then an editing Priority Encoder also transmits an in- the Decoder. procedure, such as a cursor move- terrupt signal through AND gate A1 to The Decoder is controlled by other ment, screen scroll, character deletion the interrupt request pin INT* of the control and status signals (not shown) or line deletion, is performed. If the Z-80 CPU. Upon completion of the in the conventional manner so as to Keystroke corresponds to an alphanu- present instruction (and assuming that transmit a signal RDE* to the corre- meric character or other valid source- the interrupt of the processor is en- sponding input RDE of the UART. code character, the latter is entered abled), the CPU's status pins lORQ* The byte in the received data register into the source code buffer and dis- and Ml* are activated and their (not shown) of the UART is then gated played on the video screen and the signals are transmitted by gates G3,G4 onto the data bus and transmitted to screen cursor is advanced to the next to AND gate A2 to form the INTA (in- the accumulator within the CPU. character position. terrupt acknowledge) signal. INTA is In the embodiment of the invention The interrupt service routine then inverted by gate G5 and fed to the out- shown in Fig. 2, I chose to use the jumps to its subroutine to perform the put enable pin OE of the Interrupt following integrated circuits: Restore Registers procedure, whereby Vector Register, whereupon the RST the registers of the CPU are restored call instruction at the inputs of the lat- to their original values at the instant of UART: 1602 ter is jammed onto the data bus. the interrupt. Priority Encoder: 74LS148 The RST instruction is then input to Interrupt Vector Register: 74LS373 The Enable Interrupt instruction and executed by the Z-80, causing the Decoder: 74LS155 CPU to push the contents of the pro- Comparator: 25LS2521 gram counter onto the stack, and fur- CI: 1489 COMPILER ther causing the CPU to jump to a pre- C2: 1488 determined location in low memory. This location stores a vector, or three- System Sequence byte jump instruction, to an interrupt Fig. 3 shows the sequence of opera- service routine. tion of the overall system. The Com- KEYSl •ROKE The interrupt service routine in- piler normally has control of the CPU

0 VI INTEF^RUP T t> CRT , PRIORITY OUT CONSOLE ENCODER ( ROE EI c:

ROE* SAVE REGISTERS

OECODER

-aiNT*

EOUT EDITOR COMPARATOR 1 RESTORE REGISTERS

INTERRUPT VECTOR REGISTER

IBO CPU ENABLE IN TERRUPT

RETURN TO COMPILER

Fig. 3. Flowchart showing sequence of operations.

Microcomputing, July 1983 57 (EI) is then executed by the CPU so The first statement in the modified IF statement obviates the need to that the latter may respond to the next compiler is: reexecute all of these assignment interrupt. Finally, the RET instruction statements upon subsequent reinitiali- is executed so that the CPU may IF NOT CONT THEN zations of the compiler for recompila- return to the Compiler. The Compiler tions. That is, after the first test of the then resumes execution from the The Boolean variable CONT is False variable CONT, it is set equal to True point where it was interrupted. upon initial entry into the compiler, so as to bypass the assignment state- Fig. 4 shows the sequence of opera- signifying that this is not a continua- ments thereafter when recompilation tions of the Compiler. After initializa- tion of a previous execution. That is, is required. tion, the Compiler performs its Read the compiler has just been entered for After the conditional block of array Character function whereby the byte the first time during the present assignments, a Peek assembly-lan- in the first location of the source code session. guage function is invoked to read the buffer is read. The subsequent assignment state- content of the memory location imme- If this byte is the predetermined ments therefore are executed to ini- diately preceding the start of the code designated as the Pause Mark, tialize the contents of the arrays source code buffer (the location of the the Compiler pointer does not ad- WORD, WSYM, SSYM, MNEMON- recompile flag). If this location con- vance and the Compiler enters an in- IC, DECLBEGSYS, STATBEGSYS tains the ASCII code for the letter R, finite loop. It continues to read the and FACBEGSYS shown on pp. 346 then a compiler procedure Recompile same location until the content of this and 347 of the Wirth treatise. is invoked to reinitialize the variables location is changed by the editor to a The values of these arrays remain ERR, CC, CX and LL, and to assign the blank. When this change occurs, the fixed throughout execution of the value of constant AL (10) to the vari- Compiler memory pointer is incre- compiler and the above conditional able KK. mented to the next location of the buf- fer so that the Compiler exits from its Pause loop, as indicated by the legend Advance Memory Pointer. As indicated by Symbol?, the lexical analyzer of the Compiler then deter- READ CH ARACTER mines if the source character read-in constitutes the last character of a sym- bol, such as an identifier, operator or punctuation mark. If not, the Read Character function is executed again until a symbol is recognized. The syntax analyzer of the Compiler then determines whether this symbol NO conforms to Correct Syntax in accor- dance with the grammar of the pro- ADVANCE MEMORY POINTER gramming language. If not, an Error Message is displayed. If the syntax is correct, the Read Character function is repeated until an error is found or until End Of Pro- gram is reached. In this event, the Code Generator may be invoked if this function is performed as a sepa- rate pass. Alternatively, code generation may be performed concurrently with the lexical and syntactic analyses. The generated code then may be saved on disk and/or executed at the option of the programmer, as indicated by the legend Save/Execute Object Code. For clarity in illustration, I'll show how the simple and widely published compiler PL/0 of Prof. N. Wirth ("Algorithms + Data Structures = Programs," Prentice-Hall, Inc., 1976, CODE GENERATOR pp. 280-347) may be modified for im- plementation in the present invention. In the description below, the follow- ing identifiers have been added and SAVE / EXECUTE OBJECT CODE do not appear in the original PL/0 compiler as published: CONT, PEEK, RECOMPILE, PTR, PM and SP. 58 Microcomputing, July 1983 THE PRICE OF MS/ WAS JUST SHATTERED!

^^ iTTn -.w... '^^ri: -^vi' w't®^;:: 'w •ss- ••s^- -w •••w^-iu »«• r ix^::: {M:: [w frfc- ttsr- -Vi::-- •••jer-' ViV- ,-eiJfi. -1 t'C: x. x. {s®::: ^ieia m;: -^y- .-^v- viv- ViV" ij 1 ^v; • '.my. .-.n' V riwi^i «r luv • ; s-'ij—- i j " I

Jh- V--- J- '--V-^J

256Kbyte Floppies are ok for data transfer or long-term storage. But they fall far short as online storage. If you are using high level languages, spelling SemiDisk checkers, word processors, databases and other disk-intensive software, you know the price you are paying: time. Your productivity is going down For more than a year, we've been making the the drain. The SemiDisk disk emulator will save most advanced disk emulator available for micro- time and increase your productivity. computers. The one that's taken the "waiting" out of computing. Now, we have some more Even better, Release 5.0 of the SemiDisk CP/M-80 news that'll set the world on fire: A price cut! installation software contains SemiSpool, an The NEW 256Kbyte board is only $995. And the automatic printer buffer. No extra hardware is 512Kbyte SemiDisks for the S-100 and TRS-80 required; it's all in the software. Up to 8 Mbytes of Model II are $1495. (1Mbyte unit is $2350.) So, buffer space! it's a better solution than a $350 what are you waiting for? 64Kbyte printer buffer that wastes space on your desk. Send documents of almost any length to the The SemiDisk is the ORIGINAL single-board printer at a very high speed, then continue using microcomputer disk emulator. It has a greater the computer immediately. No Waiting! storage density than any other: 1 Mbyte per board! And we've been shipping them for over a year! We didn't do this with 'me too' engineer- ing. Our products are true innovations, based SemiDisk on reliable technology and proven designs, without the need for custom components. It's the disk the others are trying to copy^ SemiDisk Systems, Inc. P.O. Box GG Beaverton, OR 97075 (503) 642-3100

Call 503-646-5510 lor CBBS' /NW. a SemiDisk-equipped computer bulletin board. SemiDisk trademark of SemiDisk Systems, Inc. Copyright 1983 SemiDisk Systems, Inc. The RECOMPILE procedure also so as to read into the variable CH the tion of the IF clause no longer will be sets the vahie of a pointer variable contents of the source memory loca- satisfied (variable CH won't equal PTR equal to the address of the begin- tion pointed to by the pointer variable PM). Instead, the following ELSE ning of the source code buffer. The PTR. The next statement of GETCH is: clause will be executed so as to ad- pointer PTR is the memory pointer of vance the source memory pointer the compiler's lexical analyzer, and IFCH = CHR(PM| THEN PTR to the next memory location by it's successively advanced from byte the statement: to byte of the source code to read the This statement tests the byte read for latter. The lexical analyzer reads in the the Pause Mark (PM) value, a constant PTR : = PTR H- 1 ; byte in the memory location pointed equal to 35. This value was chosen to by the pointer PTR. because it is a visible character and The next invocation of GETCH will The lexical analyzer embodies an- was otherwise unused. read the next source memory location other major change in the PL/0 com- Following the IF clause, the assign- to enable the compiler to continue its piler. It is embodied in the procedure ment is: advance through the source code. The GETSYM, which also has nested pointer PTR is repeatedly advanced, therein the procedure GETCH. CH := CHR(SP) with each successive call of GETCH, GETSYM's first statement is: until it reaches the new Pause Mark The SP is equal to the ASCII code (32) inserted by the editor, as described WHILE CH = • DO GETCH: for a space. Control then returns to below. GETSYM, where the condition of the This constitutes part of an infinite WHILE clause is satisfied so that it loop that repeats for as long as again invokes GETCH. This sequence Editor's Sequence GETCH returns the ASCII code (32) is repeated and results in an infinite Fig. 5 shows the sequence of opera- for a space. As explained below, the loop for as long as the byte in the tions of the editor. The Input Charac- procedure GETCH will return the memory location being read is the ter function is performed in response space code 32 whenever it reads the Pause Mark. to the Keystroke (Fig. 3). The editor Pause Mark. After the editor changes that byte then determines if the input byte is a GETCH's first statement is: from the Pause Mark to the ASCII Control Character. If not, the charac- code for a space, the loop will be ter is entered into the source code buf- C}1 := I'TR^: broken, because the Boolean condi- fer as indicated at Char Into Mem Buf- fer. The input character is also displayed on the screen as indicated at Char to Video Console. If the input character is a control character, the editor then determines if it is a Carriage Return?. If not, the appropriate one of the editor's rou- tines for handling control characters is called, as indicated by the legend To Control Char Routine, and as described below with reference to Fig. 6. Still referring to Fig. 5, if the input character is a carriage return, then a new Pause Mark is written into the source code buffer adjacent to the end of the current line, as indicated at In- sert New Pause Mark. The old Pause Mark is changed to a blank space, as indicated by the legend Remove Old Pause Mark. For convenience in finding the loca- tion of the Pause Mark, a memory word location is reserved as a Pause Register for storage of the location ad- dress of the Pause Mark. The Pause Mark's new address thus is stored in this memory register, as indicated by the legend Update Pause Register. The ASCII code for a carriage return (13) is then entered into the source code buffer adjacent to the Pause Mark, as indicated by Insert CR Into Mem Buffer. The ASCII code for a line-feed (10) may be entered after the carriage return if this convention is Fig. 5. Flowcharl shnwing sequence nf operations of the editor. desired. 60 Microcomputing, July 1983 Fig. 6 shows the sequence of opera- of the source location pointed to by INIT clears the source code buffer, tions of the editor routines for han- the cursor to determine if the editing sets the memory pointer to the start of dling control characters input at the changes are being made to already- the buffer, inserts Pause Mark at the console. The input character first is compiled source code. first location of the buffer, sets the tested to determine if it is the code for Although these alternative schemes contents of Pause Register to the ad- the Cursor Up operation. If not, it is result in fewer recompilations, my dress of this first location, initializes tested to determine if it is the code for invention has the advantage of sim- the cursor to the first row and first col- the Screen Up operation. If not, the in- pler implementation. Furthermore, umn of the screen and sets the recom- put control character is handled in a the compilation process is so much pile flag pointer to the memory loca- conventional manner that will not be faster than the manual typing of tion preceding the first byte of the described further, as indicated by Pro- source code at the console that the buffer. cess Other Control Char. compiler will recompile all but the NEWFILE prompts the program If the input control character is the largest programs and catch up with mer to select either a new file for entr> code for the Cursor Up or Screen Up, the programmer before he can type of source code or an old file for ed then the respective operation Move more than a few new lines of code. iting. If the editing option is chosen Cursor Up or Scroll Screen is per- Therefore, the reduction of the num- the file is read into the source code formed. In the former case, the cursor ber of recompilations to the absolute buffer from a disk and the first screen is moved up one line on the video minimum is not essential. of source code is displayed. screen. In the latter case, the screen is The editor is written in Pascal with The procedure Vector calls the ex- erased and is rewritten to display calls to 16 external assembly-language ternal assembly procedure Poke three those lines of the source code buffer procedures and functions. The follow- times to store in low memory (20H) immediately preceding the erased ing is a description of those routines the jump vector to subroutine SAV- lines. unique to this invention. REGS, which stores the contents of As indicated at Insert New Pause Upon entry to the editor, the the CPU registers. In response to an Mark, a pause mark is put in adjacent Boolean variable ECont is tested to interrupt activated by a keystroke at to the end of the source code buffer determine if this invocation of the the console, the CPU executes the line immediately preceding the line editor is the first entry of the present RST4 call instruction and executes this now bearing the new cursor position. session or if it's a continuation. If jump vector and then the SAVREGS The operations Remove Old Pause ECont is False, then it is set equal to subroutine. After the registers are Mark and Update Pause Register are True and the following procedures are saved, a jump instruction in the then performed in the same manner called: INIT, NEWFILE, VECTOR subroutine sends the CPU to the as described above, with respect to and TOPLO. editor. Fig. 5. The operation Set Recompile Flag YES causes reinitialization of the compiler when the latter resumes control of the CPU after return from the interrupt service routine. This flag is preferably a memory location wherein a prede- termined code may be stored to in- MOVE CURSOR UP form the compiler that recompilation of the source code is required. YES In my version, this recompile flag is set to require recompilation whenever the cursor is moved up or the screen frame is scrolled up. That is, it is SCROLL SCREEN assumed that whenever the cursor is moved to point to source code that PROCESS OTHER may have been compiled already, this CONTROL CHAR code will be changed so as to require recompilation. INSERT NEW PAUSE MARK

Another Way An alternative method would be REMOVE OLD1 PAUSE MARK to set the recompile flag only if the previously compiled code is actually changed, since it is possible that the programmer may scroll up the screen and then scroll down again, without UPDATE PAUSE REGISTER making any change in the source code. Another alternative would be to maintain a memory register holding the address of the latest position of the SET RECOM PILE FLAG compiler pointer. The editor then might compare this address with that Fig. 6. Flowchart showing sequence of operations of control-character routines of the editor. Microcomputing, July 1983 61 The TOPLO procedure passes con- the end of the invisible line preceding for a carriage return (13), the pro- trol to the PL/0 compiler. It usually is the first displayed line in the case of a cedure CRET is called. This routine called after the editor has completed scroll down operation. UPDATE also enters into the source buffer a new the character entry or editing function removes the old Pause Mark by sub- Pause Mark adjacent to the carriage corresponding to the key struck at the stituting the ASCII code for a space return code, removes the old Pause terminal. In this case, the procedure is (32) in place of the Pause Mark in its Mark and updates the Pause Register, called after initialization of the editor. previous location. The Pause Register among other more conventional func- also is updated to the address of the tions (such as adding a line-feed code Reading Into a Variable new Pause Mark location. to the buffer, updating the cursor and The next statement of the editor is If the input byte is the control code scrolling the video display if the pres- not reached until an interrupt occurs for either moving the cursor up or ent line is the last line of the screen). in response to a keystroke. This state- scrolling the screen frame up, the ment reads into a variable the ASCII corresponding procedure performs code input from the UART's received the respective operation. This proce- One of Many Forms data register. This input byte is tested dure concludes with invocations of It should be understood that the pre- to determine if it is a control character UPDATE and RECOMPILE. ferred embodiment described above or alphanumeric character (greater RECOMPILE stores the ASCII code and shown in the drawings is illustra- than 31). An alphanumeric character for the letter R in the memory location tive of merely one of the many forms would be entered into the source code immediately preceding the start of the that the invention may take in prac- buffer and displayed on the video source code buffer so as to constitute tice. Numerous modifications thereof screen in the conventional manner. the recompile flag noted above. Upon can be made without departing from If the input byte is the control code completion of the cursor up operation the scope of this invention. for either moving the cursor down or or the screen scroll up operation, the For example, instead of the Pause scrolling the screen frame down, the CPU will return to the compiler, Mark implemented as a predetermined appropriate procedure is called and which will test the recompile flag, code entered into a memory location concludes with an invocation of the determine that the flag is set and then within the source code buffer, the procedure Update. call its reinitialization procedure to pause location may be defined for the UPDATE enters into the source buf- force the compiler to recompile the compiler by a memory address stored fer a new Pause Mark, adjacent to the source code from the beginning of the in a register. The compiler then may end of the old line in the case of a cur- source buffer. be prevented from analyzing code sor down operation, and adjacent to If the input byte is the ASCII code stored in memory locations beyond

Circle 14 on Reader Service card. FIRST QUALITY COMPONENTS - NOT MAIL ORDER "SECONDS"

OfOITAL MULTIMCTIR &ngl« roury •witch Opcr^. Tl WIRE Tl LOW PROFILE ARIES ZERO 22225 14 S.M tion Large. May 10 rMd 5' WRAP SOCKETS INSERTION 3-' I doiwon- 22327 18 .29 betlery Seven lgfKf>oo«- hMi« ecMcMO ••01*1 loe 32228 20 .29 IDC Vots. DC Amp*. Ohma, Tin plated copper alloy SOCKETS- •nd Mnom ol Cantf AC Votta. AC Ampa. 0vi. AuO- phosphor bronze cam actuated, true zero «ie Continuity Chech) contact-3 wrap with gas tight seal insertion - tin plated solder •uekNo 100 Stock 100- MMM b..iaa(>$Q.»6 tail pins - capable of being No. NoPtna'-flfl -499 500 No Nonn. 1-24 25-99 999 plugged into dip sockets, 11301 8 $.40 S.3« (.30 11301 8 $.10 $.09 S.08 incg wire wrap. WILD ROVER 60/40 ROSIN CORE SOLDER 11302 14 . 59 .S4 .45 11202 14 .14 .13 .12 Touch twitch capauie stock Lartgih WeiQM 11303 18 .64 .S8 .48 11303 16 .18 .15 .14 Ope^aling motion la OOS" without the No Oia iteet) loi i 11304 18 .73 .M .55 11304 16 .17 Sioeii No. e< S007S 0«3 9 15 .18 .15 No. Mn* 1-* 10-49 SO uae ot a levered arm Eiiremely laa( on | 11305 20 .99 .90 .75 11305 30 .20 .18 .18 and oH with low r>o079 033 66 S 4 1.52 1.38 1.15 11306 36 .28 .28 .25 liosa M 12 03 10.90 9.49 12098 S1.42 S1.2I M060 033 6 11309 40 2.05 1.SS 1.S5 1130« 40 .40 .37 .33

ELPAC POWER SUPPLIES - DC/DC CONVERTERS MODUTEC ELPAC Inpwl Output Oiftpul Special of the Month! Miniclamp AC Volt-Ammeter No. Voneo* Volt^ Cunent allows stngling one conductor out of (VDC) (VOC) IMA) many without disarrangement CUdOt 3 07.0 13t0 6 03S 4aa.S1i3.0» « 7.99 C»36t1 3.0-T.0 •13*0.6 oas «6i91i3.09 7*9 " Stock No AC Ampere* Price CB360a 3.0-7.0 18t07 030 4a«.91t3.09 7.99 ®® 13730 0-25A S39 50 CB3813 3.0-7.0 •15t0.7 020 «ai.9lB30S 7.99 13731 O-SOA 39 50 CB3a04 3.0-7.0 38t0.7 0-10 .46«.91i3.0S 7.99 Stock No. 13801 CB3614 3 07.0 -2610.7 0-10 .461.91 >3.09 7.99 13732 0-100A 39 50 - 'Floppy Disc" ACCESSORY LINE SPLITTER Power Supply For CL3a01 4.0-7.0 12*0.6 ftS1>1 ail 77 934 99 allows fast readings of AC power con- Winchester Drives CL3611 4.0-7.0 -12t06 691i1.2it.77 24.99 ^^ 59002 KH $37.50 sumption of plug in equipment with- CLMOa 4.0-7.0 19±0,7 •6lBl.ai1.77 34.99 out separation of leads ^ CL36ta 4 0-7.0 -19*0.7 69111.2i1.77 34.99 59003 Assembled Unit $59.50 $109.«> •91i1.2it.77 34.99 SlochNo 13727 1380M Datasheet CL3a04 4 0-7.0 CL38t4 4 0-7.0 • 691i1.2it.77 34.99 for more detailed information call for catalog for 13801 . . . 25 POCKET SIZED OATA SHEET FOfl OC/OC CONVCWTERS .. BATTERY TESTER f\ fo'or all typetypes of small battenesfrom ELPAC POWER SUPPLIES - SOLV SERIES FULLY REGULATED PIN FORMING TOOL 10/ U.135vto4 5v (HiWiOl puts ICs on their ^ Slock NO ,3733 $13.95 RWMg WliKftn true row to row }Q« A-r/iaMU uees spacing One side is _ VOLT-tCATICATOC R ISA 4-?Mai«3/ta AC VOLTAGE TESTER OMi SlM«( tor totv S< Bthru40PINS! Stock No. 11059$12.95 plugs intoany 110v service recept* OK MACHINE AND TOOL i acle to check line voltage over 50- i3?»5 Mp-i IC INSERTION/ •-5 SOCKET WRAP to 13^96 16pin IC EXTRACTOR 150VAC - 0tf> MXket t<(«d ptadc pa 1379/ 1«P«i EXTRACTION KIT 13790 Mpm One-piece, spring steel corv Stock No 13735 $1 «»." •rowisn 0

»v Mt S-T.pMnn >1307 40 c*n CIUKA »nO mcKxIf vound wv^w-W^ t'OutHe ,3303 p^ Stock No. 10 small package o qs 13313 Stock No. 13729 $13.^®

Drawer Q Milford TOLL 800-526-5960 NJ 08848-9990 FREE in NJ (201) 996-4093 this address, which may be in- The recompile flag may be set temporary entries are discarded and cremented and decremented by the whenever the compiler determines the compiler pointer is moved back to editor. that the source code contains an error. the end of the previous line, thereby The interrupt that causes control of That is, it may be assumed that when- obviating recompilation. However, the CPU to pass from the compiler to ever an error is revealed, the source this scheme still will require recom- the editor may be activated by a timer code will be changed so as to require pilation if source lines previous to the or clock instead of by the keyboard. recompilation. last line are modified. That is, the compiler may be periodi- Another possible modification is to Still another possibility would be to cally interrupted and the input port eliminate recompilation from the be- have the editor advance Pause Mark polled to test if a key has been struck. ginning of the source code in instances after entry of each character or after If not, the interrupt is terminated and where the error occurs in the last com- entry of each delimited symbol. control returns to the compiler. pleted line. If polling the port reveals that a key During the compilation of that line, This would provide the advantage has been struck, then the interrupt the resulting register values, table en- of revealing an error almost instantly ser\'ice routine editor takes control tries, stack manipulations, variable upon its entry to the keyboard, instead and is executed in the nianner de- assignments and code buffer entries of waiting until completion of the cur- scribed above for the disclosed pre- are temporarily stored and are not rent line. The disadvantage would be ferred embodiment. For most applica- entered until the syntax analysis of the that recompilation would be required tions, clock interrupts at intervals of source line is completed and deter- for every minor typing error without about every ten to 30 milliseconds mines that the line conforms to the giving the programmer a chance to should be frequent enough to keep up grammar. correct it before it is scanned and with keys stroked at the keyboard. If the line contains an error, these parsed. •

Program Listing. N. Wirth's PL/O compiler as modified by author.

(* LAST CHAtJCE AUG. IS, 1982 •) PROGRAM PLO; END {• ERROR •); (•SZ SDOOO«) PROCEDURE GETSYK; (• PL/0 COMPILER WITH CODE GENERATION •) VAR I. J, K:INTEGER;

PROCEDURE GETCH; CR - 13; (• CARRIAGE RETURN •) BEGIN LF - 10; (• LINE FEED •) CH :- PTR'; PM • 35; (• PAUSE MARK •) IF CH » CHR(PM) THEN SP - 32; (• SPACE •) CH j« CHR(SP) BUF • $9000; (• START (STX) SOURCE BUFFER •) ELSE ENF - 26; END FILE •) (• BEGIN NORW - 11; (* NO. OF RESERVED WORDS •) PTR :- PTR + I; TXMAX • 100; (* LINGTH OF IDEOTIFIER TABLE •) NMAX - 14; (• MAX. NO. OF DIGITS IN NUMBERS •) IF CH - CHR(ENF) TIIEN AL • 10; (• LENGTH OF IDENTIFIERS •) BEGIN KRITECPROGRAM INCOMPLETE'); ArtAX - 2047; (• MAXIMUM ADDRESS *) CC 0; LEVMAX • 3; (• MAXIMUM DEPTH OF BLOCK NESTING • CXMAX - 200; (• SIZE OF CODE ARRAY •) WRITE(CX:5, ' ') END; SYMBOL - IF (CH - CHR(CR)) OR (CH « CHR(Lr)) THEN (NUL, IDENT. NUHBER, PLUS, MINUS, TIMES, SLASH. ODDSYM, CH :- CHR(SP) EOL, NEQ, LSS, LCQ, GTR, GEQ, LPAREN, RPAREN, COMMA. SEMICOLON. END (• ELSE •) PERIOD. BECOMES, BECINSYM, ENDSYM. irSYM. THENSYH, END (• GETCH •) ; WHILESYM, DOSYM, CALLSYM, CONSTSYM, VARSYM, PROCSYM); BEGIN (• GETSYM •) WHILE CH - • • DO GETCH; ALFA • PACKED ARRAYtl..AL] OP CHAR; IF CH IN ('A'..'Z') THEN OBJECT . (CONSTANT, VARIABLE. PROCEDUR); BEGIN (• IDENTIFIER OR RESERVED WORD •) SYMSET • SET OF SYMBOL} K :- 0; FCT • (LIT, OPR. LOD, STO, CAL. INT, JMP, JPC)> (• FUNCTIONS REPEAT INSTRUCTION > PACKED RECORD IF K < AL THEN Fs FCT; (• FUNCTION CODE •) BEGIN L! O..LEVMAX; (• LEVEL •) K-H; A: O..AMAXf (• DISPLACEMENT ADDRESS •) A[K1 > CH END ; END; GETCH UNTIL NOT (CH IN (•A',.'Z',' LIT 0,A : LOAD CONSTANT A IF K >• KK THEN OPR 0,A : EXECUTE OPERATION A KK :• K LOD L.A : LOAD VARIABLE I.,A ELSE STO L.A : STORE VARIABLE L.A REPEAT CAL L.A : CALL PROCEDURE A AT LEVEL L AIKK) s- ' '; INT O.A s INCREMENT T-REGISTER BY A KK:- KK-1 JMP O.A : JUMP TO A UNTIL KK - K; JPC OA : JUMP CONDITIONAL TO A *) ID :- A; I :- 1; J s* NORW; C: CHAR; REPEAT PTR: 'CHAR; (• POIWTER TO SOURCE BUFFER •) K s- (I+J) DIV 2; RFLAG: "CHAR; (• RECOMPILE FLAG •) IF ID <- WOROIK] THEN J K-1; CONTi BOOLEAN; (• FLAG FOR INITIALIZATION •) IF ID >- WORDlKi THEN I K*1 CH: CHAR; (• LAST CHARACTER READ •) UOTIL I > J; SYM: SYMBOL; {• LAST SYHBCa, READ •) IF 1 > J+1 THEN ID: ALFA; (• LAST IDEOTIFIER READ •) SYM :- WSYMIK] NUK: INTEGER; (• I AST NUMBER READ •) ELSE CC: INTEGEr.; (• CHAhACTER COUNT •» SYM IDENT LL: INTEGER; {• LINE LENGTH •) END XK: INTEGER; E ERR: INTEGER; IF CH IN I'0' ..'g'l THEN CX: INT£GER; (• CODE ALLOCATION INDEX •) BEGIN (• NUMBER •) LINE: ARRAY(l..eil OF CHAR; K 0; A: ALFA; NUM 0; C(M>E: ARRAY10..CXMAX1 OF INSTRUCTION; SYM :- NUMBER; HSYM: ARRAYll..NORWl OF SYMBOL; REPEAT WORD: ARRAY(1..N0RW] OF ALFA; NUM lO'NUM • (ORD(CH)-ORD('0')); SSYM: ARRAYICHAR] OF SYMBOL; K K+l; MNEMONIC ARRAY[FCT) OF GETCH PACKED ARRAYll..5] OF CHAR; UNTIL MOT (CH IN ['0«..'9'n J DECLBEGSYS. STATBEGSYS. FACBEGSYS: SYMSET; IF K > NMAX THEN ERROR (30) TABLE: ARRAYt0..TXMAX] OF END RECORD ELSE NAME: ALFA; IF CH • •:' THEN CASE KIN3: OBJECT OF BEGIN CONSTANT: (VAL: INTEGER); GETCH? VARIABLE, PROCEDUR: (LEVEL,ADR: IF CH • THEN END; BEGIN SYM :- BECOMES; EXTERNAL FUNCTION PEEK(LOC : INTEGER) s CKAR; GETCH EXTERNAL PROCEDUE ABORT; END ELSE PROCEDURE ERROR(NiItn'£GER) ; SYM :» NUL; BEGIN END WRITELNC •: CC-1, N:2); ELSE ERR :• ERR > 1 BEGIN Listing continued. SYH :• SSYMICH); LEV-LEVEL, ADR); GETCH PHCCEDUR: ERR0R(21) END END 5 END (• GETSYH •) ; GETSYM END PROCEDURE GEN(X: FCT; Y,2: INTEGER); ELSE BEGIN IF SYM " NUMBLR THEN , IF CX > CXMAX THEN BEGIN BEGIN IF NUM > AMAX THEN KRITE('PROGRAM TOO LONG'); BEGIN ABORT ERROR(30); END ; NUH :«0 WITH CODEICX! DO END ; BEGIN GEN(LIT, 0, NUM); GETSYM F5» X; LND L Y; ELSE IF fYM « LPAREN THEN END I5ECIN ETO; (• GEN GETSYM; EXPRESSION I RPAKLNl tFSYS) ; PROCEDURE TEST(Sl,S2s SYMSET; N: INTEGER); U SYn -- RI'AREII THEN GETSYM BEGIN ELSE ERROH(22) ir NOT (SYH IN SI) THEN END ; BEGIN TEST(FSYS,ILPAREN],23) ERROR(N); END SI SI • S2; END (• FACTOR •) ; WHILE NOT(SYM IN SI) DO GETSYH END BEGIN (• TERM •) END(* TEST •) ; FACTOR(FSYS+lTIHES, SLASH)); WHILE SYM IN [TIMES, SLASH] DO PROCEDURE BLOCK{LEV,TX: INTEGER; FSYS: SYMSET); BEGIN VAR DX: INTEGER; (• DATA ALLOCATION INDEX MULOP s- SYM; TXO: INTEGER; {• INITIAL TABLE INDEX •) GETSYM; CXO: INTEGER; (• INITIAL CODE INDEX •) FACTOR(Fsys+I TIMES, SLASH)); IF MULOP • TIMES THEN PROCEDURE ENTER(K: OBJECT); GEN (OPR,0,4) BEGINC ENTER OBJECT INTO TAPLE •) ELSE TX TX • 1; GEN(OPR.O,5) WITH TABLEITXIDO END BEGIN END (• TERM •) ; NAME ID; KIND K; BEGIN (• EXPRESSION •) CASE K OF IF SYM IN {PLUS, MINUS) THEN CONSTANT: BEGIN BEGIN IF NUH > AHAX THEN ADDOP :« SYM; BEG IN GETSYM; {.RROP (30); TERM(FSYS+IPLUS, MINUS)); Nt!K 0 IF ADDOP - MINUS THEN GEN(OPR,0,1) END; END VAI. NUK ELSE TERH(FSYS4(PLUS, MINUS)}; WHILE SYH IN (PLUS, MINUS) DO BEGIN LEVEL :» LEV; ADDOP SYM; ADR DX; GETSYM; ' DX+1; TERM (F.'JYS+I PLUS, MINUS)); f.ND IF ADDOP - PLUS THEN GEN(OPR,0,2) ELSE GEN(OPR,0,3) "ROCEDUR: LEVEL END END END (* EXPRESSION •) ; END END{* ENTER PROCEDURE CONDITION(FSYS: SYMSET); VAR P.ELOP: SYMBOL; FUNCTION POSITIONdD: ALFA): INTEGER; BEGIN VAR I: INTEGER; IF SYH » ODDSYM THEN BEGIN (• FIND IDENTIFIER ID IN TABLE •) BEGIN TABLE(01.NAME :» ID; GETSYM; I :» TX; EXPRESSION(FSYS); WHILE TABLEII].NAME <> ID DO I I-l; GEN(OPR,0,6) POSITION I FND END {• POSITION •) ; ELSE BEGIN PROCEDURE CONSTDECLARATION; BEGIN rXPRKSSIONdE&L, NEC, LSS, GTR, LEO» GEO)+FSYS) ; I? IF SYM - IDENT THEN NOT(SyM IN irOL, NRO, tSS, LEO, GTR, GEO)) THEN BEGIN ERROR (2) ELSE GETSYM; nEClH IF SYM IN [EOL .BECOMES) THEN BEGIN PEI.OP :• SYM; GETSYM; IF SYM « BECOMES THEN ERROR (1); EXI'RESS10N{FSYS) ; GETSYM; CASE RELOP OF IF SYH « NUMBER THEN EOL: GEN(OPR,0, 6); BEGIN NEO: CEri(OPR,0, 9); ENTER(CONSTANT); LSS: GEN(&PR,0,10); GETSYM GEO: <;EN(OPR,0,11) ; END GTR: GEN(OPR,0,12); ELSE LEO: GEN(OPR,0,13) ; ERROR (2) END (• CASE •) E'fD (• ELSE •) END END (* ELSE •) ELSE END (* CONDITION •) ; ERROR (3) END BECIN (• STATEMENT •) ELSE IF SYM - IDE^^• THEN ERROn (4) BEGIN END (• CONSTDECLARATION •) ; I :« POSITIONdD) ; IF I - 0 THEN PROCEDURE VAI^DECI ARATlONj BEGIN ERROR. (11) ELSE IF SYH « intNT THEN IF TABLEII).KIND <> VARIABLE THEN HEGi:; BEGIN (• ASSIGNMENT TO NON-VARIABLE •) l.NTER(VARIABLE) ; ERROR (12); GETSYM I :-0 END END ; EI SE GETSYM; CRROR (4) IF SYM - BECOMES THEN END (• VARDLCLARATION •) ; GETSYM PROCEDURE LISVCODE; ELSE VAR I: INTEGER; ERROR (13); BEGIN (• LIST CODE GEHERATtD FOR THIS RLOCF •) EXPRESSION(FSYS) ; FOR I CXO TO CX-1 DO IF I <> 0 THEN WITH CODE!I] DO WITH TABLEIIl DO WRITELNd, MNEHONICIFI L:3, A:5) GEN(STO, LEV-LEVEL, ADR) ENDC LISTCODE •) ; END

IROCEDURL •jTATEMENT(FSYS: SYMSET); ELSE IF SYM » CALLSYH THEN VAR I,CXl,CX2i INTEGER; BEGIN GETSYH; IF SYH <> IDENT THEN ERROR (14) ELSE PROCEDURE TERH(FSYS: SYKSET); BEGIN VfiR MULOP: SYMBOL; I POSITIONdD) ; IF I « O THEN PROCEDURE FACTOR{FSYS: SYMSET); ERROR (11) VAR I: INTEGER; ELSE BEGIN WITH i^BLElD DO TEST{FACBEGSYS,FSYS, 24); IF KIND • PPOCEDUR THEN WHILE SYM IN FACBEGSYS DO GEN (CAL, LEV-LEVEL, ADR) BEGIN ELSE IF SYM = IDENT THEN ERROR (15); BEGIN GETSYM I POSITIONdD) ; END (• ELSE •) IF 1 - 0 THEN END (• ELSE IF •) ERROR(ll) ELSE ELSE IF SYM « IFSYM THEN WITH TABLElI! DO BEGIN CASE KIND OF GETSYM; CONSTANT: CEN(LIT, 0, VAL) CONDlTIONdTI'ENSYM, DOSYM)+FSYS) • VARIABLE: GEN(LOD, IF SYM - THENSYM THEN * GETSYN BEGIN ELSC WRITELN(-START PL/0'); ERROR(16); T s- 0; CXI CXj B 1; GEN(JI>C.0,0) : P 0; STATEMEKT(FSYS)j S(l) 0; S(2] « 0; SI3) •" 0; COOEICXl).A :» CX REPEAT END (• ELSE IE •) I :• C0DE[P]; P P+1; ELSE IP SYK - BECINSYM THEN WITH I DO BEGIN CASE F OF GETSYM; : BEGIN T T+1; Si T) :• A STATEMENT((SEMICOLON, ENDSYM)+FSYSI} END i WHILE SYM IN (SEMICOLON)•STATBEGSYS DO : CASE A OF (• OPERATOR • ) BEGIN 0: BEGIN (' ' RETURN •) T ! B-1; P SIT+3J; IF SYM - SEMICOLON THEN END ; GETSYM 1: SIT] ;! - -SIT); KI^E 2: BEGIN T T-1; SIT] ;: T SIT] + SIT+l] ERROR (10) ; END ; STATEMENT((SEMICOLON, ENDSYM)•FSYS) 3: BEGIN T :- T-1; SIT) : > SIT] - S|T»1) END ETO ; 4: BEGIN T T-1; SIT] s; « SIT) • SlT^l) IF SYM > ENDSYM THEN END ; • GETSYM 5: BEGIN T T-1; SIT] : >. SIT] DIV S|T*1) ELSE END ; ERROR (17) 6: SIT) !;< . 0RD(000{SlT])) END (» ELSE IF •) 6: BEGIN T T-1; SIT! : K 0RD(S|T)-S[T»1)) END ; ELSE IF SYM - WHILESYM THEN 9: BEGIN T :• T-1; S|T] : > 0RD(S|T]<>S|T+1)) BEGIN END ; CXI CX; 10: BEGIN T :- T-1; S(T] : « 0RD(S|T].S|T»1)) GES(JPC,0,0); END ; IF SYM • DOSYM THEN 12: BEGIN T T-1; SIT] ! B 0RD(S1T)>SIT>1)) GETSYM END ; ELSE 13: BEGIN T :- T-1; SIT] ! B ORD(S|TJ<»SlT*ll) ERROR (18); END ; STATEMENT(FSYS); END ; CEN(JMP,0,CX1); LOP: BEGIN T T+1; SiT] . SIBASE{L)*A] C0DE[CX2].A J" CX END ; END ; (• ELSE IF •) STO: BEGIN S1 BASE ( L) A] : SlTJ; WRITELN(SIT]); END ; TEST(FSYS, I ) 19) CAL: BEGIN (• GENERATE NEW BLOCK MARK ) END (• STATEMENT •» SlT+1] BASE(L); SlT+2) SlTO] B T*ls P A END ; TNTs T T*A; BEGIN (• OI^K •) JMP: P :« A; DX 3; JPC: BEGIN IF SjT) - 0 THEN P A; T T-1 TXO TX; END TABLEITX).ADP :• CX; END (• WITH, CASE •) GEN(JMP,0,0); UNTIL P - 0; IF LEV > LEVMAX THEN ERROR (32); WRITECEND PL/0'); REPEAT END (• INTERPRET •) ; IF SYM • CONSTSYM THEN BEGIN GETSYM; REPEAT PROCEDURE ZERO; CONSTDECLARATION; BEGIN WHILE SYM « COMMA DO BEGIN ERR 0; GETSYM; • 0; CONSTDECLARATION • 0; END ; 0; IF SYM - SEMICOLON THEN GETSYM ELSE ERROR (5) CH UNTIL SYM <> IDENT; KK AL; END ;

IF SYM - VARSYH THEN BEGIN GETSYM; REPEAT VARDECLARATION; PROCEDURE RECOMPILE; WHILE SYM • COMMA DO BEGIN BEGIN GETSYH; RFLAG BUF - 1; RFLAG" • '; VARDECLARATION PTR BUF • 1; END; 2ER0; IF SYM • SEMICOLON THEN END; (• RECOMPILE • GETSYM ELSE ERROR(5) UNTIL SYM <> IDENT; END; (• IF VARSYM •)

WHILE SYM • PROCSYM DO BEGIN BEGIN (* MAIN PROGRAM GETSYM; IF SYM - IDENT THEN IF NOT CONT THEN BEGIN ENTER(PROCEDUR); CONT :« TRUE; GETSYM RFLAG BUP - 1; END RECOMPILE; ELSE ERROR (4); FOR CH *A' TO ';' IF SYM - SEMICOLON THEN GETSYM ELSE ERROR (5); WORD] 1 - 'BEGIN WORDI 2) 'CALL BLOCK(LEV*1,TX,[SEMICOLON]+FSYS); WORD! 3 CONST WORDI 4] :- 'DO IF SYM • SEMICOLON THEN WORD( 5) • 'END WORDI 6] 'IF BEGIN WORDI 7) « 'ODD WORDI 8] 'PROCEDUR GETSYK; WORD( 9) • 'THEN WORDI10] 'VAR TEST(STATBEGSYS*IIDENT, PROCSYM),FSYS, 6) WORDdlJ - 'WHILE END WSYM[ 1] - BEGINSYM; WSYM[ 2) • CALLSYM; ELSE ERROR (5) WSYMl 3J • CONSTSYM; WSYM[ 4) ' DOSYM; END ; WSYMt 5] • ENDSYM; WSYM[ 6] • IFSYM; WSYMt 7] • ODDSYM; WSYMl • PROCSYM; TEST(STATBEGSYS*IIDENT),DECLBEGSYS,7) WSYMf 9] - THENSYM; WSYMllOJ ' VARSYM; UNTIL NOT(Syn IN DECLBEGSYS); WSYMl11) • WHILESYM; COOE(TABLE(TXO).ADR].A ;«CX; SSYMl PLUS; SSYMI'-•) - MINUS; WITH TABLE(TXO) DO SSYMI••' TIMES; SSYMI V J > SLASH; BEGIN SSYMCC LPAREN; SSYMI')•) • RPAREN; ADR CX; (• START ADR OT CODE •) SSYM('•• t- EQL; SSYMI',•] - COMMA; END ; SSYM('.' t> PERIOD; SSYMI J:- NEQ; SSYMI'<' CXO CX; CEN(INT,0,DX); J- LSS; SSYMt ) GTR; SSYH]';• STATEMENT((SEMICOLON,ENDSYMJ+FSYS); SEMICOLON; GEN(OPR,0,0); (• RETURN •) MNEMONIC LIT] LIT '; MNEMONICIOPR] : 'OPR TEST(FSYS, I ], 8); MNEMONIC LOD) LOD '; MNEMONICISTO} : 'STO LISTCODE; MNEMONIC CAL I CAL '; MNEMONICIINT] : 'INT D (• BLOCK •) J MNEMONIC JMP) - 'JMP 'JPC DECLBEGSYS '; MNEMONICIJPC) : STATBEGSYS ICONSTSYM, VARSYM, PROCSYM); FACBEGSYS - IBEGINSYM, CALLSYM, IFSYM, WHILESYM] • IF NOT COWT IIDENT, NUMBER, LPAREN); PROCEDURE INTERPRET; ) CONST STACKSI2E - 500; VAR P,B,T: INTEGER; (• PROGRAM-,BASE-,TOPSTACK-REGISTERS •) I: INSTRUCTION; (• INSTRUCTION REGISTER •) S: ARRAY (1..STACKSl:E) OF INTEGER; (• DATASTORE •)

FUNCTION BASE(L: INTEGER): INTEGER; VAR Bli INTEGER; C I- PEEK(BUF - 1) ; BEGIN IF C - 'R' THEN 61 B; (• FIND BASE L LEVELS DOWN •) RECOMPILE; WHILE L > 0 DO CH ' '; BEGIN GETSYM; B1 :> S(B1]; BLOCK(0,0,I PERIOD)•DECLBEGSYS+STATBEGSYS); L I- L-1 IF SYM <> PERIOD THEN ERROR (9); END ; IF ERR • 0 THEN INTERPRET ELSE WRITE('ERRORS IN PL/0 PROGRAM'); BASE :> B1 WRITELN END (• BASE •) ; Sony's Marketable Micro

With its many unique features, including micro floppies and an assortment of available add-ons, the SMC-70 is the "one and only" micro from Sony.

By Bruce Kline

he Japanese microcomputer in- Tdustry appears to be waiting on •ttiitttiit technology's sideline. A few com- panies, though, are actively pushing products: Sharp, Panasonic, NEC, Ep- son and Toshiba. And now Sony is joining that list—with a system that could only be the product of long-term development: the Sony SMC-70 (Sony Microcomputer Products, Sony Drive, Park Ridge, NJ 07656). Sony is selling a "system," not just an eight-bit microcomputer. The mini- mum system could be as small as the SMC-70 computer/keyboard with a monochrome monitor a:id a cassette recorder; however, Sony is promoting the SMC-70 as a business machine that includes the SMC-70 with dual disks, a color monitor and a printer. Available expansions include a nu- meric keypad, up to four micro floppy disk drives, an eight-inch floppy con- troller and a video signal converter for connection to a TV. Other peripherals that are or will be available from Sony include a light pen, a cache disk unit, a second RS-232C interface, an lEEE- 488 interface, a battery back-up unit, a bus expansion unit, an 8086 adapter, a 192K bank RAM for the Z-80 and up to 768K of RAM for the 8086. The packaging is compact and well-

Address correspondence to Bruce R. Kline, Panton Road, Vergennes, VT 05491. The Sony SMC-70 microcomputer, featuring SVi-inch micro floppy disk drives. 66 Microcomputing, July 1983 LOWEST SOFTWARE PRICES

We hereby certify that your purchase from Discount Software represents the lowest price sold anywhere. If you find a lower price on what you purchased within 30 days, send the ad and we'll reftind the difference.

Discount Price MDBS $1099 Palantier-1 (WP) $385 Visilile $219 DRSorQRSor RTL $319 "COMMUNICATIONS Visischedule $259 MDBS PKG $1999 «249 SuperCalc Ascom $149 PEACHTREE ARTIFICIAL INTELLIGENCE MICROPRO BSTAM or BSTMS . . . $149 G/L.A/R,A/R PAY. (each) $224 Medical (PAS-3) J849 Act $157 PeachPack P40 $395 Crosstalk ACCOUNTING PLUS Dental (PAS-3) $849 SUPERSOFT ASHTON-TATE '289 G/L.AR. AR INV.(each) Mail Merge Ada $270 $g0 Move-it "OTHER GOODIES ' dBASE II Diagnostic II $89 Super-Text II «4?? call lor price Disk Doctor $89 Data Factory WordStar/Mailmerge $399 Forth (8080 or z80) $149 OTHER GOODIES" Mini Factory Financial Planner $595 WS/MM/SpellStar $549 Fortran $319 Micro Plan $419 DB Master Bottom Line Strategist $349 Customization Notes $44 RaMor $79 Plan 80 $495 Versalorm VS1 ASrST DESIGN/FRONTIER C Compiler $225 Target PlannerCalc .... $79 IBM PC. 16 BIT 8, Prof Time Accounting $549 SpellStar Star Edit $189 Target Financial Modeling $299 General Subroutine $269 M99 Scratch Pad $266 Target Task $299 DISPLAVWRITER $174 Tiny'C" $89 Application Utilities $439 DataStar StatsGraph WORD PROCESSING" $249 $45 Tiny "C" Compiler $229 DIGITAL RESEARCH InloStar , . .$349 Analiza II Wordstar $289 CP/M 2.2 Disk Edit $89 MicroStat $224 SpellStar $199 ReportStar $254 Vedit Intel MDS $135 Encode/Decode II $84 $130 Mailmerge $199 Wordmaster. . $119 MiniModel Optimizer $174 $449 Easywriter $314 Supersort I . . $199 StatPak $449 Northstar Term II $179 Easyspeiler $159 Calc Star $129 . $54 Micro B-l- $229 MICROSOFT Utilities I or II Select/Superspell $535 String/80 $84 Write On $116 String/80 (source) $279 '159 SOFTWARE DIMENSIONS/ Speilguard $189 ACCOUNTING PLUS ISISCR/M Utility $199 Micropolis $175 '229 Lynx $199 Textwriter III $111 Per Module $399 Supervyz . $95 Spellbinder $349 $Qg CBasic-2 '329 UNICORN ATI Power (tutorial) ..$75 Final Word $270 Mince or Scribble (each) . $149 Mathe Magic . $95 LANGUAGES i UTILITIES ' Fortran-80 Both $249 CIS Cobol $765 Crosstalk $174 Display Manager $319 The Final Word $270 Forms II Move-it $129 Access Manager .. $23? Cobol-80 WHITESMITHS Basic $249 BSTAM or BSTMS $149 Multiplan $219 •C" Compiler . $600 Zip MBasic. CBasic $129 Pascal MT+ /86, SPP- . . . $679 M-Son $ CBasic86 $294 Pascal (incl-C") .. . $850 1 APPLE II 1 $449 Macro-80 Act86 $157 ^9 •PASCAL" ASHTON-TATE Trans 86 $115 . $429 XLT86 $135 BT-80 $179 Pascal/MT+ Pkg.. (See CP/M Ashton-Tate) MuSimp/MuMattl $224 . $315 MBasic (MSDOS) $329 MAC $85 Compiler BRODERBUND MuLisp.80 $174 . $175 MBasicCompiler (MSDOS) $329 RMAC $179 SP Prog G/L (with A/P) $444 ORGANIC SOFTWARE PascalZ . . $349 Payroll Both $629 Sid $65 Textwriter III $111 $355 CBasic Compiler (MSDOS) $495 Pascal/UCSD 4 0 ,.$670 INFO UNLIMITED Datetxiokll $269 Cobol (MSDOS) $649 DATA BASE EasyWriter (Prof) Milestone $269 $155 590 ' ® ' dBASE II Call 477 EasyMailer (Prof) $134 Pascal (MSDUS) $429 OSBORNE (Mcgraw/HIII) FMS-80 $799 Datadex Fortran (MSDOS) $429 G/L. or AR & AR or PAY. . . $59 $129 DeSpool $49 FMS-81 $399 MICROSOFT C" (MSDOS) $429 CB-80 $459 All 3 $129 Condor I & III Call Softcard (Z-80 CP/M). $239 CP/M 86 $239 Link-so . . , ,$90 AII3 + CBASIC-2 $199 Superlile $159 Fortran $179 OTHER GOODIES FOX ^ GELLER Enhanced OstJorne $299 Lotus 1-2-3 $329 WORD PROCESSING Cobol $499 Ouickscreen $135 PEACHTREE SuperCalc $269 Perfect Writer $189 Tasc $139 Ouickcode $265 G/l.A/R.A/RPAY.INV(each)$399 Premium Package $549 VisiCalc $219 Reversion Add $234 WordSearch $114 Visiplot/trend $259 SpellGuard $199 RAM Card . $89 Sg5 DU.,I Peachcalc $249 MICROPRO Visidex $219 Other Less 10% Peachtext $289 Easyfiler $359 Spell Binder $349 (See CP/M MicroPro) STAR COMPUTER SYSTEMS VISICORP Mathemagic $95 Select $495 MICRO-AP G/L.A/R.A/RRay(each). $349 Visicalc3.3 $189 dBase II Call 477 Selector IV .. $295 All 4 $1129 The Word $65 Desktop/Plan II $219 Condor Q & R. Others Call Selector V . $495 Legal or Property Mgt. .. $849 The Word Plus Visiterm . $90 Statpak $449 MICRO DATA BASE SYSTEMS STRUCTURED SYSTEMS '145 Visidex $219 Optimizer $174 HOBS $269 Business Packages (call) Visitrend/Visiplot $259 Desktop Plan $259 FREE W^TH PURCHASE: Complete Software HI Exclusive Confidential Buyer's Guide rf""Hotline] " Software ($5.00 value) Our reputation for cour- BargainGrams Filled with and teous and knowledgeable Regular notices of insider's usable advice about service has resulted in calls bargains not available to scores and scores of lA from people who never the general public. software programs from^I S purchased our products. accounting and business Now a separate "hotline" is DISCOUNT SOFTWARE Outside Continental U.S.-add $10 plus Air systems to word processing available to customers only. Parcel Post Add $3.50 postage and handlirw and utilities. per each item. California residents add sales tax. Allow 2 weeks on checks. C.O.D. »3.00 extra. Prices subject to change without notice. 1 800 421-4003 All items subject to availability. "Mfr. trade- mark. Blue Label $3.(X) additional per item. Calif: 1 800 252-4092 CP/M is a registered trademark of DIGITAL 6520 Selma Avenue, Los Angeles, OA 90028 RESEARCH, tNC. MC683 • IN^F^FIJ M ? SOFTWARE] organized. The first two micro flop- the SMC-70, is the heart of this super high-resolution mode (640 x 400 pies mount within the main unit and system. The SMC-70's vital statistics B/W pixels). This means that the - take up an insignificant amount of are listed in Table 1, but a few more chrome monitor should have a long space. The main unit has room for two observations are in order. decay phosphor to avoid flickering. expansion modules, but the modules 6. The keyboard is serviced by an must not require any external connec- 1. The video FIAM is mapped into 8041 A, a microcomputer that is con- tions. Memory or cache disks are ideal the I/O space, thus freeing the main figured as an intelligent peripheral candidates for this position. memory for programs and data. interface. The 8041A takes care of The next three expansion modules Although accessing the video RAM scanning the keyboard, forming the mount in a unique way—the main with I/O instructions may be a little in- key code (including the programmable unit literally grows to accommodate convenient, it's still preferable to function keys), repeating the key if it is them. The power supply is on a sliding using up a sizable hunk of main held down (timing is programmable) tray and forms the rear of the main memory. and interrupting the Z-80A when a key unit. When you slide the power sup- 2. The character font is program- is depressed (optional). ply away from the main unit, a gap is mable. The default font uses one-dot 7. A help key is provided, but it is not formed where the expansion mod- descenders. Each character can have used in any of the built-in software. ules, which are in their own small blink and inverse attributes set 8. The keyboard does not extend far cases, can be inserted. individually. enough for a palm rest. Except for the monitor, a powerful 3. The video display consists of 9. There is an excellent set of edit system can be assembled as a single three overlaid planes: characters, keys, including four logically arranged unit. However, there are some inher- graphics and background, with char- cursor keys. ent disadvantages to all of this neat acters having priority. 10. The F and J keys have dimples to packaging: the keyboard is perma- 4. The SMC-70 interfaces directly to aid in touch-typing. This is especially nently attached to the main unit, a fan two kinds of monitors: monochrome important on a computer keyboard is required for air movement and in- and high-resolution RGB (red/green/ where the hands are often leaving the dependent hardware houses will have blue). A television interface is home positions. the added problem of supplying cases available, but at $200 it's a dubious 11. Cables do not come with the for some of their expansion modules. option. Caution: High-resolution RGB unit, and hard-to-find eight- and 13- monitors are expensive, yet once you pin DIN style plugs are required. (I The Main Unit see the SMC-70 working with one, it'll hope Sony realizes its error in doing The micro floppies have a tendency be hard to settle for monochrome. this.) to steal the show, but the main unit, 5. Interlaced scanning is used in the 12. The Basic reference manual, the system monitor manual and the hard- Circle 209 on Reader Service card. ware reference manual do not come with the unit. Only the operating in- structions and two reference charts are included. This is carrying un- bundling much too far. It's like buying a computer and finding that the CPU chip is not included. Documentation is a necessary component of any hard- ware or software product; the product is incomplete and unusable without it. To add insult to injury, Sony charges 10 USEFUL RANGES AC Current 6, 15, 60, 150, 300, 600A $28 to $43 for each of the manuals, AC Voltage 150, 300, 600V and they weren't even available until Resistance 0-20kS!(lkn center scale) about a month after the system was first marketed. (By the way, the ROM Utt POHER SUPPLY Basic and System Monitor reference For Lab or Original Equipment charts that do come with the unit are FEATURES: Efficient 30 kHz twitching frequency • Four Models satisfy most handy.) applications • Yean of trouble-free service • Each side AC line fuse protected • Tele-Tale LEO "Pwr-On" Panel Indicator • Three separate voltage outputs 13. The ROM Basic supplied with • Metal enck>sure provides physical ai>d EMI protection • For experimental use or permanent power source • Soft start feature protects critical circuits • Parallel the unit is complete with powerful operation acceptable for higher current f>eed$ • Push-in terminals, accept wire or test lead • Light-v^eight. easy to use • AC line cord permanently attached • Most graphics commands. Sony Basic runs reliable power source for a variety of uses and applications • 48 hour bum-in as- sures MTBF of years, reasonably priced at $1.90/wan * Full one year guar- close to the speed of Applesoft. antee • 2 tone ar>odized case • Custom volt/current outputs on special order • Input surge protection • Automatic short circuit protection and restoration FULL 100X Since floating point numbers in • UL recognized components • Handy Service Aid RETURN PRIVILEGE Sony Basic have 14 significant digits, GUARANTEED SPECIFICATIONS: Input; 90 132VAC. 47-440H2 • Dual AC Input Fuses • Line Regulation: ±0.1% Max. for 10% input change • Load Regulation: +0.2% Sony Basic is a little slower than Ap- Max. on #1 Output • Ripple Noise: Typ. 1% PP Max. • Over Voltage Protection Qty. Modll Outfwt# 1 Output#2 Oul;>ut#3 Total • Reverse Polarity Protection • Compact, only 7V4" x 4" x 21i" • Fast load trans PS-1 SVSA •tjvasA -1}V-a.6A plesoft during number crunching. On PS-2 5V.6A »15V-a4A -15Va4A ient response*5 volt adj. +10%*DC Output: 42 Watts continuous*?©* Efficiency PS-3 5V6A •lav-asA -5V.1A the other hand, it is a little faster dur- PS-4 6V3A +24Va6A -24V.0.6A ing other processing. SK-7K n Clamp-On Tester inc 1545 Osgood St. Uiit llAV. No. Ando»Br. MA 01845 f^REE Clamp.On Tester, with any 4 Units Purchased. NC Loom Chaigeto 3 MastwCard • V.sa • AnieficanExpress • Check/MonevOrder 14. The system monitor is surpris- Sub Total _ Card If Exp Date .. NOT)CE:We rmrve the righ ingly powerful for a business system. Mass res add 5% Tax _ Name to limit quantity of FftEE Shipping & Handling S4.50 Address SK tester's with each order. It has a mini-assembler, disassembler TOTAL Cilv State Zip and a memory and peripheral test, as CALL TOLL FREE 1800 343-1455 Siflnature . . Within MASSACHUSETTS 1-617-682-6936 SCHOOLS-LABS: QUANTITY PniCtNO (tO o. mon) ON REQUEST well as access given to the monitor's utility subroutines. gether and formed a standards com- system is by Condor Computer and the 15. The SMC-70 has a built-in mittee—a well-used technique to take accounting system is by SSG. clock/calendar with battery back-up. the wind out of the sails of a manufac- As far as languages go, there is a 16. The fan is a bit noisy, but the rest turer who is early to market with a disk version of Sony Basic, and Pilot of the unit has a solid feel. product. It is interesting to note that Plus with CB-80 is planned. Hewlett-Packard has just released its Micro Floppy Disks Series 100 and Series 200 computers Conclusion I intended to put an eight-inch drive with the Sony drives. Also, Tandon is By getting one of the first machines on my system, but after seeing the planning to produce a compatible marketed, I knew I was inviting trou- micro floppies, I quickly changed my drive early next year. ble. So far, that trouble has manifested mind. In a word, they're cute! But One sour note is that the micro flop- itself as lack of information and sup- that's not all. Each disk holds 280K, py drive does not come with an oper- port, but the start-up problems are and the drives are fast and quiet. ating system. CP/M is another $150. A mostly solved now and there is sup- Imagine carrying a megabyte of data disk version of Sony Basic is also sold port. I'm happy to say that I have not in your shirt pocket. separately for $150. Although Disk flushed out any hardware bugs yet. The micro floppies are 3'/2 inches in Basic is powerful, it's a bit expensive The dealers have an "800" number diameter and are in a rigid plastic for a second language. I say "second" to call for help on technical questions, case. You can slide a shutter over the because I installed an AMD 9511A but Sony's most knowledgeable peo- head access slot when the floppy is not math chip and used Forth with it to ob- ple tend to be tied up with computer in use. The rigid case and the shutter tain an impressive performance. shows and the like. Users with a busi- ensure that the magnetic medium is ness configuration of all Sony compo- well-protected. Software nents running Sony-supplied software Whether or not Sony's micro floppy Sony is after the small-business will probably have things run fairly formal will become an industry stan- market, judging from the first avail- smoothly. The technical types, dard is still up in the air. able software. Table II lists applica- though, will have a few trails to In response to Sony's introduction tion software that is available. Appar- blaze. • of the micro floppy, a number of disk ently all of this software was produced drive manufacturers quickly got to- in the U.S. The database management Operating System CP/M. CPU control keys; five programmable Processor: Z-8()A. function keys; one help key (pro- Uinguagcs Clock: 4.028 MHz. grammable); numeric keypad inter- Sony Basic. face. Sony Disk Basic. Interrupts: Nonniaskiible and niotle 1. Audio cassette: Eight-pin DIN jack; 1200 CB-80. b/s baud rate; motor on/off switch. Pilot Plus. Memory Printer interface: 25-pin D connector; TTL Main memory: 64K bytes (64K bit Word Processing dynamic RAMs). level; standard eight-bit parallel trans- Letterwriter. Video RAM: fer. RS-232C interface: 25-pin D con- Word Processor. Graphic—32K bytes (16K bit dynamic nector; TTL level; 75-19,200 b/s baud Spelling Checker. RAMs). rate; implemented with 8251A. Mail List. Character—2K liytes (static). Speaker: Eight ohms, three levels. W/P Math. Attributes—2K bytes (static). Earphone: Minijack. Font tabic—2K bytes (static). RGB video output: 25-pin D connector; Spreadsheet ROM: 32K bytes total. 0V-0.7V, 75 ohms. VisiCalc. System monitor—9K bytes. SuperCalc. Sony Basic-22K bytes. Monochrome video: Eight-pin DIN jack; 1 Default font-1K bytes. Vp-p, 75 ohms, sync negative. Accoiniting System Light pen interface: Five-pin DIN jack. Oisplay General Ledger. Slots for expansion (50-pin connectors): Accounts Payable and Receivable. Character di.splay: 8x8 dot Inside—Two slots. Order Entry System. niatrix/character; 80 or 40 characters Outside—Three slots. Payroll System. by 25 lines; eight colors. Maximum current—2.4A al +5V. Inventory Control System. Border area: 16-color. 1.2A al -t^ 12V. 70mA at -12V. Output interface: Database Management Expansion unit: 50-pin connector. Color—RGB analog signal: in, level Record Management System. separate sync signal; comjxisite sync Report Generator. General signal. Database Management System. Monochrome—Composite video signal, Dimensions: 14.5x3.625x17.5 inches. TTL level separate sync signal. Weight: Ten pounds, nine ounces. Conimiiiiications Price: $1475—main unit; $650—single On line Communications (IBM 3275). I/O Interface micro floppy drive; $1100—dual Batch Communications (IBM 2780/3780). Keyboard: Encoded with 8041A micro- micro floppy drives; $5—micro floppy TWX and Database Access System. processor; 72 keys; eight display disk; $90—numeric keypad. Multiterminal Emulation.

Table 1. Complete list of the Sony SMC-70 specirications. Table 2. S(>lt\w)rc for Sony's SMC-70. TS-1000 Printing Power For Under $100

Timex-Sinclair's lowest-priced printer for the lowest-priced micro is no toy. It can capably do the job— and at a fraction of the cost.

By Jim Stephens

imex-Sinckiir has done it again! Its The few units that were "smuggled" the printer at a discount price a week Tnew, redesigned model 2040 into the U.S. were not impressive, but after I had seen the advance photos! printer far exceeds its first model. But, they were the only ones available that Still unbelieving, I called the store. more importantly, the printer is avail- responded directly to the ROM's Sure enough, they had more than 20 able on a local basis. That is, you can printer commands. However, they units in stock at this one outlet alone. I buy it at your local Timex-Sinclair dis- did do a reasonable job of printing. I was there when the doors opened. tributor. Will wonders never cease! waited a year for my printer, mainly The clerk said she had sold four Sinclair Research promised a printer because I couldn't get one locally. printers the night before the advertise- when the early ZX-80 units were in- Now that I have my new model, the ment came out. troduced in 1980. They even were able wait was worth it. to market a small printer overseas and I had seen a few advance photos of Sizing Up the 2040 in Canada. The first one had several the new 2040 printer, but based on The 2040 measures 2x6x8 inches handicaps, such as four-inch, metallic- past experience I felt that production of black, high-impact plastic, and is coated paper that had a tendency to probably was still about six months larger and heavier than the original jam if it was allowed to stay in one away. To my surprise, a full-page Sinclair printer. It weighs in at about spot on the roller for a long time. newspaper advertisement featured three pounds, which is almost three times the size and weight of the orig- inal model. The printer comes with its own heavy-duty power supply. This supply is a wall-plug-type unit similar to the original supply, but is more than twice as large. Output of the supply is 24 volts at 1.2 amps! The best news is that the paper is now white, 4'/i inches wide, and of a high-quality thermal specification. The earlier model had a width of only four inches and looked like burnished aluminum. The new paper is supplied in lengths of 85 feet, and fits into a paper tray that is covered with a clear plastic dust cover. The new model is similar to the design of the CAI P40 printer, which is also made for the ZX-81 and TS-1000 computers.

The Timex-Sinclair 2040 thermal printer is compatible with both the TS-1000 and TS-2000 computers. Address correspondence to Jim Stephens, 2324 Den- The printer incorporates a dot matrix print mechanism with full graphics and text capability. It prints two nywood Drive, Nashville, TN 37214. lines per second in two modes. The print is 5x7 dot matrix of 32 be irritating, but I'm usually watching Alphacom. The fact that it was pro- columns. The print speed is a quiet the printer do its thing. duced in Taiwan was not discour- two lines per second, which means a The instruction manual gives most aging, since almost everything seems full screen can be copied in less than of its attention to explaining what to to be made in Taiwan these days. 12 seconds. Unlike the CAI P40 do to avoid damage to the printhead. Turning the board over reveals a printer, the 2040 responds to the The use of the supplied paper is highly sparsely populated component side LPrint, LList, and copy commands di- recommended, since low-quality paper that's dominated by one 40-pin rectly rather than having to peek and can "ruin the print head in a few min- 8224IC and four others of unknown poke memory locations for operation. utes of operation," according to the in- makes and models. I was most inter- The new unit has its own power on/off structions. Apparently, the printer is ested in the printhead mechanics, and switch and, by holding the on switch fragile and subject to serious damage if explored this to the greatest extent. down, the paper can be advanced the printhead is jammed. •The printing is done by a pair of manually. This is a necessary func- I had one moment of panic when I two-inch stationary thermal wafers tion, since the last line is below the first turned on the printer and my connected to the board by ribbon tear-off blade when the last print line TS-1000. The display was not oper- cable. The wafers, which are flat is completed. ating! All I could get were skewed against the platen, do move from side to side about Vg-inch to produce the Operation characters' horizontal dots. The move- ment is driven by a plastic cam, and The new printer comes supplied return is done by a spring. This will be with an eight-inch, permanently at- a large source of wear. The roller and tached interface cable terminated wafer cam are driven by nylon gears with a backplane connector/adapter. The 2040 is by far that have sensing switches for infor- The connector is attached to the back- the best printer for the price. mation on starting and stopping. plane of the TS-1000, and the 16K RAM Pack is connected to the adapter It is small and portable. There is a lot of metal within the case, but it is mainly die-cut and by a feed-through extension board. It operates with The RAM Pack now will be located stamped, with no machined or preci- about two inches away from the com- the ROM Basic sion parts. This would explain the low puter, making it appear rather un- and never misses a character. cost. I see no reason why this stable. However, no problems have mechanism would not last for thou- been experienced with wobble. sands of cycles, other than the one nylon cam used to shift the printing For operation, the printer cable is at- wafers. tached to the TS-1000, and the power supply is plugged into the wall outlet. With little movement of the heads, The printer is switched on manually black lines. After I quickly turned no impact printing and the use of qual- and the TS-1000 is activated. It doesn't everything off and reconnected all of ity paper, this little printer should appear to matter if one of the units is the plugs, no further problems were easily last the life of the system. off. I accidentally left my printer on experienced. for 24 hours and it still operated per- Watching this little printer quietly The Best for the Bucks fectly the next day. The two regulators spew out characters at two lines per The 2040 is by far the best printer under the vents on the right side were second is fascinating. I had expected a available for the price. Actually, at giving off plenty of heat. I suppose the horrible churning noise like that $99.95, it's the only printer for its extra power supply is necessary, but I of my little printing calculator, which price! It is not full-size, will not print detest all that extra cable cluttering up sounds like it's grinding coffee. The on plain paper, and can't compare to my limited work space. 2040 printer is hardly audible over the the more sophisticated units, but it The documentation is brief, but ade- sound of the television, the kids, the does the job at a fraction of the cost. quate. A built-in test procedure is dogs and the radio. With the printer, your computer described to determine if the printer is The instructions end abruptly with can now do many things like the big operational. This test consists of a short paragraph describing how to ones. It can generate hard copy that holding down both the on and the off use the printer with machine code. can be used for such things as records switch simultaneously. This automat- They describe how the use of the Out management and program debugging, ically prints alternate rows of "eights'' instruction activates and deactivates and, with the proper formatting, it can and "ones." If this test is passed, you the printing mechanism. This infor- even be photocopied using two are ready to use the printer commands. mation will be useful for machine- 11-inch lengths for a complete LPrint is a direct command that code programs that require the use of 8Vz X11-inch printed report. The ther- prints all of the characters in the the printer. mal print photocopies beautifully. quotation marks following the LPrint. The extra power supply is a nui- LList lists out your entire program A Look Under the Hood sance, and it lacks the frills of a soft- unless the break key is pressed. The Even though it probably voided the ware-controlled power on and off. copy command copies the entire warranty, I could not resist a peek at These shortcomings, however, can be screen to the printer. All of the screen the mechanics of the most inexpen- overlooked when you consider the ad- will be printed even though there may sive printer on the market. vantages. It is small and portable. It be just one line on the display. This After carefully removing the four operates with the ROM Basic and can waste a lot of paper. When the retaining screws, I lifted off the bot- never misses a character. It is quiet printer is operating, the display acts as tom, which exposed an excellent- and the cost can't be beat. Now where though it is in the Fast mode. This can quality printed circuit board made by is that minidisk?^ Increase the Power of CP/M

If you find CP/M lacking in some areas, this utility program will provide more power to you and your micro.

By Mitchell K. Hobish

he way that CP/M has virtually For this reason, several "front ing-system debates. While these pro- Ttaken over the marketplace for ends" (programs that provide some of grams allow greater flexibility in eight-bit microcomputer operating sys- the capabilities CP/M should provide) terms of program redirection, they do tems testifies to its utility. However, have appeared. not allow access to all the data extant it's been described as less than "user Microshell and Unica supply sev- on a disk. And, while Microshell, for friendly"—a capacity to which all in- eral CP/M enhancements, many of example, supports multiple state- terfaces between the human operator which emulate Bell Labs' Unix, the ments on a command line, it's still and the computer should aspire. sometime-contender in best-operat- rather cumbersome if you want to copy several files from one disk to another.

Command Funtion More Power to You CHECK Calculate checksum for file. Enter another utility program: Pow- COPY Transfer files. er, from Computing! (2519 Greenwich, DIR Directory listing. San Francisco, CA 94123). Actually, DISK List disk parameters. this is a package of about 50 programs. DS Display and substitute hex code. DUMP Dump ASCII code. Since the cost of the package is $169, it DUMPA Dump formatted ASCII code. averages out to a little over $3 per utili- DUMPH Dump formatted HEX code. ty program—quite a bargain when you DUMPX Dump formatted ASCII and HEX code. consider what you get. (See Table 1 for ERA Erase files. a listing of the available commands.) EX Execute program at given address. The program requires about 12K of EXIT Leave Power, go to designated address. memory, beginning at lOOH. FILL Fill memory with specific HEX byte. Most of the programs supplied are GO Load a program and execute. GROUP List group numbers of files. menu-driven. That is, entry of one of the utility names at the keyboard (for JP Jump to entered address. LOAD Load a file to given memory' address. example. Copy) results in a listing of LOG List POWER default settings. all the files, each with an associated MOVE Move block of memory. number, on a disk to the CRT. Merely READ Read track and sector. enter the number of a file (or series of READGR Read group. files, or all the files) and the destina- RECLAIM Recover erased files. tion drive, and the files will be REN Rename files. transferred appropriately. Try that RUN Run a .COM program from Power. with PIP! SAVE Save file from memory. SEARCH Search memory for string. The same format holds for utilities SETDIR Set file to $DIR. that rename files, reclaim previously SETRO Set file to SR/O. erased files, load, generate the size in SETSYS Set file to $SYS. sectors and bytes, and on and on. The SETWR Set file to $RAV. SIZE List size of file in sectors and bytes. SPEED Set display speed. STAT List free and used disk space. Address correspondence to Mitchell K. Hobish, Laboratory of Chemical Evolution, University of Maryland, College Park, MD 20742. Table I. Listing of commands available vfith Computingl's Power utility program.' use of numbered files helps alleviate iter between disk drive designation tory listings. Even the speed at which the problem of typing erroneous file and file name (e.g., B;filnam.ext). text is read out to the CRT may be names; it also saves time. Furthermore, I have always found varied. Power also allows you access to onerous the necessity of shifting to get And there's more. . . Through the specific sectors and groups on the an asterisk, unshifting to get a period, DS command, several bytes of Power's disk. This data may be loaded into and then shifting again to get another code may be modified to provide more memory at a location you designate, asterisk for complete wild-card com- customization: prompt-changing, sign- and may then be operated on appro- mands. Well, Power takes care of that, on message, characters per line and so priately, before being written back out on. The modified code may be saved to disk to the sectors you designate. to disk for a completely personalized Never before has the CP/M operator package. had such control over information Never before has stored on disk. the CP/M operator Pick Up Power The only area I found even slightly had such control over Useful Commands lacking was the documentation; the One of the commands I find par- information stored on disk. manual in the package I received had ticularly useful is TEST. This nonde- blurred and missing letters. I would structive test of the designated disk have preferred that the manual be ori- results in generation of a unique CRC ented vertically along the long axis of checksum. It also identifies bad sec- too; a simple " *»" will be handled ap- the page instead of the horizontal for- tors and collects them into a special propriately. mat currently supplied. In addition, I file, designated SYSTEM. Hence, it's There are times when I would pre- found that several of the commands invisible to the user; CP/M will never fer differently formatted directory were incompletely documented. attempt to write data to those sectors. listings and other customizations. These are mere quibbles, however. This is an excellent way to assess the Through the Log command, the user I would strongly recommend this integrity of any disk—especially those can set any number of columns for powerful addition to CP/M for anyone that may appear to be "bargains." listings, set Page on or off (number of who wants more access to files on the Another aspect of the user-friendli- lines read out to CRT before stopping disk. Power is an excellent buy- ness of the package is the way it al- and waiting for a for the next made even better by a money-back lows use of the semicolon as a delim- page) and show system files in direc- guarantee.®

Circle 72 on Reader Service card. Circle 60 on Reader Service card. ATTENTION EPSON OWNERS The ultimate solution to your paper storage v^ VIC RABBIT CARTRIDGE problem at an unbelievable low cost of only ^ AND CBM 64 RABBIT CARTRIDGE

y $39.95 "High-Speed Cassette (includes Cartridge Load and Save!" and Manual)

Expansion Connector MX-70/80 MX-100 on the VIC Cartridge PRINTER-STILTS' PRINTER SUPPORTS "Don't waste your Life away waiting to LOAD and SAVE FEATURES: programs on Cassete Deck." • Precision machined from solid aluminum. • Tilted to facilitate viewing paper. Load or Save 8K in approximately 30 seconds! Try • Soft rubber feet to absorb vibration. it — your Un-Rabbitized VIC takes almost 3 minutes. • Easy to install — no tools required. It's not only Fast but VERY RELIABLE. O-rings insure tight fit into printer recesses. • Natural finish aluminum. Almost as fast as VIC Disk Drive! Don't be foolish — Why buy the disk when you can get the VIC Rabbit Available in two styles {MX-70/80 or MX-100) for your for much, much less! EPSON Printer. The MX-70/80 style also fits the IBM & Tl PC dot matrix printers and the H P82905 B printer. To order Easy to install — it just plugs in. PRINTER-STILTS" printer supports give style and send Expansion Connector on rear. $9.95 plus S2.00 postage/handling or call today: Works with or without Expansion Memory. Louisiana residents add 5% tax. Works with VIC Cassette Deck. 12 Commands provide other neat features. DATATEK INC. Also Available for 2001,4001, and 8032 J Dept. 200 master r charge ] I P.O. Box 5956 L 3239 Linda Or -' Shreveport. La. 71135 ® Winslon Salem. N C 27106 (318) 888-0068 or 888-2241 til 10 PM CST (9191924 2889 |9I9| 748 8446 How to Succeed in Business (with a little help from Apple)

Leant the secret of success in business with this Apple II program that analyzes your company's sales and cost figures.

By Gregory Glau

ne of the best things businessmen the raw materials, plus the labor re- your net profit. Ocan do is to analyze profit projec- quired to create the product, plus any We'll keep things simple and work tion figures. It's really helpful to get a other costs directly associated with with only these totals because we line on what may happen to your the production of the items. In a retail want to create a clear simulation of sales/costs/profits. business. Direct Costs consists of what will happen to them if your busi- Unfortunately, many of us look in material purchases, freight and any la- ness gets better or worse—if sales and only one direction: forward. It seems bor directly connected with selling costs increase or decrease. that most businessmen are optimists, your product. All of this is based on your own so we naturally expect sales to grow, Overhead involves expenditures data, of course. The program's print- assume our profits will rise right along such as administrative salaries, book- out lists your sales along the top and with them and think we'll cut over- keeping costs, insurance expenses, your costs up and down the left side. head to the bone at the same time. utilities and office supplies. Over- Remember, though, that we want to head, simply, is what it costs just to see a range of values, so your starting Look in Both Directions open your doors every day, whether figures will be in the middle of the The Break-even program (Listing 1), or not you sell anything. others. written for the Apple II, allows the A financial statement normally will For example, say you enter $400,000 businessman to look at his sales and total and list Sales, Direct Costs and for your sales figure. Let's also assume cost figures from both directions. In Overhead. When you deduct your you want to see a four percent range other words, it allows us to simulate costs from your sales, what's left is for your sales. Here's what the top line the bottom line (profit or loss) for our of your printout will show: business—based on conditions that we Sales Volume-* set. And more than that, it prints out a 353894 368640 384000 400000 416000 range of amounts developed from this Decreasing Costs 432640 449945 simulation criteria. Notice your $400,000 starting sales We control not only the starting figure in the middle of the other figures for sales and costs, but also the amounts. way in which these figures will vary For your sales, the printout shows for any particular simulation we'd like your starting figure, plus three dollar to see. Our simulation also can cover values for increased sales and three any time period we wish. We can use figures for decreased sales, all accord- year-end figures, amounts for one Starting Amount ing to the percentage you select. month or for one quarter or whatever. To the right of your starting figure, To keep things simple, we'll work sales are increased by four percent with three amounts: Sales, Direct each year. These amounts are cumula- Costs and Overhead. tive, percentage-wise; each year they The Sales category is just that—your are four percent higher than the pre- total sales for whatever period you vious year. want to use. To the left of your starting figure, Direct Costs deals with the labor Increasing Costs and materials involved in producing Address correspondence to Gregory Glau, PO Box Fig. 1. "Flow" diagram of cost figures. whatever you sell. In a manufacturing 1627, Prescott, AZ 86302. business, Direct Costs would include 74 Microcomputing, July 1983 FRANKUN'S BAKER'S DOZEN!

f Tf 13 Good Reasons to Buy I theACB^OO Apple® Ihcompatible CPIM®-compatible 128K of RAM Built-in floppy disk drive Disk controller 80 column card Serial interface Parallel interface Upper and lower case VisiCalc® keys Cursor control pad Numeric pad Auto repeat keys

Extras can more than double the price of your per- the Apple II. And, with the built-in CP/M card, you sonal computer. Not so with the Franklin ACE 1200. can run both Apple II and CP/M programs. Franklin's It's the professional computer system that includes CP/M operates three times as fast as many com- the extras—and a long list of exclusive Franklin peting systems, drastically reducing processing features that make it the most extraordinary value on time for most business applications. the market today. The Franklin ACE 1200—the most extraordinary value The ACE 1200 has everything you'll need jw on the market today. Call or write today for to add a color or black and white monitor, IJ the name of your local authorized Franklin modem, printer, back-up disk drive and dealer. other accessories. You can choose from Franklin ACE is a trademark of Franklin Computer Corporation. the enormous selection of Apple programs Apple is a registered trademark of Apple Computer Inc. and peripherals because the ACE 1200 is CP/M is a registered trademark of Digital Research Inc. hardware- and software-compatible with VisiCalc is a registered trademark of Visi Corp. FRANKLIN COMPUTER CORPORATION 2138 Route 38, Cherry Hill, NJ 08002 609-482-5900 Telex: 837-385 Circle 59 on Reader Service card. Listing 1. Break-even program for the Apple II.

100 DIM C(21)l REM THIS DIMENSIONS OUR COST FIBURE TABLE 430 PRINT "INCREASE/DECREASE FIGURE, THE COLUMNS" no HOME I PRINT : BOSUB llOOOl PRINT 440 PRINT "TO THE RIGHT AND LEFT OF THE 'STARTING" 120 PRINT 450 PRINT "SALES COLUMN WILL SHOW THIS AMOUNT" 130 PRINT "ANSWER 1 TO SKIP THE INSTRUCTIONS" 460 PRINT "INCREASED (RIGHT SIDE) AND DECREASED" 140 PRINT "AND QO RIGHT TO THE DATA-ENTRY AREA." 470 PRINT " (LEFT SIDE) BY THE PERCENTAGE YOU" 150 PRINT 4B0 PRINT "SPECIFIED. " 160 PRINT "ANSWER 2 TO SEE THE INSTRUCTIONS" 490 PRINT 170 PRINT "AND THEN ENTER DATA" 500 PRINT "THIS IS A CUMULATIVE PERCENT, BY THE" IBO PRINT I PRINT "ANSWER 3 TO STOP NOW."i PRINT 510 PRINT "WAY, SO YOU CAN EASILY SEE WHAT " 190 INPUT Q 520 PRINT "HAPPENS TO YOUR SALES IF THEY INCREASE" 192 IF Q - 1 THEN lOOO 530 PRINT "OR DECREASE BY THE 7. YOU ENTERED. " 194 IF Q - 2 THEN 200 540 PRINT I GOSUB llOOOl PRINT 196 IF Q - 3 THEN PRINT "END OF PROGRAM"! END 545 PRINT "HIT ANY KEY TO CONTINUE..."! GET A» 198 GOTO 110 530 HOME 1 PRINT I GOSUB llOOOl PRINT 200 HOME I PRINT I BOSUB llOOOi PRINT 560 PRINT "YOUR COST INFORMATION IS TOTALED." 210 PRINT "THIS PROGRAM WILL ALLOW YOU TO ENTER" 570 PRINT "YOU ARE ALSO ASKED TO ENTER A PERCENT" 220 PRINT "YOUR SALES VOLUME AND COST DATA, AND" 580 PRINT "THAT YOU'D LIKE TO SEE YOUR COSTS" 230 PRINT "THEN WILL PRINT A CHART FOR YOU, BASED" 590 PRINT "INCREASE AND DECREASE." 240 PRINT "ON YOUR OWN INFORMATION." 600 PRINT 2b0 PRINT 610 PRINT "THIS INFORMATION IS PRINTED AS THE" 260 PRINT "TO KEEP THINGS SIMPLE, WE" 620 PRINT "LEFT-HAND COLUMN OF YOUR PRINTOUT," 270 PRINT "ONLY ENTER YOUR TOTAL SALES VOLUME, AN 630 PRINT "AND - LIKE THE SALES FIGURES - HAS " 280 PRINT "THE TOTAL OF YOUR 'COST OF SALES.'" 640 PRINT "YOUR STARTING 'COST' AMOUNT IN THE" 285 PRINT 650 PRINT "CENTER OF THE NUMBERS, WITH THE TOTALS" 290 PRINT "THIS INCLUDES YOUR DIRECT COSTS, SUCH" 660 PRINT "FOR YOUR COSTS INCREASING (BOINO DOWN" 300 PRINT "AS LABOR AND MATERIALS. YOU ARE ALSO" 670 PRINT "THE CHART) AND DECREASING (GOING UP" JlO PRINT "ASKcD TO ENltR YOUR OVtrthEAD L0ST3." 680 PRINT "THE CHART) ACCORDING TO THE PERCENT" J20 PRINT 690 PRINT "YOU SPECIFIED TO START WITH." 330 PRINT "THE TOTAL OF THESE TWO - DIRECT COSTS" 700 PRINT I BOSUB 11000! PRINT 340 PRINT "AND OVERHEAD COSTS - WILL BE" 705 PRINT "HIT ANY KEY TO CONTINUE...": BET A» 350 PRINT "YOUR TOTAL 'COST OF SALES.' 707 HOME PRINT I QOSUB llOOOi PRINT 335 PRINT I BOSUB llOOOl PRINT 710 PRINT "BY READINB ACROSS FOR SALES AND THEN" 360 PRINT "HIT ANY KEY TO CONTINUE..." 720 PRINT "DOWN THE LEFT-HAND COLUMN FOR COSTS," 370 GET A* 730 PRINT "YOU CAN DETERMINE YOUR PROFIT OR LOSS" 380 HOME I PRINT I BOSUB llOOO: PRINT 740 PRINT "BASED ON WHAT MAY HAPPEN TO YOUR " 390 PRINT "YOUR SALES DATA WILL BE PRINTED IN" 750 PRINT "BUSINESS." 400 PRINT "SEVEN COLUMNS, WITH THE INITIAL " 765 PRINT I GOSUB 11000: PRINT 410 PRINT "'STARTING SALES' IN THE CENTER. THEN," 770 PRINT "HIT ANY KEY TO START...": GET A» I PRINT I GOSUB llOOO: PRINT ! PRINT 420 PRINT "SINCE YOU WERE ASKED FOR A PERCENTAGE" 1000 HOME

Circle 373 on Reader Service card. Circle 140 on Reader Service card.

X OMNITEK COMPUTERS INTERNATIONAL, INC. A UV EPROM ERASER A 1300 MAIN STREET TEWKSBURY, MASS 01876 A * tram mtr 15 EPflOMS • IS minutis ifltt Unw * Elirrwnt Me 7700 hours A 617-851-4580 A * Inttmny : 12Wi'Acm'il V A A * Eriui III UV EPROMS 12716. 273?. 2516. 2532, ale.! 'CBM64 295.00 $49.95 A A • HOeaV MODEL Verbatim 5.25" D.L 25.00 A 5 >/i" Head Cleaning Kits 5.00 each or 3 for $ 12.00 A INDUSTRIAL MODEL A Okldata MIcroline 80 299.00 A QUV-T8/2N A Okldata MIcroline 82A 399.00 A $68.95 A Okldata MIcroline 83A 629.00 A WITH TIMER AND A Okldata MIcroline 92 (160 C.P.S.) corresponds mode 499.00 A SAFETY SWITCH Okldata MIcroline 93 799.00 A Smith Corona Daisy Wheel Printer 559.00 A QUV-T8/2T A S97.50 A 13" Green Monitor 99.00 A B.M.C. 13" Color Monitor 299.00 A INTELLIGENT A Epson fX80 FT 539.00 A A Epson MX-100 629.00 A PROGRAMMER Radio Shack MIV 64K w/2 drives and RS232 1787.00 A STAND ALONE A 40 track economy drive Tower Supply with case 179.00 A Tandon drives with Power Supply and case A RS-232 40 track singlehead 249.00 A « RELIABLE A duaihead 339.00 * EASY COPY ^Noe.toai A A eautonien' neefltfli 80 track singlehead 299.00 A * USER FRIENDLY duaihead 399.00 PROGRAMS 2508, 2516. 2b32, 2716 27C16. 27C32. A COMPATIBLE 2732.2732A,2758 8748, 8749H,8748H A 5.25" Power Supply and case 39.00 or 10 for $340.00 A IBM PC. TRS-80, APPLE. CPM, * BASF 40 track D.D. 5 'A " new disk drive, as Is, A OPIIONAL MODULES; 2564, 2764, 875bA. 8741 FL£X. TEKTRONICS, MDS A * ST/WD ALONE, CRT, OR COMPUTER CONIROL no return 89.00 V * Un.OAD/DOWNLOAD IN MOTOROLA OR INTEL HEX FORMAT A 8" * MICROPROCESSOR BASED * 4 K INTERNAL RAM (MCS-48) Power Supply and case 99.00 or 10 for 935.00 * 90 DAY PARTS I UBOR WARRANTY ON ALL PRODUCTS PROGRAMMING A Brothers HR-1 D.W. Printer 795.00 A SOON TO BE RELEASED: PRICE INCLUDES A Full Commodore Line CALL VIC 20 99.00 A PERSONALITY MODULE PROMPRO-8 128K Version $689. $489.00 A A MONEY BACK GUARANTEE A OMNITEK COMPUTERS INTERNATIONAL, INC. A LOGICAL DEVICES INC. A TRS-80 is a reg. trademark of Tandy Corp. Prices are for mall order only TERMS: A A Cfieck. money order. Mastercard and Visa accepted. F.O.B. Tewksbury-freigfit ex- A 781 W. OAKLAND PARK BLVD. • FT. LAUDERDALE. FL 33311 tra. Minimum S5.00 S 8. H. Mass residents add 5% sales lax. Write for FREE Phone Orders (305) 974-0967 • TWX: 510-955-9496 A CATALOG A AAAAAAAAAAAAAAAAAAAAA the amounts decrease by four percent Listing continued. each year. The figure immediately to 1002 PRINT "YOUR ST«RTINQ FISURE MUST BE ft PRINT "POSITIVE AMOUNT."! PRINT I PRINT the left of your starting amount is four 1003 INPUT "STARTING SALES VOLUME "jS(4) percent lower than the $400,000 fig- 1004 IF S(4) < - O THEN lOOO 1006 HOME : PRINT I BOSUB llOOOl PRINT I PRINT ure, the next is four percent less and 1007 PRINT "REMEMBER TO ENTER THE PERCENT" lOOB PRINT "INCREASE/DECREASE AS A DECIMAL." so on. 1009 PRINT I PRINT "FOR INSTANCE, SX SHOULD BE" So what you see is a range of values, 1010 PRINT "ENTERED AS .05, WHILE lOX" 1011 PRINT "SHOULD BE ENTERED AS .10." based on your starting sales figure and 1012 PRINT I PRINT "1, THEN, IS THE SAME AS lOOX. " the percent amount you enter to in- 1013 PRINT "THIS IS THE LARQEST YOU CAN QQ."l PRINT 1015 PRINT -WHAT'S THE PERCENT" crease and decrease this amount. 1020 INPUT "INCREASE/DECREASE FOR EACH PERIOD ? "jPS 1030 IF PS > 1 THEN 1006 If you want to see your sales in- 1035 IF PS < O THEN 1006 crease/decrease at a 50 percent rate, or 1040 HOME I PRINT i 130SUB llOOOl PRINT 1 PRINT 1100 INPUT " DIRECT COSTS ";D a three percent rate, the program will 1150 HOME I PRINT ! GOSUB llOOOl PRINT i PRINT do it for you. 1200 INPUT "OVERHEAD COSTS "lO 1210 C(ll) - O + Dl REM C(ll) IS OUR TOTAL COST TO START WITH So for sales, you're asked for the 1215 IF Cdl) > - 1 THEN 1220 1216 HOME I VTAB 5i PRINT "YOUR DIRECT COSTS + OVERHEAD" starting sales amount, then the per- 1217 PRINT "COSTS TOTAL LESS THAN ZERO." centage of increase/decrease in deci- 121B PRINT I PRINT "THEY MUST BE A POSITIVE FIGURE.": PRINT 1219 PRINT "ENTER ANY KEY TO START OVER ";i GET A«i GOTO 1040 mal form (you enter ten percent as. 10, 1220 HOME : PRINT i GOSUB llOOOi PRINT 1 PRINT 14 percent as .14, and so on). 1230 PRINT "TO GET YOUR COST FIGURES TO 00" 1240 PRINT "UP AND DOWN THE SIDE OF YOUR PRINTOUT," 1250 PRINT "WE NEED TO ENTER THE PERCENT YOU'D" Totaling Costs 1260 PRINT "LIKE TO SEE THESE FIGURES " 1265 PRINT "INCREASE/DECREASE." Cost amounts are handled the same 1270 PRINT 1 PRINT 1280 PRINT "REMEMBER, PLEASE ENTER THIS FIGURE AS" way. Since there are basically two 1282 PRINT "A DECIMAL (10* - .10, 47. - .04, ETC.)" things that make up your total cost of 12B4 PRINT I INPUT "PERCENT INCREASE/DECREASE ")PC 1290 IF PC < 0 THEN 1220 sales—direct costs and overhead ex- 1295 IF PC > 1 THEN 1220 penses—the program asks for each 1300 REM NOW WE HAVE TO FIGURE SALES 1310 REM AMOUNTS USING THE VARIABLES one individually. It then totals them 1320 REM S(l) THRU S<7) 1330 REM S(4) WILL BE THE INPUTTED SALES AMOUNT for you. 1340 S<5) (1 • PS) t S(4) Then, the program will ask what 1350 S(6) (1 -I- PS) * S(S) 1370 S<7> <1 + PS) t S(6) percent you want to see your costs in- 1380 REM NOW WE HAVE TO DECREASE THE AMOUNTS 1390 S(3) <1 - PS) « S(4) crease/decrease, as they run up and 1400 S(2) (1 - PS) » S(3) down the left side of the printout. 1410 S(l) (1 - PS) « S<2) 1500 REM NOW WE HAVE TO FIGURE THE AMOUNTS Again, enter this as a decimal. This 1510 REM FOR THE COST FIGURES. percent does not have to be the same 1520 REM : Cdl) IS OUT STARTING COST TOTAL 1530 REM I LET'S FIGURE THE INCREASED COSTS FIRST as you use for sales. It can be what- 1600 FOR Y - 12 TO 21 ever you want, depending on the sim- 1610 C(Y) - <1 • PC) I C to enter a negative percentage figure, 1730 NEXT X as it goes up and down anyway with 1740 FOR Y - 1 TO 21 1750 C 2 THEN 2000 systems. 2080 IF Q < 1 THEN 2000 costs increasing (see 'flow" diagram 2100 REM I PRINTING SECTION 2110 D« - CHR« (4) in Fig. 1). 2120 PRINT D»r'PR»l" The program also asks you for the 2130 PRINT "" 2140 PRINT" >>>>>> BREAKEVEN CHART <<<<<<" current date; then it's ready to print. 2150 PRINT PRINT " " 2152 PRINT "THIS REPORT WAS PRINTED ON "|E»i"." If you make an error as you enter 2153 PRINT " "1 PRINT "TO READ THIS CHART, FIND THE SALES FIGURE YOU WANT something, just continue on to the ON THE" 2155 PRINT "TOP LINE, AND THEN LOOK DOWN THE LEFT SIDE, THE COST LINE, UN printing part; you can stop there and TIL YOU" start over. 2157 PRINT "FIND THE COST YOU WANT. THE FIGURE WHERE THE LINES" 2159 PRINT "INTERSECT IS YOUR PROFIT OR LOSS BASED ON YOUR SALES AND COST Your printer should be in slot 1; you S. " 2160 PRINT INT (S can change this at line 2120 if your (4));". " 2170 PRINT "THE RATE OF INCREASE/DECREASE IS "l INT (100 » PS)|" X." printer resides elsewhere. (See Table 1 2175 PRINT " " for a list of the variables the program 2177 PRINT "THE TOTAL STARTING COSTS ARE • "| INT (C(ll)))"." 2180 PRINT AND THE COSTS ARE INCREASING/DECREASING" uses. See Fig. 2 for a complete printout 2190 PRINT "AT THE RATE OF ") INT <100 » PC)(" X." of a simulation; the starting amounts and percentage increase/decrease fig- Microcomputing, July 1983 77 ures are shown for both sales and Listing continued costs.) 2193 PRINT I FOR Q - 1 TO 79« PRINT "-"|l NEXT I PRINT " " We don't use commas in our print- 2196 PRINT " " 2197 PRINT "DIRECT COSTS- out, by the way, so we can print more 2190 PRINT "PLUS OVERHEAD" 2199 PRINT " !" amounts on the hard copy. And we 2200 PRINT " ! SALES VOLUME >" don't try to put the same information 2202 PRINT " V" 2205 PRINT " "1 on your screen; there are simply too 2210 FOR X - 1 TO 7 many numbers to allow much com- 2220 Z9 - S(X>t BOSUB ISOOO 2230 09 - LEN 0 09 - LEN (Z9«) amounts lower. So, it is dimensioned 2370 PRINT TAB< 11 - 09)Z9*; in line 100. 2380 NEXT X 2303 PRINT " " 2390 NEXT Y Line Specs 2400 PRINT " "|l FOR Q - 1 TO 70i PRINT "-"II NEXT 2300 PRINl " " Lines 110-190 ask if you wish to 3000 U* - CHR* (4) 3010 PRINT D»("PR»0" see the instructions for the program, 3013 HOME and let you skip them if you wish. 3020 PRINT -END OF PROGRAM": END llOOO INVERSE • PRINT " »>>> BREAKEVEN ««< Lines 200-700 are the actual instruc- 11010 NORMAL 11020 RETURN tions; they summarize what we've 15000 Z9 - INT (Z9) covered here. 13010 Z9» - STR» - S<3) decreasing sales volume positive figures. Since the amounts will both increase and decrease ac- 8(5) - S(7) increasing sales volume cording to the percentages you select, you need to start with positive D direct costs amounts. O overhead expenses Lines 1300-1660 do all the math to get your sales and cost totals and put C(ll> total cost o-f sales them in their proper array niches. Lines 1700-1760 change your values to in- C(l) - C(10) decreasing total costs tegers, so the math will be correct. Lines 2000-3020 do the printing of C<12) - C<21) increasing total costs the chart for you, and let you exit so you can start over if you've made an PS percent O'f increase/decrease for sales error in entering. Lines 11000-11020 PC percent of increase/decrease for costs make up a subroutine that prints the break-even line across the screen. X counter for sales volume figures Lines 15000-15020 convert the amounts to strings (Z9$) so we can mea- Y counter for total cost figures sure their lengths when we print them.

• Input entry to continue the program Out of the Red

E« the date of the printout Use this program to help determine your break-even point. Learn that if 19% the amount as an integer your sales drop X percent, your net profit will drop by Y amount. On the Q9 the length of the printed amounts, so sample chart (Fig. 2), a five percent drop in sales causes a 100 percent de- the chart will all line up properly crease in profits. You can use this program to deter- A« used in GET statements to read through thi mine exactly what figure you need to instructions hold your total costs down to if your sales drop X percent. Do you keep track of your sales and Table 1. List of variables used in Break-even program. costs on a monthly basis? Then run a few simulations using various percen- tages, grouped around your current monthly figures. THIS REPORT MAS PRINTED ON 6/9/83.

You'll soon see the relationships TO READ THIS CHART, FIND THE SALES FISURE YOU MANT ON THE that exist between them. And, of TOP LINE, AND THEN LOOK DOWN THE LEFT SIDE, THE COST LINE, UNTIL YOU FIND THE COST YOU MANT. THE FIGURE MHERE THE LINES course, you'll know your exact break- INTERSECT IS YOUR PROFIT OR LOSS BASED ON YOUR SALES AND COSTS. even points. You'll see how an X per- cent change in costs, coupled with a Y THE INITIAL SALES VOLUME IS • JOOOOO. percent change in sales, will affect THE RATE OF INCREASE/DECREASE IS 10 X. your bottom line. THE TOTAL STARTING COSTS ARE • 9SOOO. AND THE COSTS ARE INCREASING/DECREASING You should do the same for your AT THE RATE OF 5 X. quarterly and yearly data. Run range printouts for any scenarios you can DIRECT COSTS imagine. You'll have the exact bot- PLUS OVERHEAD tom-dollar amounts on your printouts. i SALES VOLUME > V Situation Simulator 72900 81000 90000 lOOOOO llOOOO 121000 133100

In effect, you can make this printout S6B80 ! 16020 24120 33120 43120 33120 64120 76220 39B73 • 13027 21127 30127 40127 50127 61127 73227 show whatever you want it to; you 63024 ! 9876 17976 26976 36976 46976 37976 70076 can use it to simulate any business 66342 ! 6556 14638 23638 33638 43638 34638 66758 69833 ! 3067 11167 20167 30167 40167 51167 63267 situation you can imagine. And best of 73509 ! -609 7491 16491 26491 36491 47491 59391 all, since its figures go both up and 7737B ! -4478 3622 12622 22622 32622 43622 33722 B14S0 ! -8330 -430 8550 1BS50 28550 39550 51650 down, you can really learn from the 83737 ! -12837 -4737 4263 14263 24263 35263 47363 90250 ! -17350 -9250 -250 9730 19730 30750 42850 information. 9SOOO ! -22100 -14000 -3000 5000 15000 26000 38100 Considering the present economy, 99749 ! -26849 -18749 -9749 251 10231 21231 33331 104737 ! -31837 -23737 -14737 -4737 3263 16263 28363 it's more important than ever to know 109974 ! -37074 -28974 -19974 -9974 26 11026 23126 what our bottom line will be if busi- 115473 ! -42373 -34473 -25473 -15473 -5473 3327 17627 121246 ! -48346 -40246 -31246 -21246 -11246 -246 11834 ness isn't quite as good as we expect, 127309 ! -34409 -46309 -37309 -27309 -17309 -6309 3791 133674 ! -60774 -52674 -43674 -33674 -23674 -12674 -374 and what it will be if costs increase 140358 ! -67438 -39338 -50358 -40358 -30358 -19358 -7238 faster than we anticipate. 147376 1 -74476 -66376 -57376 -47376 -37376 -26376 -14276 154744 ! -81844 -73744 -64744 -54744 -44744 -33744 -21644 This program will let you simulate almost any comparison focusing on Fig. 2. Printout of simulation of a break-even chart. sales vs cost totals. •

Hello thayuh. This is Eben Flow, proprietor of the Fish or Cut Bait Company, buyer and seller of lobstah bait for 49 years. My hobbies are collecting linoleum samples, squashing flies and playing pac-person on my home computer. But here on Martinicus Rock, off the coast of Maine, the power can be a tad erratic. So, to cure the brownout and blackout problems, and to keep them spikes and surges off my picture tube, I got me a MAYDAY Uninterruptible Power Supply from SUN RESEARCH. Them fellas fixed me up real good and real light on my pocketbook, too. Got me a MAYDAY for my mini-calcaputer with a voltage regulator and everything for only 325 clams. They even included the battery in a nice waterproof box. Handy out here, you know. Now, if MAYDAY would only keep them sea dogs out of my barrel. . . MAYDAY - Protection even you can afford!

SUN RESEARCH, INC. Box 210 New Durham, NH 03855 603/859-7110 TWX 5102974444 Printer Survival Kit

Shhh—the Infoscribe 1000 is printing. It's a heavy-duty, quality printer with the emphasis on quiet!

By Jim Hansen

In this month's printer survival kit, we'll look at the Infoscribe 1000 dot matrix printer. This heavy-duty, 200 character per second printer, equipped with a sound-deadening case, is in- tended for continuous service. Outside the Infoscribe Externally, the Infoscribe 1000 is one of the more colorful printers on the market. The cream-colored injec- tion-molded plastic case has a large, stylish red stripe across the front and down each side. The printer control panel is mounted on a partially re- cessed lip extending from the bottom section of the case. The printer window is a 21x9%- Vw Infoscribe 1000 printer. This 200 character per second printer offers bidirectional, logic-seeking printing inch flat plate of plexiglass bonded to at 10, 12 and 16.5 characters per inch. the top of the printer case. Visibility into the printing area is good. The main ac line fuse, a classic tog- gle switch for power and a receptacle for the detachable line cord are lo- cated on the right side of the back panel. The other side of the back panel has a conventional Centronics-type interface connector and a dip switch used to set the baud rate and to stop bit selection for the serial interfaces. The printer has two paper-feed paths—one underneath the unit (to be fed through a hole in the top of the printer stand) and one through a slot under the front lip of the case, for front-loaded paper. There is no provi- sion for paper-feed from the rear of the printer. Paper is ejected through a slot near the top of the rear panel. The paper path can handle form widths of 1.5 to 16 inches. Although 1 did not test this unit on multipart forms, the manual states that it will

The printer case is of heavy construction, with plenty' of sound-deadening fmm rubber on top and bottom. Address correspondence to Jim Hansen, PO Box The round dots at the top comers are magnets which mate with those on the bottom section of the case, used 234, New Boston, NH 03070. to hold the cover shut. print an original plus five copies. The across the printing bay. The cable is forms-thickness adjustment knob is tensioned by repositioning a casting located on the left side of the printer The Infoscribe 1000 mounted to the printer frame. The rib- mechanism, inside the case. is a versatile printer bon is driven by a small dc motor The Infoscribe 1000, manufactured mounted on the head carriage. by Infoscribe, Inc., 2720 S. Croddy for line-printing applications The electronics for the printer are Way, Santa Ana, CA 92704, offers a on larger computer installations. contained in a well-shrouded enclos- number of features that make it a ure in the back of the print area. The versatile printer for line-printing ap- controller is Z-80-based, and was de- plications on larger computer installa- signed to use either 24- or 28-pin read- tions. These include character pitches a pulley-timing belt combination. only memories, allowing for enor- of 10, 12 and 16.5 characters per inch Head motion is controlled with a dc mous expansion possibilities. Eight (as well as double-width printing at servo motor driving a timing belt, 2114 static random access memories half these densities), 80 or 132 col- which in turn drives a cable stretched provide 4K of memory. A CTC (a Z-80 umns per line, preprogrammed forms lengths of 11 and 12 inches, a pro- grammable perforation skip, selec- table auto-line-feed, printing at either six or eight lines per inch vertical spac- ing, two internally stored character fonts, downloadable fonts (those not stored in the printer, but sent from the host computer), a programmable VFU tape (this amounts to vertical tabs), super/subscript capability, and (with operator intervention and program- ming) underscore. Infoscribe also offers bit-mapped graphics at 72 dots per inch, both ver- tically and horizontally. Although not tested, the implementation is conven- tional. Since both the horizontal and vertical resolutions are the same, no printer-induced distortion of graphics images will take place. This printer can be ordered with several memory options to provide The printing bay of the Infoscribe 1000 is completely open. Any form up to 16 inches wide can be accommo- more print buffer (460 characters is dated by the adjustable tractors. Printed text can be easily read as soon as it is on the paper. The cartridge- standard, but up to 3K of additional loaded ribbon and head is at left. Changing the ribbon is a one-handed job; it's easily snapped into place on memory may be installed). If down- top of the carriage. The ribbon motor, under the carriage, is a small dc motor. The head-to-platen adjustment loaded fonts are used, some memory is easily accomplished by turning a knob on the left sideplate. otherwise assigned to the print buffer is used to hold the fonts. Three interfaces are standard with the Infoscribe. The standard Centron- ics-type parallel interface is most often used for local hookup. RS-232C serial and 20 mA current loop serial inter- faces are also available. Both data ter- minal ready and X-On/X-Off signaling (to indicate when the printer is ready for more data) can be used with the RS-232C interface.

Inside The internal mechanics layout of the Infoscribe is similar to others built under the same license. (The Datasouth DS180 printer, reviewed in the March 1983 Microcomputing, is built under the same license as this one.) The sideplates and most of the rest of the mechanism are made of aluminum. The head cable tension, and thereby print quality, is maintained by sliding this casting left or right along the Paper motion is controlled by a step- printer base. The timing belt shown around the large pulley passes through the right sideplate to a dc servo per motor driving the tractors through motor. Circle 163 on Reader Service card.

Analog and Power Control I/O in o Single Board Computer

6801 or6d701 MPirWth 2K ROM or EROM, 128 RAM, timer. 8 12-bit anaiog inputs, 8-bit anaiog output, 8 AC or DC inputs or outputs, serial I/O, digital I/O, watctidog timer, power supply. Wintek Corp. 1801 Soum Street mm Latoyette. IN 47904 }17.742'S42S The right sideplate of the Infoscribe 1000, showing the head carriage motor (which is servo-driven, rather than the more common stepper motor drive systemj and the paper-feed motor and timing belt. The tine-feed motor is of unusual power, not requiring reduction pulleys to increase torque as in many printers.

A/D 8chonn.U-^D/A Schonn.l.

APPLY roup MICRO TO ANALOG SIGNAL PROCESSING S, CONTROL Connects to M processor buss ot most Z80 & 6502 computers including Timex, TRS-80. Apple. CBM 64 Our pin rearrangement feature eases interlacing. FAST: 200.000 samples per sec with Z80A. EASY TO PROGRAM: One PEEK chooses the chan- nel, starts conversion & gets data Routines provided SOFTWARE AVAILABLE: FFT in Z80. 256 points in one second; storage scope (or Timex. LOWCOST: Assembled S tested St 95 Cable S15 Please call or write for free catalog.

(omputer^^^tmuum

301 Sixteenth Avenue San Francisco. OA 94118 (415) 752-6294 The controller board and power supply. The printer is operated from a rather small transformer Power sup- plies and load circuits are fused internally with the four fiises shown here at the left end of the circuit board. The controller is Z-80-based, and has provision for 4K of RAM and sockets for four ROM or EPROM chips. Two character sets can be resident in the printer at a given time.

thb pi^licQtion family chip) counter-timer is used to face. Only lines per inch, character time controller operations. pitch density, character set selection, is Qvoiloble in The power supply, with the excep- graphics or alphanumerics and super/ microform tion of the transformer, is mounted on subscript vertical paper-positioning the main controller board with sep- may be set by controls from your arate fuses for the 5-volt, head, servo computer. (You also can load fonts and paper-feed power. All are clearly and set the VFU tape from your host marked for easy service. A consider- computer.) There are no horizontal able amount of rework was noted on tabs or fancy paper-handling com- the controller, including two "piggy- mands available. back" boards, apparently added after The manual is straightforward and the main board was designed. completely covers the printer in tech- The controller and power supply, as nical terms. It is printed on 8V2 x 11 designed in this printer, are located in paper and punched for standard ring University Microfilms International a nearly airtight box. No forced air or binders. Hand-drawn illustrations are 300 North Zeeb Road 18 Bedford Row Dept. P R, Dept. P R, convection cooling was used to con- used throughout the document and Ann Arbor. MU8106 London, WC1R 4EJ trol the internal temperature. serve their purpose well. I found no U.S.A. England This printer responds to a limited omissions or obvious errors, but number of commands over the inter- would guess that experienced users Powerful CB^M® Software. For Apple, Osborne, Xerox, , North Star, SuperBrain, Heath/Zenith, and others. Now only $29.95 each! NEVADA NEVADA COBOL PILOT was $199.95 now only $29.95. was $149.95 now only $29.95. When we introduced Nevada COBOL in 1979, it was loaded with • Perfect for industrial training, office training, drill and testing, innovations. Today's Edition 2 is even better! virtually all programmed instruction, word puzzle games, and data • Extremely Compact. You can compile and execute up to 2500 entry facilitated by prompts. statements in 32K RAM, 4000 statements in 48K, etc. • John Starkweather, Ph.D., the inventor of the PILOT language, • It's based upon the ANSI-74 standards with level 2 features such has added many new features to Nevada PILOT. There are com- as compound conditionals and full CALL CANCEL. mands to drive optional equipment such as Video Tape Recorders. • You can distribute your object programs royalty FREE! There's a built-in full-screen text editor, and much more. • You get a diskette, 153-page manual with lots of examples and 16 • Meets all PILOT-73 standards for full compatibility with older complete COBOL source code programs. versions. • You get a diskette, 114-page manual and ten useful sample Also available: COBOL Application Packages, Book 1 S9.95 programs. • See Review in Microcomputing, January 1983, page 158. NEVADA NEVADA FORTRAN EDIT was $199.95 now only $29.95. was $119.95 now only $29.95. • Based on ANSI-66 standards with some 1977 level features. • High quality text editing for micros! • IF .. THEN .. ELSE constructs. • A character-oriented full-screen video display text editor designed • A very nice TRACE style debugging. specifically to create COBOL, BASIC and FORTRAN programs. • 150 English language error messages. • Completely customizable tab stops, default file type, keyboard • You get a diskette, 174 pages of Documentation and five sample control key layout and CRT by menu selection. programs. Requires 48K RAM. • The diskette comes with an easy to read manual.

To make our software available to even more micro users, vwe've slashed our prices. The CP/M-80 Operating Systems and 32K RAM are required. What's more, we're oHering a money back guarantee. U (or any reason you're not completely satisfied. iust return the package—in good condition with the sealed Indicate diskette format: diskette unopened—within 30 days and we'll refund your money completely 8" • SSSD (Standard IBM 3740 format) 51/4" • Apple CP/M This is a limited time offer, so order yours today! • Osborne • North Star DD • North Star SD Shipping/handling fees. Add S4.00 for first package and S2.00 each additional • TRS-80 Mod I (4200 hex) • TRS-80 Mod I/Mapper package OVERSEAS Add $15.00 for first package and S5.00 each additional pack- age. Checks must be in U.S. funds and drawn on a U.S. bank! • Heath, Hard Sector • Heath, Soft Sector • Micropolis Mod II • Superbrain DD DOS 3.X Trademarks: CP/M. Digital Research; TRS-80, Tandy Corp.; TeleVideo. TeleVideo Systems, Inc.; Applell. Apple Computer Inc.; . Osborne Computer Corp.; (512 byte sectors) Xerox 820, Xerox Corp.; Kaypro. Non-Linear Sys.; Heath/Zenith. Heath Co.; IBM. • Xerox 820 (Kaypro) • TeleVideo International Business Ivlachine. Corp. £; 1983 Ellis Computing. Indicate software packages: • COBOL • PILOT MAIL TODAY! To: Ellis Computing • FORTRAN •EDIT 3917 Noriega St. San Francisco, CA 94122 Send my order for packages @ $29.95 each Total (415) 753-0186 COBOL Applications Package @ $9.95 each Total • Check enclosed InCA add sales tax Shipping/handling • MasterCard O VISA TOTAL . Exp. Date. Signature . Ship to: o Name Street. ELUS COMPUTING City/St/Zip. Country Circle 326 on Reader Service card. Enjoy the SEXPLOSION Subscribe Today to The Adult Book and enjoy the latest guide to bedroom programs and games geared to creative and joyful living and loving. The Adult Book Bourbon Street Press 3225 Danny Pk.. New Orleans LA 70002 Telephone (504) 455-5330

Circle 132 on Reader Service card Probably one of the biggest pains in the neck for an engineer is having to add or to modify' a controller hxtrd after some purchasing agent went on a rampage and bought 10,000 hxirds before the need for the change '68' MICRO was found. The Infoscribe 1000 evidently had this problem. Shown here is one of two piggy-back boards add- ed. Notice the resistor/capacitor combination added across IC UI7. This sort of problem happens to everyone JOURNAL. (even the Japanese) and is no reflection on the manufacturer or design staff. Such changes usually do not 6800-680»«8000 degrade the reliability of the product; they just Irx^k bad and embarrass the engineer responsible. * The only ALL 68XX Compulef Magazine

USA 1 YR.-$24.50 2 Yr -$42 50 3 Yr.-J64.50 for a tabletop printer of any speed, but •Foreign Surface Add $12 Yr. to USA Price I didn't measure it personally. The Foreign Air Mail Add $35 Yr, to USA Price •Canada & Mexico Add $5.50 Yr. to USA Price manual claims about 54 dB, compared OK. PLEASE ENTER MY to around 72 dB for a Selectric type- SUBSCRIPTION writer. The Infoscribe case's seals and Bill my M/C • - VISA • Card • acoustic foam have paid off, and I Exptraiion Date have no reason to doubt the noise- For „ l Yr ~2 Yrs level figure given in the manual. Enclosed $ I missed not having a rear paper- Name street feed path. Most tabletop printers (or Cl^ most printers in general, for that mat- -Zip- ter) allow paper to be fed from the 66 Micro Journal back of the unit; this one doesn't. 5900 Cassandra Smith Rd. O Hixson, TN 37343 Also, no provision was made for a tear bar. Users must be careful when removing copy from the printer, or VotUg, paper may be pulled out of the trac- PRESERVE : Cunm tors and have to be reloaded. MICROCOMPUTING The ac power switch, primary fuse and power cord The interface connector at the back connector. I included this photo in appreciation of of the printer is of high quality, but WITH the engineer at Infoscribe who stood his ground was not equipped with retainers to and put in a "real" switch—a toggle right out of the hold the interface cable in place. I had BINDERS 1940s. I have always hated rocker switches, and at to reconnect the interface cable sev- & FILE CASES. last / know I'm not alone. I wonder who my friend eral times during my evaluation be- at Infoscribe is. cause it had vibrated loose during Keep your issues of Mit:nH:umpulinft handv and pru- lecled in handsome and durabli; library iilnboxfisnr operation. binders. Both styles are bound in dark blue lealher- will find this manual easier to read My biggest concern is what happens ette with the magazine logo stamped in gold. than newcomers to the field. to the internal controller temperature Filebiixes: each file box holds 12 issues, with spines on a hot day in the computer room. visible for easy reference. Subjective Commentary $5.95 each. 3 for $17.00. 6 for $30.00 Being sealed as tightly as it is must Binders: each binder holds 12 issues and opens flat The Infoscribe's large, open print- make it hotter than necessary, which for easy reading. ing bay that allows easy access for will ultimately cause semiconductor $7.50 each. 3 for ^21.75. 6 for $42.00 (USA postage paid. Foreign orders must include changing forms—as well as clear visi- failure. (Semiconductor lifetime in $2.50 per item.) bility of what is being printed—is an terms of thousands of hours is keyed Please state years desired (1977 to 1984). appealing feature. So is the heavy directly to operating temperature.) Send check or money order to; [esse [ones Box Corp.. P.O. Box 5120. Philadelphia. case, which was designed to keep Evidently, Infoscribe was satisfied PA 19141; please allow 6 to 8 weeks for delivery. printer noise under control. that the black structure around the Sorry, no C.O.I), or phone orders. I judged the Infoscribe very quiet controller radiated enough heat for sufficient cooling to tai^e place. Line Length Time to Complete Throughput (characters (characters) 20 lines jseconds) per second) The printer supplied for evaluation 20 4.5 88.8 did not include a UL sticker. Whether 40 7.0 106.6 this means that the printer has not 80 11.5 139.1 been UL-tested, or that someone in 7633 chars, of production left it off is not clear. My text' 75.0 101.7 personal inspection satisfied me that this is a quality printer; I would find it hard to believe that it doesn't meet or *A preliminary version of this review was printed using an Epson QX-10 computer. The line exceed UL standards. length was set to 75 characters, and the text double-siMced. This is a typical type of printing job and gives a realistic idea of tlie actual real-life throughput of the printer. While its print quality is not out of the ordinary, the Infoscribe is excel- Table 1. Throughput measurements for the hifoscribe 1000 printer. Except as noted, these tests were run lent in terms of overall execution. It's from an Apple computer using a parallel interface card. The printer was set to ten cpi print density', six clearly put together by a manufactur- lines per inch. ing and engineering team that cares.•

NtDRhAL DENSITY PRINT SAMPLE !"«$%&'<)*+,/0123456789:;<=>?eABCDEFGHIJKLMNOPQRSTUVUXYZCabcdefghijk Imropqrstuvuixy 2 { I

DOUBLE DENSITY PRINT SAMPLE ! •• ' < >* -I —_ /oa.^js^s^s^^es'S - ==::--- -p ^ Ai B c: c:> E: r

GHIJrKL_MMORG>RSTU'iJ'UXV:z:i:\Il sibccJ^Rghijk 1 m T» C3i p cq r^ ^ "t; v u.i x y C S 3-

Fig. 1. Infoscribe 1000 print sample.

Circle 396 on Reader Service card. Circle 92 on Reader Service card. BYTEK's SECOND GENERATION XX UNIVERSAL (E)PROM 68 Products $ALE PROGRAMMER-SYSTEM 15 JPC is closing out some of its SS-50/30 Features: •Bipolar PROMS. Product Line . . . and having a Sale on > Micros - ^8748 & 8749) the rest! Close out when stock is gone. •1/0-6 baud rates, 13 formats including Intellec, Textronix and Motorola. Sale ends Sept. 30, 1983. « EPROMs, (2708 27256) • Gang option - progranns eight at once. > Remote control option. CLOSE OUT PROGRAMS MX-6SS-50 Extender $15.95 CK-7 Real Time Clock $45.95 OVER 250 DAC-5 Dual Channel A/D $59.95 DEVICE TYPES PA-15 Parallel Interface Sold Out TS-11 Motor Control Sold Out SALE (*) TC-3 High Speed Cassette Interface .... $49.95 AD-16 16 Channel A/D $69.95 CFM/3 Cassette File Manager on Cassette$19.95 CFM/3 Cassette File Manager on EPROM $24.95 FUNCTIONS: ^RCRAM BASIC/3 High Speed Cassette Basic $39.95 DISPLAY DEVICE DATA LOAD DATA WSpecify 6800 or 6809 EDIT RAM DATA COMPARE FFIELD S DEVICE PROGRAM FILL MEMORMEMOl Y FIELD TYPE SELECTION BLOCK MOMOVV E Terms: Cash, Master Card or Visa DIAGNOSTICS PRODUCTS CO. Shipping & Handling S3.50 (US) rP^ and more. ^^ JPC PRC S5.50 (Canada) $15.00 (Foreign) Phone (505) 294-4623 COMPUTER SYSTEMS CORP 12021 Paisano Ct. Albuquerque, N.M. 87112 2283 S. Federal Hwy. Delray Beach, FL 33444 (305) 272-2052 A VIC Printer For the Do'lt-Yourselfer

Dust off your ASR33 Teletype and put it to work with your VIC-20. All you need is this simple interface circuit.

By George R. Steber

t might seem strange that a How does the ASR33 work with the modification will be necessary. How- I VIC-20? With a simple interface (it ever, you may encounter one that is peripheral device for a computer really is simple) and knowledge of set up for RS-232 or something else. actually can cost more than the com- some of the inner workings of the Your best bet in that case is to have puter itself. Yet that's often the case VIC, you can find out. someone familiar with internal wiring with the VIC-20, which can be bought make the necessary change to 20 mA. for less than $100. Printer Requirements The ASR33 should be set up for 20 A printer is a useful peripheral, but The first task is to locate an ASR33 mA operation with two wires (which it's not absolutely necessary. It would for the job. The ASR33 teleprinter can form the 20 mA loop) brought out of be nice to have one for producing list- be found in various types of configura- the machine for interfacing purposes. ings of Basic programs and other rela- tions; unfortunately, this may cause Note that when the ends of the two tively simple data lists. In most other some confusion for the neophyte. wires are touched together, the ma- cases, the video display handles the The requirement for the chine will revert from the space mode input/output situation adequately. ASR33 in this application can be to the mark mode. In other words, it Is there a cheap printer that can stated simply. It must be configured stops "clunking" and starts "hum- serve limited purposes? for 20 mA operation. ming." This is a good preliminary A Lx)w-Cost Printer A large number of ASR33s retired check to see if your machine is work- For years the workhorse of the from service are already set up for the ing okay. The next step is connection industry was the ven- 20 mA operation. In these cases, no to the VIC interface. erable ASR33 Teletype. The ASR33 teleprinter is a serial de- VIC Interface vice, with integral keyboard and VIC USER PORT The interface circuit from the printer, that uses the ASCII code. It is VIC-20 to the ASR33 is shown in Fig. designed to operate at 110 baud and 1. Power is tapped directly from the may be configured for RS-232 voltage VIC; little current is needed. Only a levels or 20 mA current loop. few parts are required for the circuit. The best part of the ASR33 is that it They should be readily available at can be found as a surplus item for a your local parts store; total cost should price of around $75 at hamfests or be a dollar or so. All resistors are TO computerfests. That's enough to aSR 33 warm the heart of old Scrooge himself! Address correspondence to George R. Sleix^r, 9957 N. River Rtxid, Mequon, \VI 53092. The next question, of course, is: Fig. 1. VIC-to-ASR33 interface circuit. 86 Microcomputing, July 1983 '^-watt, ten-percent carbon types. The probably needs work. program, for the RS-232 buffers. (The transistors and diode are common avid computer buff will, of course, general-purpose items. Printer Software find other solutions.) I saved 512 bytes The interface is connected between One fact you may not know is that of RAM by following the instructions the VIC user port and the ASR33 as the VIC has serial I/O routines already at the start of the Basic program— shown. It will be powered up auto- implemented in ROM. It's just a matter POKE 52, 28 : POKE 56, 28. matically when the VIC is turned on. I of calling these routines to output data When you've finished your listing suggest that a 24-pin edge connector to the ASR33. The best way to ac- or other printing task, be sure to print be connected to the user port. Do not complish this is to open a channel (via and close the channel. The necessary solder directly to the VIC board. (This RS-232 software in ROM). instructions to do this are shown in is a cheap design, but we have to draw A simple program to generate a list- Fig. 2. This will divert all output back the line somewhere!) ing of a Basic program stored in your to the video screen. Mount the circuitry of the interface VIC is shown in Fig. 2. This program on a small PC board and install it in a may be entered any time, provided Voila! convenient place. Use care in laying one caution is observed. The RS-232 So there you have it—an inexpen- out the parts and check your work software in ROM sets up buffers in sive VIC-20 printer. I've had mine in closely. If everything looks okay, plug the top 512 bytes of RAM. If you have operation for several months, and I've it into the user port and the ASR33, a Basic program in RAM, it may not found it to be helpful in listing and and proceed. work properly if it uses this part debugging Basic programs. When power is applied, the ASR33 of RAM. An additional benefit is that the should begin humming. If not, reverse There are ways around this prob- ASR33 prints a full 80 characters per the leads to the ASR33. If you cannot lem. One solution is to reserve 512 line and makes beautiful listings. (It get the ASR33 to hum, your circuit bytes of RAM, hidden from your Basic should be noted that only uppercase letters are printed, and special sym- bols do not print because they lack To open the channel and list program on ASR33, type: valid ASCII codes.) OPEN 128,2,3,CHR$|163KCHR$|160);CMD128:LIST The ASR33 is not the most elegant To close the channel and return to video screen: printer available, but it's inexpensive PRINT#128:CLOSE128 and fairly reliable. Used sparingly, it Fig. 2. VIC Basic commands to print on ASR33. should last quite a while in this application.!

Circle 189 on Reader Service card. TRS-80 100% Radio Shack Equipment SAVE A BUNDLE Order Toll Free 1'800'874'1551 FLA Residents 904-438-6507 collect EPSON, OKI DATA, CITOH, TABCO Printer Switches fWy^ SALES CO. 704 W Michigan Ave; P.O. Box 8098 Pensacola, FLA 32505

•TRS-80 IS a trademark of Tandy Corporation Do'It'Yourself Recorder For the VIC'20

Build this simple cassette interface circuit that lets you use an ordinary recorder with the VIC—and save yourself $70.

By Jim Brousseau

bought my VIC-20 computer, shown converts the digital signal to an corder is converted back into a digital 1frankly, because it was inexpen- analog-signal-level suitable for the mi- signal by the LM3900. Because the sive. Consequently, I thought $70 was crophone input of a cassette recorder. VIC-20 requires an active low pulse, a bit too much to pay for a cassette re- The CD4049 inverter and the LED inverter CD4049 is required. corder to store programs on. So to provide a visual indication that the The 5-volt relay and the 18-ohm re- operate the recorder I already own VIC-20 is outputting data to the sistor control the remote switch of the with the VIC-20,1 designed the circuit cassette. cassette recorder. When Load or Save shown in Fig. 1. To read programs from cassette, the is commanded, the VIC-20 turns on To write a program onto cassette, the VIC-20 requires an active low-digital the 6.7 V cassette motor drive on pin VIC-20 outputs a digital signal to pin pulse on pin D-4 of the cassette port. C-3 of the cassette port. When this E-5 of the cassette port. The circuit The earphone output of the cassette re- happens, the relay switches on, start- ing the cassette recorder. Since I don't have an extra playback switch on my recorder, I chose to dis- able the cassette switch option by ty- ing pin F-6 of the cassette port to ground. If you use this option with your VIC-20, you can tie pin F-6 to a switch. This circuit is relatively immune to volume-level setting. The LED tied to the tape input to the circuit can be used to give an indication of input level. I've used this circuit on several other computers and have found it to be effective. And it could save you $70.B

Address correspondence to Jim Bruiisscon, 6900 Firebird Dr., Orlando, FL 32S10. Fig. 1. VIC-20 cassette interface. Note: CD4049 pin 1 is 5 V, and pin 8 is ground. 88 Microcomputing, July 1983 Son of 'The Inflation Fighter* % The Orange+TWo" $1095 Mew Math from Orange+ Computer Systems Z80A CPG + 6502 CPG = "Orange+Two"

We give you two computers for the price of one, because we've put them both in the same machine. The "Orange+Two" is the latest "state of the art" personal business/home computer with two micrprocessors, each operating independently. Consider: CP/M 3.0, Digital Research's new enhanced CP/M version, AND 6502. That means the "Orange+Two" will mn over 20,000 currently available programs, including some of the most popular business and game software on the market today. And, it uses the new easy to-learn, easy-to-program language: FORTH-79.

- Z80A plus 6502 mi> •ORTH-79, BASIC, CP/M 3.0 + 64K RAM Bank Swit iigh-impact case with removable lid, allowing + Built-in disk drive controll 'cess to interior + Programmable ASCII keyl Metal base plate with motherboard connectors for fast auto repeat board removal and replacement (no screws) Built-in control-reset function 110/220 switch selectable power supply. Operating range + Audio volume control switch 47-65 Hz + High resolution video display with graphics + Programmable EPROMS (2764). Allows user to do custom + Cassette interface for tape backup unit ROM programming + Game input and output connector for joystick The "Orange+Two" is the pacesetter of the future. Why buy The "Orange+Two" carries a full 90 day warranty. Ninemonth 1970's technology at 1983 prices, when you can purchase two extended warranty is available for an additional ^.00. computers for the cost of one. Ask your favorite dealer for the Prices & Specifications are subject to change without notice. "Orange+Two". Limited quantities are subject to availability. If "Orange+Two" is not available locally, you can order factory direct To order factory direct, call \ E ^ "fl or send bank check or money order for $1095* I 2 jL 3 I 1 w Collins International Trading Corporation, Allow 30 d^s for delivery from receipt of order. 23801 Calabasas Road, Suite 2050, Calabasas, •California residents add 6^/2% sales tax. California 91302 The Intelligent Toaster VJe continue our journey into the world of single-chip intelligence by exploring the programming and use of the Intel 8748 en route to mastering computer-controlled devices.

By Mark J. Robillard

ou will find, in the pursuit of Yintelligent control, that the "com- puter-on-a-chip" will provide a cost- effective way of implementing a de- sign. It offers an experimenter the flexibility of designing a complex control system that uses a small num- ber of parts and isn't so tedious to construct. In the March and May issues of Mi- crocomputing, we began our venture into the world of single-chip intelli- time it is involved, the value in the ac- Adjusting the BCD Value gence with an in-depth study of the in- cumulator will decrease by one. CLR ner workings of one of these products: Working with four-bit values brings will reset the accumulator to all zeros. the Intel 8748. We covered the basic to mind a lot of BCD applications. CPL will complement each bit. pin functions and dabbled a bit with Doing arithmetic in BCD can be If the value FF was stored into A instructions that had to do with acces- cumbersome without some help from before CPL was exercised, the value sing external memory. With this the microprocessor. The DA instruc- 00 would result. This instruction under our bell, let's move on. tion provides this help with its ability comes in handy if you have to invert to readjust the BCD value in the Accumulator Instructions data that is coming from a port, or if accumulator after performing addi- you have to output data to a port that tion between two BCD numbers. Remember I said that all data moves is connected through open collector go through the accumulator? Well, The instruction (DA) will adjust the drivers. The CPL instruction would as- let's see just what operation can be result of the addition (now left in the sure the correct signal polarity output. done with this register. The following accumulator) into two BCD digits. SWAP is an interesting instruction. is a list of accumulator instructions: This is done in the following sequence: Have you ever started working with L Check bits 0 through 3 for a value the lower four bits of a register, and INC A CPL A greater than 9. If the value is not that DEC A SWAP A then wanted to move them up to the high, go to step 2. If the contents is CLR A DA A high-order four bits? This type of op- greater than 9 or if the auxiliary carry eration is done frequently when bit (to be covered later) is 1, then incre- These are the accumulator instruc- building an address from hex keypad ment the accumulator by 6. tions that utilize only the accumulator. entry. 2. Check bits 4 through 7 for a value (Register and logical operations in- The SWAP instruction will perform greater than nine. If the value is not volving the accumulator will be cov- an actual transfer of high-order nibble that high, then proceed to the next ered separately.) (D7, D6, D5, D4) for low order. The instruction. If the value is greater than Basically, the list includes some of result you'll see in the accumulator 9 or if the carry bit is a 1, then the the more simple instructions in the looks like this: values in the four upper bits are in- 8748 repertoire. INC A will add + 1 to cremented by 6. If an overflow occurs, Before D7 D6 D5 D4 the value already there. If the pre- the carry bit is set. 1 0 1 1 vious value was FF (all Is), an INC D3 D2 D1 DO Aren't you glad you don't have to do will reset the accumulator to zero. 1 1 1 0 Upon doing this, however, the carry After D7 D6 D5 D4 Address correspondence to Mark J. Robillard, do flag (not yet described) will assume a 1 1 1 0 MJR Digital, Inc., PO Box 630, Townsend, MA value of 1. D3 D2 D1 DO 01469. DEC will do the opposite. Every 1 0 1 1 90 Microcomputing, July 1983 all that in separate programming state- instructions and Interrupts. begins. ments? The DA single-byte instruction Remember that the 8748 works Interruption of does it all. In fact, all the accumulator with 256-byte chunks of memory at a Instruction Sequence instructions we just covered are one- time. The first 1024 locations (pages byte-only types. Commonly used routines or groups 0-3) are located on-chip. The other Program Status Word of instructions may be written once thousand may be accessed as external and used many times through the use During our discussions, the carry bit program memory. of the Call instruction. In larger micro- and auxiliary carry flag have come up. processors this would equate to a If you select memory bank 1 (SEL I guess it's time to cover the pro- Jump to subroutine. MBl instruction) you get another 2K cessor's way of checking status when There are eight versions of the Call of external program space. It should doing arithmetic or logical operations. instruction: be cautioned, however, that the Call The Program Status Word (PSW) instruction and any other page-ori- should be a relatively familiar entity Call (page 0| Call (page 4| ented instruction will function in that to those of you with backgrounds in Call (page 11 Call (page 5) relative page regardless of which bank other microprocessors. It is here that Call (page 2) Call (page 6) is selected. Page 0 of bank 1 includes the Carry Flag and Auxiliary Carry Call (page 3) Call (page 7) locations 2048-2303 of external pro- Each Call instruction has a unique reside. gram memory. hex op-code, which allows you to Let's look at the structure of the jump to a subroutine located anywhere The Call instruction consists of two PSW location in the 8748. (Fig. 1 in program memory as long as you bytes. The first, of course, is the op- describes the PSW.) specify the page where the routine code. One of the eight page-related As you can see in Fig. 1, the first three bits act as a sort of pointer to the PROGRAM STATUS WORD stack memory area. I mentioned that (PSW) there are eight levels of subroutine 0? 06 Oj D2 nestings that may be handled by the 1 stack; these locations reside just above the first register back in Data Mem- STACK POINTER ory. These three bits indicate which SITS 0-3 two-byte location is next in line for CARRY AUXILIARY GENERAL REGISTER NOT BIT CARRY PURPOSE BANK USED storing a return address. BIT FLAG SWITCH BIT FO 'O'.BANK 0 To see exactly how this is per- l> BANK I formed, let's digress a moment into the two areas that use the stack: Call Fig. 1. Bit assignments of the Program Status Word WHAT REALLY IS INSIDE YOUR COMPUTER?

Find out in INSIDE YOUR COMPUTER from Wayne Send to: Green Books. I.R. Sinclair lakes the cover off your comput- Wayne Green Inc. Attn: Ikx)k Sales er and shows you what's inside and what it does. Novices Peterborough. NH 03458 will find information on: Dealer Inquiries Invited •Microprocessors •Inputyoutput •Interpreters • Machine language Yes, I want to know what's inside my • Registers • Logic operations computer! A look at programming ties it all together—how hardware Send mc copies of INSIDE YOUR COMPUTER. 1BK7390I En- and software make a microeompuler work. The informa- closed is SI2.97 per copy plus SI.50 shipping and handling. tion applies to any microcomputer system. A glossary ol" • MASTERCARD bank" DVISA OAMEX computer terms and aii appendix on binary, decimal, and Card" _ Explrf> hexadecimal conversion make the book all the more Sijlnaliirr — valuable. Name S12.97.solu ovfr. 109 pp.. S'/j x 8'/2. ISBN "O-SSOOe OSS-1 Address Call TOLL FREE 1-800-258-5473 lorcrt dil card orders. Or mail your Clly SlalcandZip order Willi paynienl or complete credit card information. Include SI.50 Send To: WAYNIC GRtCEN HOOKS Ann i3ook Sales IVlcrborouKh. NH 03458 for shipping and handling. I'hotocopy or coupon is accfptabU- for ordfnne UPS IX-livcr>' irroniplcic slrrt-l addr

to 4K (internal and external banks 0 - 12 BITS OF ly. We've investigated the stack and and 1) of program memory, there is a PROGRAM COUNTER the use of subroutines. need for 12 address bits. (The actual There is another case where 8748 placement of this information on the Fig. 2. Details of inlenial slaci; operation. program execution may be inter- stack is outlined in Fig. 2.) rupted. The INT input pin will cause After the stack is loaded, the low- The program counter will then don an immediate interrupt. This is a hard- order eight bits of the program count- its previous set of clothes (a-dress?) ware function that is involved when- er are reloaded from the second byte and resume processing at home. (No- ever a low level is detected on the INT of the Call instruction. The upper bits tice it left behind the upper four bits of pin. When it occurs, both the program (A8, A9, AlO) are adjusted according the PSW.) The RET instruction may counter and the upper four PSW bits to the bank of the Call, and execution be used in cases where the status of are saved on the stack. is resumed at that new location. Nor- the PSW bits either are not used or are Hardware inside the processor then mal instruction processing continues unimportant to that particular point in loads the address value 003 into the until a return from subroutine (RET) the program. program counter and execution is instruction is encountered. The next Call instruction will clob- picked up there. Normally, you would Either of the two return instruc- ber those bits that are left, so be sure put a jump instruction (JMP) in loca- tions, RET and RETR, will enable you you don't need to know what their tion 003, which would catapult you in- to retreat to the original calling point, state was when you left. to a general-purpose interrupt routine. but they don't return you exactly the For those of you who tend to be ex- (We'll cover jumps a little later on.) same way. The RET instruction will tra cautious, there is a return that will After executing the interrupt service decrement the stack pointer (PSW bits restore the PSW to its initial slate. The routine, you can reenter your program 0-3) to point to where you stored the RETR instruction resumes processing right where you left off by performing directions for home. at home and restores the PSW. Be a lit- the RETR instruction. So keep in mind

Circle 345 on Reader Service card. Circle 107 on Reader Service card.

COST MONEY

OROUT & ABSOCIATES

If you give estimates m order to secure business for your company, you know they take EXBIDITE tjme and cost you MONEY! COST ESTIMATES CONTRACT BIDDING COMMUNICATIONS SOFTWARE WHY BUY 3 PROGRAMS?

TO CUT THE COST OF ESTIMATING AND LYNC HAS ALL 3 IN ONE! PROMOTE YOUR BUSINESS, YOU NEED EXBIDITE II FILE TRANSFER 2) REMOTE OPER/\TIO\ Compihng cost esumates or contract txte becomes easy with EXBIDITE. The EXBIDITE SOFTWARE PACKAGE enables setesmen to quickly and effoenOy create 31 COMMLINK-ATE WTHi TIME-SHARE Itemized estimates based upon inventory items and servKies requested by a customer The estimate lists items or servtces. quantities, pnce. totate. as weU as information Easy set up on most systems. identifying the company, customer, annotations, terms and type of project Once created, the estimate can be printed for the customer and stored on dsk for Menu driven install program. easy reference or updating later, aleviatmg the need for long recalculations should the Command Mode of operation details of the client's request change Help Screen for Lync & Term EXBIDITE IS ideal for businesses like the retail lumber industry which routinely create bids from long lists of materials requested by customers Prces can be eas:ty updated, Z80 based CP/M SI55 and the margin of profit for each estimate can be adjusted according to individual items or across the entire estjmate EXBIDITE can handle an unlimited number of inventory items PC DOS S155 TRSDOS S75 Included is a program which creates inventory tables. Simplifying tfie initial creaDon of an inventory data base We re ISIot the Biggest, Just the Best. EXBIDITE is a basic software package available for the TRS 80 IVIOOELI and III Or« disk dnve, a printer, and 48k of memory are required Documentation is clearly written and inckides an easy to follow tutorial enabling the user to quickly learn the programs International Software Alliance isosi 966-3077

AND THE IBM PC! 1835 Mission Ridge Santa Barbara, CA 93103 • HKMI.H l\l> OKM l.\Ql /H/K.S m r/H) " PRICE $39 95 Professional Appearance EXBIDITE is available from Minimize Errors KC)HM.VI>i: H- Slaiiclanl; IBM IH IX)S; THS^«) Mix! II uilh ( P M; \C< liirtira(ihic: QPOUT & ASSOCIATES Save Time ( n)nn'nifii; \nrth Slan O-siioniin Xrnn H2(l 'H" cjr.'j-i: Su|i<'rHniiti: \US Kil> Pn); 263agtC5ri 9S370 Maximize Business h'lijit.sii: (}|r(>na. 415 • 472-7183 ( 1' \I is a iniili niiirk ol DICi l Al. HKSMW II. I.\\< is a lraili imr)> of MH)M(,irr .SOmvAlU- when you're programming to carve These flag bits can be used whenever both flags may be set, cleared and out some space around location 003. you need someplace to mark the fact tested. What more could you want? In fact, take a looi^ right now at Fig. that something has occurred. Bit 6 of the PSW and bit 7 are carry 3; it shows the layout of the program If your program determines, for in- flags. The first one (AC), the au.xiliary memory. Indicated in the figure are stance, that you are in a certain mode carry, is active following the DA (dec- the reset and interrupt locations. The (like "transmit " in a radio control- imal adjust) instruction we talked timer interrupt shown there will be ler), this bit may be used to mark and about earlier. When an overflow oc- covered later. store that fact. Any time you need to curs between BCD digits, this flag There may be times when you might know what mode you're in, just read goes positive. not want to be interrupted. In fact, it's the flag bit. The other carry bit is used to in- a good idea to avoid interruption A number of instructions will ma- dicate that the accumulator has over- while you're processing an interrupt nipulate or utilize both flags: flowed (going from FF to 00) during request. The 8748 provides the ability the previous instruction. This is help- to disable or enable the operation of CLR FO JFO ful when doing addition; it indicates the INT line through the use of two CI.R Fl JFl when a carry-over operation must be instructions: EN I and DIS I. CPI. FO CPL Fl PSW (Continued) Getting back to where we left off, The first set (CLR) does just what it let's investigate the remainder of the implies. The contents of flags 0 and 1 program status word. Bit 4 (D3) is not will be zero after each are executed. used, and when it is read, a logic 1 will The next set assumes that the contents appear in this place. will be the exact opposite of what they The next bit location to the left indi- were previous to the instruction (CPL). cates which register bank is being uti- The column on the right is our first lized. When you do either a SEL RBO encounter with conditional branch- or a SEL RBI instruction, it is this bit ing. JFO means that if the contents of that is affected. FO is 1, then a jump to a certain ad- D5 is a general-purpose readable dress will occur. The value of the and writable flag; it's called FO. In place to go is contained in the follow- fact, elsewhere within the microcom- ing byte. You may traverse 256 places, puter is another flag bit called Fl. which is one page. As you can see, Fiji. 3. Miip of inlermil pmgnim mc)non\

Circle 166 on Reader Service card. EE SHIPPING IBM® Products Apple II® Computer Products SYSCOM APPLE COMPATIBLf SYSTEM $725.00 Oavong 5 MB Hard Disk System - $1495.00 12 MB - $1995.00 Apple Compatible Controller Card $ 79.95 IBM PC-2 Drive System $ CALL Apple Compatible Disk Drive w/Cabinet & Cable 249.00 3 ' DUAL DRIVE SUBSYSTEM $725.00 w/Controller 315.00 Quadram - Quadboard with Parallel TEAC SLIM LINE 5% " DRIVE $265.00 DUAL SUM UNE $525.00 Printer/Graphics Interlace 99.95 Port, Serial Port. Clock/Calendar, Expandable to 256K Davong 5 MB Hard Disk System-$1495.00 - 12 MB - $1995.00 64Kon brd.-S340.00 128 K on brd. - $395.00 Apple Compatible Joysticks 29.95 192Kon brd.-$439.00 256K on brd. - $499.00 > Epson/Smith-Corona Printers Quadram Memoiy Expansion MX80 $425.00 FX80 $550.00 MX100 $875.00 192K Maximum TRS 80 / Parallel Printer Cable $20.00 64Kon brd.-$230.00 128 K on brd. - $290.00 IBM Parallel Pnnter Cable $35.00 192Konbrd-S350.00 STAR MICRONICS GEMINI 10 $ CAU. AST a PERSYST MEMORY EXPANSION PRODUCTS S CAU 6EMINI 15 $ CAU. Amdek Monitors Smith Corona TP-1 Letter Quality Daisy Wheel $575.00

Mod 300 Phosphor - $150.00 Composite Color III - $345.00 ELECnOIIICS IBM RGB Compatible Color II - $599.00 Color I - $300.00 INC. TRS-80 MOD III Disk Controller Inci Disk Controller Power iBM/TRS 80 Disic Drives/Cabinets Supply. Mounting Hardware. Cables & Instruction Manuals $239.00 TM 100 Single 40 Track Drive - $189.00 POWER SUPPUES Dual 8" Slim Line-$HO.OO DualS'A"-$ M.OO TM 100-2 Double 40 Track Drive - $280.00 ANO CABINETS Single 5%" - S 69.00 TEAC 5

VISA. MASTERCARD (Sioo Mm Add 2°oi FREE SHIPPING IN CONTINENTAL U.S Or Certified Check 90 Day Warranty (Parts & Labor) D ATA— M Al L (2131 993-4804 TRS 80 is a Registered Trademark. Tandy Corp * (IN CALIF.) Prices Subject to Change Without Notice J P.O. Box818. Reseda, CA91335 1-800-635-5555 performed. instructions, it would be relatively tions that allow you to set a value into It's possible at any time to ciiange complex. The 8748 allows you to per- either. The second byte contains the the entire contents of the PSW simply form shifts, either left or right, with data to be transferred. by moving the data resident in the ac- the use of one-byte op-codes. The column on the right allows you cumulator directly into it. The MOV to add one or subtract one from any PSW,A allows this. RL A RR A register. Conversely, the contents of the PSW RLC A RRC A By the way, these instructions that may be moved into the accumulator by specify an Rr are only one byte in executing a MOV A, PSW instruction. The op-codes above pertain to the length. Each register has its associat- shift instructions. The left column will ed op-code. So the INC Rr instruction Arithmetic and Logic Functions shift the contents of the accumulator is really eight separate ones! The That about does it for the PSW. one bit to the left. At that time, a zero same applies for any register-based Those carry flags bring up another will be placed into bit 0. The next one instruction. group of instructions. The list below will shift left into the carry flag. describes the range of arithmetic and Bit 7 will replace the previous infor- logic operations that come with the mation in the flag, which will be controller. placed in bit 0 (a vicious circle). The There are many opportunities column on the right will shift every- within the instruction set ADD A,Rr ORL A,Rr thing to the right. ADD A,#data ORL A,#data to catapult yourself ADDC A,Rr XRL A.Rr to another location. ADDC A,#data XRL A,#data Register Operations ANL A,Rr Throughout these discussions, both ANL A,#data register banks that are resident on- chip have been briefly mentioned. Notice that each operation has two You have seen bank selection instruc- The INC @R0 and INC @R1 in- methods of getting the immediate data tions, registers used as immediate structions really pertain to manipulat- to operate on the accumulator. data and registers used as address ing internal data memory and should The first, ADD A,Rr, adds the con- pointers. have been covered earlier. I guess tents of A to the contents of the regis- they were inadvertently swept under One section of instructions is dedi- ter specified (0-7); the result is the rug, even though they're so useful. cated specifically to these registers. left in the accumulator. The next does Any location in data memory pointed Let's look at them: the same, except it tests the carry flag to by either RO or R1 may have its con- to see if the previous operation tents incremented. MOV A,Rr INC Rr overflowed. MOV Rr,A DEC Rr Last, but certainly not least, is the The 8748 has the capability of per- MOV A,#data INC @R0 DJNZ instruction. This operation is forming logical ANDs, ORs and Ex- MOV Rr,#data INC @R1 worth its weight in gold. With it, you clusive ORs on its data. The next three XCH A,Rr DJNZ Rr, addr can decrement the contents of a spec- sets illustrate the operations as they ified register and test to see if it has exist in the chip. Either the data im- The first two on the left allow you to become zero. If the test proves nega- mediately following or the specified traffic data between any register and tive, it will jump you to the address register provides the other operand. the accumulator. Both of these and the specified in the following byte. (It Arithmetic with computers can be last one in the column move between does all this in one instruction.) performed in a number of ways. It's the two places. It's useful in counting delays or possible to multiply the contents of a Of course, XCH will change both lo- counting anything, and you'll find that register or accumulator by shifting the cations where the MOVs affect only the register array included on-chip bits one position to the left. If you the destination, be it register or also can be helpful. were to write an algorithm to perform accumulator. The MOV A,#data and In many instances, you may not this shift using MOVE, AND and OR MOV Rr,#data are two-byte instruc- even need to use the data-memory storage area. These registers are

Circle 334 on Reader Service card important because you can use them not only for data storage but for point- COMPOSE YOURSELF ing to other locations during jump MUSIC FOR THE TIMEX-SINCLAIR COMPUTER operations. You've balanced your checkbook, calculated your bioryhthms and chased J** r the Klingons out of the golaxy—now isn't it obout time to do something creotive? Branches, Jumps Intfoducir^g And General Leap-Frogging MOZART plugs into oil ZX81 and TS1000 without • menu-driven screen oriented music You have seen, by now, that there modification. editor allows user to enter, save, or allows addition of RAM pack and other modify a musical composition, are many opportunities within the modules. • three voices may be individually instruction set to catapult yourself to three pitched voices for musical tones arranged to be played, transposed, or and noise generator for sound effects, repeated. another location. Typically, this kind programmable in BASIC or machine • complete instruction manual with of leap-frogging would occur when- code. programming examples included ever a decision block is encountered. S3 00 shipping and handling a song' 15 day unconditional money-bock guarantee Within the 8748, a number of 672 AVENIDA DE LA PbMA specific conditions may be tested, and NEWBURY PAIW. CALIF 91320 (605) 498-173S •RIGON a jump can be performed as a result. The general JMP instruction has been covered, as have the JFO, JFl and if you are running a machine that is re- Let's look at an example of receiving DJNZ commands. The list below out- ceiving codes from an external ter- data (Fig. 4). lines the rest of them. minal. Each incoming code catapults The initial low-going pulses of the you into specific command handlers start bit will trigger an interrupt. At JMPP @A JTO.addr JBN.addr at varying places within program this time, your service routine should JC.addr JNTO.addr JTF.addr memory. provide the ability to disable further JNC.addr JTl.addr The next four will test the state of interrupts and start looking at (polling) JZ.addr JNTl.addr the carry flag or test whether the con- the INT line with the JNI instruction. JNZ.addr JNI.addr tents of the accumulator is zero and By using the internal timer, you take appropriate action. should be able to count bit times and Quite a list, isn't it? Let's start with Moving into the middle column, we successfully receive the serial data the left column. see the opportunity to test the state of word. Of course, it would be neces- The first is a complex table-oriented the TO and T1 input pins of the chip. sary to know in advance what bit rate jump, much like the MOVP,@A Of course, if you were to use TO as an the data will be clocking in at. instruction. Here, the contents of the input, you couldn't perform the ENTO The value that you set in the timer program memory location pointed to CLK instruction. You will find that would be one-bit time. If the INT line by the number in the accumulator will these input pins may come in handy remains low for one complete bit replace the low-order eight bits of the for receiving serial data or for count- time, then the data bit is a zero. Mov- program counter. It will jump you ing applications. ing through the word, after the eighth anywhere within the current page. Another instruction that can be used bit has been received, you start look- 'This instruction may come in handy for serial information is the JNI ing for high-stop bits. When the com- command. This one will jump to the plete word is finished being pro- specified address whenever the inter- cessed, simply enable the interrupts to rupt line is low. (Now that may be catch another transmission. i STOP BITS L SrO^TA BfTsTLT confusing.) The column on the right shows only Let me explain. Remember I said two more jump instructions. In ac- that you can disable interrupts? Well, tuality, the first, JBN, is a gen- when they're disabled, you can use eral name for eight separate jumps. this line as a general-purpose input Each bit of the accumulator may be line by employing this test instruction. tested for a logic 1 level using this Fig. 4. Method of receiving serial data. Where does the serial data come in? instruction.

Circle 230 on Reader Service card. Circle 262 on Reader Service card.

UOLISP Epson, OKI, IDS, NEC, Diablo, Qume An Optimizing Compiler and Assembler An Excellent System for A.I. Robotics & Intelligent Systems

Documentation Comprehensive manual covering all aspects of the system. Numerous examples of cach facility are included.

Interpreter Over 125 functions implemented in base ACOUSTIC ENCLOSURES interpreter • Reduces Noise Up to 90% • Bottom Feed Capability Additional Development • Heavy Duty Acrylic Cover • Woodgrain Finish Software Available Micro Printercenter™ Fast Load Libraries Compiled code can be stored in relocatable files Dealer & Ordering Info Requirements 800-343-4311 CP/M System •• Also available for TRS-80 Model I or Master Charge and Visa Accepted Model III. 48K. dual disks Shipping & Handling Charges Additional Ordering System Manual -- $20 CAB-TEK, Inc. Complete System -• $150 Riverside St. Nastiua, NH 03062 VISA and Mastercard CIVILIZING COMPUTERS Please include expiration date and Card No MPC I S99 (MX 801 MPC M S129 I0KI82I MPC III $179 (83A. MX100) MCPIV $199 (Daisy Printer) FAR WEST Power Control & Ventilation S80 SYSTEMS & SOFTWARE, IIMC. Paper Rack S30 Bottom Feed Bracl CODE(X) THEN PRINT "PROBLEM AT LOCATION"; X: OOTO 1240 f. CLEAR •:.««« 1580 PRINT(i21,X:NEXT X i;Li:PftINl "ONE MOMENT PLEAiE": DIM CODEC 10 OOSUB 200 15 huk X = TO le;;:: CODE(X) = 0: NEXT X 1600 PRINT "PROORAMMINO COMPLETE" CL'i:PRINT ••MCi-4K DEVELOPMENT SV^.TEM" 1610 PRINT "YOU MAY REMOVE DEVICE" 0IJT=11-S: IN=144:EiU'=.= 4fl5::V0LT4=>47 1620 PRINT "PRESS -ENTER> FO MENU" 40 Pi=4--'155:p;;=4'il54:CTL=4yl55:STATIJi=176 1630 INPUT A: OOTO 20 56 C'OiUt 2000 CLS it PRINT: PRINT "iELtCT FkOM THE FOLLdWINO" 2010 PRINT "INSERT S748 INTO SOCKET" 7e PRINT: PRINT "1) PROORAM S74t:" 2020 PRINT "PRESS JENTER:- TO READ" PRINT "2) READ S74:S" 2030 INPUT A PRINT ••;:) EMULATE i:74t;" 2040 CLS 1«0 INPUT A 2045 PRINT"READINO LOCATION" 110 ON A OOTO 1000. >000. :;:000 2050 FOR X = 0 TO 102:3 120 C'OTO 10 2060 VOLTS = VOLTS AND 223 :e0 POI E(CTL) I IN 2070 PCrKE(P3), VOLTS il0 P0ME(P3I.VOLTi 2080 OOSUB 500 220 PCi»-E FOR MENU" 1020 PRINT "D SYSTEM RAM" 21<'0 PRINT "PRESS ;2> TO EXAMINE MEMORY" 1030 PRINT "2) CASSETTE FILE" 2200 PRINT "PRESS <3> TO ENTER PROORAM MODE" 1040 PRINT "J) TO HE ENTERED BY KEYBOARD" 2210 INPUT A 1050 INPUT A: IF A • i THEN 0010 1000 2220 ON A GOTO 20. 22 30. 1240 10t.0 IF A = -i THEN C-OIO 11^0 2230 CLS: PRINT "EXAMINE MEMORY" 1070 IF A = 1 THEN OOTO 12:-:S 2240 PRINT: PRINT "ENTER START ADDRESS" 1060 IF A = 2 THEN INPUT "FILE NAME =": A$ 10"0 OPEN "I". -1. A» 2250 INPUT A: CLS = 0 TO 1023 2260 FOR X = A TO 102 3 1100 FOR X 2270 PRINT X "="; CODE(X) 1110 IF ECiF(-l) THEN OOTO 1240 2280 A»=INKEY»:IF A»="" THEN 2280 CODE(1024) 1120 INPUT ll-l, 22^0 IF Al = " " THEN OOTO 2330 1130 NExr X 2300 IF A» = "R" THEN X = X - i: OOTO 2270 1140 OOTO 1240 2310 IF A» = "u" THEN OOTO 20 1150 CLS 2320 CODE(X) = VAL(At) 1160 INPUT "ENTER START ADDRESS": A 2350 NEXT X 1170 INPur "ENTER END ADDRESS"; B 2340 PRINT "END OF MEMORY" 11S0 CLS: FOR X = A TO B 2350 PRINT "PRESS tENTER; FOR MENU" 11^0 PRINT x:"="; 2360 INPUT A II•='5 INPUT Ll 2370 OOTO 20 1200 IF Ct = " " THEN OOTO 1235 3000 CLS 1210 IF Ct = "R" THEN X = X - l: OOTO lly0 3010 PRINT "6748 EMULATOR" 1220 CuDtlX) = VALtCt) 3020 PRINT "INSERT 8035 INTO SOCKET" 1230 NEXT X 3030 PRINT "PRESS ..ENTER> TO BEOIN" 1235 RETURN 3040 INPUT A 1240 PRINT "INSERT S:74S INTO SOCI ET" 3050 CLS 1250 PRINr"PRESS :EN1I-:R> TO PROORAM" 3055 OOSUB 1010 12t-0 INPUT A 3059 CLS:PRINT"LOADINO EMULATION RAM" 1270 CLS:PRINT"PROORAI-IMINi.. LOCATION 3060 FOR X = 0 TO 1023 12S0 FOR X = 0 TO 102;-: 3070 OOSUB 500 1300 VCiLTS = VOLTS AND 251 3080 STATUS = STATUS AND 223 1310 P0Kt(P3), VOLTS 3090 P0KE(P2). STATUS 1320 VOLTS = VOLTS AND 223 3100 STATUS = STATUS OR 64 1330 P0KE(P3). VOLTS 3110 P0KE(P2). STATUS 1340 OOSUB 500 3120 STATUS = STATUS AND 191 1350 VOLTS = VOLTS OR 6 3130 P0KE(P2). STATUS 1340 P0KE(P3), VOLTS 3140 POKE(BUS). CODE(X) 1370 POKE(BUS), CODE(X) 3150 STATUS = ,STATUS AND 127 13S0 VOLTS = VOLTS AND 3160 P0KE(P2). STATUS 13"e P0KE(P3). VOLTS 3170 STATUS = STATUS OR 128 1400 VOLTS = VOLTS AND I';') 3180 P0KE(P2), STATUS 1410 P0KE(P3). VOLTS 3190 STATUS STATUS OR 32 1420 VOLTS = VOLTS OR t.4 3200 P0KE(P2). STATUS 1430 VOLTS = VOLTS AND 127 3210 PRINTe22.X:NEXT X 1440 POKE(PE). VOLTS 3220 CLS: PRINT "EMULATOR" 1450 FOR T = 1 TO 5: NEXT T 3230 PRINT: PRINT "D TO BEOIN RUNNINO" 1460 VOLTS = VOLTS AND I'll 3240 PRINT "2) TO STOP" 1470 VOLTS = VOLTS OR 128 3250 PRINT "3) TO RETURN TO MENU" 14S0 P0KE(P.3). VOLTS 3260 INPUT A 14V0 VOLTS = VOLTS OR 64 3270 IF A = 1 THEN VOLTS = VOLTS OR 8: P0tE(P3). VOLTS: PRINT: PRINT "PROORAM RU 1500 P0kE(P3). VOLTS NNINO": OOTO 3230 1510 VOLTS = VOLTS OR 16 3280 IF A = 2 THEN VOLTS = VOLTS AND 247: P0KE(P3). VOLTS: PRINT: PRINT "PROORAM 1520 P0KE(P;3)i VOLTS STOPPED": OOTO 3230 1530 PCiKE(CTL). IN 3290 IF A = 3 THEN OOTO 20 1540 VOLTS = VOLTS OR 4 3300 OOTO 3220 Lisling 1. Basic program thai operates 874S development system.

Substituting the numbers 0 through The last jump has to do with the in- may be operated under program con- 7 into the n spot will call out the bit ternal timer. Up until now, this piece trol. Counters come in handy when you wish to test. This instruction is of hardware has not been covered. long time delays must be utilized. The particularly useful in I/O processing, processor need only set up the counter where you are looking for the state of Timer value, connect some constant fre- a certain bit out of a field of eight to Included within the 8748 is a quency clock to it and go off doing change. general-purpose eight-bit counter that other things while it is busy counting HOW TO CONTROL YOUR CP/iUllUIICRO -A T ONLY $3. PER COiUIMAND. mfoVknM A Remarkable Program For CP/M page by page, file by file, or line by line with the wonder- Software Report Card Users. instant halt by touching the space bar. ful ways Power Of course, CP/M is a wonderful operat- —Need to reorganise files? POWER! Version 2.55 | ing system. That's why so much serious POWER! sorts and formats the directory can put you business software has been created for it. in 4 different ways. And you can easily in complete BUT, CP/M is not easy to work with. copy or move files from user area to user control of hi ^ That's why you need to take the POWER! area. POWER! creates 32 user areas your CP/M Ptrrfnrmanre • • • 0 trip. instead ofCP/M's16. micro. But DfMTuniiMiliition • • 0 • POWER! is a super-power-packed, —Need to change memory? see for your- EaN«^ofL'He • • • 0 user-friendly program that lets you take POWER! searches, displays and lets you self. There's a Krr»»r Handling • • • 0 immediate and complete control of CP/M. change memory wherever you want. You Money Back And at a cost of only $3. per command, It's can even automatically run software any- Guarantee. At O 1982 by Popular Computing. Inc. A subsidiary of CW Communications Inc.. the software buy of the year. where in memory. And you can inter-mix the low pnce of Pramingham AAA, Reprinted from InfoWbrtd. Over 55 Housekeeping Utilities. your search with as many wild card jokers $169., each POWER! is over 55 prompted, user- as you need to find, for instance, all occur- powerful command costs you less than $3. friendly CP/M utility programs all rolled rences of "Sam Jones" and "Sid James" A true bargain I Into one 15k package. It takes care of all of just by typing "S??J??". And POWER! POWER! Is Better Than Ever! these frustrations and more: also lets you read or write to any sector Eventhough "InforWorid", "Microsystems" —BDOS errors? POWER! ends BDOS or track very simply. and "Interface Age" call POWER! great, we errors and gives you a way out. —Changing disks? You can forget the have improved POWER!—including a com- —Accidentally erased a file? If you ubiquitous Control C to change disks. pletely rewritten 120-page easy-to-read docu- accidentally erase a program or disk file, POWER! can do it for you automatically. mentation. (Previous purchasers of POWER! POWER! restores the erased files. And POWER! doesn't require a system may exchange their original disk for an —Can't remember file names? disk in any drive, so Drive A is open for updated version with the new commands POWER! assigns a number to each file on use, when POWER! is in control of CP/M. and a brand new manual—for only $35.) your disk. So, to copy files from disk to —Afraid of HEX numbers? POWER! Take The POWER! JUp Tbday! disk, you don't have to fiddle with PIP any- automatically converts Hex to Decimal, POWER! will operate in any standard more. You just pick the file from a num- Binary or ASCII. CP/M or MP/M system, including CP/M-86, bered menu and POWER! copies it for Special Password Protection, Too. IBM PC, Apple (Z80 card), Osborne, Kaypro, HP, you. No more typing errors! POWER! POWER! now includes a special pro- TeleVideo, TRS-80 conversions, SIOO's includ- also marks original files and their copies for gram that lets you lock sensitive files, so ing NorthStar, Vector, Mon-ow, CompuPro, etc. you; and you can compare files to find that only you can access them. Without Up and running immediately, no configuration identical copies regardless of name. the secret PASSWORD which you can necessary—for hard disks and floppies. —Losedataonaglitched disk? If a create and change at will, no prying eyes At only $3. per command, you can glitched disk makes it impossible to call up will ever know your secret file even exists. afford to Take the POWER! IVip. Call a long word processing text, POWER! A great way to protect financial or scien- or send in your order today. can fix the glitch. This means you may tific data from unauthorized eyes. Just this NOW AVAILABLE FOR MS-DOS, TOO. have to retype only a couple of sentences single program alone would be worth the instead of losing 20 pages of text. price of POWER!, but there are over 55 ONLY $169. Money Back Guarantee. —-n-ouble with "bargain" disks? more just as valuable programs in this Charge & COD Orders Welcome. POWERi's disk testing function gathers power-packed-package. TOLL FREE (800) 428-7825 Ext. 96Z any bad sectors of the disk into a special At $169., It's A Bargain. IN CA: (800) 428-7824 Ext. 96Z file so that CP/M thinks those parts _Space doesn't permit DEALERS AND OEM'S (415) of the disk are already used and —^ describing all 567-1634 Ext.96Z never attempts to write to them. The rest of the disk isthen safe to use. COMPUTING! —CP/IW scrolls 25191 Greenwich San Francisco, CA 94123 too fast through TOLL FREE (800) 428-782S Ext. 96Z text files? IN CA: (BOO) 428-7824 Ext. 96Z POWER! spools^ DEALERS AND OEM'S (4iS) 567-1634 Ext. 96Z through files^ ONLY $169. Calif, add 6%% sales tax for you. Itiico • CP/M S169. • CP/M-86 S169. • MP/M S249. TM Card No _ Exp Date. hePOUVER! Computer Your Name Company Name. Address ^ City/State/Zip ^J the time away. Think of it as the timer built into some ovens. If you had to sit in front of the oven aL' day waiting for a roast to cook, you'd get nothing else done. This particular counter only counts up. That is, every clock pulse will increment the value contained in it. When it overflows (FF to 00), there is a flag associated within the hardware that gets set. It is this flag that the JTF instruction tests. You also have the option of allowing an interrupt to occur upon overflow. When this is enabled, through the use of the EN TCNTI instruction, the pro- gram counter will vector you to loca- tion 007 in program memory. The same rules apply to this inter- rupt as in the general purpose external one. Disabling it is done by perform- ing a DIS TCNTI instruction. View of the programmer/emulator board. In reality, there are two modes of operation for the counter. The first, READ/WRITE XTAL FREQ and most used, is the timer mode. This PRESCALER 32 » 15 is where a known time base clock is

START 8-BIT applied to increment the value. The OVERFLOW FLAG CNT TIMER/COUNTER time base is derived from the master STOP TCNT clock oscillator. (Fig. 5 shows the in- PIN TI <•- •j EDGE DETECTOR ternal hook-ups of the two modes.) As you can see, in the timer mode a STRT T instruction will connect the Fig. 5. Internal timer operation.

ANY FREO. CRYSTAL I-6MH2

EPROM SOCKET 24 PIN INTEL 6035

PI6 PI 7

Is P2I

P23 P24 P25 P26 P2r RESET SS TO TI INT EMULATOR ALE SOCKET 40 PIN PROG

5 7 6 6 9 S 12 4 15 3 II J^ 10 16 2 Id 1

1,

26 ALL SWITCHES C040I6 ANALOG GATES 7

Fig. 6. Schematic of stand-alone 8748 emulator. counter to the master clock (actually, the crystal frequency divided by 15) through a divide-by-32 prescaler. Initial values may be entered into the counter through the use of the MOV T,A instruction. Conversely, the contents of the timer may be read at any time through the use of MOV A,T. When using the counter mode, the multipurpose T1 input becomes the clock source. This allows you to count events that may happen and interrupt when enough have occurred. The only other instructions not covered so far deal with I/O. These will be covered quite thoroughly next month, when we'll design and con- struct the Command Communicator of the Unimem system. Program Emulation Emulation is performed through the use of an 8035 part. This basically is The emulator board. an 8748 without the internal ROM. External program memory is connect- I have built a IK ROM emulator that board. I've tried to add enough ed as it was described previously. (See plugs into the socket. With it I can remarks so that it's self-documenting. photos for a picture of the complete change, via keyboard commands, the Throughout the next few months, programmer/emulator and for a pic- data. The programmer/emulator, how- you'll find yourself getting deeper ture of a stand-alone emulator.) ever, has this programmable feature into the programming and use of the You can insert either an EPROM or built in. 8748. I hope you've found this series, another IK memory part into the pro- At this time, look at Listing 1; this is so far, a useful introduction to small- gram memory socket. the Basic program that operates the size intelligence. •

Circle 197 on Header Service card. Circle 24 on Reader Service card. First came MICROPROOF"': "There is simply no finer program available..." RIBBONS (Creative Computing. Mart h 1982) Low Price • FREE Shipping SATISFACTION GUARANTEED Now: RIBBON CARTRIDGES top quality factory fresh Cartridges for price each in quantity of use on these printers: 1-5 6-23 24-99 100-f MX-70, MX-80, IBM PC 7.41 6.45 5.61 4.88 MX-100 19.96 17.36 15.09 13.13 Prowriter, PC 8023A-01 7.98 6.94 6.04 5.25 RS LP2, LP3, LPS 7.98 6.94 6.04 5.25 RIBBON LOOPS top quality nylon refills for your old cartridge l.oops for use price each in quantity of on these printers: 1-5 6-23 24-99 100-1- MX-70. MX-80, IBM PC 3.56 3.09 2.69 2.34 MX-100 5.41 4.71 4.09 3.56 Prowriter, PC 8023A-01 2.46 2.14 1.86 1.62 The Ultimate: RS DMP 400, LP6, LP8 2.04 1.77 1.54 1.34 RS DMP 200, DMP 500 3.56 3.09 2.69 2.34 RS LP2, LP3, LP5 2.46 2.14 1.86 1.62 Spinwriter (nylon) 2.46 2.14 1.86 1.62 Cartridges and loops may be mixed for quantity prices. Our FREE CATALOG includes loading instructions for loops. Discounts available for schools. Florida res. add 5% tax. VISA DATA SYSTEMS MasterCard CORNUCOPl (305) 788-2145 • Box 99 • Fern Park, FL 32730 SOFTWARE, INC. 1625 Beverly Place V^rkeley.CA 94707 Conuci your local dealer, or order direct |4IS) S24-8OTg^