This function maps a logical page from a plug-in card memory into the physical address page frames. This function operates on 16 KB pages when requested to map into physical pages 0, 1, 2, or 3, and operates on 64 KB pages when requested to map into physical pages 4 or 8.
For physical page numbers 4 and 8, the logical page number must be a multiple of 4 so that the logical page starts on a 64 KB boundary. In this case four consecutive logical pages are mapped into the C or D bank corresponding to physical pages 4 or 8, respectively.
This function can also unmap physical pages, which makes the previously mapped logical pages inaccessible for reading or writing. A physical page is unmapped by setting its associated logical page to FFFFh.
This function is intended to be used by the XIP loader to map XIP code and data into the CPU address space for execution. It is subsequently used to unmap card pages prior to unlocking a port.