EdsacDoc.pdf

This preview shows page 1 - 5 out of 52 pages.

THE EDSAC SIMULATOR PROGRAM DOCUMENTATION July 2001
Image of page 1

Subscribe to view the full document.

- 1 - CONTENTS PROGRAM NOTATION . . . . . . . . . . . . . . . . . . . . . . . . . 3 CODE LETTERS FOR INITIAL ORDERS 2 . . . . . . . . . . . . . . . . 4 SPECIFICATIONS OF LIBRARY SUBROUTINES . . . . . . . . . . . . . . 5 C7 Check function letters . . . . . . . . . . . . . . . . . . . 6 C10 Numerical check . . . . . . . . . . . . . . . . . . . . . . 9 D6 Division . . . . . . . . . . . . . . . . . . . . . . . . . . 12 E2 Exponential . . . . . . . . . . . . . . . . . . . . . . . . 13 M3 Print heading . . . . . . . . . . . . . . . . . . . . . . . 14 M20 Set parameters from dial during input of orders . . . . . . 15 P1 Print positive number . . . . . . . . . . . . . . . . . . . 16 P6 Print short positive integer . . . . . . . . . . . . . . . . 17 P7 Print positive integer . . . . . . . . . . . . . . . . . . . 18 P14 Print signed decimal . . . . . . . . . . . . . . . . . . . 19 R1 Input decimal fractions . . . . . . . . . . . . . . . . . . 21 R2 Input positive integer during input of orders. . . . . . . . 23 R3 Input signed long decimal fraction . . . . . . . . . . . . . 24 R4 Input signed integer . . . . . . . . . . . . . . . . . . . . 26 R9 Input positive integers during input of orders . . . . . . . 27 S2 Square root. . . . . . . . . . . . . . . . . . . . . . . . . 28 S3 Cube root . . . . . . . . . . . . . . . . . . . . . . . . . 29 T1 Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 DEMONSTRATION PROGRAMS Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Cubes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Reciprocals . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Hello World . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Print Primes . . . . . . . . . . . . . . . . . . . . . . . . . 37 Print Squares . . . . . . . . . . . . . . . . . . . . . . . . . 39 The TPK Algorithm . . . . . . . . . . . . . . . . . . . . . . . 41 INITIAL ORDERS 1 . . . . . . . . . . . . . . . . . . . . . . . . . 48 INITIAL ORDERS 2 . . . . . . . . . . . . . . . . . . . . . . . . . 49
Image of page 2
- 3 - PROGRAM NOTATION The following notation is used on all library program sheets. Entry points: If control may arrive at an order by being transferred there by an E or G order the location of the latter (relative to the first order of the subroutine) is shown on the extreme left, with an arrow pointing to the address of the order to which control is transferred, e.g., 16 23 T 6 θ . Unconditional transfers A horizontal line is drawn underneath of control: every E or G order which is intended to produce a transfer of control each time it is encountered. Variable orders: Orders and pseudo-orders which are to be changed during the course of the calculation are shown in brackets. Pseudo-orders: A double vertical line is drawn on the left of the contents of all storage locations which are intended never to be obeyed as orders. Use of J: When reading the address part of an order the initial orders treat the letter J as a digit of value 10. Some subroutines therefore use J for the address 10, thus saving one row of holes on the tape. Preset parameter C(45), C(46) ... when used as preset parameters are referred to as H parameter, N parameter ... Control combinations: Any "order" with code letter K or Z is a control combination. The more common ones are described in ["Control Combinations"]. [Source: WWG 1951, p. 104]
Image of page 3

Subscribe to view the full document.

- 4 - CODE LETTERS FOR INITIAL ORDERS 2 When an order such as A 50 F or A F is being transferred from the tape to the store, the first character to be read is the function letter, and the corresponding binary number is placed by the initial orders in a suitable location for temporary storage. The next character may be either a digit of the address or a code letter F or D. These can be distinguished by the fact that F and D correspond to binary numbers which are greater than ten. The character just read is therefore tested by having 11 subtracted from it; if the result is negative the character must represent a digit of the address, otherwise it represents a code letter. As the successive digits are read the address is built up progressively in binary form. When the code letter is encountered the address and the number representing the function letter are added together. If the code letter is F the result represents the
Image of page 4
Image of page 5
You've reached the end of this preview.
  • Winter '19
  • oussama jadayel
  • Numerical digit, Decimal, Negative and non-negative numbers, Prime number, F 

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern