intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l RESET OPTIONS (VERSION 1.1 ONLY) If these options are still not sufficient to address the needs of a specific application, one other option exists and it functions as follows: After RESET, MCS BASIC-52 initializes the SPECIAL FUNCTION REGISTERS SCON, TMOD, TCON, and T2CON with the following respective values, 5AH, 10H, 54H, and 34H. If the user places the character 0AAH in external CODE MEMORY location 2001H (remember CODE MEMORY is enabled by /PSEN), MCS BASIC-52 will CALL external CODE MEMORY location 2090H immediately after these special function registers are initialized.

No other registers or memory locations will be altered except that the ACCUMULATOR will contain a 0AAH and the DPTR will contain a 2001H. Since MCS BASIC-52 does not write to the above mentioned Special Function Registers at any time except during the RESET or power-up sequence the user has the option of modifying any of the Special Function Registers with this RESET option. Upon returning from this RESET mode, the MCS BASIC- 52 software package will clear the internal memory of the 8052AH and proceed with the RESET routine. The PROG1 through PROG6 options will function as usual.

Now, suppose the user does not want to enter the normal RESET routines, or the user wants to implement some type of "warm" start-up routine. This can be accomplished simple by initializing the necessary Special Function Registers and then jumping back into either MCS BASIC-52's COMMAND mode or RUN MODE. For a warm start-up or RESET (warm means that the MCS BASIC-52 device was RESET, but power was not removed -- i.e. the user hit the RESET button) the following must be initialized: SCON, TMOD, TCON, T2CON, if the user does not want to use the values that MCS BASIC-52 supplies. RCAP2H and RCAP2L must be loaded with the proper baud rate values.

If the user has programmed an EPROM with one of the PROG1 through PROG6 options, the proper baud rate value will be stored in external DATA MEMORY locations 8001H (RCAP2H) and 8002H (RCAP2L). The STACK POINTER (Special Function Register SP) must be initialized with the contents of the STACK POINTER SAVE location, which is in internal DATA MEMORY location 3EH. A MOV SP, 3EH assembly language instruction will accomplish the STACK POINTER initialization. - 147 -