[comp.lang.asm370] Opsyn

OEYO8729@TREARN.BITNET (Cem Turgay) (06/09/89)

>  can anyone tell me what 'opsyn' is used for?  it seems to me that a
>  way  to  redefine  (or  undefine)  standard  opcodes  would  create
>  maintenance problems.

Opsyn  is the  assembler command.   You can  use it  for make  your user
synonyms of  the assembly commands and  it makes very clear and readable
your assembly  sources.  I use it  most of my programs.   I'll give some
examples...

MVC      OPSYN MOVE
L        OPSYN LOAD
B        OPSYN JUMP
..       ..
..       ..
         LOAD  R2,=F'1'
         MOVE  FIRST,SECOND
         JUMP  GOOUT
..       ..

********************************************************don't*worry*****
* Agean University      *       Cem Turgay         *     *   *   *     *
* Computer Research &   *   OEYO8729 @ TREARN      *   *     *     *   *
* Practice Center       *     Izmir - TURKEY       *   *   * * *   *   *
* Computer programming  ****************************   *  *  *  *  *   *
* student.              * I know that I don't know *     *   *   *     *
***********************************************************be*happy*****

OEYO8729@TREARN.BITNET (Cem TURGAY) (06/13/89)

> Arrggghhh. How can you ever use IBM-supplied macros if you do this ???

Sorry, but we haven't Ibm supplied macros JUMP, MOVE or LOAD !!!
I can use that optional synonyms very effective...

                                     Cem Turgay Oeyo8729@Trearn

LDW@USCMVSA.BITNET (Leonard D Woren) (06/13/89)

> > Arrggghhh. How can you ever use IBM-supplied macros if you do this ???
>
> Sorry, but we haven't Ibm supplied macros JUMP, MOVE or LOAD !!!
> I can use that optional synonyms very effective...

That's not what I meant.  What happens when you use an IBM-supplied
macro that GENERATES the real opcodes, and you have OPSYN'd them out
of existance?

OEYO8729@TREARN.BITNET (Cem TURGAY) (06/14/89)

#1 > Arrggghhh. How can you ever use IBM-supplied macros if you do this ??
   >
#2 > Sorry, but we haven't Ibm supplied macros JUMP, MOVE or LOAD !!!
   > I can use that optional synonyms very effective...
   >
#3 > That's not what I meant.  What happens when you use an IBM-supplied
   > macro that GENERATES the real opcodes, and you have OPSYN'd them out
   > of existance?

So sory, I missunderstand your one line question. (my bad English) 8-|
I meant that synonyms are optional.  When you define your Opsyn, you can
use both of real opcode and synonym opcode.  You can also use Ibm macros
without worry.

Example,

MOVE     OPSYN MVC
         USING *,15
         MOVE  BUFF(8),=CL8'CEM'
         MVC   BUFF+8(8),=CL8'TURGAY'
         WRTERM BUFF,80
         BR    14
BUFF     DS    CL80
         END

********************************************************don't*worry*****
* Agean University      *       Cem Turgay         *     *   *   *     *
* Computer Research &   *   OEYO8729 @ TREARN      *   *     *     *   *
* Practice Center       *     Izmir - TURKEY       *   *   * * *   *   *
* Computer programming  ****************************   *  *  *  *  *   *
* student.              * I know that I don't know *     *   *   *     *
***********************************************************be*happy*****

MICHAEL@MAINE.BITNET (Michael Johnson) (06/16/89)

There is one very good reason that I can think of NOT to use the OPSYN
directive in the way that you, Cem, suggest. This is the simple fact that by
so doing you are probably going to make it immensely difficult for anyone to
later understand and successfully enhance your code, should that ever be
necessary.

One of the cardinal rules of good programming is that you should not use
obscure tricks if you don't have to and if you do have to, you should explain
as fully as you can what you are doing. I dare say renaming the opcodes of
the 370 instruction set counts as an unnecessary trick.

Michael Johnson                           "We are the Priests of the Temples
University of Maine System                 of Syrinx. Our great computers fill
Computing and Data Processing Services     the hallowed halls." - Neil Peart