MON960 R1.1 calls the system calls appl_exit_user (system procedure table entry number 258) and appl_go_user (system procedure table entry number 259) when taking control from and returning control to an application program. The application might use these routines to disable a real-time clock while the application is not running. These routines are documented on page 4-20 of the MON960 Debug Monitor User's Guide (order number 484290-002). This article provides an example of how an application can replace the monitor provided system call stubs with its own routines.
The following example has been tested on the EV80960SX Evaluation Board.
To replace the monitor provided stubs appl_exit_user and appl_go_user, you must replace their addresses in the System Procedure Table (SPT) with the addresses of the application's routines which will replace them. The address of the system procedure table is found by performing a Store System Base IAC (see page 11-8 of i960(R) SA/SB Microprocessor Reference Manual, order number 270929-003) which will return the addresses of System Address Table and the PRCB. The System Address Table (SAT) contains the address of the SPT at an offset of 120 bytes into the table (see page 3-10 of the i960(R) SA/SB Microprocessor Reference Manual, order number 270929-003). The SPT entries 258 and 259 are replaced with the addresses of the application's routines. In this example, the replacement routines change the LED display in the board to 8 when the monitor has control and to A when the application has control of the processor.
Note that if you are using the i960 CA/CF microprocessor, the set_prcb( ) procedure call in MON960 will reset the System Procedure Table entries to point to the monitor-provided stub routines. Calling set_prcb( ) is described in the MON960 User's Guide pages 4-2 and 4-4, and is only necessary if and when you subsequently reinitialize the processor with a sysctl. [This does not affect the i960 KA/KB or i960 SA/SB microprocessors because the system procedure table is not accessed through the PRCB and set_prcb( ).]
Legal Stuff © 1997 Intel Corporation