gtpm1m1rTPF V4R1 Migration Guide: 3.1 to 4.1

Macro Decoder and SVCs

In the TPF 4.1 system, 255 SVCs are allocated for use and 32 of these are reserved for your use. In addition, a new level of support is introduced in which two SVC entries (one for IBM and one for your use) can be reserved to support a second-level structure. With this secondary or indexed structure, an additional 32,767 macros can be defined. The macro decoder table uses the same primary supervisor call (SVC) table with 256 entries, which includes pointers to secondary SVC tables. SVCs in the secondary tables are called secondary or indexed SVCs, and are specified by adding a halfword index number to the SVC instruction.

The fast-link macro decoder service is unchanged but 100 entries are reserved for your use. In addition to the 32 SVC numbers, 100 fast link entries are reserved for your use.

A new set of macros allows you to define and maintain data in the primary and secondary SVC tables.

Macro Name
Description

 CFISVC 
Returns the address of an SVC entry in the primary or secondary SVC table

 CRESVC 
Creates an entry in a macro information table

 IBMSVC 
Contains the IBM CRESVC calls

 USRSVC 
Contains user CRESVC calls.

See Defining SVCs for information about how to migrate your SVC entries.

The TPF 4.1 system supports the monitor call (MC) instruction for select macros (the SNAPC, $MONTC, and $RECVC macros) to allow transfer of control without damaging the register save area of the ECB.

Defining SVCs

Changes to SVC definition and structures are described in Macro Decoder and SVCs.

Up to 32,767 secondary SVCs and odd SVCs are now supported, and there is a new method for adding SVCs to the TPF 4.1 system. All new and existing SVCs must be added to the SVC tables using the CRESVC macro.

To Add New (Or Existing) SVCs to the TPF 4.1 System

  1. Code the SVC service routine and the macro that starts the service routine. The SVC service routine should be in a copy member that is called by CCUEXT.
  2. Code a CRESVC macro for each of these SVCs and place these calls into USRSVC. (USRSVC will use these entries to generate the macro decoder table and your secondary SVC tables.)
  3. Assemble CCMCDC.
  4. Link to CPS0 and STPP.

The CRESVC macro defines an SVC or fast-link macro to the TPF 4.1 system and adds the macro definition to the primary, indexed, or fast-link macro tables. Use the CKMAC parameter to specify the type of authorization (common block, key 0, MONTC, or restricted) required for specific macros.

The new CFISVC macro is used to access information in the macro information tables. The ISV0SV data macro maps the fields in the table entries.