// Macros for reading/writing from/to memory // coded by Scott Evans 7/4/97 // last modified 7/4/97 #ifndef _RWMEM_H #define _RWMEM_H #include // read from memory location 'addr' #define _peekByte(addr) (*(_byte *)(addr)) // read 8 bits #define _peekWord(addr) (*(_word *)(addr)) // read 16 bits #define _peekLong(addr) (*(_long *)(addr)) // read 32 bits // Write to memory location 'addr' the value 'val' #define _pokeByte(addr,val) *(_byte *)(addr)=(val) // write 8 bits #define _pokeWord(addr,val) *(_word *)(addr)=(val) // write 16 bits #define _pokeLong(addr,val) *(_long *)(addr)=(val) // write 32 bits #endif