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> memw word access to memory pp 205</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MEMW                       Word Access to Memory                     pp 205

 Syntax:  MemW [Segment:Offset]

 Type:    Word

 Form:    Function or Procedure

 Purpose: Read or write a word 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
          VideoSeg  : Integer = $B800           ;  { Color video segment   }
          VideoOfs  : Integer = $0000           ;  { Upper left corner     }
       VAR
          VideoData : Integer                   ;  { Video data, attribute }

       BEGIN
          MemW [VideoSeg:VideoOfs] := 80        ;  { Write data, attribute }
          VideoData := MemW [VideoSeg:VideoOfs] ;  { Read data, attribute  }
       END.

See Also: Absolute Addr Cseg Dseg Mem

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