[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MEM                        Byte Access to Memory                     pp 205

 Syntax:  Mem [Segment:Offset]

 Type:    Byte

 Form:    Function or Procedure

 Purpose: Read or write a byte to memory.

 Notes:   The index must be in Segment:Offset format where segment and
          offset are of type Integer.  Variables and standard identifiers
          such as Cseg, Dseg can be used in the index.



 ----------------------------------------------------------------------------



 Usage:
       CONST
          BiosSeg   : Integer = $0040   ;       { BIOS data segment     }
          BiosOfs   : Integer = $0017   ;       { Screen width offset   }
       VAR
          Width     : Byte ;                    { Screen width variable }

       BEGIN
          Mem [BiosSeg:BiosOfs] := 80    ;      { Set cols width = 80   }
          Width := Mem [BiosSeg:BiosOfs] ;      { Read screen columns   }
       END.

See Also: Absolute Addr Cseg Dseg MemW
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson