370 pseudo-ops (was: Questions on some 370 psuedo-ops {sic}) 
Author Message
 370 pseudo-ops (was: Questions on some 370 psuedo-ops {sic})

Quote:
>   PUNCH - Punch a card .... where does it punch it TO?? :-)

A good use of PUNCH is to embed linkage editor control statements in
an object "deck".  For example, we've used PUNCH in numerous assembler
source programs to define an alias, or to force SSI information.

In other words, PUNCH can be used to implement a self-specification of
linkedit options.  Now, if only you could do the same for assembly
options.  The assembler should have permitted you to embed the
specification of options like RENT in the source code a long time ago
(a la C #pragma or PL/1 *PROCESS).  Requirements, anyone?

Quote:
>   OPSYN - "Equate operation code" - I have NO idea.

I've seen at least one software vendor use this in an intriguing macro
technique that takes standard IBM control block defining macros and
generates tables of control block offsets from them.  It does this
by OPSYN'ing the DC and DS instructions.

Quote:
>   MHELP - "Trace macro flow" - Interesting.  How does it work?

Cruftily.  The Assembler F assembly-time options are much easier to use
 - they don't require re-editing the source and they provide far better
output for macro diagnosis.  MHELP is an outstanding example of
second-system elephantiasis.  Every actually TRY to debug a macro in
Assembler H?

 - SEB



Sat, 11 Jun 1994 20:58:00 GMT  
 370 pseudo-ops (was: Questions on some 370 psuedo-ops {sic})
I just started getting this newsgroup, and so do not have the original
question for this thread.  The poster apparently was asking how to use
Assembler H pseudo-ops.

WRT OPSYN: This lets you override assembler opcodes with macros.  An IBM
example was TRACE.  VM's CP has a TRACE macro which conflicts with the
Assembler H TRACE opcode.  IBM's official line is that this prevents
CP's assembly with Assembler H.  Not so, adding

TRACE OPSYN

to the ASSEMBLE file (or preferably a common COPY file) allows CP to
assemble correctly.

WRT MHELP: This is not as easy to use as the macro debugging tools in
Assembler XF, but can be very useful.  I used it to debug several
complicated macros in the last product I worked on.  I wrote an article
about MHELP for VM Systems Group's "V/Update" newsletter, which follows:

=========================================================================
MHELP AND ACTR - POWER MACRO DEBUGGING IN ASSEMBLER H

The H Assembler (Product Number 5668-962) contains a very good Macro Trace
Facility, controlled by the MHELP instruction, and a Conditional Assembly Loop
Counter, controlled by the ACTR instruction. Together, these instructions can
greatly ease the development of assembler macros.

MHELP is invoked with a single numeric argument that can invoke one or more of
the following levels of macro tracing:

Level     Trace Information Displayed

1         Macro Call Trace:  Will output a single
line for each macro call, giving the
macro name, its depth, and the &SYSNDX
value

2         Macro Branch Trace:  Will output one
line for each AGO and AIF statement,
giving the macro name, and the model
statement numbers branched from and to

4         Macro AIF Dump:  Will dump all undimen-
sioned SET symbols immediately before
each AIF statement

8         Macro Exit Dump:  Will dump all undimen-
sioned SET symbols for each MEND or
MEXIT statement

16        Macro Entry Dump:  Will dump all param-
eter values immediately after each macro
call

32        Global Suppression:  Will suppress
dumping global SET symbols for the Macro
AIF and EXIT dump options

64        Macro Hex Dump:  Will dump parameters
and SETC symbols in charter and
hexadecimal when used with the Macro
AIF, Exit and/or Entry dumps.

128       MHELP suppression: Will suppress all
currently active MHELP options.

Any or all of these options can be added together to obtain the desired mix of
trace information. Here is a small portion of output from MHELP 31 for one of
the macros in KPROBE:

-------------------------------------------------------------------------
DINST START,E5       MACRO CALL                     KC100026 21600000
(Macro Call Trace)
++//MHELP CALL TO MACRO DINST       DEPTH=001   SYSNDX=0000769   STMT=03942

(Macro Entry Dump)
//MHELP ENTRY TO  DINST    MODEL STMT=00000 DEPTH=001 SYSNDX=0000769 KWCNT=000
////PARAMETERS (SYSNDX,SYSECT,SYSLOC,SYSTIME,SYSDATE,SYSPARM,NAME,KWS,PPS) ///
//NUM  LNTH  VALUE (64 CHARS/LINE)
//0000  004  0769
//0001  008  FMTINSTR
//0002  008  FMTINSTR
//0003  005  12.45
//0004  008  02/05/90
//0005  NUL
//0006  NUL
//0007  005  START
//0008  002  E5

(Macro AIF Dump)
//MHELP AIF IN    DINST    MODEL STMT=00110 DEPTH=001 SYSNDX=0000769 KWCNT=000
////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).//
//0000 GBLA       LASTOP                                        VAL=  0000000041
//0001 GBLA       MCOUNT                                        VAL=  0000000007
//0002 GBLB       STARTED                                       VAL=0
//0003 GBLB       FIRST                                         VAL=1
//0004 GBLC       MNEM                                          DIMENSIONED
//0005 LCLA       A                                             VAL=  0000000000
//0006 LCLA       O                                             VAL=  0000000000
//0007 LCLC       I                                             LNTH= 0
//0008 LCLC       L                                             LNTH= 0
//0009 LCLC       N                                             LNTH= 0
//0010 LCLC       T                                             LNTH= 0

(Macro Branch Trace)
++//MHELP  BRANCH FROM STMT 00110 TO STMT 00115 IN MACRO DINST
-------------------------------------------------------------------------

MHELP values between 256 and 65535 serve a dual purpose.  The value (mod 256)
controls MHELP normally, and the total value becomes an upper limit on the total
number of macro calls in this assembly.  Whenever &SYSNDX exceeds the MHELP
value, all further macro calls will be suppressed.

Another handy feature in Assembler H is the ACTR instruction.  This allows you
to set a conditional assembly loop counter to avoid excessive loop iterations
during macro expansion.  If the total number of AIF and AGO statements processed
exceeds the ACTR value, then the assembler suppresses expansion of the current
macro and proceeds with expansion of the next statement after the macro call at
the next level of macro expansion.  If the ACTR value is exceeded in open code,
then all remaining lines in the source file will be treated as comments.

The ACTR value is local to each macro level, and is altered only by AIF, AGO,
and ACTR instructions within the same scope.  Therefore, you can nest macros
containing ACTR instructions, and the counters will be maintained at each level.
For further information, consult the Assembler H Language Reference (Publication
number GC26-4037-1).  MHELP is documented on pp.  257-259, and ACTR on pp.
254-255.

As Assembler H becomes more of a standard, many of us proficient in Assembler F
will be converting to the H Assembler.  These are only two of the powerful
facilities that can make us more productive as we make the big jump.



Wed, 15 Jun 1994 05:21:23 GMT  
 370 pseudo-ops (was: Questions on some 370 psuedo-ops {sic})
I just started getting this newsgroup, and so do not have the original
question for this thread.  The poster apparently was asking how to use
Assembler H pseudo-ops.

WRT OPSYN: This lets you override assembler opcodes with macros.  An IBM
example was TRACE.  VM's CP has a TRACE macro which conflicts with the
Assembler H TRACE opcode.  IBM's official line is that this prevents
CP's assembly with Assembler H.  Not so, adding

TRACE OPSYN

to the ASSEMBLE file (or preferably a common COPY file) allows CP to
assemble correctly.

WRT MHELP: This is not as easy to use as the macro debugging tools in
Assembler XF, but can be very useful.  I used it to debug several
complicated macros in the last product I worked on.  I wrote an article
about MHELP for VM Systems Group's "V/Update" newsletter, which follows:

=========================================================================
MHELP AND ACTR - POWER MACRO DEBUGGING IN ASSEMBLER H

The H Assembler (Product Number 5668-962) contains a very good Macro Trace
Facility, controlled by the MHELP instruction, and a Conditional Assembly Loop
Counter, controlled by the ACTR instruction. Together, these instructions can
greatly ease the development of assembler macros.

MHELP is invoked with a single numeric argument that can invoke one or more of
the following levels of macro tracing:

Level     Trace Information Displayed

1         Macro Call Trace:  Will output a single
line for each macro call, giving the
macro name, its depth, and the &SYSNDX
value

2         Macro Branch Trace:  Will output one
line for each AGO and AIF statement,
giving the macro name, and the model
statement numbers branched from and to

4         Macro AIF Dump:  Will dump all undimen-
sioned SET symbols immediately before
each AIF statement

8         Macro Exit Dump:  Will dump all undimen-
sioned SET symbols for each MEND or
MEXIT statement

16        Macro Entry Dump:  Will dump all param-
eter values immediately after each macro
call

32        Global Suppression:  Will suppress
dumping global SET symbols for the Macro
AIF and EXIT dump options

64        Macro Hex Dump:  Will dump parameters
and SETC symbols in charter and
hexadecimal when used with the Macro
AIF, Exit and/or Entry dumps.

128       MHELP suppression: Will suppress all
currently active MHELP options.

Any or all of these options can be added together to obtain the desired mix of
trace information. Here is a small portion of output from MHELP 31 for one of
the macros in KPROBE:

-------------------------------------------------------------------------
DINST START,E5       MACRO CALL                     KC100026 21600000
(Macro Call Trace)
++//MHELP CALL TO MACRO DINST       DEPTH=001   SYSNDX=0000769   STMT=03942

(Macro Entry Dump)
//MHELP ENTRY TO  DINST    MODEL STMT=00000 DEPTH=001 SYSNDX=0000769 KWCNT=000
////PARAMETERS (SYSNDX,SYSECT,SYSLOC,SYSTIME,SYSDATE,SYSPARM,NAME,KWS,PPS) ///
//NUM  LNTH  VALUE (64 CHARS/LINE)
//0000  004  0769
//0001  008  FMTINSTR
//0002  008  FMTINSTR
//0003  005  12.45
//0004  008  02/05/90
//0005  NUL
//0006  NUL
//0007  005  START
//0008  002  E5

(Macro AIF Dump)
//MHELP AIF IN    DINST    MODEL STMT=00110 DEPTH=001 SYSNDX=0000769 KWCNT=000
////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).//
//0000 GBLA       LASTOP                                        VAL=  0000000041
//0001 GBLA       MCOUNT                                        VAL=  0000000007
//0002 GBLB       STARTED                                       VAL=0
//0003 GBLB       FIRST                                         VAL=1
//0004 GBLC       MNEM                                          DIMENSIONED
//0005 LCLA       A                                             VAL=  0000000000
//0006 LCLA       O                                             VAL=  0000000000
//0007 LCLC       I                                             LNTH= 0
//0008 LCLC       L                                             LNTH= 0
//0009 LCLC       N                                             LNTH= 0
//0010 LCLC       T                                             LNTH= 0

(Macro Branch Trace)
++//MHELP  BRANCH FROM STMT 00110 TO STMT 00115 IN MACRO DINST
-------------------------------------------------------------------------

MHELP values between 256 and 65535 serve a dual purpose.  The value (mod 256)
controls MHELP normally, and the total value becomes an upper limit on the total
number of macro calls in this assembly.  Whenever &SYSNDX exceeds the MHELP
value, all further macro calls will be suppressed.

Another handy feature in Assembler H is the ACTR instruction.  This allows you
to set a conditional assembly loop counter to avoid excessive loop iterations
during macro expansion.  If the total number of AIF and AGO statements processed
exceeds the ACTR value, then the assembler suppresses expansion of the current
macro and proceeds with expansion of the next statement after the macro call at
the next level of macro expansion.  If the ACTR value is exceeded in open code,
then all remaining lines in the source file will be treated as comments.

The ACTR value is local to each macro level, and is altered only by AIF, AGO,
and ACTR instructions within the same scope.  Therefore, you can nest macros
containing ACTR instructions, and the counters will be maintained at each level.
For further information, consult the Assembler H Language Reference (Publication
number GC26-4037-1).  MHELP is documented on pp.  257-259, and ACTR on pp.
254-255.

As Assembler H becomes more of a standard, many of us proficient in Assembler F
will be converting to the H Assembler.  These are only two of the powerful
facilities that can make us more productive as we make the big jump.



Wed, 15 Jun 1994 05:21:23 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 370 pseudo-ops (was: Questions on some 370 psuedo-ops {sic})

2. Questions on some 370 psuedo-ops

3. Questions on some 370 psuedo-ops

4. FS/370 System/370 Emulator

5. Newbie 370 Questions

6. Question about IBM 370 assembler books

7. Cobol/370 Questions

8. COBOL/370 VSAM Question

9. Cobol/370 Questions

10. S/370 Principles of Operation

11. Q: Free 370 Assembler?

12. IBM system 370

 

 
Powered by phpBB® Forum Software