F
fazulu deen
Hi all,
pls check the following statements:
unsigned h, i=0;
FILE *fp = fopen("jump.txt","r");
if(fp)
{
while(!feof(fp))
{
fscanf(fp,"%x", &h);
mem_opcode[i++] = h;
}
}
else
printf("Can not open %s file\n","jump.txt");
}
j = 0x7fff8;
for(i = 0; i < 17; i = i + 2)
{
ram_ev[j] = mem_opcode;
j = j + 1;
}
j = 0x7fff8;
for(i = 1; i < 17; i = i + 2)
{
ram_od[j] = mem_opcode;
j = j + 1;
}
}
or example if iam having hexdata in jump file as
b8
f0
ff
8e
d8
Note:
mem_opcode[256]
ram_od[1048577]
ram_ev[1048577]
all the above are declared as two dimemsional array...
from location 7ff8 it is reading b8 ff d8.. (only even content)
wats wrong with the code....why it is not reading odd memory content
kindly give the suggestion...
regards,
fazal
pls check the following statements:
unsigned h, i=0;
FILE *fp = fopen("jump.txt","r");
if(fp)
{
while(!feof(fp))
{
fscanf(fp,"%x", &h);
mem_opcode[i++] = h;
}
}
else
printf("Can not open %s file\n","jump.txt");
}
j = 0x7fff8;
for(i = 0; i < 17; i = i + 2)
{
ram_ev[j] = mem_opcode;
j = j + 1;
}
j = 0x7fff8;
for(i = 1; i < 17; i = i + 2)
{
ram_od[j] = mem_opcode;
j = j + 1;
}
}
or example if iam having hexdata in jump file as
b8
f0
ff
8e
d8
Note:
mem_opcode[256]
ram_od[1048577]
ram_ev[1048577]
all the above are declared as two dimemsional array...
from location 7ff8 it is reading b8 ff d8.. (only even content)
wats wrong with the code....why it is not reading odd memory content
kindly give the suggestion...
regards,
fazal