CPY - CoPY register contents

Remark 1:
This document is intended for evaluation of the setup for documentation.
Please e-mail us any comments you may have.

Remark 2:
The final version of this document will also describe all other features of the CPY macro: storage-to-register, register-to-storage, storage-to-storage and type checking.

Remark 3:
View the complete list of defined field types .

This document contains the following chapters:

1.0 Description

The CPY macro will copy the contents of a register unchanged to another register as follows:

If the source and destination register are the same, the operation is discarded (i.e. no code is generated) and, unless suppressed by the NOWARN option, a warning is issued.

1.1 Environment

The requirements for the caller are:
Minimum authorization Problem state with any PSW key
Dispatchable unit mode Task or SRB
Cross memory mode any HASN, any PASN, any SASN
AMODE 24- or 31- bit
ASC mode Primary or access register (AR)
Interrupt status Enabled or disabled for I/O and external interrupts
Locks The caller may hold locks, but is not required to hold any
Control parameters Not applicable

1.2 Programming Requirements

The registers must have a type code of 'g' for general purpose registers, 'a' for access registers, or 'f' for floating point registers. The preferred way to achieve this is to start your program with the PGM macro, or to define all registers by invoking the MAPREGS macro. EQUating a symbol to one of the MAPREGS-defined registers using the EQU macro also has the desired effect.

1.3 Restrictions

The CPY macro does not support:

The CPY macro always generates reenterable and refreshable code. List and execute forms for the CPY macro are not supported.

1.4 Input Register Information

Before issuing the CPY macro, the caller does not have to place any information into any register unless using it as a source for the CPY operation.

1.5 Output Register Information

When control returns to the caller, the general purpose registers (GPRs) are unchanged, except when a general purpose register is specified as the target of the CPY operation.

When control returns to the caller, the access registers (ARs) are unchanged, except when an access register is specified as the target of the CPY operation.

1.6 Performance Implications

None.

1.7 Syntax

The CPY macro is written as follows:


name name: Symbol. Begin name in column 1.
One or more blanks must precede CPY.
CPY
One or more blanks must follow CPY.

destination Destination register: R0-R15, AR0-AR15, FPR0, FPR2, FPR4, FPR6
,source Source register: R0-R15, AR0-AR15, FPR0, FPR2, FPR4, FPR6
,NOWARN Default: blank
If NOWARN is specified, no warning is issued when a copy-to-self operation is discarded.

1.8 Parameters

The parameters are explained as follows:

destination
The destination register for the copy operation. May be any of the general purpose, access, or floating point registers.
,source
The source register for the copy operation. May be any of the general purpose, access, or floating point registers.
,NOWARN
When an operation is suppressed, due to destination and source registers being the same, a warning message is issued, unless the NOWARN option has been specified. If specified, the warning message is suppressed; the operation, however, is discarded irrespective of the NOWARN parameter.

1.9 Abend Codes

None.

1.10 Return and Reason Codes

None.

1.11 Examples

Some CPY examples are:

         MAPREGS ,                      * Define all registers
RDCB     EQU   R2                       * Define ptr to DCB
ARDCB    EQU   AR2                      * and ALET for DCB

SAMP1    CPY   R1,AR5                   * Copy ALET from AR5 to GPR1

SAMP2    CPY   R2,R1                    * Copy value from GPR1 to GPR2

SAMP3    CPY   R2,RDCB                  * Copy DCB pointer?
+*MNOTE 4,'Copy to self not useful: ignored'

SAMP4    CPY   R2,RDCB,NOWARN           * Equally useless, without
  warning

2 Miscellaneous

2.1 Wish List

2.2 Maintenance Status

Currently not in maintenance

2.3 Source Code

Source code of macro CPY is available for reference only.
Any other use is licensed under the GPL.
For other licenses, please e-mail us.


Please e-mail us with your comments. Thanks in advance.

To our homepage.

 

This site is a member of WebRing.
You are invited to browse the list of mainframe-loving sites.
Running
    Tyrannosaurus Rex Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years!
Dinos and other anachronisms
[ Join Now | Ring Hub | Random | << Prev | Next >> ]