Initializes DOS extended BIOS
Gets Memory Mappers variable table
Pointer to DOS_VarTable structure with information about all available Memory mappers
| bool DOSMapper_Alloc( |
| ) |
Allocates a segment. Implementation of extenpended BIOS's ALL_SEG routine.
| type u8 | Type of segment to allocate. Can be DOS_ALLOC_USER or DOS_ALLOC_SYS |
| slot u8 | Slot to allocate (FxxxSSPP format). You have to or your segment number with those flags: |
DOS_SEGSLOT_THIS Allocate a segment to the specified slot
DOS_SEGSLOT_OTHER Allocate a segment in another slot than the one specified
DOS_SEGSLOT_THISFIRST Allocate a segment to the specified slot if free, otherwise in another slot
DOS_SEGSLOT_OTHERFIRST Allocate a segment in another slot than the one specified if free otherwise try in specified slot
seg - Information about allocated segment
TRUE the segment have been allocated
| bool DOSMapper_Free( |
| ) |
Frees a segment. Implementation of extenpended BIOS's FRE_SEG routine.
| seg u8 | Segment number to free |
| slot u8 | Slot of the Memory mapper |
TRUE the segment have been freed
| inline bool DOSMapper_FreeStruct( |
| ) |
Frees a segment through a structure.
| seg DOS_Segment* | Segment structure (contain segment number and Memory mapper slot) |
TRUE the segment have been freed
| u8 DOSMapper_ReadByte( |
| ) |
Reads byte from given address. Implementation of extenpended BIOS's RD_SEG routine. /!\ Warning: The mapper RAM slot must be selected in page-2 when this routine is called.
| seg u8 | Segment number to read from |
| addr u16 | Address within the segment (0000h~3FFFh) |
Value at the given address
| void DOSMapper_WriteByte( |
| ) |
Writes byte to given address. Implementation of extenpended BIOS's WR_SEG routine. /!\ Warning: The mapper RAM slot must be selected in page-2 when this routine is called.
| seg u8 | Segment number to write at |
| addr u16 | Address within the segment (0000h~3FFFh) |
| val u8 | Value to write |
| void DOSMapper_SetPage( |
| ) |
Selects a segment on the corresponding memory page at the specified address. Implementation of extenpended BIOS's PUT_PH routine.
| page u8 | Page to set the segment |
| seg u8 | Segment number to set |
| void DOSMapper_SetPage0( |
| ) |
Selects a segment on page 0 (0000h~3FFFh). Implementation of extenpended BIOS's PUT_P0 routine.
| seg u8 | Segment number to set |
| void DOSMapper_SetPage1( |
| ) |
Selects a segment on page 1 (4000h~7FFFh). Implementation of extenpended BIOS's PUT_P1 routine.
| seg u8 | Segment number to set |
| void DOSMapper_SetPage2( |
| ) |
Selects a segment on page 2 (8000h~BFFFh). Implementation of extenpended BIOS's PUT_P2 routine.
| seg u8 | Segment number to set |
| u8 DOSMapper_GetPage( |
| ) |
Gets the selected segment number on the corresponding memory page at the specified address. Implementation of extenpended BIOS's GET_PH routine.
| page u8 | Page to get the current selected segment |
Segment number selected on the given page
Gets the segment number on page 0 (0000h~3FFFh). Implementation of extenpended BIOS's GET_P0 routine.
Segment number
Gets the segment number on page 1 (4000h~7FFFh). Implementation of extenpended BIOS's GET_P1 routine.
Segment number
Gets the segment number on page 2 (8000h~BFFFh). Implementation of extenpended BIOS's GET_P2 routine.
Segment number
Gets the segment number on page 3 (C000h~FFFFh). Implementation of extenpended BIOS's GET_P3 routine.
Segment number