Top Banner
Stack Computers Guest Editor's Introduction David M. Bulman Pragmatics, Inc. Those of us who have worked with stack computers for several years have found an unending source of amaze- ment-and some consternation-in how few computer profes- sionals there are who seem aware that there is an entirely different approach to computer architecture from the familiar von Neumann model. Sometimes when such phrases as "zero-address machine" have dropped from my lips, and I see that the phrase had about as much meaning for the listeners as "zero-bit word" might have, I have wished that knowledge of stack machines were more widely spread. Fortunately Jack Grimes, the technical editor of Computer, had the same desire and suggested that an issue be devoted to the subject. This is just about the right time to treat the subject of stack machines, what with the rumors rampant about impending LSI stack machines from Intel and Zilog. Another rumor has it that Hewlett-Packard is coming out with an LSI stack machine which will be not unlike the HP3000. I wouldn't even be surprised if Amdahl made an interesting announcement in this area. Microdata has announced plans to actively market a system based on their 32/S. Several other high-level language machines from other vendors will probably be announced in the next couple of years. Although stack machines and high-level language machines are not equivalent, I believe that a stack architecture is best for most of the more common programming languages. I suspect that the new machines to be introduced by some of the semiconductor manufacturers will be called "Pascal machines" by their manufacturers rather than stack machines. Pascal is an Algol-like high-level language developed by Niklaus Wirth with a number of desirable features which the original Algol didn't have. Although Pascal has been around for a number of years, its popularity seems to have started to spread rapidly in the last year or so. One of the reasons for its new popularity is the easy availability of a Pascal compiler written in Pascal. Several articles have appeared describing the ease of bootstrapping up to a compiler for a new machine using this compiler. The compiler generates code for a "hypothetical stack machine." A program must be written to emulate or interpret the code. The idea of building a machine very close to the hypothetical stack machine has obviously occurred to a number of people. I was first introducted to the idea of a stack machine as a student of F. L. Bauer in Germany in 1961. By that time, he and K. Samelson had already patented a specialized stack machine. I remained intrigued by the idea, but had no opportunity to work with a stack machine until 1970, when I participated in the implementation of an on-line system based on the B5500. By 1974 we had 510 terminals attached to two B5700's, which operated 24 hours a day, 7 days a week with query response times of 1 to 3 seconds and data base update times of 6 to 12 seconds. Each B5700 had from six to 15 programs running at the same time with a total main memory of only 192K bytes of 4-microsecond core. Most of the on-line system had been implemented by no more than four programmers. Since then, I have seen no reason to alter my feeling that most computers should-be based on stacks. COM PUTER 14
3

Stack Computers · PDF fileThoseof us who have worked with stack computers for severalyearshavefoundanunendingsourceofamaze- ... Barton.ThedesignoftheB5000wasduealmostentirely to Barton

Feb 17, 2018

Download

Documents

buikien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Stack Computers · PDF fileThoseof us who have worked with stack computers for severalyearshavefoundanunendingsourceofamaze- ... Barton.ThedesignoftheB5000wasduealmostentirely to Barton

Stack ComputersGuest Editor's Introduction

David M. BulmanPragmatics, Inc.

Those of us who have worked with stack computersfor several years have found an unending source of amaze-ment-and some consternation-in how few computer profes-sionals there are who seem aware that there is an entirelydifferent approach to computer architecture from thefamiliar von Neumann model. Sometimes when suchphrases as "zero-address machine" have dropped from mylips, and I see that the phrase had about as muchmeaning for the listeners as "zero-bit word" mighthave, I have wished that knowledge of stack machineswere more widely spread. Fortunately Jack Grimes, thetechnical editor of Computer, had the same desire andsuggested that an issue be devoted to the subject.This is just about the right time to treat the subject

of stack machines, what with the rumors rampant aboutimpending LSI stack machines from Intel and Zilog.Another rumor has it that Hewlett-Packard is comingout with an LSI stack machine which will be not unlikethe HP3000. I wouldn't even be surprised if Amdahlmade an interesting announcement in this area. Microdatahas announced plans to actively market a system basedon their 32/S. Several other high-level language machinesfrom other vendors will probably be announced in thenext couple of years.Although stack machines and high-level language

machines are not equivalent, I believe that a stackarchitecture is best for most of the more commonprogramming languages.

I suspect that the new machines to be introduced bysome of the semiconductor manufacturers will be called"Pascal machines" by their manufacturers rather than

stack machines. Pascal is an Algol-like high-level languagedeveloped by Niklaus Wirth with a number of desirablefeatures which the original Algol didn't have. AlthoughPascal has been around for a number of years, itspopularity seems to have started to spread rapidly inthe last year or so. One of the reasons for its newpopularity is the easy availability of a Pascal compilerwritten in Pascal. Several articles have appeared describingthe ease of bootstrapping up to a compiler for a newmachine using this compiler. The compiler generates codefor a "hypothetical stack machine." A program must bewritten to emulate or interpret the code. The idea ofbuilding a machine very close to the hypothetical stackmachine has obviously occurred to a number of people.

I was first introducted to the idea of a stack machine asa student of F. L. Bauer in Germany in 1961. By that time,he and K. Samelson had already patented a specializedstack machine. I remained intrigued by the idea, but hadno opportunity to work with a stack machine until1970, when I participated in the implementation of anon-line system based on the B5500. By 1974 we had 510terminals attached to two B5700's, which operated 24hours a day, 7 days a week with query response timesof 1 to 3 seconds and data base update times of 6 to 12seconds. Each B5700 had from six to 15 programsrunning at the same time with a total main memory ofonly 192K bytes of 4-microsecond core. Most of the on-linesystem had been implemented by no more than fourprogrammers. Since then, I have seen no reason toalter my feeling that most computers should-be based onstacks.

COMPUTER14

Page 2: Stack Computers · PDF fileThoseof us who have worked with stack computers for severalyearshavefoundanunendingsourceofamaze- ... Barton.ThedesignoftheB5000wasduealmostentirely to Barton

The first article in this issue is meant to introducethe basic ideas of stack architecture and to survey mostof the machines based on stacks or with interestingstack features. I hope that the evangelism which got mixedin with the instruction is also useful and instructive.The reader who would like to continue the study ofstack architecture should start with Doran's chapter inChu's book or with McKeeman's chapter in Stone's book.For a more advanced treatment, Organick's book wouldprobably be best. The book by Pratt treats a number ofproblems in the run-time environment needed for severalprogramming languages. (See complete list of references onp.28.)

Blake's article on the results of an extensive performancemeasurement project at Hewlett-Packard on the HP3000will surely be used for several years by computer archi-tects. He not only gives us a tremendous amount ofinformation on the optimal design of a stack machine,but also a valuable insight on features actually used incomputers executing high-level language programs,whether with stack architecture or based on a moretraditional design.The article by John Couch and Terry Hamm is much

more advanced than the others in this issue. It will bevaluable to those who are involved with writing compilersfor any kind of machine. In addition, a careful study oftheir work will reveal a number of the more difficultdetails and problems of stack machines (yes, there areproblems). In their section on boolean expression evalu-ation, one should also consider that an optimization ofspace might work as well if the complete value isalways computed at the stack top and then a conditionalbranch executed on the basis of that boolean value.Duncan has given us a most enlightening view of the

history of stack machines outside of the U.S., showing themarvelous work which was being done in the U.K. around1960. Even more impressive are the innovations of C. L.Hamblin of Australia, who certainly ranks as one of theforemost computer architects of all time. His remarkquoted by Duncan-". . . there are some hopes that controltransfer may be unnecessary if a sufficiently flexiblesystem of control instructions can be found ..."-wasmade in a paper published in 1957. It shows that hewanted to eliminate the GOTO from machine instructionsets long before the GOTO controversy arose in pro-gramming.To complete the survey given in Duncan's paper we

need to have an outline of the work being done in theU.S. at about the same time. As we will see, there wasanother computer architect of the same rare stature asHamblin.

Until recently, when stack computers in the U.S. werediscussed, only one company-Burroughs-could possiblybe mentioned. Hewlett-Packard entered this arena morerecently with their now-successful HP3000 series. TheMicrodata 32/S, introduced in about 1973, has not yetbeen marketed widely.Burroughs has a long history of manufacturing com-

puters with stack architecture, beginning with the B5000and B5500-known briefly as the B5700-and continuingwith the B6700 and B7700. The whole idea of Burroughsbuilding a stack machine certainly came from Robert S.Barton. The design of the B5000 was due almost entirelyto Barton. Obviously, others participated in the designof the machine, but the architecture, general design, andessentially all of the innovations are to be credited toBarton alone. There seems to be complete agreement onthis point within Burroughs among those involved inthe development, in spite of the fact that several articles

May 1977

were published by others in Burroughs at the time. Hesaw the B5000, not just as a stack machine, but asan Algol machine. The machine language and architecturewere to reflect Algol as closely as possible, with certainother features which would allow the B5000 to executeprograms efficiently in other popular languages. Bartonhas worked for Burroughs off and on for several years,both as an employee and as an outside consultant. Heis presently director of engineering for systems research.Barton developed stack machine architecture at essential-

ly the same time that Hamblin of Australia was inde-pendently arriving at the same revolutionary conclusion-i.e., that Polish notation was the "natural" method ofcontrolling a digital computer. In 1958, Barton read abook by Kopi on logic. The idea of a Polish machineoccurred to him "instantaneously" while reading Kopi.At that time he wanted to do a two-stage translationto Polish, then execute the compiled code. Also at thattime, he not only wanted to use the stacks for sub-routine control and parameters, but also for the controlof loops. Stack control of loops was not done at thattime, but the idea may be just about due for a revival.The idea of building the B5000 was proposed by

Barton in 1959, and Burroughs actually began the projectin the spring of 1960. The machine, together with theoperating system and compilers, was completed in 1962and the first commercial delivery of the B5000 wasearly in 1963.

The Balgol project in Burroughs exerted a very heavyinfluence. Balgol was an implementation of Algol 58 onthe Burroughs 220. The B220 was not a stack machine,but the compiler did use Polish as an intermediatelanguage. Co-routines were used extensively in the com-piler and were switched according to space requirementsduring compilation. It was a very fast compiler with nointermediate assembly language stage. About sixty com-piler instructions were executed to generate each machinelanguage instruction; this is probably still unusuallyfew. Joel Erdwinn was the Balgol project leader and theprincipal desigper and implementer. Jack Merner wasvery important to the project, and David Dahm washeavily involved at the beginning. The reason for theimportance of the Balgol compiler was that it was verydifficult to convince Burroughs management that a com-puter-the B5000-should be built which had no assemblylanguage at all. The fact that Balgol could be compiledat the read speed of the card reader on the B220lent some credibility within Burroughs to Barton and hisideas for a high-level language machine.

Protecting the technical principles from management isa problem often faced by engineers and designers. Theperson responsible for protecting Barton's ideas fromcompromise by Burroughs management was Lloyd Turner,who also probably made the B5000 a reality by pro-viding the push so that the project was actually completed.This protection was needed to a much larger degreethan is typical because the B5000 was to be builtwith compilers and operating system (known withinBurroughs as MCP for Master Control Program) writtenentirely in Algol 60. Not only was all system softwareto be done in Algol, but no assembler was to beavailable to anyone. That this is a difficult idea toaccept is evidenced by the fact that an article appearedin 1975 (after Multics!), in a usually respected trademagazine, discussing whether it would be possible towrite an operating system entirely in a high-level language.

Since it is unlikely that 'a new operating system orcompiler for any large-scale computer will ever be done inassembly language again, it is instructive to look at the

15

Page 3: Stack Computers · PDF fileThoseof us who have worked with stack computers for severalyearshavefoundanunendingsourceofamaze- ... Barton.ThedesignoftheB5000wasduealmostentirely to Barton

results of the first ones done in a high-level language.The first Algol 60 compiler for the B5000 was writtenin Algol 60. It was then hand translated into machinelanguage. As soon as it worked satisfactorily, it wasused to compile the Algol version of itself. So far noneof this would astound those who have used variousbootstrap methods to write compilers recently, but thereis one very important difference here: the compiledversion was smaller and faster than the hand translatedversion! This fact is almost wholly a result of the stackarchitecture of the B5000.The total maximum core size of the B5000 was 192K

bytes, smaller than the resident portion of operatingsystems on typical non-stack large-scale machines today.To see that this is due to the stack architecture ofthe B5000 and not to a lack of features in the MCP,one needs to regard the capabilities of the B5000 MCP.The card reader, printer, etc., were all spooled on diskautomatically as part of the MCP. Virtual memory was

provided with a so-called presence bit interrupt to causeabsent segments to be brought in from disk automatically.The B5000 was planned from the beginning to support bothmultiprocessors and multiprogramming. Even the firstmachines had two "tightly coupled" processors (MP) andsupported 15 or more separate jobs in the mix at once(MVT). The B5000 was normally delivered with 192K bytesof core, but some were delivered with much less. Theoperating system and the Algol compiler could run in lessthan 48K bytes! Considering that B5000 Algol hadessentially all the features of PL/I except. hierachicaldata structure and high-level interrupt handling, the valueof the stack architecture becomes even m-ore obvious.

Reader Service Number 7

16

Perhaps the main principle that Barton kept in mindwhile designing the B5000 was code compaction. Moreon this in the tutorial article in this issue.The next important principle of the design was the

fundamental nature of the subroutine. The subroutine orprocedure concept was built into the B5000 rather thanbeing little more than saving a return address. JackMerner's contribution in the area of procedure structurewas important in the B5000 design.Another primary principle was that code must be

invariant, hence only a relative branch was included inthe B5000.The concept of using hardware descriptors to access

all code segments and all data larger than a singleword is not linked in principle to stack architecture, butit does seem to occur in most stack machines. Hardwaredescriptors first appeared in a commercial machine inthe B5000. Barton decided to use descriptors afterreading an article about the Atlas and paging.The Hewlett-Packard HP3000 was designed in 1971-72.

Several of the designers had previously been employedby Burroughs, and the influence of the B5500 and B6700can be seen quite clearly. A number of features in theHP3000 have made it perhaps the clearest example ofstack architecture to be followed in future stack machines.As discussed by the Blake article in this issue, theinstruction set and design details of the HP3000 havebeen tuned to near optimum efficiency.The Microdata 32/S was designed by Bill Roberts and

Dennis Allison in 1972. The 32/S is certainly'a stackmachine, but beyond that it is very definitely a high-level language machine. Allison first designed MPL, ahigh-level language patterned after Algol 60-but said tobe a derivative of PL/I for marketing purposes-and thendesigned a microprogrammed machine based on theMicrodata 3200 to implement MPL. The result is-alongwith the B1700-probably the best example of a truehigh-level language machine now being manufactured.Allison apparently now feels that it could be improved,but the 32/S certainly has a place in the history ofstack architecture.

Note that there are essentially no "general registers"in a stack machine. Their function is treated automaticallyby the stack hardware. If there were just one effectthis issue could have on the way that programmers andengineers think about computers, I would want it to bethis: The next time a survey of microprocessors ispublished with a table of features, the readers will lookat the columns containing the number of registers and thenumber of instructions in the instruction set and say,"Those are nice numbers, but why are they supposed tobe interesting?"

David M. Bulman is president of Pragmatics,Inc., a San Diego software and consultingfirm. Before founding Pragmatics in 1975,he was head of systems programming for a

data base system with a nationwide networkof terminals. From 1967 through 1970 he wasan assistant professor of mathematics atSan Diego State University.A member of IEEE, ACM, and SIAM,

Bulman was the technical program chairmanfor the ACM national conference in 1974. His MS inmathematics(Dipl. rer. nat.) is from the Technical University of Munich.

COMPUTER

Your Mail Order Cd6mputer Shop...

IMSAI 8080 kit with 22 slots (Iimited quantity) ....... S599.00TDL Z-80 ZPU (the Qne with full software available now) 242.00EdgeConnectorsandguidesforiMSAI each ......... 4.25Edge Connectors and guides for IMSAI 10 for ....... 40.00VECTOR Graphic 8K RAM kit with 500 ns chips ...... ...... 225.00Seals 8k RAM kit with 250 ns chips ....... .......... 260.00North Starcomplete Micro-Disk System kit ..... .... 599.00

WE TAKEMASTERCHARGEOR BANKAMERICARD

_ For phone and mai orders BANKAMERICARD__N (Add4% of TOTALORDERforservicecharge)

TERMS: Shipping charges - $10. per CPU or large units, $1.50 per kit,$2. minimum perorder.

Provided stock is available, we will ship immediately for payment bycashiers check or money order.Allow 3 weeks for personal checks to clear. New York State residentsadd appropriate sales tax.

PRICESSUBJECTTOCHANGEWITHOUT NOTICE.

For the best prices available on:IMSAI * TDL * NORTH STAR * POLYMORPHICTARBELLELECTRONICS * SEALSELECTRONICS

CALL: (315)637.6208WRITE: P.O. Box 71 * Fayetteville, N.Y. 13066