24.12.2013 Views

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APRENB [CALLI 16]<br />

NOTES<br />

o If your trap-servicing routine<br />

instruction<br />

JRSTF @.JBTPC<br />

contains<br />

the<br />

the processor bits are cleared and the stat~ of<br />

the CPU is restored; control resumes where the<br />

interrupt occurred.<br />

o<br />

The APRENB monitor call clears the trap after an<br />

occurrence of any selected condition; therefore<br />

your program must call APRENB after each trap<br />

occurs.<br />

o To enable repeated trap interceptions, your<br />

program should set AP.REN (bit 18) when executing<br />

the APRENB call; however, clock interrupts must be<br />

reenabled after each trap occurs.<br />

o<br />

If your<br />

overflow<br />

but the<br />

fatal errors.<br />

program does not enable for traps,<br />

conditions and clock ticks are ignored,<br />

other conditions listed above produce<br />

EXAMPLE<br />

OVERFL:<br />

CONTIN:<br />

MOVE I<br />

MOVEM<br />

MOVE I<br />

APRENB<br />

JRST<br />

OUTSTR<br />

JRSTF<br />

TI,OVERFL ;Get address of overflow handler<br />

TI, .JBAPR ;Put into .JBAPR<br />

TI,AP.AOV ;Arithmetic overflow flag<br />

TI, ;To .JBAPR on arith ovflw<br />

CONTIN iOn to something else<br />

[ASCIZ /ARITHMETIC OVERFLOW ERROR/]<br />

@.JBTPC ;Resume execution<br />

;Something else<br />

This code sequence sets up an overflow. message for the first<br />

arithmetic overflow; note that this example will not handle more than<br />

one arithmetic overflow.<br />

COMMON PROGRAMMING ERRORS<br />

o<br />

o<br />

Not reenabling the interrupt after each trap has occurred.<br />

Failing to set up .JBAPR prior to the APRENB call.<br />

RELATED CALLS<br />

o<br />

o<br />

PISYS.<br />

UTRP.<br />

22-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!