ASM 与 结构

来源:互联网 发布:淘宝打不开是怎么回事 编辑:程序博客网 时间:2024/06/06 12:46

struct first_type
{
 char* weasel;
 int same_name;
};
#include <stdio.h>
struct second_type
{
 int wonton;
 long same_name;
};

struct first_type hal;
struct second_type oat;


int main()
{

 __asm
 {
  mov ebx, offset hal;
  mov ecx, hal.same_name;
  mov ecx, hal.weasel;
  mov ecx, [ebx].weasel;
  mov hal.weasel, 20;
  std;
  cld

 }

 printf("%d", hal.weasel);
}
 

原创粉丝点击