#include <stdio.h>

void main()

{

int a=98;

__asm

{

    mov al,a

    and al,11011111B

    mov a,al

}

printf("%c\n",a);

}

编译出现下面的错误:

--------------------Configuration: cc - Win32 Release--------------------

Compiling...

cc.cpp

D:\soft\VC\MyProjects\cc\cc.cpp(8) : error C2443: operand size conflict

D:\soft\VC\MyProjects\cc\cc.cpp(10) : error C2443: operand size conflict

Error executing cl.exe.



cc.exe - 2 error(s), 0 warning(s)

原因:

是编译出错。

类型冲突:

C/C++ code

?

1
2
3
4
5
6
7
8
9
10
11
12
#include   <stdio.h> 
void   main() 
int   a=98;     //int类型一般是32位,你把a定义成8位的 char型
__asm 
        mov   al,a  //因为这里你引用的是8位长的 al寄存器
        and   al,11011111B 
        mov   a,al 
printf("%c\n",a); // 这里也需要是char类型的参数

error C2443: operand size conflict的更多相关文章

  1. Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D

    Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...

  2. Solution for Latex error: "Cannot determine size of graphic"

    I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex h ...

  3. Fatal error: Allowed memory size of 8388608 bytes exhausted

    这两天安装bugfree,更换了一个数据量较大的库,结果打开bug详情页要么是空白页,要么就报如题的错误,错误信息还包括C:\wamp\www\bugfree\Include\Class\ADOLit ...

  4. Error response from daemon: conflict: unable to remove repository reference 解决方案

    由于前一章演示用的镜像没什么用准备删除 docker image rm hello-world:latest Error response from daemon: conflict: unable ...

  5. *** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED

    *** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED 在软件已经执行破解仍然出现,是因为工程是破解前建立的,要先执行 ...

  6. 解决访问 jar 包里面的字体报错:OTS parsing error: incorrect file size in WOFF header

    前言:jar 包里面的字体加载,浏览器 console 中报警告信息,这里记录一下解决方案. 附:自己的一个 jar 包源码 https://github.com/yuleGH/querydb 错误问 ...

  7. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)

    一段PHP程序执行报错: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261181 ...

  8. error: Allowed memory size

    错误提示 error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in D:\www\Th ...

  9. Double prefix overrides to provide 16-bit operand size in a 32/64 operating mode

    A processor supports an operating mode in which the default address size is greater than 32 bits and ...

随机推荐

  1. INNODB存储引擎之缓冲池

    以下的资料总结自:官方文档和<MySQL技术内幕-INNODB存储引擎>一书. 对INNODB存储引擎缓冲池的那一段描述来自博文:http://www.ywnds.com/?p=9886说 ...

  2. Minimum Snap轨迹规划详解(3)闭式求解

    如果QP问题只有等式约束没有不等式约束,那么是可以闭式求解(close form)的.闭式求解效率要快很多,而且只需要用到矩阵运算,不需要QPsolver. 这里介绍Nicholas Roy文章中闭式 ...

  3. JZOI1134 迷宫(maze)

    #include <bits/stdc++.h> #define ll long long #define INF 2147483647 #define mem_INF 213906214 ...

  4. C语言新手写扫雷源代码

    今天发布源代码,由于写在一个文件里非常乱,所以分三个文件写 绘图和鼠标函数graph.h /*绘图与鼠标相关函数*/ #include<graphics.h> #include <e ...

  5. 在Windows的控制台和Linux的终端中显示加载进度

    Windows中 #include <stdio.h> #include <windows.h> int main() { ;//任务完成总量 int i; ; i < ...

  6. jQuery 对文档的操作

    通过jquery方式实现页面各种节点的追加.修改.删除.复制等操作 节点追加 1 父子关系追加 /*************************************************** ...

  7. 调试Bochs在Linux Mint下面symbol not found的问题

    在我的Linux Mint上使用Bochs时出现了很奇怪的问题,按照http://www.cnblogs.com/long123king/p/3568575.html步骤 会提示: symbol no ...

  8. response和ServletContext和乱码问题

    服务器端以/开始就代表当前项目名客户端必须以 /项目名/资源 才能定位到资源 软件与软件之间,以字符为标准传递,传递字节,接收端自己按原来的编码集编码之后再按照自己的编码集解码编码(如果没有对应字符, ...

  9. vim对行进行排序

    vim自带排序函数sort, 在命令行模式下执行:help sort 可查看其具体用法,摘录如下: Vim has a sorting function and a sorting command. ...

  10. WSGI是什么?

    WSGI是什么? WSGI,全称 Web Server Gateway Interface,或者 Python Web Server Gateway Interface ,是为 Python 语言定义 ...