Even if the different architectures have instructions that do the same thing, such as shift all the bits in a computer
word left one place, the pattern of ones and zeros in the instruction word will be different in different
architectures. Of course, different architectures will usually also have some instructions that are unique to that
computer design.
The earliest computers, and the first hobby computers, were programmed directly in the machine
instruction set. The programmer worked with ones and zeros to code each instruction. As an example,
here is code (and an explanation of each instruction), for a particular 16-bit computer. These three
instructions will add the value stored in memory location 64 to that in location 65, and store the result
in location 66.
0110000001000000 (Load the A-register from 64)
0100000001000001 (Add the contents of 65)
0111000001000010 (Store the A-register in 66)
Once the programmer created all the machine instructions, probably by writing the bit patterns on paper,
the programmer would store the instructions into memory using switches on the front panel of the computer.
Then the programmer would set the P register (program counter register) contents to the location of the first
instruction in the program, and then press ???Run.
Pages:
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128