Indirect Address



Rating - 3/5
459 views

It is sometimes convenient to use the address bits of an instruction code not as an address but as the actual operand. When the second part of an instruction code specifies an operand, the instruction is said to have an immediate operand. When the second part specifies the address of an operand, the instruction is said to have a direct address. This is in contrast to a third possibility called indirect address, where the bits in the second part of the instruction designate an address of a memory word in which the address of the operand is found. One bit of the instruction code can be used to distinguish between a direct and an indirect address.

It is sometimes convenient to use the address bits of an instruction code not as an address but as the actual operand. When the second part of an instruction code specifies an operand, the instruction is said to have an immediate operand. When the second part specifies the address of an operand, the instruction is said to have a direct address. This is in contrast to a third possibility called indirect address, where the bits in the second part of the instruction designate an address of a memory word in which the address of the operand is found. One bit of the instruction code can be used to distinguish between a direct and an indirect address.

As an illustration of this configuration, consider the instruction code format shown in Fig. 5-2(a). It consists of a 3-bit operation code, a 12-bit address, and an indirect address mode bit designated by I. The mode bit is 0 for a direct address and 1 for an indirect address. A direct address instruction is shown in Fig. 5-2(b). It is placed in address 22 in memory. The I bit is 0, so the instruction is recognized as a direct address instruction. The opcode specifies an ADD instruction, and the address part is the binary equivalent of 457. The control finds the operand in memory at address 457 and adds it to the content of AC. The instruction in address 35 shown in Fig. 5-2( c) has a mode bit I = 1. Therefore, it is recognized as an indirect address instruction. The address part is the binary equivalent of 300. The control goes to address 300 to find the address of the operand. The address of the operand in this case is 1350. The operand found in address 1350 is then added to the content of AC. The indirect address instruction needs two references to memory to fetch an operand. The first reference is needed to read the address of the operand; the second is for the operand itself. We define the effective address to be the address of the operand in a computation-type instruction or the target address in a branch-type instruction. Thus the effective address in the instruction of Fig. 5-2(b) is 457 and in the instruction of Fig 5-2( c) is 1350.

 

These Topics Are Also In Your Syllabus
1 Computer Instructions link
2 Instruction Set Completeness link
You May Find Something Very Interesting Here. link
3 Timing and Control link
4 Timing and Control -2 link
5 Instruction Cycle link

 

 

 

 

 

These Topics Are Also In Your Syllabus
1 OCTAL AND HEXADECIMAL NUMBER CONVERSION link
2 OCTAL AND HEXADECIMAL NUMBER CONVERSION -2 link
You May Find Something Very Interesting Here. link
3 DECIMAL REPRESENTATION-INTRODCTION link
4 ALPHANUMERIC REPRESENTATION link
5 Complements link

 

 

 

 

 

These Topics Are Also In Your Syllabus
1 Stored Program Organization link
2 Instruction Codes link
You May Find Something Very Interesting Here. link
3 Indirect Address link
4 Computer Registers link
5 Program Counter link

 

 

 

 

The direct and indirect addressing modes are used in the computer presented in this chapter. The memory word that holds the address of the operand in an indirect address instruction is used as a pointer to an array of data. The pointer could be placed in a processor register instead of memory as done in commercial computers.

These Topics Are Also In Your Syllabus
1 Decimal Fixed-Point Representation link
2 Floating-Point Representation link
You May Find Something Very Interesting Here. link
3 Floating-point representation link
4 Other Binary Code link
5 Other Decimal Codes link

Rating - 3/5
517 views

Advertisements
Rating - 3/5