3.2.5 Systems with Indirect Access to the Data File
These systems access programming data indirectly via a paging mechanism. Paging is a method of copying a certain range of data from the memory containing the data file and pasting it into a limited size memory buffer that DirectC can access.
To implement paging:
- Enable the
USE_PAGING
compiler option. - Define
Page_buffer_size
. The minimum buffer size is 16 bytes. - Modify the
dp_get_page_
data function.
This function copies the requested data from the external memory device into the page buffer. See Data File Bit Orientation for additional information. For correct operation:
- Fill the entire page buffer unless the end of the image is reached. See Data File Format.
- Update
return_bytes
to reflect the number of valid bytes in the page.
dp_get_data
function. The
dp_get_data
function calculates the relative address location of
the requested data and checks, if it already exists in the current page data. The paging
mechanism is triggered, if the requested data is not within the page buffer.