home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 6.ddi / LIB / PEEK.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-09-11  |  366 b   |  19 lines

  1. /*    PEEK(addr) -- returns the contents of the byte at addr in the data segment
  2.  
  3.         Copyright (c) 1983, 1984  by  JMI Software Consultants, Inc.
  4.  */
  5.  
  6. #include "acom.h"
  7.  
  8. INT BPEEK(addr)
  9.     BYTES addr;
  10.     {
  11.     IMPORT BYTES base_seg;
  12.     BYTES off, seg;
  13.     TINY x;
  14.  
  15.     ptr_split(&x, &seg, &off);
  16.         movedata(base_seg, addr, seg, off, 1);
  17.     return (x & 0xff);
  18.     }
  19.