User Manual for the IBM Type 650 Magnetic
Drum Data-Processing Machine Simulation


This document is intended to provide instruction for programming and running the IBM Type 650 computer simulation. The application was developed as part of a semester-long, classroom exercise in software engineering, for the Spring 1999 CSI 4260 course at Metropolitan State College of Denver, Denver, CO. The course professor was Dr Charles Howerton, and members of the development team included Scott Balay, Jack Bartch, Brian Freeman, Jeremy Greene, and Anne McNaughton.

Index

Host Application Requirements

Overview of the Original Type 650 and the Simulation

   • General Information

   • Drum Storage

   • Input and Output

   • Arithmetic Components

   • Program Register

   • Bi-Quinary Encoding

   • Self-Checking

   • Error Correction

IBM 650 Simulation Controls

   • Graphical User Interface (GUI)

      • GUI Response to Program Execution

      • Interacting with Controls

      • GUI Response to User Interaction

      • Three Modes of Operation

        • Input View

        • Console

        • Output View

Programming and Operation (OP) Codes for the Type 650 Simulation

   • Programming the Type 650 Simulation

   • Examples of Use of the Console

   • Operation (OP) Codes for the Type 650 Simulation

The Original IBM 650 Computer; Types 650, 655, and 533

A Short History of the IBM Type 650 Computer

Acknowledgements and References

Host Application Requirements

The simulator is implemented as a Java applet, which is embedded as a statically-sized window object in an HTML-based web page. Any web browser application, with a Java virtual machine compatible with Java version 1.2, should be capable of creating and running the simulator’s GUI and handling its interaction with the user. The web browser application should also support JavaScript, which is used to create the browser window that the simulator applet is displayed in. The user’s desktop area (resolution) should be set at (at least) 800x600 pixels to accommodate the size of the GUI and all of its controls.

Overview of the Original Type 650 and the Simulation

General Information

In order to understand programming and running the Type 650, it is necessary to understand how the simulation (and the original Type 650) processed data.

The following diagram shows the internal "hardware" of the original Type 650 and, with the exception of the "One-Digit Adder", the simulated hardware.

Drum Storage

The magnetic drum, on the original Type 650, was used to store data and instructions (programs); the drum is analogous to today's hard drive. All data stored on the magnetic drum was permanent until overwritten, and was retained when power was switched off. The simulation software replicates this functionality using text files. The simulator will initially load with a blank drum, but will provide the user with the ability to load and save the drum status, via these text files.

All 1000 locations on the drum are addressable by the user; the addresses are 0000 through 0999. As explained in the discussion of the Console, the simulation will show a diagram of the drum contents in the lower right corner of the console.

Input and Output

An important, underlying feature of the drum, that is also simulated, is the read buffer (Input, on the above diagram). The punch buffer on the above diagram will not be implemented, as any output will be directed to the GUI output window.

Any input into the machine (simulation) will first pass through the read buffer. This buffer will hold up to ten words (100 digits). The read buffer will operate automatically, and will not be accessible by the user.

The simulation will imitate the card reader and card punch that were components of the original Type 650. The simulated card reader will be the main source for user input and output. To imitate the use of a card reader, the simulation will allow users to input data (programs) via a text box, which is accessible via the console, and which will be read into drum storage. The simulation will treat the input as if it were an actual set of punch cards. To imitate the use of a card punch, output will, similarly, be displayed in a text box, and will allow the user the option of saving to a file by using standard copy and paste operations. The output is also accessible via the simulation console.

Arithmetic Components

The original Type 650 was composed of three main arithmetic components, including the accumulator, the distributor, and the one-digit adder.

1) Accumulator

The accumulator was used as a register on the original Type 650. The accumulator is comprised of an upper section, a lower section, and a sign. The upper section holds ten digits and is addressable at address 8003 (via the console). The lower section also holds ten digits, and is addressable at address 8002 (again, via the console). It is important to note that there is only one sign for the entire accumulator, except during division operations. During division, the quotient and remainder may have opposite signs. The general function of the accumulator is to store the results of arithmetic operations in either the upper, lower, or both upper and lower portions of the accumulator.

It is important to note that if there is a carry beyond the 10 digit capacity of the lower accumulator, during an arithmetic operation, the carry digit will propagate to the upper accumulator. This will destroy any data that is stored in the upper accumulator; therefore, care should be taken when arithmetic carries are involved during processing. It should also be noted that if the capacity of the entire 20-digit accumulator is exceeded, then an overflow will occur. In general, the overflow will halt the simulation. However, the overflow can be "caught", using a branching OP code, and can be used to redirect the processing.

The simulated accumulator will behave similarly to that of the original Type 650, except that the memory will be referenced virtually.

2) Distributor

The distributor is similar to a (contemporary) cache. Its purpose is to hold one word (ten digits) and a sign, to be used during processing. Any data passed from drum storage to the accumulator will first pass through the distributor. In the original Type 650, the distributor was much faster than normal (drum) memory; and was used to increase processing speed.

3) One-Digit Adder

In the original Type 650, all arithmetic calculations were accomplished using the one-digit adder.

For example, during addition, a single digit was fetched from both the accumulator and the distributor and added together; the result was stored in the accumulator. In order to add two 10-digit words together the adder had to perform the addition operation ten times. The adder was used to do addition, subtraction, multiplication and division. All of these operations were accomplished using either adding, complementing, and/or shifting of digits within the accumulator.

The simulation will not imitate the one-digit adder. Instead, operations will be performed within the Java "Word" class, which contains source code to implement Bi-Quinary functionality. All of the arithmetic operations will be transparent to the user. The only requirement will be to use a specific, desired OP code when programming.

Program Register

In the original Type 650, as in the simulation, the program register is used as a holder for a ten-digit instructions The (next) instruction is fetched from drum storage, using the address in the Address Register (Add. Reg. on the above diagram), and placed in the program register. The two-digit OP code of the instruction is fetched from the program register and placed in the Operation Register (OR on the above diagram). During the Instruction Half-Cycle of processing, the instruction address is placed in the address register; during the Data Half-cycle of processing, the data address is placed in the address register. In this manner, data and (next) instructions are fetched from drum memory when needed during processing. An explanation of the ten-digit instruction is provided in a later section.

Bi-Quinary Encoding

The original Type 650 used a code translation process that resulted in encoding input program data into machine code, for the purpose of error checking. This was known as bi-quinary encoding.

The bi-quinary digit was composed of two parts. The first part was the binary portion of the digit, which contained two bits. These two bits represented either a zero if the first bit was set, or a five if the second bit was set. If both or neither bits were set, an error resulted which was detected during the Type 650 self-checking processes, as explained in later sections. The second part of the bi-quinary digit was the quinary portion. This portion contained five bits. If the first bit was set, it represented a zero; the second bit represented a one; the third bit represented a two; the fourth bit represented a three; and the fifth bit represented a four. This is illustrated in the following figure:

The simulation will replicate bi-quinary encoding for the purpose of error checking, as in the original machine. This process will not require any user intervention, as it will be transparent to the user.

Self-Checking

Because reliability was one of the major design issues of the original Type 650, it was designed with several methods of self-checking. These included:

1) Validity Check

Bi-quinary encoding of program data was used in the original Type 650 to check for errors. To validate the binary portion of the code, the machine needed only to check if no binary bit or two binary bits were present. If neither of these conditions were true, then the binary portion of the code was acceptable. For the quinary portion, a test was performed to check for no bits or more than one bit. Validity checkpoints, which were used to ensure correct coding, were located at the distributor, accumulator, and program register outputs.

2) Read Check

In the original Type 650, data that was read in from a punch card was subjected to a validity check. This check ensured that the input was correct, and that the mechanism for inputting data was working correctly. This functionality will be replicated in the simulation.

3) Punch Check

In the original Type 650, output checking was performed on the punch cards that contained the results from executing a program. If any bits were lost between the (last) validity check and punching, this resulted in a blank column on the punch card. Conversely, if a bit was added between the (last) validity check and punching, this resulted in a multiple punches within a column on the card. This output punch checking was used to ensure that, if either of these conditions existed, it was "caught" and programmers could correct the error.

Since the simulation will not use punch cards for output, and because contemporary computers are much more reliable than their ancestral counterparts, this output checking will not be replicated in the simulation. Therefore, the simulation user will need to check their output for correctness.

4) Control Check

The original Type 650 was equipped with several control checks which were used to detect errors not related to bi-quinary encoding. Address checking was done to verify that correct addressing was performed; that is, addresses were limited to 0000-1999, 8000, 8001, 80002, and 8003. The original machine also checked to ensure that correct, two-digit OP codes were used

A third check detected accumulator overflows that were not anticipated in the problem processing, and a fourth check was used for the timing circuitry (which was related to drum rotation).

The simulation will incorporate address , OP code, and accumulator overflow checking. Therefore, the user will need to ensure that correct addresses and OP codes are used during programming, and that arithmetic operations will either not result in an accumulator overflow or that anticipated overflows will be handled by branching instructions.

Because the simulation will use a file to contain the drum storage data, timing checking will not be replicated in the simulation.

Error Correction

Automatic error correction was not incorporated into the original Type 650; therefore, it will not be incorporated into the simulation. The user will need to correct and reprocess and code that contains errors.

IBM 650 Simulation Controls

The Type 650 simulator attempts to provide the user with an accurate replication of the internal "workings" of the original Type 650. A representation of the Type 650 Console is provided, which allows input and output via text files, machine interaction via the console knobs and switches, and shows the user a view of the drum storage activity.

An explanation of the Type 650 controls follows.

Graphical User Interface (GUI)

The graphical user interface (GUI) consists of the on-screen display, with various aspects of the simulator, which provide methods of interaction for the user. Specifically, user interaction is realized using a mouse and keyboard.

GUI Response to Program Execution

Once execution begins, by using the Transfer and Program Start buttons on the GUI interface (console), each instruction will be executed in order, and for each instruction, the appropriate responses on the console will be displayed in the bi-quinary lights, the operation type indicators, the checking indicators, and the memory activity map. These changes will occur at a specified time interval, during which one instruction will execute.

Interacting With Controls

A user may interact with the rotating knobs by clicking on them with the mouse cursor. Clicking on the right side of a knob will rotate it to the next valid position in a clockwise direction. Clicking on the left side of a knob will rotate it to the next valid position in a counter-clockwise direction. Clicking on a button will check if doing so would be inappropriate at the time; any time a valid change is made in any of the controls, the associated action will be triggered in the simulator.

GUI Response to User Interaction

Unlike GUI changes during program execution, changes made to the console’s controls from user interaction with the mouse does not occur on a specific time interval. If the user attempts to manipulate a control, and it is determined to be a valid change, the visual update of that control will change immediately, even if the change occurs between two instructions. If the change in the control will lead to a change in the bi-quinary lights display, that change will visually occur at the next instruction execution.

When the simulation first loads, the following splash screen is shown:

Three Modes of Operation

There are three general modes of operation that are available by clicking on one of the three "tabs" that are located near bottom (left) of the interface. The tabs are labeled Input View, Console, and Output View. Clicking on any of the tabs, while running the simulation, will bring up the corresponding view. The tab controls are always visible while the simulation is running, to allow switching between views at any time.

1) Input View

Once the splash screen shows that the applet is completely loaded the Input View is shown:

The Input View consists of two text boxes, with standard multi-row text fields, and a representation of a punch card. The top text box is used to input source code into the simulation, and the bottom text box is used to input data into the drum memory simulation. When either text box is used to input data, the import button (located in the upper right corner of each text box) must be depressed. Standard window-type operations, such as copying and pasting, may be used for entering text into either text box, regardless of the specific operating system that is in use. Copy and paste functionality provides simple loading and saving capability between the simulator and other applications. It is possible to input from either text box, or both text boxes simultaneously.

 

Once text is entered into the source code (upper) box, the "generate punches" button, located in the lower center of the window, may be depressed to accurately punch holes in the punch card, located on the right side of the screen, which will represent the source code. If more than one punch card is required for the output to be displayed entirely in that form, up and down arrows are available (just below the punch card) and can be clicked to scroll through the cards, one at a time. The number of punch cards will be displayed, as well as the number of the current punch card, in "current / total" form. For example, if card number 3, of 5 total cards, is currently displayed, "3 / 5" will be displayed next to the card.

The Punch Cards view is intended only for the user’s benefit to show what the cards would look like if created on the original Type 650 machine, and are not used by the simulator for any meaningful operations.

2) Console

The Console View provides a graphical representation of the Type 650’s console unit and all of its physical controls and bi-quinary light displays, with the exception of a few of the (original) controls. A screenshot of the console view is shown in the following graphic:

The control console replicates much of the lights and switches on the original Type 650. Of course, the interface has been updated to take advantage of today's computer graphics capabilities. The simulator’s control console will also, as did the original, aid in error detection and the analysis of trouble in program execution. The simulator’s control console also allows an operator to "step through" each process of a program. In general, the IBM 650 simulator’s control console is arranged as depicted in the following graphic.

 

Type 650 Simulation Control Console

1.) Display Lights

6.) Checking Lights

11.) Display Switch

2.) Storage-Entry Switches

7.) Switch Controls

12.) Overflow Switch

3.) Operation Lights

8.) Half-Cycle Switch

13.) Error Switch

4.) Address Lights

9.) Address Selection Switches

14.) Key Controls

5.) Operating Lights

10.) Control Switch

15.) Drum Activity

A simulation user can observe and control the execution of a program, as discussed below.

1.) Display Lights

The Display Lights represent 10 digit positions and one sign position. Each digit is represented by seven lights. The horizontal lights are "binary", representing the values of zero and five. The five vertical lights are "quinary" lights and represent the values of 0, 1, 2, 3, 4, or 5, 6, 7, 8, 9, depending on the indication of the "binary" (horizontal) lights of zero or five. The sign of the 10 digit number is indicated by one of the two sign lights. The upper light represents the "positive" sign, and the lower, the "negative". Bi-quinary encoding is discussed in a later section.

2.) Storage-Entry Switches

The ten digit switches and one sign switch can be used in two ways. They can be referred to during the program by using an address of "8000", or they can be used in combination with other control panel buttons and switches to enter values into any memory location on the drum.

3.) Operation Lights

The Operation Lights consist of two sets of seven lights, in the same format as the Display Lights, with the two "binary" lights above the five "quinary" lights. These lights indicate which operation is to be performed. They are unlit during the instruction half-cycle.

4.) Address Lights

The Address Lights consist of four sets of seven lights; again, in the same format as the Display Lights. These lights indicate the contents of the address register. Depending on what stage the machine is in (data half-cycle or instruction half-cycle) the value indicated represents either a data address or an instruction address.

5.) Operating Lights

The Operating Lights consist of set of six separate lights, which reflect the operating status of the machine. Two lights indicate which half-cycle, data or instruction, the machine is executing. The remaining four lights reflect the status of the read, punch, accumulator, and program register units. An explanation of the Operating Lights follows:

Data Address Light

When the machine stops with this light on, the data-half-cycle is ready to be executed.

Instruction Address Light

When the machine stops with this light on, the instruction-half-cycle is ready to be executed.

Program Light

This light will only go on if the machine stops for a programmed stop, manual stop, or address stop. However, it will not light if a manual stop is performed during the instruction-cycle of a READ or PUNCH instruction.

Accumulator Light

This light goes on whenever the accumulator is in use.

Punch Light

This light goes on during the data-cycle of a "PUNCH" instruction.

Read Light

This light goes on during the data-cycle of a READ instruction.

6.) Checking Lights

The Checking Lights consist of a set of seven lights that indicate the detection of various validity errors. The original Type 650 console had eight lights, with one non-operational light. For obvious reasons, this light was eliminated from the simulation. The seven lights are:

Program Register Light

This light goes on whenever a validity error is detected at the output of the program register.

Storage Selection Light

This light goes on whenever the following error types are detected :

  1. a store operation with a data address of the 8000 series
  2. an invalid data or instruction address (other than 0000 through 999
  3. and 8000 through 8003)
  4. information is being written in two or more locations simultaneously
  5. information is not written in any location on a store operation
  6. attempted manual entry from storage entry switches to 8001, 8002, 8003.

Distributor Light

This light goes on whenever a validity error is detected at the output of the distributor.

Overflow Light

This light goes on whenever an overflow condition is detected. An overflow condition can be caused by one of the following :

  1. an overflow of the accumulator
  2. a quotient exceeding 10 digits
  3. exceeding the number of shifts called for in a "shift and count" operation.

Clocking Light

In the original Type 650, this light was used whenever an error was detected in the clocking (or timing) circuitry. This functionality will not be replicated on the simulation.

Accumulator Light

This light goes on whenever a validity error is detected at the output of the accumulator.

Error Sense Light

This light is operative only when the "Error" switch is in the "sense" position. It will go on when one of the following is detected:

  1. validity error:
  2. Register, Accumulator, Distributor

    It should be noted that there are conditions that will cause the machine to stop with none of the Checking Lights on. These conditions include:

  3. a programmed stop or an "OP CODE 01"
  4. an invalid operation code in the operation register
  5. an attempted "BRD" (90-99) operation in which the position tested does not contain either an 8 or 9
  6. a table lookup failure.

Switch Controls

The original Type 650 console had a bank of ten switches which were called the Switch Controls. These switches have been broken up on the simulator console; however, each of the ten switches is represented. The ten switches are as follows :

7.) Programmed Switch

This switch has two positions, "Stop" and "Run". In the "Run" position, the program will bypass any operation codes calling for a program stop (code 01). The machine will treat the "01" OP code as a no-operation code (NO OP 00). In the "Stop" position, the program will be halted whenever a stop code (01) is found.

8.) Half-Cycle Switch

This switch has two positions, "Half" and "Run". In the "Run" position, the program will run automatically once it is started. In the "Half" position, the machine will execute one-half of an instruction for each depression of the "Program Start" key, provided the "Control" switch is in either the "Run" or "Address Stop" position. The "Control" switch is discussed later. With an operation code in the operation register and a data address in the address register, depressing the "Program Start" key will cause the operation to be performed and place the address of the next instruction in the address register. This is the "Data Half-Cycle" of the instruction. The next depression of the "Program Start" key will cause the next instruction to be located and placed in the program, operation, and address registers. This is the "Instruction Half-Cycle" of the instruction.

9.) (Four) Address Selection Switches

These four switches are used to set up a four-digit address. This address can be used in one of the following ways :

  1. an address location where the program should stop
  2. an address to be entered into the address register for storage read-in or storage read-out
  3. an address to be entered into the address register for starting a program.

10.) Control Switch

This switch has three positions, "Address Stop", "Run", and "Manual". In the "Address Stop" position, the program continues until the address indicated by the "Address Selection" switches matches the address in the address register, at which point the machine stops. In the "Run" position, the program continues automatically once it is started. In the "Manual" position, the console can be used to read information into, or to display the contents of, any addressable memory location on the drum. The "Manual" position can also be used to enter an address from the "Address Selection" switches to start the program at that specific address.

11.) Display Switch

This switch has six positions. Clockwise they are : "Lower Accumulator", "Upper Accumulator", "Distributor", "Program Register", "Read-Out Storage", and "Read-In Storage". When the switch is in any of the first four positions, the contents of the corresponding location is displayed in the "Display" lights. In the "Read-Out Storage" or "Read-In Storage" positions, as mentioned earlier, in combination with the "Manual" position of the "Control" switch and the "Address Selection" switches, the contents of, or a "word" may be entered into, any addressable storage location. It should be noted that the machine will not operate if the "Control" switch is in either the "Run" or "Address Stop" positions and the "Display" switch is also in either "Read-Out Storage" or "Read-In Storage" positions. The setting of the "Display" switch cannot be changed while a program is running. Changing the settings will corrupt the numeric values in transit.

12.) Overflow Switch

This switch has two positions, "Stop" and "Sense". In the "Stop" position, the machine will stop whenever an overflow is detected. In the "Sense" position, the overflow will be indicated but the machine will not stop. The only exception to this on a quotient overflow.

13.) Error Switch

This switch has two positions, "Stop" and "Sense". In the "Stop" position, the machine will stop when any of the following conditions are detected :

a) validity error: Program Register, Accumulator, Distributor

In the "Sense" position, detection of any of the above listed errors will have the following effect :

a) the "Error Sense" light will go on

b) the program register, distributor, and accumulator will be reset to zero

c) the address register will be reset to "8000", which is the address of the "Storage Entry" switches

d) the next instruction is then taken from the "Storage Entry" switches.

It should be noted that in the "Sense" position, it is possible to use a correction (programming)routine to recalculate part or all of the problem in case an error occurs. However, the "Error Sense" light will remain on to indicate that an error occurred.

14.) Key Controls

The Key Controls consist of a bank of eight buttons. From top to bottom, they are :

Transfer Key Button

This is operational only when the "Control" switch is in the "Manual" position. When this button is depressed, it will cause the address set in the "Address Selection" switches to be transferred into the address register.

Program Start Key Button

When the "Control" switch is in the "Run" or "Address Stop" positions and this button is depressed, the machine will start executing the program with the instruction located at the address specified by the address register. The "Program Start" Key is also depressed as the final step of a "Read-In Storage" or "Read-Out Storage" operation, only if the "Control" switch is in the "Manual" position.

Program Stop Key Button

When this button is depressed, the machine will stop at the completion of the particular "Half-Cycle" of instruction that the Key was depressed on.

Program Reset Key Button

When this button is depressed, the operation register is reset to zero. Error circuits that have been triggered by either a program register validity check, a storage selection error, or a clocking error are reset by this key also. When the "Control" switch is in the "Manual" position, depressing this button inserts blanks in the operation register and address register. When the "Control" switch is in the "Run" or "Address Stop" positions and this button is depressed, blanks are inserted in the operation register and the address of the console switches (8000) in the address register.

Computer Reset Key Button

The program register, the distributor, and the entire accumulator are reset to zero when this button is depressed. In addition, all error circuits are reset. Again, when the "Control" switch is in the "Manual" position, a depression of this button inserts blanks in the operation register and address register. When the "Control" switch is in the "Run" or "Address Stop" positions and this button is depressed, blanks are inserted in the operation register and the address of the console switches (8000) in the address register.

Accumulator Reset Key Button

When this button is depressed, the distributor and the entire accumulator are reset to zero. Error circuits that have been triggered by an overflow condition, a validity check in the accumulator or distributor, a clocking error, or a storage selection error other than that caused by an invalid address, are reset by this button. It should also be noted that depressing this button does not change the contents of the program register, operation register, or the address register.

Error Reset Key Button

When this button is depressed, the error circuits triggered by a clocking error or a storage selection error, other than one caused by an invalid address, are reset.

Error Sense Reset Key Button

Depressing this button resets the error circuits, and the "Error Sense" light is turned off. This button is only operational when the "Error" switch is in the "Sense" position.

15.) Drum Memory

In addition to the interface elements on the original Type 650, a representation of the activities in relation to the drum memory are displayed, near the lower right corner of the Console View. A color-coded map of the entire memory space is displayed, showing a simple history of the memory locations that have been used, as well as the operations that are occurring as a result of the current instruction. Color-coding for the drum memory is as follows:

  • Light gray memory locations have not been referenced or used in any way
  • Dark gray locations are those that have been used previously in the program, but are not currently being accessed
  • Red locations are being read from the current instruction
  • Blue locations are being written by the current instruction.

Unimplemented Console Functionality

Unimplemented features of the original Type 650 console include:

a) The power controls labeled Power On, Power Off, DC Off, and DC On switches. In addition, the unlabeled light in the checking section of the original machine has not been included in the interface. Since the simulator is a virtual machine, it was felt that there was no need to implement these features.

b) The original Type 650 had a separate unit to handle the input and output, by means of punch cards. This separate unit had its own controls. Although the simulator will represent input and output using (simulated) punch cards, a separate unit and it’s controls to indicate "starting", "stopping", and "miss-feed" were not implemented because they were deemed unnecessary.

3) Output View

A screenshot of the Output View is shown below:

The Ouput View consists of two text boxes, with standard multi-row text fields, and a representation of a punch card. The top text box will show the resulting output from running a program, and the bottom text box will show the drum memory location values, at the conclusion of running a program. A user may copy and paste the contents of the drum output into a text file, to be saved for future use. That is, the drum output from the output view can be pasted into the drum input, in the input view, to restore the drum memory to its former state. (Copy and paste functionality provides simple loading and saving capability between the simulator and other applications. When text is present in the program output box, the "generate punches" button, located in the lower center of the window, may be depressed to accurately punch holes in the punch card, located on the right side of the screen, which will represent the output code. If more than one punch card is required for the output to be displayed entirely in that form, up and down arrows are available (just below the punch card) and can be clicked to scroll through the cards, one at a time. The number of punch cards will be displayed, as well as the number of the current punch card, in "current / total" form. For example, if card number 3, of 5 total cards, is currently displayed, "3 / 5" will be displayed next to the card.

Again, the Punch Cards view is intended only for the user’s benefit to show what the cards would look like if created on the original Type 650 machine, and are not used by the simulator for any meaningful operations.

Programming and Operation (OP) Codes for the Type 650 Simulation

This section provides a description of the simulation OP codes, instructions and suggestions for programming the simulation (with examples), and examples for use of the console.

Programming the Type 650 Simulation

Introduction

The original Type 650 required "optimum" programming in order to speed the processing of data and instructions. This programming took the form of selectively placing data and instructions in specific drum memory locations (addresses) to take advantage of drum rotation in relation to reducing "seek" times. Of course, with today's fast CPUs, buses, and storage mediums, the same requirement is not necessary, and is not replicated, for the simulation.

Instructions

The Type 650 simulation uses an instruction that allows specific data manipulation to be performed by the machine. All operations performed by the machine will be controlled by these numerically-coded instructions. A single instruction is comprised of ten decimal digits and a sign. The ten digits are divided into three basic groups as follows:

10

9

8

7

6

5

4

3

2

1

0

OP Code

Data Address

Instruction Address

Sign

1) The operation (OP) code, digit positions 10 and 9, designate the operation that the simulation is to perform.

2) Digit positions 8 through 5 designate the data address. Depending upon the OP code of the instruction, the data address has one of the following meanings:

    a) location of information to be used in the operation

    b) location in which information is to be stored by the operation

    c) the number of positions the information in the accumulator should be shifted left or right

    d) the maximum number of positions the information in the accumulator may be shifted on a shift and count operation

    e) locations into which information is to be read from a card

    f) locations from which information is to be punched into a card

    g) the location of an alternate instruction

    h) the location of the beginning of a table.

3) Digit positions 4 through 1 designate the instruction address, which is normally the address of the next instruction to be performed.

The sign of an instruction is not considered in the analysis and execution of the instruction, but will be present.

A set of 44 OP codes is provided for programming the simulation. Each OP code is assigned a two digit number, that is used as a "shorthand" notation for writing programs for the Type 650. An explanation of all 44 OP codes, with examples, is provided in a later section.

All of the instructions consist of the same number of digits to facilitate ease of programming. The number of digits for each instruction (OP code and addresses) are fixed in length (10 digits).

Original data and instructions are stored in drum memory locations (addresses), from the program code, during the (machine) loading operation. Additional data and instructions may be loaded during the solution of a given problem. Because both data and instructions are stored in the same manner, an instruction may be subjected to arithmetical operations and, thus, be altered from its original form. If an instruction is altered in this manner, the sign of the instruction will be treated in exactly the same way as any other number. Therefore, storage of data and instructions should be done with this in mind.

As a problem is being solved, the machine will refer to a storage location to obtain an instruction. After one operation is performed, the machine obtains another instruction from storage. A sequence of these instructions is referred to as a program.

Internal Flow

The following lists the possible internal flow paths of data through the Type 650 simulation:

a) program register can receive instructions directly from drum memory

b) program register can transmit information directly to the operation and address registers

c) distributor can receive information directly from drum memory or the accumulator

d) distributor can transmit information directly to drum memory, the program register, or the accumulator

e) accumulator receives information directly from the distributor and indirectly from drum memory via the distributor

f) accumulator transmits information directly to the distributor or program register and indirectly to drum memory via the distributor.

Instruction Execution

Instruction execution is controlled by the 10-digit instructions, which make up a program. All arithmetic and logical operations, of which the simulation is capable, are performed by the action of the distributor and the accumulator; and the functions of these units are controlled by the program, operation, and address registers. The following describes instruction execution within the simulation.

The program register fetches a 10-digit instruction, and transfers the OP code to the operation register and the data address to the address register, for the first (data) half-cycle of instruction execution.

The OP code and data address are analyzed in the operation and address registers, respectively. If the operation involves arithmetic (addition, subtraction, multiplication, or division), the contents of the data address location in drum memory are loaded into the distributor. If the operation is logical, the data address can specify the number of positions to be shifted, location of a table, branch address, etc., in which cases the previous contents of the distributor will not be altered by the operation. It should be noted, however, that all store accumulator operations will alter the contents of the distributor, because accumulator information is stored in drum memory via the distributor.

Execution of an instruction will begin when the OP code is analyzed and data is loaded into the distributor (if necessary). Once this is accomplished, the second part, or the instruction half-cycle begins. The instruction address, in the program register, is transferred to the address register for analysis and selection of the next 10-digit instruction to be fetched from drum memory; the next instruction is located at the address indicated in the address register.

The next 10-digit instruction is then read into the program register. At this point, the instruction repeats until all of the instructions, comprising a program, are run.

Arithmetic Components (revisited)

The distributor is controlled by the instructions in a program. It has a capacity of one word (10 digits), and is addressable at (address) 8001. Again, the distributor acts as an intermediate link between drum memory and the accumulator. Information passed through the distributor remains in the distributor and is available for repeated use until replaced by new information (via new instructions).

The accumulator is also controlled by the instructions in a program. It has a capacity of two words (20 digits) and a sign; either positive or negative. The 20 positions are divided into two sections; the upper accumulator and the lower accumulator. The lower accumulator is addressable at (address) 8002, and the upper accumulator is addressable at (address) 8003. It is possible to read into or out of either half of the accumulator, but it should be noted that the entire accumulator is reset whenever an instruction of either half calls for a reset. There is only one sign for the entire accumulator, except during division operations, where the quotient and remainder have independent signs.

During addition and subtraction operations, carries are propagated from the lower to the upper half of the accumulator. Therefore, care must be exercised, during programming, to ensure that no operations are attempted in one half of the accumulator result in undesirable effects on the other half. If the 20-digit capacity of the accumulator is exceeded, an overflow will be sensed. The overflow may be used to halt processing, or (through programming) used to alter the course of a program. Because of the distributor, it is possible to perform the following operations on the accumulator (during any of these operations, the number being moved will pass through the distributor and will remain there until replaced by the entry of another factor):

a) either half of the accumulator can be added to or subtracted from the other half

b) either half can be added to itself (multiply by 2)

c) either half can be subtracted from itself

d) either half can be added or subtracted into the other half, with reset (equivalent to a 10-position shift)

e) either half can be added, with reset, into the same half; this is used to clear one-half of the accumulator, while retaining the data in the other half

f) a factor in the upper half may be squared by a multiply instruction having a data address of 8003

Loading

Prior to running a program, the data and instructions must be loaded into the drum memory locations. This is accomplished by ???.

Examples of Use of the Console

Displaying Drum Memory Contents

Inspecting the contents of a drum memory location can be accomplished as follows:

a) stop the program

b) set the address of the location to be examined in the address selection switches

c) set the control switch to Manual

d) set the display switch to Read-Out Storage

e) depress the program reset button

f) depress the transfer button

g) depress the program start button

The contents of the desired memory location will be displayed in the display lights (as digits). It should be noted that Manual read-out is through the distributor, which causes the previous contents of the distributor to be lost.

When the program distributor is stopped and the display switch is in the distributor, program register, or lower or upper accumulator positions, the contents of the selected unit are automatically shown in the display lights. If the upper accumulator is displayed following a divide without reset operation, and before a reset or multiplication operation is performed, the displayed sign will be the sign of the remainder.

Entering Instructions and Data into a Program

New instructions and data may be entered into a program that already exists in drum memory, via the console. To manually enter a word (10 digits) into a drum memory location, perform the following steps:

a) stop the program

b) set the word to be entered in the storage entry switches

c) set the memory address of the desired location in the address selection switches

d) set the control switch to Manual

e) set the display switch to Read-In Storage

f) depress the program reset button; the computer reset button could also be used, but the contents of the accumulator will be lost

g) depress the transfer button

h) depress the program start button

The word, set in the storage entry switches, will then be placed in the location specified by the address selection switches. The word will appear in the display lights as 10 digits. The word that is entered passes through the distributor, replacing the previous contents of the distributor.

To verify that the manual entry was performed properly, the location in which the word was entered should be inspected. This verification can be accomplished by moving the display switch to Read-Out Storage and performing the following:

a) depress the program reset button

b) depress the transfer button

c) depress the program start button.

The address selection switches and the Read-In Storage position of the display switch cannot be used to enter a word directly into the distributor or accumulator from the storage entry switches.

A word can be placed in the distributor from the storage entry switches by entering the desired (10 digit) word into an unused drum memory location using the method described above. Because the word entering the drum memory location must pass through the distributor, it will be retained in the distributor.

A word can be placed in the accumulator using one of the following two methods:

Method One

a) enter the desired word into an unused drum memory location

b) the contents of the distributor can be added to, or subtracted from, the accumulator contents in the following manner:

    1) set the desired instruction in the storage entry switches

    2) set the control switch to Run

    3) depress the program reset button

    4) depress the program start button.

The instruction address of the instruction in the storage entry switches could be the address of the first instruction to follow.

To inspect the accumulator after making the above changes, the half-cycle switch should be set to Half.

Method Two

a) set the desired add or subtract instruction (with a data address of 8000) in the storage entry switches

b) set the control switch to Run

c) depress the program start button one time

d) set the desired factor in the storage entry switches

e) depress the program start button.

By following this procedure, the factor will be entered into the accumulator; and if the proper instruction address was used in step a (above) the program can continue to run from this point.

When a factor is entered into drum memory from the console, it may be desirable to save the contents of the accumulator and/or distributor. The information in the accumulator may be retained by using the program reset button. The information in the distributor will be lost when the factor being entered passes through it. For this reason, the contents of the distributor must be noted by the simulation user and reloaded by the console operation.

Half-Cycle

The half-cycle switch can be used by a programmer for trying out a new routine. When this switch is set in the Half position, it can be used in conjunction with other console controls to check the results of each operation before and after execution. The following is an example.

Assume the OP code "Add Lower " (15) is in the operation register, and that "0100" is in the address register. Under these conditions, the operation is ready to proceed. The first depression of the program start button will cause the machine to perform the operation (data half-cycle). At this time, it is now possible to use the display switch to check the following units:

Distributor: this unit is checked to see if the proper information has been called from storage (location 0100).

Accumulator: this unit is checked to see if the operation has produced the correct result.

Program Register: this unit is checked to ensure that it still contains the entire instruction.

Simultaneously with the execution of the operation, the operation register is set to blank, and the data address in the address register is replaced by the instruction address from the program register.

The second depression of the program start button will cause the next instruction, to be executed, to be placed in the program register (instruction half-cycle). It is now possible to use the display switch to check the program register. This unit would be checked to see if the next instruction to be executed has been correctly chosen and placed in the program register.

The above procedures may be used to allow a programmer to check a block of instructions where an error in programming has been detected.

Address Stop

It is possible to a program at a specific point by using the control switch in conjunction with the address selection switches. This type of stop can be accomplished as follows:

a) set the control switch to the Address Stop position

b) set the desired address in the address selection switches

c) depress the program start button.

By setting the switches as described above the simulation will stop every time the address in the address register matches the address set in the address selection switches. It should be noted that the stop will occur on both data and instruction addresses.

Depressing the program start button after such a stop will cause the simulation to resume processing from the point at which it was stopped.

Programmed Stop

The programmed stop switch makes it possible to ignore stop OP codes (01) in the program. If the switch is set to Stop, a "01" OP code will stop the machine. If the switch is set to Run, a "01" code will be treated as a "00" (no-OP) OP code, and the program will continue to process data. Therefore, for testing purposes, Stop instructions may be inserted at critical points in a program to allow examination of partial results.

Starting a Program

Two methods that may be used to start a program include the following:

Method One

a) set "00 000 xxxx" in the storage entry switches, where "xxxx" is the address of the first instruction to be executed

b) depress the program or computer reset button

c) depress the program start button.

This procedure will cause the simulation to get its first instruction from the storage entry switches. This instruction calls for no operation, and its instruction address is the address of the first instruction of the program. In order for the above procedure to work, the control switch must be in either the Run or Address Stop position. Also, the display switch must be in either the Distributor, Accumulator, or Program Register position.

Method Two

a) set the control switch to Manual

b) set the address of the first instruction to be executed in the address selection switches

c) depress the program or computer reset button

d) depress the transfer button

e) set the control switch to Run or Address Stop

f) depress the program start button.

This procedure will cause the simulation to get its first instruction from the location set in the address selection switches. This is the address of the first instruction, of the program, to be executed.

Operation (OP) Codes for the Type 650 Simulation

A total of 44 OP Codes are provided for use in programming the Type 650 simulation. In order to simplify the understanding of all OP codes, those operations that function in a similar manner are explained, below, as a group. The explanations are grouped as follows:

1) Read and Punch Operations

2) Transfer Operations

3) Add and Subtract Without Reset Operations

4) Add and Subtract With Reset Operations

5) Add and Subtract Absolute Value Operations

6) Accumulator Store Operations

7) Multiply and Divide Operations

8) Branching Operations

9) Shifting Operations

10) Table Lookup Operations

11) Miscellaneous Operations.

Figures illustrating the results of using the OP codes follows the (entire) discussion of OP codes. These figures are numbered using the OP codes (eg. Figure OP11) and are linked within the text.

Please note that the following text, and the figures following the text, are from "The IBM 650 Magnetic Drum Data-Processing Machine; Manual of Operation", which was published by the International Business Machines Corporation in June 1955.

1) Read and Punch Operations

The read and punch operations are used, essentially, to input data and instructions into the Type 650 simulation, and to output solution results from the simulation. It should be noted that the card reader and card punch are only simulated; the actual program input and resulting output are shown in their respective text boxes. The following sections describe the read and punch operations.

OP code 70 RD (Read)

This OP code causes the simulation to read "punch cards" (program code) by a two-step process. First, the contents of the 10 words of read buffer storage will be automatically transferred to one of the 20 possible ten-word groups of read general storage. The group that is selected will be determined by the data address (D-address) of the READ instruction. Second, information from the next a "card" will be read and entered into buffer storage for the next READ instruction. When cards (program) are initially run into the simulated machine, the contents of the first card will be read into the read-buffer. Therefore, the first READ instruction will cause the contents of the first card to be transferred to general storage, and the contents of the second card to be read into read-buffer storage.

In relation to drum storage, each simulated drum memory band will simulate 10 words that may be used for read storage, and any D-address given within a band will cause a card to read into those storage positions. As an example, an address of 0663 will cause reading into locations 0651 through 0660. A READ instruction will erase the previous contents of the read storage locations. However, the read storage will be available for any purpose during the computing simulation.

Special conditions will apply when the "card" being read is identified as a load card. These conditions will be described in a later section.

OP code 71 PCH (Punch)

This OP code results in a two-step "card punching" process. First, the contents of one of the 20 possible ten-word groups of punch storage will be transferred from the drum to punch-buffer storage. The group selected will be specified by the D-address of the PUNCH instruction. Second, the card will be "punched" with the information from buffer storage.

In relation to drum storage, each simulated drum memory band will simulate 10 words that may be used for punch storage, and any D-address given within a band will cause a card to punch from the punch-storage positions. As an example, an address of 0123 will cause punching from locations 0127 through 0136. The data in drum punch storage will remain unchanged by the punching operation.

2) Transfer Operations

The transfer operations are used to transfer data among storage locations within the Type 650 simulation. The following sections describe the transfer operations.

OP code 69 LD (Load Distributor)

This OP code causes the contents of the D-address location of the instruction to be placed in the distributor, as illustrated in Figure OP69.

OP code 24 STD (Store Distributor)

This OP code causes the contents of the distributor, with the distributor sign, to be stored in the location specified by the D-address of the instruction. The contents of the distributor will remain undisturbed. The D-address for all store instructions must be in the range 0000 - 1999. An 8000-series D-address will not be used by the simulation on any of the store instructions. Figure OP24 illustrates the results of using the Store Distributor OP code.

3) Add and Subtract without Reset Operations

It is anticipated that the add and subtract (without reset) operations will be used extensively for problem solutions on the Type 650 simulation. It should be noted that the distributor will contain the D-address factor following any addition or subtraction operation. The following sections describe the Add and Subtract (without Reset) operations.

OP code 10 AU (Add to Upper)

This OP code causes the contents of the D-address location to be added to the contents of the upper half of the accumulator. The lower half of the accumulator will remain unaffected unless the addition causes the sign of the accumulator to change. When this occurs, the contents of the lower half of the accumulator will be complemented. Also, the units position of the upper half of the accumulator will be reduced by one. Figure OP10 illustrates the results of using the Add to Upper OP code.

OP code 15 AL (Add to Lower)

This OP code causes the contents of the D-address location to be added to the contents of the lower half of the accumulator. It should be noted that the contents of the upper half of the accumulator could be affected by carries. Figure OP15 illustrates the results of using the Add to Lower OP code.

OP code 11 SU (Subtract from Upper)

This OP code causes the contents of the D-address location to be subtracted from the contents of the upper half of the accumulator. The contents of the lower half of the accumulator will remain unaffected unless the subtraction causes a change of sign in the accumulator, in which case the contents of the lower half of the accumulator will be complemented. Also, the units position of the upper half of the accumulator will be reduced by one. Figure OP11 illustrates the results of using the Subtract from Upper OP code.

OP code 16 SU (Subtract from Lower)

This OP code causes the contents of the D-address location to be subtracted from the contents of the lower half of the accumulator. It should be noted that the contents of the upper half of the accumulator could be affected by carries. Figure OP16 illustrates the results of using the Subtract from Lower OP code.

4) Add and Subtract with Reset Operations

The reset-add and reset-subtract OP codes differ in function from the add and subtract operations in that the entire accumulator will be reset to zero before the new factor is entered. The following sections describe the Add and Subtract (with Reset) operations.

OP code 60 RAU (Reset and Add into Upper)

This OP code resets the entire accumulator to plus zero and adds the contents of the D-address location into the upper half of the accumulator. Figure OP60 illustrates the results of using the Reset and Add into Upper OP code.

OP code 65 RAL (Reset and Add into Lower)

This OP code resets the entire accumulator to plus zero and adds the contents of the D-address location into the lower half of the accumulator. Figure OP65 illustrates the results of using the Reset and Add into Lower OP code.

OP code 61 RSU (Reset and Subtract into Upper)

This OP code resets the entire accumulator to plus zero and subtracts the contents of the D-address location into the upper half of the accumulator. Figure OP61 illustrates the results of using the Reset and Subtract into Upper OP code.

OP code 66 RSL (Reset and Subtract into Lower)

This OP code resets the entire accumulator to plus zero and subtracts the contents of the D-address location into the lower half of the accumulator. Figure OP66 illustrates the results of using the Reset and Subtract into Lower OP code.

5) Add and Subtract Absolute Value Operations

These OP codes allow the absolute value of the incoming factor to be added or subtracted. These operations will ignore the actual algebraic sign of the incoming factor and automatically treat it as a positive factor. The following sections describe the Add and Subtract Absolute Value OP codes.

OP code 17 AABL (Add Absolute to Lower)

This OP code causes the contents of the D-address location to be added to the contents of the lower half of the accumulator as a positive factor, regardless of the actual sign. When the operation is completed, the distributor will contain the D-address factor with its actual sign. Figure OP17 illustrates the results of using the Add Absolute to Lower OP code.

OP code 67 RAABL (Reset and Add Absolute into Lower)

This OP code resets the entire accumulator to zero and adds the contents of the D-address location into the lower half of the accumulator as a positive factor, regardless of its actual sign. When the operation is completed, the distributor will contain the D-address factor with its actual sign. Figure OP67 illustrates the results of using the Reset and Add Absolute into Lower OP code.

OP code 18 SABL (Subtract Absolute from Lower)

This OP code causes the contents of the D-address location to be subtracted from the contents of the lower half of the accumulator as a positive factor, regardless of the actual sign. When the operation is completed, the distributor will contain the D-address factor with its actual sign. Figure OP18 illustrates the results of using the Subtract Absolute from Lower OP code.

OP code 69 RSABL (Reset and Subtract Absolute into Lower)

This OP code resets the entire accumulator to plus zero and subtracts the contents of the D-address location into the lower half of the accumulator as a positive factor, regardless of its actual sign. When the operation is completed, the distributor will contain the D-address factor with its actual sign. Figure OP69 illustrates the results of using the Reset and Subtract Absolute into Lower OP code.

6) Accumulator Store Operations

The following sections describe the store OP codes for the contents of either half of the accumulator; included are descriptions for two special store instructions for portions of the lower half of the accumulator.

OP code 20 STL (Store Lower in Memory)

This OP code causes the contents of the lower half of the accumulator, with the accumulator sign, to be stored in the location specified by the D-address of the instruction. The contents of the lower half of the accumulator will remain undisturbed. The D-address for all store instructions must be in the range 0000 - 1999. An 8000-series D-address will not be used by the simulation on any of the store instructions. Figure OP20 illustrates the results of using the Store Lower in Memory OP code.

OP code 20 STU (Store Upper in Memory)

This OP code causes the contents of the upper half of the accumulator, with the accumulator sign, to be stored in the location specified by the D-address of the instruction. If STU is performed following a division operation, and before another division, multiplication, or reset operation takes place, the contents of the upper accumulator will be stored with the sign of the remainder from the divide operation (OP code 14). The contents of the upper half of the accumulator will remain undisturbed. The D-address for all store instructions must be in the range 0000 - 1999. An 8000-series D-address will not be used by the simulation on any of the store instructions. Figure OP20 illustrates the results of using the Store Upper in Memory OP code.

OP code 22 STDA (Store Lower Data Address)

This OP code causes positions 8 - 5 of the distributor to be replaced by the contents of the corresponding positions of the lower half of the accumulator. The modified word in the distributor, with the sign of the distributor, is then stored in the location specified by the D-address of the instruction. The contents of the lower half of the accumulator will remain unchanged, and the sign of the accumulator will not be transferred to the distributor. The modified word will remain in the distributor upon completion of the operation. The D-address for all store instructions must be in the range 0000 - 1999. An 8000-series D-address will not be used by the simulation on any of the store instructions. Figure OP22 illustrates the results of using the Store Lower Data Address OP code.

OP code 23 STIA (Store Lower Instruction Address)

This OP code causes positions 4 - 1 of the distributor to be replaced by the contents of the corresponding positions of the lower half of the accumulator. The modified word in the distributor, with the sign of the distributor, is then stored in the location specified by the D-address of the instruction. The contents of the lower half of the accumulator will remain unchanged, and the sign of the accumulator will not be transferred to the distributor. The modified word will remain in the distributor upon completion of the operation. The D-address for all store instructions must be in the range 0000 - 1999. An 8000-series D-address will not be used by the simulation on any of the store instructions. Figure OP23 illustrates the results of using the Store Lower Data Address OP code.

7) Multiply and Divide Operations

Multiplication

Multiplication in the Type 650 simulation will be accomplished by repeated addition. The number of additions will be controlled in the following manner:

    • The contents of the entire accumulator will be shifted one position to the left. This will place the high-order digit of the multiplier in a special storage position. The digit in the special storage position will then be analyzed for a zero or non-zero condition. If it is non-zero, an add cycle will be set up.
    • The multiplicand will be added into the lower half of the accumulator. The digit in the special position will be decreased by one, each time the multiplicand is added. As soon as the digit becomes zero, the addition operation will be stopped, and the contents of the entire accumulator will, again, be shifted to the left to place the next digit of the multiplier in the special position.

The machine process of multiplication will be essentially the same as the "paper and pencil" process. The difference will be that the multiplier digits will be handled in the reverse order.

The following section describes the single Multiply OP code.

OP code 19 MULT (Multiply)

This OP code causes the machine simulation to multiply. A 10-digit multiplicand may be multiplied by a 10-digit multiplier to produce a 20-digit product. The multiplier must be placed in the upper accumulator prior to multiplication. The location of the multiplicand will be specified by the D-address of the instruction. The product will be developed in the accumulator, beginning in the low-order position of the lower half of the accumulator, and extending to the left into the upper half of the accumulator as necessary. The multiplier, which will originally be in the upper half of the accumulator, will be lost and the multiplicand will remain in the distributor during the multiplication operation.

Please see the section for Shifting for an explanation of the operations necessary to position factors for decimal point alignment, and to half-adjust the results.

If the lower half of the accumulator contains a number at the start of a multiplication operation, the absolute value of that number will be added to the absolute value of that portion of the product developed in the upper half of the accumulator. The regular rules of carry and overflow will apply in this case. Thus, a sufficiently large number in the lower half of the accumulator could increase the absolute value of the multiplier. Figure OP19 illustrates the results of using the Multiply OP code.

Division

Division in the Type 650 simulation will be accomplished by repeated subtraction. The number of subtractions will be controlled in the following manner:

  • The contents of the entire accumulator will be shifted one position to the left. This will place the high-order digit of the dividend in a special storage position and insert a zero in the units position of the lower half of the accumulator.
  • The 10-digit divisor will be subtracted from the contents of the upper half of the accumulator and the special digit position. The subtraction process will continue until an overdraw occurs. When the overdraw occurs, the subtraction process will stop, and the overdraw will be corrected by adding the divisor back into the upper half of the accumulator. Following each subtraction on which an overdraw does not occur, a count of one will be added to the units position of the lower half of the accumulator.
  • Following the overdraw correction, the entire accumulator contents will, again, be shifted one position to the left and the process will repeat for ten cycles (shifts). The remainder, if any, will be the amount remaining in the upper half of the accumulator following the final overdraw correction.

The machine process of division will be essentially the same as the "paper and pencil" process.

The following section describes the two Division OP codes.

OP code 14 DIV (Divide)

This OP code causes the machine simulation to divide without resetting the remainder. A 20-digit dividend may be divided by a 10-digit divider to produce a 10-digit quotient. In order to remain within these limits, the absolute value of the divisor must be greater than the absolute value of that portion of the dividend that is in the upper half of the accumulator. The entire dividend will be placed in the 20-position accumulator. The location of the divisor will be specified by the D-address of the Divide instruction. Please see the section for Shifting for an explanation of the operations necessary to position the dividend for decimal point alignment, and to half-adjust the results.

If the machine simulation attempts to develop a quotient of more than ten digits, a quotient overflow will occur, and the machine (simulation) will stop. If division by zero is attempted, a quotient overflow will always occur, and the machine (simulation) will stop.

At the completion of the divide operation, the divisor will be in the distributor; the quotient, with its sign, will be in the lower half of the accumulator; and the remainder, with its sign, will be in the upper half of the accumulator. The sign of the remainder will be the same as the sign of the dividend and will continue to be associated with the upper half of the accumulator until a reset or another divide operation is executed. This will be the only condition under which the upper half of the accumulator will acquire an independent sign.

If the possibility of a difference in the sign of the quotient and the sign of the remainder occurs, the remainder should be stored in some drum memory location or loaded into the distributor before any arithmetical operation using the remainder is performed. This will be necessary to ensure that the remainder retains its proper sign.

If a multiplication operation is executed any time after an OP code 14 operation, but before a reset operation is called, the sign of the accumulator will be placed in the remainder sign position. A Store Upper operation will then store the sign of the multiplier, not the sign of the product.

If the Branch Minus OP code (46) (see Branching section) is used after a division operation, the sign of the accumulator, and not the sign of the remainder, will be tested by this operation. Figure OP14 illustrates the results of using the Divide OP code.

OP code 64 DIV RU (Divide and Reset Upper)

This OP code causes the machine simulation to divide as explained under Divide (OP code 14 - above). However, the upper half of the accumulator, containing the remainder with its sign, will be reset to zeros. Figure OP64 illustrates the results of using the Divide and Reset Upper OP code.

8) Branching Operations

Op codes for branching are used to provide a means for selecting one of two possible conditions while a program is executing. When a branching instruction is used, the machine simulation will choose either the data address or the instruction address of the branching instruction as the location of the next instruction to be performed. If the condition of the branch OP code is fulfilled, the location of the next instruction will be specified by the data address of the branching instruction. Otherwise, the location of the next instruction will be specified by the instruction address of the branching instruction. The following sections describe the Branching OP codes.

OP code 44 BRNZU (Branch on Non-Zero in Upper)

This OP code causes the contents of the upper half of the accumulator to be examined for zero. If the contents of the upper half of the accumulator is non-zero, the location of the next instruction to be executed will be specified by the D-address. If the contents of the upper half of the accumulator is zero, the location of the next instruction to be executed will be specified by the I-address. The sign of the accumulator will be ignored. Figure OP44 illustrates the results of using the Branch on Non-Zero in Upper OP code.

OP code 45 BRNZ (Branch on Non-Zero)

This OP code causes the contents of the entire accumulator to be examined for zero. If the contents of the accumulator is non-zero, the location of the next instruction to be executed will be specified by the D-address. If the contents of the accumulator is zero, the location of the next instruction to be executed will be specified by the I-address. The sign of the accumulator will be ignored. Figure OP45 illustrates the results of using the Branch on Non-Zero OP code.

OP code 46 BRMIN (Branch on Minus)

This OP code causes the sign of the accumulator to be examined for minus. If the sign of the accumulator is negative, the location of the next instruction to be executed will be specified by the D-address. If the sign of the accumulator is positive, the location of the next instruction to be executed will be specified by the I-address. The contents of the accumulator will be ignored.

If Branch on Minus is used after a Divide without Reset operation (OP code 14), the sign of the accumulator (quotient), and not the sign of the remainder, will be tested.

It is important to be aware of the fact that , when OP code 46 (BRMIN) is being used, the sign of the accumulator can be negative when its contents are zero. Figure OP46 illustrates the results of using the Branch on Minus OP code.

OP code 47 BROV (Branch on Overflow)

This OP code causes the overflow circuit to be examined to see whether it has been set. If the overflow circuit is set, the location of the next instruction to be executed will be specified by the D-address. If the sign of the accumulator is positive, the location of the next instruction to be executed will be specified by the I-address. In order for the machine simulation to branch on overflow, the overflow switch on the control console must be set to SENSE. If the switch is set to STOP, any overflow will cause the machine simulation to stop (see section 4.2.7 for a discussion of the Control Console). Overflow may occur in one of the following ways:

  • An excessive accumulation
  • A multiplication operation in which a sufficiently large factor is in the lower accumulator before the multiplication begins
  • Trying to exceed the number of shifts called for in a Shift and Count operation (see below)
  • Trying to develop a quotient of more than ten digits; a division overflow will always stop the machine simulation.

Execution of the BROV instruction will reset the overflow sense circuit, and another overflow must occur before the circuit is activated again. Figure OP47 illustrates the results of using the Branch on Overflow OP code.

OP code 90 - 99 BRD 1 - 10 (Branch on 8 in Distributor Position 1 - 10)

This OP code examines a particular digit position in the distributor for the presence of an 8 or 9 (digit). Codes 91 - 99 will test positions 1 - 9, respectively, of the test word; code 90 will test position 10. If an 8 is present, the location of the next instruction to be executed will be specified by the D-address. If a 9 is present, the location of the next instruction to be executed will be specified by the I-address. The presence of other than an 8 or 9 will stop the machine simulation.

The use of one of the BRD OP codes will usually be for card type identification purposes. The entry of the digit 8 or digit 9 into a word will usually be through control panel wiring of a pilot selector controlled by the identifying punch in the card. Figure OP90-99 illustrates the results of using the Branch on 8 in Distributor Position 1 - 10 OP code.

9) Shifting Operations

All of the following shifting operations are accomplished within the accumulator. The contents of the upper and lower halves of the accumulator will be regarded as one value and shifted right or left, depending on the operation. All vacant positions will be filled with zeros. The sign of the accumulator will not be affected by the shift operation. Also, the distributor will not be affected by the shift operation.

The shifting of all significant digits of a negative value out of the accumulator will result in a minus zero. Shifting after a division operation (before a reset, multiply, or divide) will not changes the signs associated with the upper and lower halves of the accumulator, and may also result in a minus zero.

In any of the shift operations, the units position of the data address will be the only digit analyzed by the machine (simulation). However, if for any reason some digits other that zero are placed in the other three positions of the data address, the four digits must be a valid machine address. If an invalid address exists, the machine simulation will stop with a storage selection error indication.

The following sections describe the Shifting OP codes.

OP code 30 SRT (Shift Right)

This OP code causes the contents of the entire accumulator to be shifted right the number of places specified by the units digit of the D-address of the shift instruction. A maximum shift of nine positions is possible. A data address with a units digit of zero will result in no shift. All numbers shifted off the right end of the accumulator will be lost. Figure OP30 illustrates the results of using the Shift Right OP code.

OP code 31 SRD (Shift and Round)

This OP code causes the contents of the entire accumulator to be shifted right the number of places specified by the units digit of the D-address of the instruction. A 5 will be added (-5 if the accumulator sign is negative) in a blind position to half-adjust the amount in the accumulator. Data address with a units digit of 1 - 9 will cause a shift of 1 - 9, respectively, with rounding. A data address with a units digit of zero will result in a right shift of 10, with rounding. Figure OP31 illustrates the results of using the Shift and Round OP code.

OP code 35 SLT (Shift Left)

This OP code causes the contents of the entire accumulator to be shifted left the number of places specified by the units digit of the D-address of the instruction. A maximum shift of nine positions is possible. A data address with a units digit of zero will result in no shift. All numbers shifted off the left end of the accumulator will be lost. However, the overflow circuit will not be turned on. Figure OP35 illustrates the results of using the Shift Right OP code.

OP code 36 SCT (Shift Left and Count)

This OP code causes:

  • the contents of the entire accumulator to be shifted to the left
  • a count of the number of places shifted to be inserted in the two low-order positions of the accumulator.

The Shift and Count OP code will function in the following manner. At the beginning of the Shift and Count operation, the tens complement of the units digit of the data address is placed in the shift counter (zero in the case of a units digit of zero). After each shift is executed, the quantity of one (1) will be added to the shift counter. Shifting and counting will continue until some digit other than zero is sensed in the high-order position of the upper half of the accumulator, or until the shift counter attempts to accumulate a total of more than ten.

When shifting and counting is ended by sensing a digit other than zero in the high-order position of the accumulator, the total accumulated in the shift counter will be inserted in the two low-order positions of the accumulator, and the machine (simulation) will proceed with the next instruction.

When shifting and counting is ended by the shift counter trying to accumulate a total of more than ten, the overflow circuit will be set, the overflow light will come on, and the quantity of ten will be inserted in the two low-order positions of the accumulator. The effect of this overflow condition on machine (simulation) operation will be dependent on the setting of the overflow switch on the console.

If a Shift and Count operation is called for and no shift takes place (digit other than zero in the twentieth position), the two low-order digits of the accumulator contents will be replaced by zeros, regardless of the units position of the data address.

If a Shift and Count operation is called for and only one shift is executed (digit other than zero in the nineteenth position), the units digit of the original accumulator contents will be replaced by zero. Figure OP36a and Figure OP36b illustrate the results of using the Shift Left and Count OP code.

10) Table Lookup Operation

The Type 650 is provided with an automatic table lookup (TLU) operation. This will permit a table reference to be performed in a minimum amount of time and with a minimum amount of effort. The following terminology refers to the table lookup operation:

  • table - an arrangement in condensed form for ready reference of statistics, measures, etc.
  • argument - the known reference factor necessary to find a desired item in a table
  • function - the unknown factor or factors within a table associated with a known reference factor (argument).

Therefore, a table will consist of a series of arguments (reference factors) arranged in a sequence of ascending values. Associated with each argument will be one or more functions (results within the table).

Table arguments will be stored on the ( simulated) drum in ascending sequence by their absolute values; argument signs will be ignored. Because the drum is being simulated, it will be necessary to treat some tables containing arguments with different signs as two different tables. In some cases, only one set of arguments will be stored and two different locations referred to according to the sign of the search argument.

Arguments may be a maximum of 10 digits in size and will be stored 48 to a band, except for the last band of a table which may contain less. The last two memory locations in each band (0048, 0049; 0098, 0099; etc.) cannot be used to store table arguments. However, they may be used to store functions, instructions, etc. Table arguments should be stored in successive locations starting with the first word in a band (0000, 0050, 0100, etc.).

A table will not need to contain all the possible search arguments that will be encountered. A TLU will cause a search until an equal or next higher condition occurs. Thus, when a search argument is not actually in the table, the search will stop on the next higher table argument. Interpolation can be accomplished by programming, if necessary.

The fact that the search will stop on a next higher, as well as equal, condition makes possible, in many cases, the location of both the table argument and associated function in the same word. The argument must be stored in the most significant positions of the word. For example:

Table

Distributor Argument

Argument

Function

   

00001

00650

   

00002

00638

<----00002

00000

00003

00600

Table argument selected as a next higher

       

Function values may also be stored a fixed number of locations from their arguments. Thus, having found the location N of the argument, the function is located at N + C, where C is the fixed separation of the function from the arguments.

The D-address of the TLU instruction will be the location of the first argument in the table. If the D-address is other than the first address of a band (on the drum), the search will begin at the first address of a band, and the number of locations searched to find an equal (or next higher) argument will be added to the D-address. This will be useful for short tables having less than one band of arguments, as it will save modification to locate the function address. For example; the instruction 84 0020 xxx is given for a 20-argument table whose arguments are located at 0000 - 0019. If the argument at 0015 equals the given argument, xx 0035 xxxx will appear in the lower accumulator. If the function is stored 20 locations from the argument, the lower accumulator will contain the address of the function with no further modification.

It will be possible to store several short tables in one band and use the same D-address. For example; assuming three tables, 15 arguments in length, and each having 5-digit arguments:

Drum Location

Table Arguments

 

0000

00000XXXXX

 

0001

00000XXXXX

Table 1

|

|

 

0014

00000XXXXX

 

0015

0000XXXXX0

Table 2

0016

0000XXXXX0

 

|

|

 

0029

0000XXXXX0

 

0030

000XXXXX00

Table 3

0031

000XXXXX00

 

|

|

 

0044

000XXXXX00

 

Searching will begin at 0000. Proper placement of the argument will cause the search to be effective only in the applicable section of the band. When this method is used, it will be necessary for the first argument in each table to be greater in value than the last argument of the previous table.

The known argument must be placed in the distributor prior to the search operation. Throughout the table lookup operation, this argument will be compared against the table arguments stored on the (simulated) drum. When an equal argument or next higher (if no equal exists) is located, the address will be placed in positions 8 - 5 in the lower half of the accumulator. As just mentioned, the absolute value (sign is ignored) of the distributor argument will be compared with the absolute value of the table arguments. Then the search is complete, the known argument will be unaltered in the distributor. Positions 10 - 9 and 4 - 1 of the lower half of the accumulator will also be unaltered.

It will be necessary to modify the argument address in positions 8 - 5 of the lower accumulator in order to locate the function, except for the following two cases:

  • argument and function are stored in the same word
  • address of the function is compiled by giving a D-address other than the first in a band.

It is important that an end-of-table, end-of-search indication be incorporated into a table search. Several methods of indicating end-of-search will be possible. The most frequently-used method should be to insert an argument of 99......9 as the last argument of the table, to terminate the table lookup operation.

If no end-of-table indication is provided, a search argument larger than any of the table arguments will cause the machine (simulation) to continue searching until it encounters a location that contains a number equal to, or greater than, the search argument. Under this condition, the address of the location on which the search stopped would be used as the address obtained as a result of the TLU operation. If no equal or greater number is encountered, the machine (simulation) will stop when it attempts to search an the next higher address that exceeds the drum capacity (an invalid address).

If an end-of-table indication is undesirable, it will be possible to compare the known argument to the last argument in the table. In this manner, it will be assured that the known argument will fall within the table range.

It will be possible with the IBM 650 simulation to achieve the results of a table lookup operation without actually using the table lookup OP code (84). This type of operation is feasible if the arguments to be used are four-digit numbers that fall in a block between the limits 0000 and 1999 or 0000 and 0999 (or can be modified in some manner to meet these conditions).

One application, that might lend itself to this method of programming, would be cost distribution by department number. If it is assumed that department numbers run from 0001 to 0200, it would then be possible to assign magnetic drum location 0001 to department 0001, location 0002 to department 0002, etc. When department number, which had been read into the machine from a card, is used as a data address, it would be possible to locate the associated magnetic drum storage location without doing a table lookup operation.

This would be one method of performing a table lookup operation without using OP code 84. Modifications of this basic approach would be possible but are dependent upon the type of information processed.

OP code 84 TLU (Table Lookup)

This OP code performs an automatic table lookup using the D-address as the location of the first table argument, and the I-address as the address of the next instruction to be executed. The argument, for which a search is to be made, must be in the distributor. The address of the table argument equal to, or higher than (if no equal exists) the argument given, will placed in positions 8 – 5 of the lower accumulator. The search argument will remain, unaltered, in the distributor. Figure OP84a and Figure OP84b illustrate the results of using the Table Lookup OP code.

11) Miscellaneous Operations

The following sections discuss the two remaining, miscellaneous OP codes.

OP code 00 No-OP (No Operation)

This OP code performs no operation. When using this OP code, the data address will be bypassed, and the machine (simulation) will automatically refer to the location specified by the instruction address of the No-OP instruction. Therefore, this OP code may be used for switching the path of a given program. It should be noted that the data address must be a valid Type 650 address in order to prevent a storage selection error.

OP code 01 Stop

This OP code will cause a given program to stop, provided the programmed switch on the control console is in the STOP position. When the programmed switch is in the RUN position, the 01 OP code will be ignored and treated in the same manner as the 00 (No-OP) code.

Operation (OP) Code Figures

Figure OP69 - 69 LD (Load Distributor) Operation

   

Contents of

Drum Location

Accumulator

 

OP Code

 

Upper

Lower

Distributor

69 LD

before

0000123456+

0000000000

0000643217+

0000643217+

 

after

0000123456+

0000000000

0000643217+

0000123456+

           
     

Accumulator

 
   

Data Address

Upper

Lower

Distributor

69 LD

before

8003

1234567890

3838567890+

3838567890+

 

after

 

1234567890

3838567890+

1234567890+

69 LD

before

8002

1234567890

3838567890-

1234567890-

 

after

 

1234567890

3838567890-

3838567890-

Figure OP24 - 24 STD (Store Distributor) Operation

   

Contents of

Drum Location

 

OP Code

 

Distributor

24 STD

before

0123456789+

0001042666-

 

after

0001042666-

0001042666-

Figure OP10 - 10 AU (Add to Upper) Operation

   

Contents of

Drum Location

Accumulator

 

OP Code

 

Upper

Lower

Distributor

10 AU

before

0012345678+

0000458632

8942711365+

8942711365+

 

after

0012345678+

0012804310

8942711365+

0012345678+

10 AU

before

0012345678+

0000458632

8942711365-

8942711365-

 

after

0012345678+

0011887045

1057288635+

0012345678+

10 AU

before

0012345678+

9989374627

8942711365+

8942711365+

 

after

0012345678+

0001720305

8942711365+

0012345678+

           
     

Accumulator

 
   

Data Address

Upper

Lower

Distributor

10 AU

before

8003

1234567890

3838567890+

3838567890+

 

after

 

2469135780

3838567890+

1234567890+

10 AU

before

8002

1234567890

3838567890+

1234567890+

 

after

 

5073135780

3838567890+

3838567890+

10 AU

before

8001

1234567890

3838567890+

1234567890-

 

after

 

0000000000

3838567890+

1234567890-

Figure OP15 - 15 AL (Add to Lower) Operation

   

Contents of

Drum Location

Accumulator

 

OP Code

 

Upper

Lower

Distributor

15 AL

before

0012345678+

0000000000

9989374627+

9989374627+

 

after

0012345678+

0000000001

0001720305+

0012345678+

15 AL

before

0012345678+

0000000000

9989374627-

9989374627-

 

after

0012345678+

0000000000

9977028949-

0012345678+

15 AL

Introduction