[editor : Carl T. Helmers Jr., Christopher P Morgan] [publisher : Virginia Londoner, Gordon R Williamson] [art : Holly Carmen LaBossiere, Deborah Porter] #Magazine
#Abstract
Our main topic this month is Software - a perennial favorite among BYTE readers. This month's cover painting by Robert Tinney illustrates the colorful road that programmers often travel in search of bug-free code.
The software articles include: a tiny compiler that handles floating-point operations; machine problem-solving using cryptarithmetic; sorting with binary trees; a macro assembler for your computer; adding to the 6502's instruction set; an easy-to-use information retrieval system; and symbolic math using BASIC.
Also this month: Steve Ciarcia's explanation of how to use liquid-crystal displays; a description of some vector graphics for raster-scan displays; a follow-up on FORTH; and the second part of a three-part discussion of an 8088 processor for the S-100 bus.
[author : Carl Helmers] #Edito
Extract : « In this month's editorial we will summarize some of the key results of a recent BYTE reader survey, performed by the McGraw-Hill Research group. A six-page questionaire was mailed to 2000 BYTE subscribers earlier this year. The subscribers were selected from our mailing list on an every-nth-name basis. Of the 2000 questionaires mailed, 1445 were completed and returned within the six-week deadline. The 73.5% response to this survey request was exceptional. Such a large response to a detailed six-page form by itself indicates the enthusiasm and interest of our typical reader. A major objective of the survey was to analyze the reading habits of our readers; a second objective was to obtain hard information about the professional orientation of our readers; and a third was to determine demographic data.
Dear to our editorial convictions, our survey contained a major section on programming languages. Next, we wanted to characterize the impact of micro computing on the reader's personal life. Some miscellaneous information about present and future computing-equipment ownership completed the survey design. The form of the survey followed that of the two previous surveys we have done. The layout of the questionaire was designed and executed by Nancy Estle and her associates in the BYTE production department. In this editorial, we can cover only some selected results from the survey. The complete computer-tabulated results take much more room than the space available in a single issue of BYTE. We found that the typical BYTE reader is a professional who uses a computer as part of his or her job. Of the entire sample, 85% use computers in their everyday work. [...] »
The second part of this article describes techniques for interfacing to the S-100 bus.
[author : Thomas Woodward Cantrell] #Electronic #Microprocessor #Interface
Extract : « [...] While the processor board presented here is compatible with the S-100 boards in my system, it does not fully conform to the proposed IEEE (Institute of Electrical and Electronics Engineers) standard. By devoting a little additional design effort, an interested reader should be able to make the board as IEEE-compatible as he wishes and can implement features I chose not to include. Refer to figure 1, the schematic diagram for the processor board on pages 66 and 67, throughout the following section. The adaptation of the basic computer to the S-100 bus can be broken up into four necessary tasks:
• providing a buffered, demultiplexed address bus;
• providing for separate 8-bit buffered input and output data buses;
• generating a buffered command/control bus;
• producing the required status signals. [...]
»
This data-storage structure makes it easy to insert or delete items in the file.
[author : Bill Walker] #DataManagement #DataStructure #Algorithm #Listing #BASIC
Extract : « Of the numerous sorting techniques know to the average computer user, one that is seldom talked about is the binary sort. This is probably because, at first glance, it seems unnecessarily complicated when compared to, say, the common bubble sort. (The bubble sort is so-called because a new element reaching its proper position in a sorted list does so by being compared successively with each element already in the list, rising like a bubble from the bottom of the list.) Nonetheless, I was curious enough about the binary sort to compare it to the more common bubble sort in a practical demonstration. The results were interesting enough to warrant further study. First, let me describe the experiment.
The program of listing 1 (with line 5 deleted) was used to implement a binary sort on an 8 K Commodore PET. Timing comparisons were made, using the PETs internal realtime clock, for both this program and a bubble-sort program (not listed in this article), both of which were instructed to sort a random list of 100 integers. The binary sort took approximately half as long as the bubbLe sort to order the random list of numbers. However, the real payoff came when the computer was told to either add to or delete from the list, and then print the new sorted list. The bubble sort took the same amount of time it took to do its first sort, but the binary sort was finished before the display had time to record the fact.
It is on this seemingly amazing note that we begin a discussion of binary sorts. [...] »
Commodore PET's BASIC interpreter is a handy foundation for a tiny compiler.
[author : Mark Zimmermann] #Programming #BASIC #Book
Extract : « These "programmers' programs" allowed a user to write in a language that is more compact and meaningful for humans than machine language.
In the beginning, computers were programmed in machine language. To execute a simple equation, such as A=B, a user had to write dozens of instructions. He had to tell the machine, "load the accumulator with the first byte of the number B," and "store the accumulator in the memory location assigned to the first byte of A," ad nauseam. A more complicated equation like C=LOG(D) required hundreds or even thousands of instructions ! It's no wonder, therefore, that among the first programs developed were programs to make it easier to write other programs. These "programmers' programs" allowed a user to give the computer instructions in a higher-level language, one that is more compact and meaningful for humans than machine language.
High-level computer languages are nonsense to a machine until they have been translated into fundamental commands that the system can understand and execute. There are two principal methods used to perform this translation: interpretation and compilation. An interpreter is a machine-language program that scans through a higher-level program, line by line. As each statement is encountered, the interpreter figures out which operations are necessary to execute that statement, then goes ahead and performs the operations. The interpreter then moves on to the next statement, translates it, and executes it. This process is repeated, with each statement being interpreted (or reinterpreted) every time it is executed.
A compiler acts rather differently. Like an interpreter, it scans through a high-level program and figures out what fundamental operations are necessary to execute each line. But, instead of performing those operations, a compiler just writes out (ie: onto a cassette tape drive) the sequence of machine-language instructions that do the job when executed. An interpreter executes a program statement by statement, as it interprets it, so that the interpreter and the program execute concurrently. But, when a compiler is finished with a program, the result is a machine-language program that represents the higher level program; the machine-language program must be loaded back into the computer and executed before the problem being programmed is solved. [...] »
Here's an introduction to symbolic computer mathematics.
[author : David R Stoutemyer] #Mathematics #Listing #BASIC
Extract : « This article describes a simple BASIC program that expands polynomials. For example, when given an expression such as:
(5x+7) (2x+3)^3
the program produces as output the corresponding fully expanded polynomial:
40x^4 + 236x^3 + 522x^2 + 513x + 189
Written in ANSI (American National Standards Institute) minimal BASIC, this program requires only a single small one-dimensional numeric array, integer arithmetic, and room for 110 simple BASIC statements. In fact, the program can be adapted to the HP-41C and TI-59 programmable pocket calculators.
Symbolic-mathematics systems have long been available for large computers. The muMATH-79 software developed by The Soft Warehouse and distributed by Microsoft, 10800 NE 8th, Suite 819, Bellevue WA, 98004, brought sophisticated symbolic math to microcomputers based on the Intel 8080, 8085 and Zilog Z80 microprocessors. However, symbolic-math systems are currently unavailable for microcomputers and minicomputers based on other processors, and many 8080-, 8085-, or Z80-based installations lack the requisite minimum of 32 K bytes of programmable memory, a floppy-disk drive, and the TRSDOS, CP/M, CDOS, or IMDOS operating system currently necessary to run muMATH. Consequently, to make some symbolic math available on those computers for which a full-fledged system is not yet available, this article presents a compact polynomial expansion program written in BASIC. Though nowhere near as flexible, general, or robust as muMATH, this program is useful, nonetheless, and it provides an educational exposure to the idea of computer symbolic math. [...] »
A simple circuit and some clever programming make enhancing this processor's instruction set possible.
[author : Dennette A Harrod] #Electronic #Listing #Assembly #Book
Extract : « "Every programmer is part of a collective mind, and progress demands that he educate and be educated by others." So states H T Gordon in a letter published in the October 1977 issue of Dr Dobbs Journal of Computer Calisthenics and Orthodontia. In this article I shall attempt to educate others by detailing a hardware approach to adding sixty-four user-defined instructions to the MOS Technology 6502 microprocessor. The 6502 device is used in the Apple II, PET, KIM-1, SYM-1, Rockwell, Ohio Scientific, and Atari microcomputers to name a few. [...] »
When plotting a line on a raster display, there is more logic involved than moving from point A to point B.
[author : John Beetem] #Listing #Assembly #Algorithm #Graphics
Extract : « Many personal computers on the market today use raster graphics displays. These consist of devices that display a rectangular matrix of points (actually small rectangles) on a standard raster scan video monitor. The points are stored in a memory, which can be accessed by a computer. Plotting random points is easy, but there is no builtin provision for plotting line segments (vectors). This article describes a method for solving that problem. [...] »
With appropriate interfaces, these displays are suitable for many applications.
[author : Steve Ciarcia] #Electronic #Display #HowItWorks
Extract : « You've probably seen the abbreviation LCD. The chances are that many of you own LCD calculators or wear LCD watches. Liquid-crystal displays, or LCDs, are enjoying rapid growth in key markets, especially in battery-operated devices. They are beginning to appear in everything from computer games to handheld terminals.
Rather than emitting light, as in the case of LEDs (light-emitting diodes), LCDs are light reflectors. They are primarily used in high-ambient-light situations and require external "backlighting" for low-ambient-light use. Since they are non-illuminating, they consume very little power and can be driven directly from CMOS (complementary metal-oxide semiconductor) circuitry. This fact alone makes them valuable for portable equipment. [...] »
This system is capable of maintaining a file of related records and printing a selective list based on given criteria.
[author : Robert W Elmore and Krishna K Agarwal] #DataManagement #DataStructure #Book
Extract : « Much has been said in recent years regarding the reduction in size and increase in the capabilities of computing equipment. Manufacturers appear to be flooding the marketplace with ever more and more sophisticated small systems. One result of this expansion is that small computers of adequate capability are now within the financial reach of smaller businesses which previously could not justify the expense associated with the use of larger systems.
Unfortunately, the prospective buyer of such hardware may still be faced with a serious problem. He must, quite probably, pay someone to develop the software required by his particular application. This expense may be substantial since software development costs have taken a trend opposite to the cost of hardware. An information-retrieval system is a fairly common software need. This usually must be tailored to a very specific application-an employee file or an inventory file, for example. Further, it is frequently the case that the user of the information-retrieval system is not a programmer, and may find that the system is confusing and therefore difficult to use.
The preceding provides the motivation for the concepts and software described in this article. In writing this article, we have kept in mind four goals:
• to present a method of organizing
data such that its manipulation
by the algorithms presented is, to
a high degree, independent of the
data itself;
• to describe a high-level queryanswering
language that may be
used by nonprogrammers with
minimal difficulty;
• to demonstrate the feasibility of
implementing such an
information-retrieval system on a
small computer system; and
• to show that such an implementation
can be relatively systemindependent
and therefore
transportable.
[...] »
A macro assembler is often a valuable tool when developing large assembly-language programs.
[author : David C Brown] #Algorithm #Listing #Assembly #Programming
Extract : « Assembly language is the most powerful language available to a given processor. Within the limitations of time and human patience, it allows the most intricate manipulation of data, the smallest program size, and the fastest execution time possible. The drawback is that writing programs in assembly language is very tedious, often involving repeated writing of either identical code or code that is similar to previously written code. One software tool that can help to decrease the tedium of assemblylanguage programming is the macro assembler. A macro assembler allows you to write one line of assemblylanguage code (called a macro instruction or just macro) that is expanded to (or replaced by) a predefined sequence of assembly-language statements; this saves you from entering the same code a second time. The original assembly-language file containing the macro statements generates the new expanded assembly-language file; this second file, which contains only valid assembly-language statements, can then be assembled, modified, or stored by the user. The flowcharts in this article detail the process of defining and using macro instructions. The flowcharts can be used either to incorporate a macro facility into an assembler that you are designing or to write a macro-preprocessing program, the output of which is an expanded assembly-language source listing that can be assembled by your existing assembler. [...] »
The best problem-solving programs often apply a combination of human and computer methods.
[author : Peter Frey] #Listing #BASIC #ArtificialIntelligence
Extract : « [...] When humans attempt to solve these problems, they use a combination of logical inference and directed search. The values for some of the letters can be determined, or at least restricted to a subset of values, by direct logical analysis. The value of the remaining letters is then determined by a "generate and test" approach in which plausible values are examined until a suitable one is found. As more information is acquired, logical deduction can narrow the search to a limited number of potential solutions. [...] »
Using a standard dialect of the FORTH language keeps costs down in the long run.
[author : William Ragsdale] #Standard #Programming #Forth
Extract : « How can a standard be created for a computer language when every programmer freely adds his own procedures, data structures, and compilation methods? This dilemma continually faces the FORTH Standards Team as each user creates extensions to the language as the fundamental act of programming! The recently published FORTH-79 Standard offers a uniform vehicle for interchange of FORTH programs across all computer architectures and models. Additionally, it provides programmers the ability to communicate with other programmers and host computers, as they ply their craft. FORTH was created by Mr Charles Moore from 1960 thru 1970, to meet his realworld programming needs. The standards team has developed the current standard through three generations, to match increasingly broader requirements. [...] »
#Book
Extract : « Microprocessors and Digital Systems by Douglas V Hall, Gregg/ McGraw-Hill, 1980, 426 pages, hardcover, $15.95 [...]
Z80 Microprocessor Programming and Interfacing Volumes 1 and 2 by Nichols, Nichols, and Rony Volume 1: 302 pages, softcover, $10.95
Volume 2: 496 pages, softcover, $12.95
Blacksburg Continuing Education Series Howard W Sams & Company Inc, 1979. [...] »
#Book
The following is a list of books received at BYTE Publications during this past month. Although the list is not meant to be exhaustive, its purpose is to acquaint BYTE readers with recently published titles in computer science and related fields. We regret that we cannot review or comment on all the books we receive; instead, this list is meant to be a monthly acknowledgement of these books and the publishers who sent them.
The Architecture of Microcomputers, S E Greenfield; Winthrop, Cambridge MA, 1980; 18.5 by 24.5 cm, 366 pages, hardcover, ISBN 0-87626-037-7, $24.95.
Basic Computer Programs in Science and Engineering, Jules H Gilder; Hayden Book Company, Rochelle Park NJ, 1980; 18 by 25 cm, 256 pages, softcover, ISBN 0-8104-0761-2, $8.95.
Computer Logic, Testing, and Verification, J Paul Roth; Computer Science Press, Potomac MD, 1980; 16 by 24.5 cm, 176 pages, hardcover, ISBN 0-914894-62-5, $23.95.
Digital Computer Simulation, Fred J Maryanski; Hayden Book Company, Rochelle Park NJ, 1980; 15.5 by 23 cm, 336 pages, softcover, ISBN 0-8104-5118-2, $15.95.
Digital Hardware Design, John B Peatman; McGrawHill Book Company, New York NY, 1980; 18 by 25 cm, 438 pages, hardcover, ISBN 0-07-049132-1, price not available at this time.
Dr Dobb's Journal of Computer Calisthenics & Orthodontia: Running Light Without Overbyte, The People's Computer Company Series, Hayden Book Company, Rochelle Park NJ, 1980; 21 by 28 cm; volume 1: 368 pages, ISBN 0-8104-5475-0; volume 2: 480 pages, ISBN 0-8104-5484-X; volume 3: 480 pages, ISBN 0-8104-5490-4; softcover, $18.95 each.
An Introduction to Microcomputers: Volume 1 Basic Concepts, Adam Osborne; Osborne/ McGraw-Hill, Berkeley CA, 1980; 19 by 23 cm, 480pages, softcover, ISBN 0-931988-34-9, $12.50.
Mathematical Modeling with Computers, Samuel L S Jacoby, Janusz S Kowalik; Prentice-Hall, Englewood Cliffs NJ, 1980; 16 by 23.5 cm, 292 pages, hardcover, ISBN 0-13-561555-0, $21.50.
Microcomputer Management and Programming, Carol Anne Ogdin; PrenticeHall, Englewood Cliffs NJ, 1980; 18.5 by 24.5 cm, 348 pages, softcover, ISBN 0-13-580936-3, $16.95.
Microprocessors and Logic Design, Ronald L Krutz; Wiley & Sons, New York NY, 1980; 15.5 by 23.5 cm, 467 pages, hardcover, ISBN 0471-02083-4, $24.95.
Microprocessor Software Design, Max Schindler; Hayden Book Company, Rochelle Park NJ, 1980; 22 by 28 cm, 304 pages, softcover, ISBN 0-8104-5190-5, $11.95.
The Practical Guide to Structured Systems Design, Meilir Page-Jones; Yourdon Press, New York NY, 1980; 15.5 by 23 cm, 354 pages, softcover, ISBN 0-917072-17-0, $19.50.
Programmable Pocket Calculators, Mullish, Kochan; Hayden Book Company, Rochelle Park NJ, 1980; 15.5 by 23 cm, 264 pages, softcover, ISBN 0-8104-5175-1, $8.95.
TRS-80 BASIC; A Self Teaching Guide, Albrecht, Inman, Zamora; Wiley & Sons Inc, New York NY, 1980; 18.5 by 23.5 cm, 351 pages, softcover, ISBN 0-147-06466-1, $8.95.