Large Data Model Support

The DSP56800E extends the DSP56800 data addressing range, by providing 24-bit address capability to some instructions. 24-bit address modes allow user accesses beyond the 64K-word boundary of 16-bit addressing. To control large data memory model support, use the M56800E Processor panel as shown in the following figure. See DSC Compiler > Processor for explanations of this panel’s elements.

Figure 1. M56800E Processor Panel: Large Data Model
M56800E Processor Panel: Large Data Model

Extended data is data located beyond the 16-bit address boundary — as if it exists in extended (upper) memory. Memory located below the 64K boundary is lower memory.

The compiler default arrangement is using 16-bit addresses for all data accesses. This means that absolute addresses (X:xxxx addressing mode) are limited to 16 bits. Direct addressing or pointer registers load or store 16-bit addresses. Indexed addressing indexes are 16-bit quantities. The compiler treats data pointers as 16-bit pointers that you may store in single words of memory.

Note: There is a known compiler limitation for the default small data model. The data access from 0x8000 to 0xFFFF can result in wrong memory access due to the existing property of 'Index by 16-Bit Displacement: (Rn+xxxx)’ - Address-Register-Indirect Addressing Mode. This is because the address plus offset calculation is actually a signed operation in this mode. To overcome this issue, the -largeAddrInSdm compiler option should be used, if data access above 0x7fff is required with the default small data model. For details, refer -largeAddrInSdm.

Linker support is present to error out with correct help message for data access above 0x7FFF (without -largeAddrInSdm option usage) for small data model cases.

If the large data memory model is enabled, the compiler accesses all data by 24-bit addressing modes. It treats data pointers as 24-bit quantities that you may store in two words of memory. Absolute addressing occurs as 24-bit absolute addresses. Thus, you may access the entire 24-bit data memory, locating data objects anywhere.

You do not need to change C source code to take advantage of the large data memory model.

Examples in DSP56800E assembly code of extended data addressing are: