Oppolzer - Informatik / Blog


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

ASSEMBLER-L - Selbst-definierende Terme bei SETA

Subject:

Re: Self-defining terms

From:

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

Reply-To:

IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>

Date:

2010.12.14 20:34:48


Hello A.,

at the right side of SETA arithmetic expressions are allowed, so the -1 is
correct. But: if the arithmetic expression consists of a single GBLC or LCLC
symbol (or such a symbol in parantheses, or such a symbol as part of a more
complicated arithmetic expression), this symbol must contain a self-defining
term. And a self-defining term must be one of the following:

decimal constant without sign !!!
X-constant
C-constant
B-constant

each in the range, which is valid for addresses.

This is - at least - my knowledge, when I last teached ASSEMBLER macro language
in the early 90s. Things may have changed since then. I just had a look at my
old books from those early days.

Kind regards

Bernd



Am 14.12.2010 19:52, schrieb A.K.:
> All,
>
> with the help of J.K.,
> I am trying to port a program from z390 to HLASM.
> We're encountering something strange with a
> self-defining term. Please take a look at the
> following piece of code:
>           GBLC&HEXVAL,&DECVAL         * Input, output of HEX2DEC
>           LCLA&MAJOPCD,&MINOPCD       * Major, minor opcodes
>           ...                           * Other code
>           MNOTE 4,'FINDOPCD@106 DECVAL=&DECVAL' **!!
> &MAJOPCD SETA  (&DECVAL)
> &MINOPCD SETA  -1                      * No minor opcode
>
>
> In the listing it generates the following sequence (please mind line-wraps):
>   ** ASMA254I *** MNOTE ***         44277+     4,FINDOPCD@106 DECVAL=-1
>   ** ASMA102E Arithmetic term is not self-defining term; default=0 - FINDO/DECVAL
>   ** ASMA435I Record 107 in AD.ABE.MACLIB(FINDOPCD) on volume: PERM61
>   ** ASMA013S ACTR counter exceeded - HTMLG
>   ** ASMA435I Record 670 in AD.ABE.MACLIB(HTMLGEN) on volume: PERM61
>
> > From this output I deduce the following:
> 1) The variable&DECVAL holds character string with value '-1'
> 2) Error ASMA102E indicates HLASM cannot assign this value to the SETA variable&MAJOPCD
> 3) The next error as indicated by the ASMA013S message occurs much later,
>      so the assignment at line 108 is executed correctly!
>
> So that leaves me with the question why the first SETA fails on a negative
> number, while the second one does accept a negative self-defining term.
> Checking the manual only adds to the confusion: it states that negative
> self-defining terms are not acceptable. Still the assignment to&MINOPCD
> at line 108 in the macro is accepted by HLASM.
>
> Does anybody have an explanation? Am I missing something?
>
> Thanks in advance,
> A.K.
> ==========
>

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