按书中步骤,新编写LittleEndian.exe
#include "stdafx.h"
#include "windows.h"
BYTE b = 0x12;
WORD w = 0x1234;
DWORD dw = 0x12345678;
char str[] = "abcde";
int main(int argc, char *argv[])
{
byte lb = b;
WORD lw = w;
DWORD ldw = dw;
char *lstr = str;
return 0;
}
之后用OllyDbg打开。调出memory(ALT + m):
进入011D1000,往下翻找到011D1670
观察可知DS:[11D8000]处开始为程序中初始定义的byte字节。
在DUMP窗口跳转至11D8000,发现了定义的数据,为小端序:
网友评论