1 /**
2  ** mempeek.h ---- (far) memory read/write operations
3  **                Watcom-C++ code
4  **
5  ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221
6  ** [e-mail: csaba@vuse.vanderbilt.edu]
7  **
8  ** This file is part of the GRX graphics library.
9  **
10  ** The GRX graphics library is free software; you can redistribute it
11  ** and/or modify it under some conditions; see the "copying.grx" file
12  ** for details.
13  **
14  ** This library is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  **
18  ** Basic memory peek and poke operations in byte, word and long sizes.
19  ** The poke operations are available in WRITE, XOR, OR and AND versions.
20  **
21  **/
22 
23 /* candidate for speed ups */
24 #define __INLINE_STD_PEEK__(P,S,T)        (*((unsigned T *)(P)))
25 #define __INLINE_STD_POKE__(P,V,OP,I,S,T) ((*((unsigned T *)(P))) OP (V))
26 
27 #define __INLINE_FAR_PEEK__(P,S,T)        (*((volatile unsigned T *)(P)))
28 #define __INLINE_FAR_POKE__(P,V,OP,I,S,T) ((*((volatile unsigned T *)(P))) OP (V))
29