Indirect addressing is an important component of computer programming. Arrays and structures hide it, while pointers make it explicit to the high level language programmer. However, at the machine level, some indirect addressing is going on most of the time. We call it indirect because the address of the word of memory we are trying to fetch or store is not directly given in the machine instruction, but instead is somewhere else, usually in another register. The CSC-1 has a special register called S (Secondary) which it uses for all indirect loads and stores. The assembly programmer calculates the desired address by using the arithmetic instructions and the A register. Then this value is moved into the S register where it is used by LDS or STS. A secondary register must be used because these load and store instructions, just like their direct counterparts, use the A register to store the actual value to be read or written. |