This document is intended for evaluation of the setup for documentation.
Please e-mail us any comments you may have.
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.
View the complete list of defined field types .
This document contains the following chapters:
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.
|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|
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.
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.
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.
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.
The CPY macro is written as follows:
|name||name: Symbol. Begin name in column 1.|
|One or more blanks must precede 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|
If NOWARN is specified, no warning is issued when a copy-to-self operation is discarded.
The parameters are explained as follows:
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
Currently not in maintenance
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.
|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!|
[ Join Now | Ring Hub | Random | | ]