I now found the time to test the two variants using my VM/370 R6 installation on
Hercules.
In fact, the SETA solution does not work, because the value X'80000000' is not
in the valid range for a SETA symbol (at least with the old ASSEMBLER XF). The
SETA symbols are limited to 2**31 - 1.
So I found (and tested) the following solution using SETC symbols for the AMODE
bit (in fact the AMODE nibble):
LCLC &AMBIT
LCLC &ZSYS
&ZSYS SETC '370'
&AMBIT SETC '0'
AIF ('&ZSYS' NE '370').BIT24A
&AMBIT SETC '8'
.BIT24A ANOP
NEWIO DC X'000C0000' MACHINE CHECK ENABLED + EC
DC A(X'&AMBIT.0000000'+STAGE2)
STAGE2 DS 0F
END
This solution does not work unmodified with the EQU symbols, because in the 370
case, the SETC symbols would be redefined, which is not possible for EQU. So the
AIF logic has to be modified. The EQU logic (which has its merits, too) looks
like this:
LCLA &BITPREF
LCLC &ZSYS
&ZSYS SETC '370'
AIF ('&ZSYS' NE '370').BIT24B
BITPREF EQU X'80000000'
AGO .BIT24A
.BIT24B ANOP
BITPREF EQU 0
.BIT24A ANOP
NEWIO DC X'000C0000' MACHINE CHECK ENABLED + EC
DC A(BITPREF+STAGE2)
STAGE2 DS 0F
END
I tested this solution, too (simply by looking at the generated machine code,
that is, hex constants).
Kind regards
Bernd
Am 30.12.2014 um 16:50 schrieb Bernd Oppolzer:
[hercules-os380]:
> The &s before &BITPREF in SETA were missing in the first try ...
>
> Am 30.12.2014 um 16:48 schrieb Bernd Oppolzer:
>> &BITPREF SETA 0
>> AIF ('&ZSYS' EQ 'S370').BIT24A
>> &BITPREF SETA X'80000000'
>> .BIT24A ANOP
>> NEWIO DC X'000C0000' machine check enabled + EC
>> DC A(&BITPREF+STAGE2)
>>
>> Kind regards
>>
>> Bernd
>>
>>
>> Am 30.12.2014 um 15:29 schrieb K.V.:
>>> I wonder if it would be possible to simplify this:
>>>
>>> NEWIO DC X'000C0000' machine check enabled + EC
>>> AIF ('&ZSYS' EQ 'S370').MOD24B
>>> DC A(X'80000000'+STAGE2)
>>> AGO .MOD31B
>>> .MOD24B ANOP
>>> DC A(STAGE2)
>>> .MOD31B ANOP
>>>
>>> by having a variable set to either X'00000000'
>>> or X'80000000'.
>>>
>>> Something like:
>>>
>>> AIF ('&ZSYS' EQ 'S370').BIT24A
>>> BITPREF EQU X'80000000'
>>> AGO .BIT24B
>>> BITPREF EQU X'00000000'
>>> .BIT24B
>>>
>>> NEWIO DC X'000C0000' machine check enabled + EC
>>> DC A(&BITPREF+STAGE2)
>>>
>>> Would that work?
>>>
>>> Thanks. P.
>>>
|