USTKX1 - USTACK User Exit

USTKX1 is a user-written routine called before writing the screen and after reading the screen. This means that you can use this exit to perform their own screen I/Os.

In the exit, you can modify the screen buffer and thus build your own map for USTACK. If the exit is called after read processing, the input can be analyzed by the exit; if the exit returns a return code 4, the screen buffer is rebuilt. A DSECT which describes the screen buffer is given to you in the CMUSTK macro.

Because of the heavy use made of USTACK in a running Com-plete system, you must take great care when writing this exit.

This document covers the following topics:


Using USTKX1

When calling the exit before write processing:

The write operation is indicated by a value of 0 in register 0. Register 1 points to the screen buffer described in macro CMUSTK. The exit-call register 15 is then checked for the return code. A return code of 0 means normal write/read processing continues. A return code of 4 means read/write processing is performed by the user exit. The exit is called again with the value of 4 in register 0 to indicate read operation.

When calling the exit after read/write processing:

The read operation is indicated by a value of 4 in register 0. Register 1 points to the screen buffer. The exit-call register 15 is then checked for the return code. A return code of 0 means normal analyzing of the input is performed by USTACK. A return code of 4 means input analysis is skipped, and the screen buffer is rebuilt.

USTKX1 Conventions

Feature Convention
Attributes Size none required.
Registers at entry
Register 0 indicates operation:
 
0 write operation
4 read operation
Register 1 points to screen buffer
Register 13 address of an 18-fullword save area
Register 14 return address in the calling module
Register 15 entry address within USTKX1
Registers at return
Register 15 must have the return code
Register 2 thru' 13 must be unchanged.
Return Codes Register 15
0 normal processing, read/write processing, input analysis performed by USTACK
4 read/write processing performed by user exit, input analysis performed by user exit.