e01.org

Program status word

The program status word (PSW) is a register that performs the function of a status register and program counter, and sometimes more. The term is also applied to a copy of the PSW in storage. This article only discusses the PSW in the IBM System/360 and its successors, and follows the IBM convention of numbering bits starting with 0 as the leftmost (most significant) bit. Although certain fields within the PSW may be tested or set by using non-privileged instructions, testing or setting the remaining fields may only be accomplished by using privileged instructions. Contained within the PSW are the two bit condition code, representing zero, positive, negative, overflow, and similar flags of other architectures' status registers. Conditional branch instructions test this encoded as a four bit value, with each bit representing a test of one of the four condition code values, 2 3 + 2 2 + 2 1 + 2 0 .…

The program status word (PSW) is a register that performs the function of a status register and program counter, and sometimes more. The term is also applied to a copy of the PSW in storage. This article only discusses the PSW in the IBM System/360 and its successors, and follows the IBM convention of numbering bits starting with 0 as the leftmost (most significant) bit. Although certain fields within the PSW may be tested or set by using non-privileged instructions, testing or setting the remaining fields may only be accomplished by using privileged instructions. Contained within the PSW are the two bit condition code, representing zero, positive, negative, overflow, and similar flags of other architectures' status registers. Conditional branch instructions test this encoded as a four bit value, with each bit representing a test of one of the four condition code values, 2 3 + 2 2 + 2 1 + 2 0 . (Since IBM uses big-endian bit numbering, mask value 8 selects code 0, mask value 4 selects code 1, mask value 2 selects code 2, and mask value 1 selects code 3.) The 64-bit PSW describes (among other things) Interrupt masks Privilege states Condition code Instruction address In the early instances of the architecture (System/360 and early System/370), the instruction address was 24 bits; in later instances (XA/370), the instruction address was 31 bits plus a mode bit (24 bit addressing mode if zero; 31 bit addressing mode if one) for a total of 32 bits. In the present instances of the architecture (z/Architecture), the instruction address is 64 bits and the PSW itself is 128 bits. The PSW may be loaded by the LOAD PSW instruction (LPSW or LPSWE). Its contents may be examined with the Extract PSW instruction (EPSW). ==Format== ===S/360=== On all but 360/20, the PSW has the following formats. S/360 Extended PSW format only applies to the 360/67 with bit 8 of control register 6 set. |- | 8-11 | Key | PSW key |- | 12 | A | ASCII |- | 13 | M | Machine-check mask |- | 14 | W | Wait state |- | 15 | P | Problem state |- | 16-31 | IC | Interruption Code |- | 32-33 | ILC | Instruction-Length Code |- | 34-35 | CC | Condition Code |- | 36-39 | PM | |- | 40-63 | IA | Instruction Address |} |} |- | style="border-style: none;" | |- | 24-31 | | Spare |- | 32-63 | IA | Instruction Address |} |} |} ===S/370=== |- | 40-63 | IA | Instruction Address |} |} |- | style="border-style: none;" | |- | 40-63 | IA | Instruction Address |} |} |} ===S/370 Extended Architecture (S/370-XA)=== |- | 32 | A | Addressing mode 0=24 bit; 1=31 bit |- | 33-63 | IA | Instruction Address |} |} |} ===Enterprise Systems Architecture (ESA)=== |- | 32 | A | Addressing mode 0=24 bit; 1=31 bit |- | 33-63 | IA | Instruction Address |} |} |} ===z/Architecture=== |- | 24 | RI | Reserved for IBM |- | 31 | EA | Extended Addressing mode 0=defined by BA below; 1=64-bit, BA must be zero |- | 32 | BA | Basic Addressing mode 0=24 or 64; 1=31 |- | 64-127 | IA | Instruction Address |} |} |- | style="border-style: none;" | |- | style="border-style: none;" | |- | 24 | RI | Reserved for IBM |- | 31 | EA | Extended Addressing mode 0=defined by BA below; 1=64-bit, BA must be zero |- | 32 | BA | Basic Addressing mode 0=24 or 64; 1=31 |- | 33-63 | IA | Instruction Address |} |} |} ==Notes== ==References== S360 func67 S370 S370-XA S370-ESA z

References

  1. ^ The nomenclature varies among architectures. Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  2. ^ However, a 360/67 [ 7 ] equipped with the Extended Dynamic Address Translation [ 8 ] feature has a 32-bit mode selected by bit 4 of the PSW [ 9 ] in Extended PSW mode [ 8 ] (Control Register 6, bit 8 [ 10 ] ). Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  3. ^ Despite the name, the 350/20 does not adhere to the S/360 architecture. Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  4. ^ Bit 22 is renamed as HFP exponent underflow in ESA/390 Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  5. ^ Bit 23 is renamed as HFP significance in ESA/390 Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  6. ^ S360 . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  7. ^ S360 , p. 156, Instruction-Length Code . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  8. ^ S360 , p. 15, Program Status Word . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  9. ^ S360 , pp. 15–16, Interruption . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  10. ^ S370 . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  11. ^ S370-ESA . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  12. ^ S370-ESA , p. 4-5, Program-Status-Word Format . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  13. ^ S370-XA . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  14. ^ S370-XA , p. 4-5, Program-Status-Word Format . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  15. ^ S370 , p. 156, Instruction-Length Code . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  16. ^ S370 , pp. 15–16, Interruption . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  17. ^ S370 , pp. 4-6 –&#32, 4–7, Program-Status Word Format in EC Mode . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  18. ^ S370 , pp. 4-8 –&#32, 4–9, Program-Status Word Format in BC Mode . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  19. ^ S370 , pp. 6-3 –&#32, 6–5, Interruption Action . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  20. ^ S370 , pp. 6-7 –&#32, 6–9, Instruction-Length Code . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  21. ^ S390-ESA . sfn error: no target: CITEREFS390-ESA ( help ) Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  22. ^ S390-ESA , p. 4-5, Program-Status-Word Format . sfn error: no target: CITEREFS390-ESA ( help ) Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  23. ^ func67 . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  24. ^ func67 , p. 15, Instruction Fetching and Execution . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  25. ^ func67 , pp. 15–16, Instruction Fetching and Execution . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  26. ^ func67 , p. 16, Table 4. Control Registers . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  27. ^ a b func67 , p. 57, Glossary . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  28. ^ z . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  29. ^ z , pp. 4-5–4-8, Program-Status-Word Format . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
  30. ^ z , p. 4-8, Short PSW Format . Wikipedia revision 1359028884, retrieved 2026-11-18 · 1794956400.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Program status word". 1781273138. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1359028884

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·