Crossware

Table of Contents        Previous topic       Next topic       

Miscellaneous Features->Check Returns

The simulator keeps track of 8051 call and return statements and can detect if a return has been encountered without any call having been made.  By default it will warn you of this occurrence.  Clear the Check Returns in the Options menu to disable this warning.

In addition, the subroutine return address that is on the stack when RET is encountered is checked against the address from which the subroutine was called.  If the return address is not within 2 or 3 bytes of the CALL address, then a warning is given.  The warning is enabled by default.  Clear the Check Returns option to disable this warning.  In particular if you are manipulating the stack to modify the return address, then you will need to disable this trap.  Also since the C routines setjmp() and longjmp() work by manipulating the stack, then you will need to disable this check to avoid the longjmp() call from being trapped.

A tick next to the item in the menu indicates that warnings will be given.
The setting of this option will apply only to the active 8051 program.  It will be saved in the program status file for this 8051 program and restored when you next load this same program.