#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. SP7258 SUBLEX - Lexicographical Substring Search(后缀自动机)

    传送门 解题思路 首先建\(sam\),然后在拓扑序上\(dp\)一下,把每个点的路径数算出来,然后统计答案时就在自动机上\(dfs\)一下,仿照平衡树那样找第\(k\)小. 代码 #include& ...

  2. windows系统使用

    1.访问局域网共享的文件,用 \\ip号 2.电脑的硬件名称(设备管理器中)是可以用软件修改的. 3.电脑中每一个连接网络的设备都有一个网卡地址(MAC地址),如无线网卡地址.有线网卡地址. 4.wi ...

  3. 机器学习中python的有关使用技巧【创建虚拟环境、jupyter的kernel修改】

    1.创建虚拟环境<在原来基础上建立> *注:(这里是python2.python3环境共存,我要创建一个python3的虚拟环境) 一.先安装虚拟环境变量: pip3 install -U ...

  4. 删除maven项目后eclipse无法启动

    An internal error occurred during: "reload maven project". java.lang.NullPointerExceptio   ...

  5. 高程(三)--- Date

    Date类型使用UTC(国际协调时间)1970年1月1日0时0分始到现在的毫秒数来保存日期的. 所以当我们知道毫秒数时,还需要通过计算才能获取年月日时分秒. 一.获取时间对象 Date提供了2个方法: ...

  6. Java中在磁盘上复制文件

    使用字节流实现 public static void main(String[] args) throws IOException { InputStream in = new FileInputSt ...

  7. C语言结构体嵌套

    #include <stdio.h> int main() { /*************************************************** *结构体嵌套:结构 ...

  8. NetCore2.2使用Nlog自定义日志写入路径配置方式

    在一些特定场景的业务需求下,日志需要写入到不同的路径下提供日志分析.第一种:默认Nlog可以通过日志级别来区分路径,——优点是不需要额外配置,开箱即用——缺点是不够灵活,如果超过级别数量,则不满足需求 ...

  9. python 生成推导式

    推导式comprehensions(又称解析式),是Python的一种独有特性.推导式是可以从一个数据序列构建另一个新的数据序列的结构体. 共有三种推导,在Python2和3中都有支持: 列表(lis ...

  10. 笔记44 Hibernate快速入门(一)

    一.Hibernate简介 Hibernate 是传统 Java 对象和数据库服务器之间的桥梁,用来处理基于 O/R 映射机制和模式的那些对象. Hibernate 架构是分层的,作为数据访问层,你不 ...