我现在要把我在PPAGE中某页的程序内容读出来放到RAM里边去,我如何定义一个变量读出PPAGE的内容?例如我要读PPAGE=0x3E(是在Page 窗口中的0X3E页,我以0X3E举例))的内容.下面这样做是否可以,先定义unsigned long * __pptr myppagePointer然后在程序中如下:
PPAGE=0x3E p_int=(volatile unsigned int *)0x8000; while(p_int<(volatile unsigned int *)0xBFFF) {
bufferint[0] = *(p_int+0); bufferint[1] = *(p_int+1); bufferint[2] = *(p_int+2); bufferint[3] = *(p_int+3); bufferint[4] = *(p_int+4); bufferint[5] = *(p_int+5); bufferint[6] = *(p_int+6); bufferint[7] = *(p_int+7); PPAGE=page-0x20;
*(p_int+0) = bufferint[0]; *(p_int+1) = bufferint[1]; *(p_int+2) = bufferint[2]; *(p_int+3) = bufferint[3]; *(p_int+4) = bufferint[4]; *(p_int+5) = bufferint[5]; *(p_int+6) = bufferint[6]; *(p_int+7) = bufferint[7]; p_int=p_int+8;
} 期待高手回复. |