Next Previous Contents

3.80 em_map

Function

Make a page of extended memory accessible.

Header

em.h

Declaration

void* __fastcall__ em_map (unsigned page);

Description

The function maps one page of extended memory into linear memory and returns a pointer to the page frame. Depending on the hardware and driver, the data is either mapped into the address space or transfered into a buffer. If you don't need the actual contents of the page (for example because you're going to overwrite it completely), it is better to call em_use instead. em_use will not transfer the data if it is possible to avoid that.

Limits

  • Calling em_map will invalidate the memory window, so if you made any changes to the data in the window, call em_commit first, or the changes are lost.
  • The function is only available as fastcall function, so it may only be used in presence of a prototype.
  • The function produces undefined results if no extended memory driver is loaded.

Availability

cc65

See also

em_commit, em_load_driver, em_use

Example

None.


Next Previous Contents