next up previous contents index
Next: I/O port access Up: Protected mode memory organization Previous: FPC specialities

DOS memory access

DOS memory is accessed by the predefined DOSmemselector selector; the GO32 unit additionally provides some functions to help you with standard tasks, like copying memory from heap to DOS memory and the likes. Because of this it is strongly recommened to use them, but you are still free to use the provided standard memory accessing functions which use 48 bit pointers. The third, but only thought for compatibility purposes, is using the mem[]-arrays. These arrays map the whole 1 Mb DOS space. They shouldn't be used within new programs.

To convert a segment:offset real mode address to a protected mode linear address you have to multiply the segment by 16 and add its offset. This linear address can be used in combination with the DOSMEMSELECTOR variable.

See also: dosmemget, dosmemput, dosmemmove, dosmemfillchar, dosmemfillword, mem[]-arrays, seg_move, seg_fillchar, seg_fillword.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998