Language Environment-conforming assembler

When you use the macros listed in Assembler macros to write your Language Environment-conforming assembler routines, the macros generate code that follows the required register conventions.

On entry into the Language Environment-conforming non-XPLINK assembler main routine, registers must contain the following values because they are passed without change to the CEEENTRY macro:
R0
Undefined
R1
Address of the parameter list, or zero if no parameters are passed
R13
Caller's standard register save area
R14
Return address
R15
Entry point address
On entry into the Language Environment-conforming assembler subroutine, these registers must contain the following values when NAB=YES is specified on the CEEENTRY macro:
R0
Reserved
R1
Address of the parameter list, or zero
R12
Common anchor area (CAA) address
R13
Caller's DSA
R14
Return address
R15
Entry point address
All others
Undefined

On entry into a Language Environment-conforming assembler routine, CEEENTRY loads the caller's registers (R14 through R12) in the DSA provided by the caller. After it allocates a DSA (which sets the NAB field correctly in the new DSA), the first halfword of the DSA is set to hex zero and the backchain is set properly.

At all times while the Language Environment-conforming non-XPLINK assembler routine is running, R13 must point to the routine's DSA.

At call points, R12 must contain the common anchor area (CAA) address, except in the following cases:
  • When calling a COBOL program
  • When calling an assembler routine that is not Language Environment-conforming
  • When calling a Language Environment-conforming assembler routine that specifies NAB=NO on the CEEENTRY macro
On exit from a Language Environment-conforming assembler routine, these registers contain:
R0
Undefined
R1
Undefined
R14
Undefined
R15
Undefined
All others
The contents they had upon entry