Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> mem byte access to memory pp 205</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson