In general, you should not use the TAR instruction directly because you would not know what to do with condition code 3. Instead, use the TESTART macro.
Jim Mulder -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of John Dravnieks Sent: Tuesday, January 14, 2025 2:39 AM To: [email protected] Subject: Use of TAR to test access register validity Hello I have come across some usage of the Test Access instruction (TAR) in a problem state program - given that TAR is documented in Chapter 10 of Pop (usually the supervisor state instructions generally only of use to the operating system) I am concerned that TAR is being used incorrectly The code correctly loads an access register into AR7 and then has this: TAR R7,R0 Valid access register? JP AOK Yes The second operand R0 refers to general register 0, which has a positive value of 32768 or less - so bits 32-47 of gpr0 will be zero so the effective EAX used by TAR will be zero. My question is is this a valid way to test the validity of an access register? And should it also be checking for a condition code of 1 as well ? Kind regards John Dravnieks, 21CS Software (posted here at suggestion of Binyamin Dissen) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
