Modal instructions
Modal instructions are instructions where addressing mode is a factor in the output of the instruction. The AMODE determines the width of the output register operands. A good example of a modal instruction is Load Address (LA). If you specify LA R3,VIRT_PTR successively in the three AMODEs, what are the three results?
- In AMODE 24, the address of VIRT_PTR
is a 24-bit address that is loaded into bits 40 through 63 of GPR3
(or bits 8 through 31 of the 32-bit register imbedded in the 64-bit
GPR). The processor places zeroes into bits 32 through 39, and leaves
the first 31 bits unchanged, as follows:
- In AMODE 31, the address of VIRT_PTR
is loaded into bits 33 through 63 of GPR3. The processor places zero
into bit 32 and leaves the first 32 bits unchanged, as follows:
- In AMODE 64, the address of VIRT_PTR
fill the entire 64-bit GPR3:
Other modal instructions are Move Long (MVCL), Branch and Link (BALR), and Branch and Save (BASR).