comparison engine.c @ 16:807141dc5ee8

sysgo fork
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 08 Jul 2018 09:34:34 +0900
parents 2aebc6b17fbf
children e3b08716aa53
comparison
equal deleted inserted replaced
15:bb6a2a9f59f1 16:807141dc5ee8
47 }; 47 };
48 48
49 static Byte mem1(Byte *iphymem, Word adr, Byte *immu) { 49 static Byte mem1(Byte *iphymem, Word adr, Byte *immu) {
50 if ((adr&0xff00)==(IOPAGE&0xff00)) return do_input(adr&0xff); 50 if ((adr&0xff00)==(IOPAGE&0xff00)) return do_input(adr&0xff);
51 Byte *p = mem0(iphymem, adr, immu); 51 Byte *p = mem0(iphymem, adr, immu);
52 if(!(p-phymem>=memsize)) { 52 if(!(p-phymem>=rommemsize)) {
53 return *p; 53 return *p;
54 } else { 54 } else {
55 return 0xff; 55 return 0xff;
56 } 56 }
57 } 57 }
223 Byte ireg; /* instruction register */ 223 Byte ireg; /* instruction register */
224 Byte iflag; /* flag to indicate $10 or $11 prebyte */ 224 Byte iflag; /* flag to indicate $10 or $11 prebyte */
225 Byte tb;Word tw; 225 Byte tb;Word tw;
226 Byte *immu = 0; 226 Byte *immu = 0;
227 #ifdef USE_MMU 227 #ifdef USE_MMU
228 const int imemsize = memsize;
229 Byte *iphymem = (Byte *)phymem; 228 Byte *iphymem = (Byte *)phymem;
230 immu = iphymem + imemsize - 0x10000 + 0xffa0;
231 #endif 229 #endif
232 LOADREGS 230 LOADREGS
233 for(;;){ 231 for(;;){
234 if(attention) { 232 if(attention) {
235 if(tracing && ipcreg>=tracelo && ipcreg<=tracehi) { 233 if(tracing && ipcreg>=tracelo && ipcreg<=tracehi) {