#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. C/C++ 16进制转字符串,字符串转16进制 EX

    { int Encryption::HexToStr(char *Hex) { ; ; ] = { }; ] >= ] <= ') { buf[] = Hex[]; _0 = atoi(b ...

  2. Nginx缓存配置指南

    1.如何配置基本缓存设置 开启简单的缓存配置,只需要两个指令:proxy_cache_path和proxy_cache.proxy_cache_path配置缓存的存放地址和其他的一些常用配置,prox ...

  3. word文档操作

    1.如何把word文档修改的地方标记出来   :  https://zhidao.baidu.com/question/73648149.html 2.word 的几种 视图:https://zhid ...

  4. H5项目(基于vue框架)常见问题及注意事项

    参考: https://blog.csdn.net/u012377333/article/details/52326158 1.前端中所有的按钮,点击后发送报文的标签,都必须加上 去重功能.防止重复发 ...

  5. LIBRARY_PATH是编译时候用的,LD_LIBRARY_PATH是程序运行是使用的

    LD_LIBRARY_PATH与LIBRARY_PATH的区别 看起来很像,但是完全是两码事. LIBRARY_PATH is used by gcc before compilation to se ...

  6. JS互相调用

    JS互相调用 例1: <html> <head> <meta charset="UTF-8"> <script type="te ...

  7. SVN工作副本已经锁定错误的解决方法

    SVN工作副本锁定错误的解决方法 我们在使用svn版本控制软件时,时常会遇到想要更新本地项目的版本,却突然提示:工作副本已锁定.截图如下: 这种错误让人感觉很不舒服,实际上自己也没做过什么操作就这样了 ...

  8. 使用CSS将图片转换成黑白(灰色、置灰) & 毛玻璃效果

    法1⃣️: IE浏览器: filter: gray; 其他浏览器: .gray { -webkit-filter: grayscale(100%); -moz-filter: grayscale(10 ...

  9. [已解决]Series object has no attribute explode

    报错代码 s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]]) s 0 [1, 2, 3] 1 foo 2 [] 3 [3, 4] dtype: object s ...

  10. Maven的标准settings.xml文件

    配置目标 1. 默认jdk采用java8 2. 配置阿里云镜像和私服镜像, 并且先从阿里云下载, 下载不到的再去私服下载 <?xml version="1.0" encodi ...