Texas Instruments MSP50C6xx Calculator User Manual


 
RAM Overlay
6-11Applications
save_tim2_stat equ save_tim1_a0a + 2 * 1
save_tim2_a0 equ save_tim2_stat + 2 * 1
save_tim2_a0a equ save_tim2_a0 + 2 * 1
;End of RAM
RAMEND_CUSTOMER equ save_tim2_a0a
RAMLENGTH_CUSTOMER equ RAMEND_CUSTOMER
RAMSTART_CUSTOMER
After adding new_var the MAIN_RAM.IRX file would look like this:
;****************************************************************
; MAIN_RAM.IRX
;
; Start of memory for MAIN module is defined in
; include..\ram\ram.irx
;****************************************************************
; General purpose variables
ledpattern equ RAMSTART_CUSTOMER + 2 * 1
keypress equ ledpattern + 2 * 1
tabadr equ leypress + 2 * 1
; Time 1 interrupt variables
save_tim1_stat equ save_tim1_a0a + 2 * 1
save_tim2_a0 equ save_tim2_stat + 2 * 1
save_tim2_a0a equ save_tim2_a0 + 2 * 1
; Time 2 interrupt variables
save_tim2_stat equ save_tim1_a0a + 2 * 1
save_tim2_a0 equ save_tim2_stat + 2 * 1
save_tim2_a0a equ save_tim2_a0 + 2 * 1
; End of RAM
RAMEND_CUSTOMER equ new_var
RAMLENGTH_CUSTOMER equ RAMEND_CUSTOMER
RAMSTART_CUSTOMER
6.4.4 Common Problems
Since the location and size of a variable depends on a previously declared
variable, it is possible to misspell a variable and end up with one or more
variables starting at the wrong address. Therefore, it is worthwhile checking
the MAIN.LST file and searching for RAMSTART_CUSTOMER, to ensure that
all the customer variables are at the proper address.
Also, when modifying MAIN_RAM.IRX or any of the module RAM.IRX files, it
is a good idea to build the project, rather than doing a make.