00001
00002
00003
00004
00005
00006
00007
00008 #include "copyright.h"
00009
00010
00011 #define MEMSIZE (1<<24)
00012 #define memoffset 0x10000000
00013
00014
00015 #define amark(x) x
00016 #define imark(x) x
00017
00018 #define ifetch(addr) (*(int *)(int) (&(mem-memoffset)[imark(addr)]))
00019 #define fetch(addr) (*(int *)(int) (&(mem-memoffset)[amark(addr)]))
00020 #define sfetch(addr) (*(short *)(int) (&(mem-memoffset)[amark(addr)]))
00021 #define usfetch(addr) (*(unsigned short *)(int)(&(mem-memoffset)[amark(addr)]))
00022 #define cfetch(addr) (*(char *)(int) (&(mem-memoffset)[amark(addr)]))
00023 #define ucfetch(addr) (*(unsigned char *)(int)(&(mem-memoffset)[amark(addr)]))
00024
00025 #define store(addr, i) \
00026 ((*(int *)(int) (&(mem-memoffset)[amark(addr)]) = (i)))
00027 #define sstore(addr, i) \
00028 ((*(short *)(int) (&(mem-memoffset)[amark(addr)]) = (i)))
00029 #define cstore(addr, i) \
00030 (((mem-memoffset)[amark(addr)] = (i)))
00031
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees