Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

Hercules - (Variables) Setzen des linken Bits einer A-Konstante

Subject:

Re: [hercules-os380] Digest Number 1095

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

Date:

2014.12.31 02:53:00


This variant works:

         LCLB  &AMBIT
         LCLC  &ZSYS
&ZSYS    SETC  '370'
&AMBIT   SETB  ('&ZSYS' EQ '370')
NEWIO    DC    X'000C0000'  MACHINE CHECK ENABLED + EC
         DC    A(B'&AMBIT.0000000000000000000000000000000'+STAGE2)
STAGE2   DS    0F
         END

excerpt from the assembly listing:


                          3 &ZSYS    SETC  '370'
                          4 &AMBIT   SETB  ('&ZSYS' EQ '370')
  000000 000C0000         5 NEWIO    DC    X'000C0000'      MACHINE CHECK ENABLED + EC
                          6          DC    A(B'&AMBIT.0000000000000000000000000000000'+STAGE2)
  000004 80000008         7+         DC    A(B'10000000000000000000000000000000'+STAGE2)
  000008                  8 STAGE2   DS    0F
                          9          END

see the compiled constant 80000008 - the leftmost bit is in the correct position
(which should be checked to confirm the correct number of zeroes).

Kind regards

Bernd


Am 31.12.2014 um 02:46 schrieb Bernd Oppolzer:
> Way cool, this motivated me to bring up my hercules machine once again, but ...
>
> at least with the very old ASSEMBLER XF, the second solution doesn't work:
>
> assemble testz
>
> ASSEMBLER (XF) DONE
> TES00060        6          DC    AL.1(&AMBIT),AL.31(STAGE2)
> TES00060        7+         DC    AL.1(1),AL.31(STAGE2)
> IFO204 RELOCATABLE EXPRESSION IN A- OR Y-TYPE ADDRESS CONSTANT WITH BIT
> LENGTH S
> PECIFICATION NOT ALLOWED
> NUMBER OF STATEMENTS FLAGGED IN THIS ASSEMBLY =     1
> Ready(00008); T=0.02/0.07 03:40:03
>
> The SETB solution is very elegant, I will try to build the A-constant from this
> SETB value; I now have:
>
>          LCLB  &AMBIT
>          LCLC  &ZSYS
> &ZSYS    SETC  '370'
> &AMBIT   SETB  ('&ZSYS' EQ '370')
> NEWIO    DC    X'000C0000'  MACHINE CHECK ENABLED + EC
>          DC    AL.1(&AMBIT),AL.31(STAGE2)
> STAGE2   DS    0F
>          END
>
> maybe the solution with the B'...' constant will work ...
>
> Later,
> kind regards
>
> Bernd
>
>
>
>
> Am 31.12.2014 um 02:04 schrieb G.P.:
>> How about doing it the easy way:
>>
>>          LCLB  &AMBIT
>>          LCLC  &ZSYS
>> &AMBIT   SETB  ('&ZSYS' EQ '370')
>>
>> NEWIO    DC    B'&AMBIT.0000000,00001100,00000000,00000000'
>>
>> or with an address:
>>
>> NEWIO    DC    AL.1(&AMBIT),AL.31(STAGE2)
>>
>>
>> G.P.
>>
>>
>>
>

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie