Illiac Programming
Total Page:16
File Type:pdf, Size:1020Kb
t^^J^^m^,#' ^ . • V L I E) R_ARY OF THE UN IVER5ITY Of ILLl NOIS 6(0-84 -mtStOS: The person charging this material is re- sponsible for its return on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University, University of Illinois Library AyS2 6 1<68 NOV 2 5 m NOV 9 1ii95 OCT 0CT2 4199(> L161—O-1096 Digitized by the Internet Archive in 2011 with funding from University of Illinois Urbana-Champaign http://www.archive.org/details/illiacprogramnninOOuniv DIGITAL COMPUTER LABORATORY GRADUATE COLLEGE UNIVERSITY OF ILLINOIS ILLIAC PROGRAMMING A Guide to the Preparation of Problems ^ for Solution by the University of Illinois Digital Computer -0 URBANA, ILLINOIS March 1, 19 5^)- PREFACE The Digital Computer Laboratory of the University of Illinois has a three-fold program which is concerned with re- search in the field of digital computers, with maintenance for University use of a high-speed digital computer, and with teaching of design and use of digital computers. The preparation of pro- grams for the Illiac is the responsibility of the person who wishes 3 his problem solved. But since each prospective user cannot always in at a attend the courses on programming offered by the University, it r ^ has seemed desirable to help make it possible for him to learn a: the elements of Illiac use by himself. The result has been this book, which makes use of a year's experience in operating the Illiac for University research and several years experience in the teaching of programming. Many of the chapters were used in preliminary form as supplementary material in Mathematics 3^5, the basic course on programming. The book, like most of the work of the Digital Computer Laboratory, is the result of a group effort by many different people, The chapters were written by S. Gill, R. E. Meagher, D. E. Muller, J. P. Nash, J. E. Robertson, T. Shapin and D. J. Wheeler. Other members of the laboratory staff read the material and offered K valuable criticism. The typewritten copy was prepared by Natalie R. House and Caroline M. Brown; the drawings were made by George Ehrlich. Ill 1^ WKi i l'illHrKMlflHi'1'liii I- LU a. o UJ < LU a. LU < irraiTTit^a^n CONTENTS PREFACE iii PHOTOGRAPHS iv Chapter 1. INTRODUCTION 1-1 2. THE ARITHMETIC . Chapter OF THE ILLIAC , 2-1 2.1 Representation of Numbers 2-1 2.2 Fundamental Operations of the Illiac Arithmetic Unit 2-3 2.3 The Illiac Arithmetic Unit 2-5 2.k Additions 2-5 2.5 Subtractions 2-6 2.6 Absolute Value Addition and Subtraction. 2-7 2.7 Increment Add Orders 2-8 2.8 Add from Q and Increment Add from Q. 2-8 2.9 The Shift Orders 2-9 2.10 Multiplication 2-11 2.11 Division, 2-12 2.12 Precise Calculation of the Division Remainder 2-15 2.13 The Division Hangup. Special Cases of Division 2-l6 2.1U Memory to Q and Store Instructions , , . 2-17 2.15 Illustrative Examples 2-17 2.16 Integer Operations 2-20 Vlll 2.17 Summary 2-21 Chapter 3. THE ORDER CODE 3-1 3.1 The Makeup of Orders 3-1 3.2 Execution of Orders 3-^ 3.3 Stop Orders 3-6 S.k Order Types 3-6 3.5 Order Variants 3-8 Left Shift 3-12 Right Shift 3-13 Unconditional Control Transfer ...... 3-1^ Conditional Control Transfer 3-I6 Store 3-17 Memory to Q 3-I8 Divide 3-I9 Multiply 3-20 Input-Output 3-21 Special Input-Ouput 3-23 Increment Add from Q 3-25 Add from Q 3_26 Extract 3-27 Increment Add 3-28 Add 3-29 Abbreviated Order List 3-30 IX '\\VX\V»Hi Chapter k. ROUTIKBS k-1 ij-.l Closed Subroutines k-2 k,2 Entering a Closed Subroutine k-^ U.3 Returning Control to the Master Routine . U-3 k-.h Placing the Argument k-'^ ^•5 Program Parameters ^-7 h-.6 Interpretive Routines U-9 ^•7 Preset Parameters U-11 Chapter 5. THE DECIMAL ORDER INPUT 5-1 5.1 Relative and Fixed Addresses 5-2 5.2 Directives. 5-U 5.3 Assembling of Orders 5-^ 5.^ Decimal Addresses ....... 5-5 5.5 Starting the Program. 5-6 5.6 Input of Decimal Fractions 5-6 5.7 Pre-set Parameters. Modification of Orders. ........... 5-7 5.8 Example of Use of Decimal Order Input . 5-8 5.9 Use with Interludes. Retained Directive. 5-11 5.10 Stopping the Tape. 5-12 5.11 Placing the Decimal Order Input 5-12 Chapter 6. SCALING 6-1 6.1 Scaling by Shifting 6-1 6.2 Numbers with Binary Point Shifted 6-1 6.3 Scaling a Full Problem 6-5 6.1^ Adjustable Scaling Factors 6-10 6.5 Continuous Scaling. Floating Point Routines. 6-10 Chapter 7- MACHINE METHODS AND CODING TRICKS 7-1 7.1 The Summation of Products 7-I 7.2 Reversing the Control Transfer 7-3 7-3 Binary Switches 'J-k 7.i^ Tests for and -1 7-6 7.i^ Use of Orders and Addresses as Constants. 7-7 7.6 Resetting and Starting of Cycles of Orders. 7-8 7.7 Use of the Quotient Register for Inter- changes 7-II 7.8 Testing if Numbers are Greater than One- Half 7-11 7.9 Convergence Criteria 7-12 7.10 Marking 7-13 7.11 Remainder in Integer Division f-lk 7.12 Binary Chopping , . , 7-15 7.13 Evaluation of Polynomials 7-I6 7.1^ Shifting A Left Without Shifting Q 7- 17 XI Chapter 8, CHECKING METHODS. 8-1 8.1 Common Blunders ............. 8-1 8.2 The Discovery of Errors ......... 8-2 8.3 Sources of Information. ......... 8-U 8.li Modifications to Programs ........ 8-5 8.5 Blocking Orders. ..... ....... 8-6 Types of Checking Routines. ....... 8-7 8-8 8 • 7 Post Mortem Routines .... ...... 8 .8 Post Mortem Version of the Decimal Order Input ............... 8-9 8 .9 The Address Search Routine. ....... 8-11 8 .10 Sequence Checking Codes. ....... 8-11 8 .11 Control Transfer Check. ......... 8-12 8 .12 The Check Point Routine ......... 8-12 8 .13 Conclusion. ......... 8-13 Chapter 9. TAPE PREPARATION , ............. 9-1 9. 1 The Tlliac Input. ............. 9-1 9. 2 The Illiac Output .............. 9-1 9. 3 The Perforated Tape. Sexadecimal Tape Code Characters ................. 9-1 9. k Classification of Operations. ....... 9-7 9. 5 Description of Equipment. .,......„ 9-7 9. 6 General Remarks ..... ......... 9-16 Xll Chapter 10. CALCULATION OF RUITOTWG TIME. 10-1 10.1 Order Times . 10-1 10.2 Example of Running Time Calculation. 10-2 10.3 A Simple Running Time Formula 10-i; Chapter 11. PREPARATION OF A COMPLETE PROGRAM . , 11-1 11.1 General Statement of the Problem .... 11-1 11.2 Trajectory Equations .......... 11-5 11.3 Processing of Equations for Solutions by the Illiac ..... .......... 11-8 11. J^ Scaling of the Quantities for Illiac Solution. , 11 -10 11.5 Coding of the Problem. ........... 11 -15 11.6 Checking the Program 11 -36 11.7 Conclusion ................. 11 -38 Chapter 12. TEE CATHODE RAY TUBE DISPLAY ........ 12-1 12.1 General Description ..... ....... 12-•1 12.2 Orders Controlling the Cathode Ray Tube Display. .................. 12- 3 12.3 Programming for the Cathode Ray Tube Display. 12- 5 Chapter 13. THE PROGRAM LIBRARY . ............ 13- 1 li^. Chapter DEFINITION OF TERMS. ........ lk~ 1 Index Xlll . CHAPTER 1 INTRODUCTION In 19^8 the University of Illinois "began to look into the possibility of acquiring an automatic digital computer. When attempts to buy one or to have one built failed, the University decided to build one of its own, and the Digital Computer Laboratory was organized in February 19^9- Shortly thereafter an agreement was made to build a second computer for the Army to be used at the Aberdeen Proving Ground It was decided to build the two machines following the de- sign of a computer then being designed and built at the Institute for Advanced Study. While many modifications were later made, both machines built by the University owe much to the early designs ob- tained from Princeton. The two ma-chines were built more or less together so that advantage could be taken of the savings obtainable by paralleling the design and construction work, but work on the Army machine, called the ORDVAC, was emphasized, and it was finished first. It passed its acceptance tests in February 1952 at Aberdeen and i,t has been in use there since that time. Work on the University computer (later named the Illiac) was completed in September 1952 and the computer was first made available for University use when classes began on Monday, September 22, 1952. 1-1 . The Illiac is an automEtic elect3ronic digital cou^juter. It is digital because it h:^r""-- -.v.rrfrs ss sexs cf digits which have discrete values, rather than as scale reading or measure- ments, which are contir i'aTia'ble. Apparatus for handling digits is :i'-" - ---li rrTff. ""r.T. t'::'" frr "-.".r.ilir.g rr-tlr.urus quantities, but it is capable of giving urlini-fi. accuracy by using suitable numbers of digits The Illiac is electronic. In the last ten years electronic circuits for storing, transmitting, adding, subtracting, multiplying and dividing numbers in digital f :rt: at extremely high speeds have been devised. The actual addition cf tvc nonhers in the Illiac takes only accut Such speed is useless unless the machine can be made to go ahead cr.