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

  1. /*    POKE(addr, data) -- stores data 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. VOID BPOKE(addr, data)
  9.     BYTES addr;
  10.     INT data;
  11.     {
  12.     IMPORT BYTES base_seg;
  13.     BYTES seg, off;
  14.     TINY x;
  15.  
  16.     if (data < 0 || data > 255)
  17.        xerror(1, "POKE");
  18.     x = data;
  19.     ptr_split(&x, &seg, &off);
  20.         movedata(seg, off, base_seg, addr, 1);
  21.     }
  22.