VAX Internal Processor Registers
MacVAX


These registers are accessed using the mtpr and mfpr instructions.


MVCR
0x29 The MacVAX Command Register. (Read Only)

Commands from MacVAX to the VAX OS running on MacVAX are placed in this register. The VAX OS may only read this register. Currently The following are known commands.

MVCS
0x2A The MacVAX Command Status Register (Read/Write)

The MVCS is a read/write register that contains control and status information for the MacVAX / System interface. If the MVCS interrupt enable bit is set by software, an interrupt, at IPL 23 through vector V_MACVAX, (SCBB+0xE0), is generated when INT becomes set. If INT is already set and the software sets the interrupt enable bit, an interrupt is generated. The Error bit is set if the INT bit was set when MacVAX put a command in the MVCR (ie. on overflow). The INT and Error bits must be cleared, by the interrupt service routine, by writing a 1 to the bits with a mtpr instruction (donŐt forget to set the IE bit as writing a 0 will clear this bit).

MVPID
0x2B The MacVAX Process ID (Read/Write)

The MVPID holds a process identifier used by MacVAX to match the current P0 process with its symbol table. The process identifier is set by the VAX OS by using the xfc, CREATE_SYS_SYMBOL_TABLE. The OS may change the current process identifier by writing to the MVPID register with a mtpr or through the xfc, USE_USER_SYMBOL_TABLE. A svpctx will save the contents of this register in the long following the PCB (offset of PCB_PID 0x60). A ldpctx will restore the contents of the MVPID from the long following the PCB. (see also xfc #SYSTEM).

MVMEM
0x2C MacVAX Available Memory (Read Only)

The MVMEM is a read only register holding the number of bytes of VAX Physical memory allocated by MacVAX at startup. This figure cannot be changed by the user.

KFP
0x32 Kernel Frame Pointer (Read Only)
EFP
0x33 Executive Frame Pointer (Read Only)
SFP
0x34 Supervisor Frame Pointer (Read Only)
UFP
0x35 User Frame Pointer (Read Only)
IFP
0x36 Interrupt Frame Pointer (Read Only)

A VAX process has four frame pointers. A normal VAX processor does not have these registers as they are not necessary. The frame pointer, (FP), is changed on procedure entry by a calls or callg instruction and on procedure exit by a ret instruction.

MacVAX uses these registers to help it display frames in the Stack Window . They are not used for any other purpose. They are saved and restored on process context switches at the following offsets off of the PCBB:

PCB_KFP 0x64
PCB_EFP 0x68
PCB_SFP 0x6C
PCB_UFP 0x70