home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / directry / mv / peek.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  887 b   |  23 lines

  1. /*
  2.   8-Sep-86 15:59:17-PDT,818;000000000000
  3.   Return-Path: <pwu@unix.macc.wisc.edu>
  4.   Received: FROM UNIX.MACC.WISC.EDU BY B.ISI.EDU WITH TCP ; 8 Sep 86 15:45:12 PDT
  5.   Received: by unix.macc.wisc.edu;
  6.             id AA04988; 4.12/5; Mon, 8 Sep 86 17:32:13 cdt
  7.   Date: Mon, 8 Sep 86 17:32:13 cdt
  8.   From: Peter Wu <pwu@unix.macc.wisc.edu>
  9.   Message-Id: <8609082232.AA04988@unix.macc.wisc.edu>
  10.   To: info-ibmpc-request@mosis
  11.   Subject: peek.h
  12. */
  13. /* pseudo functions to peek/poke byte or word. Written by Peter Wu. 6/5/86.
  14. ** Use /ze option when compiling.
  15. */
  16.  
  17. #define acc(seg,off) ((long) (seg) << 16 | (unsigned short) (off))
  18. #define peekb(seg,off) (*(unsigned char far *)acc(seg,off))
  19. #define pokeb(seg,off,val) (*(char far *)acc(seg,off) = (val))
  20. #define peekw(seg,off) (*(short far *)acc(seg,off))
  21. #define pokew(seg,off,val) (*(short far *)acc(seg,off) = (val))
  22.  
  23.