保存桌面快捷方式 - - 设为首页 - 手机版
凹丫丫旗下网站:四字成语大全 - 故事大全 - 范文大全
您现在的位置: 范文大全 >> 理工论文 >> 计算机论文 >> 正文

在DOS实模式下直接存取4GB内存


now
db 0x66,0x0F,0x22,0xC0 //MOV CRO,EAX
//Return Real Mode.
LIDT OldIDT //LIDT OldIDT //Restore IDTR
STI // STI //Enable INTR
}
}
unsigned char ReadByte (unsigned long Address)
{
asm db 0x66
asm mov di,word ptr Address // MOV EDI, Address
asm db 0x67 //32 bit Address Prefix
asm db 0x64 //FS:
asm mov al,byte ptr [BX] // =MOV AL, FS: [EDI]
return -AL;
}
unsigned char WriteByte(unsigned Long Address)
{
asm db 0x66
asm mov di,word ptr Address //MOV EDI, Address
asm db 0x67 //32 bit Address Prefix
asm db 0x64 //FS:
asm mov byte ptr [BX],al //=MOV FS: [EDI],AL
return -AL;
}
//////// Don t Touch Above Code ///
# include <stdio, h>
void Dump4G (unsigned long Address)
{
int i;
int j;
for (i=0; i<20; i++)
{
printf (“%081X: ”, (Address+i*16));
for (j=0; j<16;j++)
printf ("% 02X" ,ReadByte (Address+i*16+j));
printf (" ");
for (j=0;j<16;j++)
{
if (ReadByte (Address+i*16+j) <0x20) printf (" . ");
else printf (" %C

", ReadByte (Address+i*16+j));
}
printf ("\n");
}
}
main ()
{
unsigned long Address=0;
unsigned long tmp;
LoadFSLimit4G ();
printf ("====Designed By Southern. 1995.7.17====\n");
printf (" Now you can Access The Machine All 4G Memory.\n");
printf (" Input the Start Memory Physical to DUMP. \n");
printf (" Press D to Cuntinue DUMP, 0 to End & Quit, \n");
do {
printf ("-");
scanf ("%IX", &tmp);
if (tmp==0x0d) Address+=(20*16);
else Address=tmp;
Dump4G (Address);
}while (Address !=0);
return 0;
}

(作者地址:珠海巨人集团电脑排版公司)

《在DOS实模式下直接存取4GB内存(第3页)》
本文链接地址:http://www.oyaya.net/fanwen/view/172494.html

★温馨提示:你可以返回到 计算机论文 也可以利用本站页顶的站内搜索功能查找你想要的文章。