View previous topic :: View next topic
|
Author |
Message |
sheersh
New User
Joined: 24 May 2008 Posts: 17 Location: Gurgaon
|
|
|
|
Please help me understanding Index register concept in RX type instruction format.
Is this something, base register is pointing to some register(Index register) and then calculating the offset to reach memory location?
Is this something we can achieve or depends upon system's memory organization? bit confused, please help. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
sheersh wrote: |
Is this something, base register is pointing to some register(Index register) and then calculating the offset to reach memory location? |
Base, index and displacement are all added together....
z/Architecture Principles of Operation wrote: |
In forming the intermediate sum, the base address and index are treated as 64-bit binary integers. A 12-bit displacement is treated as a 12-bit unsigned binary integer, and 52 zero bits are appended on the left. A 20-bit displacement is treated as a 20-bit signed binary integer, and 44 bits equal to the sign bit are appended on the left. The three are added as 64-bit binary numbers, ignoring overflow. The sum is always 64 bits long and is used as an intermediate value to form the generated address. The bits of the intermediate value are numbered 0-63. |
|
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Base register points to an area in memory.
Displacement value is added to BASE to point to a specific field.
Index value, in a second register, is added to the BASE and displacement usually to locate a specific byte within a field. Increasing the Index by 1 is handy for looping thru a field looking for certain strings. |
|
Back to top |
|
|
|