home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / lynxlib / peekpoke.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-23  |  726 b   |  21 lines

  1. /* This source file is part of the LynxLib miscellaneous library by
  2. Robert Fischer, and is Copyright 1990 by Robert Fischer.  It costs no
  3. money, and you may not make money off of it, but you may redistribute
  4. it.  It comes with ABSOLUTELY NO WARRANTY.  See the file LYNXLIB.DOC
  5. for more details.
  6. To contact the author:
  7.     Robert Fischer \\80 Killdeer Rd \\Hamden, CT   06517   USA
  8.     (203) 288-9599     fischer-robert@cs.yale.edu                 */
  9.  
  10. #include <stddef.h>
  11.  
  12. poke_ibm(addr, val)
  13. /* Byte-reverses val, and puts it into address addr, even an odd address */
  14. BYTE *addr;
  15. WORD val;
  16. {
  17.     *addr++ = val & 0xFF;
  18.     *addr = (val >> 8);
  19. }
  20. /* ------------------------------------------------------------- */
  21.