Organization of the RAMM Computer
The RAMM computer is a 100-word (4 decimal digits per word) machine with one-address logic. By a one-address logic machine we mean that only one operand is specified per computer instruction. We can think of the memory of the RAMM computer as a 100-element array where each array element contains a number consisting of exactly four decimal digits. Each word in the memory of the RAMM computer is designated by a unique numeric address. The first word of memory in the RAMM computer has an address of
00 while the last word has the address 99. The range of addresses in the RAMM computer extends from 00 to 99 and includes all two-digit numbers between these numbers. We could represent the memory of the RAMM computer as in the diagram below:Address |
Memory |
00 |
xxxx |
01 |
xxxx |
02 |
xxxx |
03 |
xxxx |
... |
... |
97 |
xxxx |
98 |
xxxx |
99 |
xxxx |
A good definition of memory
address might be a "unique number denoting a memory location to which data may be sent to be stored and from which it may be retrieved." A computer word is a set of characters (in this case decimal digits) treated as a unit by the computer. So we see that the RAMM computer has a word consisting of four decimal digits. Since all information in a computer is normally in a two-state form we can think of the information in the RAMM computer memory as being in binary-coded decimal notation. Note that binary-coded decimal notation is NOT the same as number representation in pure binary notation. Each word of memory in the RAMM computer has a unique address, that is, when we specify a particular memory word by giving its numeric address, that numeric address belongs only to that memory location. Another good way to think of a computer memory is to liken it to a message service in a hotel. There are normally a number of compartments, one for each room in the hotel, in the message room. We can leave information for a particular room by designating the room number or we can retrieve information for a particular room by giving the room number. No two rooms have the same number.The basic language of any computer is called
machine language. Machine language is the only language to which the computer can respond directly. All programs written in language other than machine language must be translated into the machine language of the computer before execution of the program can occur. There are many different machine languages as each computer (or family of computers) has its own specified set of instructions that it can execute. The set of instructions that a computer can execute is determined when the computer is designed and built. The machine language of the computer is numerical and represented in the memory of the computer in two-state form. Each memory word can contain a computer instruction or a data value. One of the most powerful properties of programming in the machine language of a computer is the ability to treat the contents of a memory location at one time as a computer instruction and at another time as a data value. In this way the program being executed on the computer can dynamically change itself during the execution of the program.Even though the RAMM computer is a "software" computer program that simulates the actions of a computer, it exhibits properties of the hardware of a real computer. For our purposes we may think of the RAMM computer as if it really exists with switches, lights, etc. RAMM is a decimal, sequential computer using BCD (binary-coded decimal) representation. By
sequential computer we mean that instructions are executed from sequential or consecutive memory locations unless a transfer of control instruction is specified.All arithmetic is performed in RAMM through the use of two arithmetic registers called the A-register and the Q-register. Each of the two registers can contain a number consisting of four decimal digits. The Q-register is used in conjunction with the A-register to perform multiplication and division. The descriptions of the various instructions available in the RAMM computer are presented in a subsequent chapter. The range of values that can be stored in a memory location of the RAMM computer is
-9999 to +9999. The range of values that can be read from a data file or from the keyboard is -999 to +9999. This discrepancy in the range of values which can be computed versus the range of values which can be input stems from the historical limits of the punched card. Data values may be placed in the memory of the computer through a program storing operation or through the execution of a "read data" instruction in a RAMM computer program.RAMM Instruction Descriptions and Examples
The instruction format for a RAMM machine language instruction is a two-digit operation code and a two-digit operand address. The instruction format may be represented as XXyy where XX is the operation code (op code) and yy is the operand address. In the instruction definitions given below, both the mnemonic operation code (used in RAMM Assembler language programming) and the numeric operation code (used in RAMM machine language) are given. Each machine language instruction will be listed as XXyy where XX is the numeric operation code and yy represents the operand.
Notation and Terminology used in Instruction Definitions
Enclosing the name of the location or register within parentheses indicates the
contents of a location or register. For example, if we wish to designate that the contents of memory location 14 is 0345 we would write this as follows: (14) = 0345. If we wish to denote that the contents of the A-register is 7777 we would write (A-register) = 7777.The
current instruction is the instruction that is being executed at a particular instant under consideration.The
current location is the memory location in which the current instruction is stored.The
current sequence of control is that order of execution in which, when the current instruction has finished executing, the next instruction to be executed is the one stored in the next consecutive memory location.Data Value Format
Data to be processed during execution of a RAMM program can be input one value at a time with the ENTER key pressed after inputting each data value. Negative numbers must be prefixed by a minus sign but positive numbers do not have to be prefixed by a + sign. All nonnegative values input are in the form of four decimal digits with no sign. A negative value is entered with a minus sign followed by exactly three decimal digits. If a data file is used, the input values are typed one value per line of a simple text file (ASCII file) in character positions 1 through 4 of the line. The "largest" (greatest magnitude) negative number that can be input as a data value is -999 because the RAMM computer only looks at columns 1 through 4 of the data record.