error C2443: operand size conflict
#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)
原因:
是编译出错。
类型冲突:
|
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的更多相关文章
- 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 从数据库 ...
- 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 ...
- Fatal error: Allowed memory size of 8388608 bytes exhausted
这两天安装bugfree,更换了一个数据量较大的库,结果打开bug详情页要么是空白页,要么就报如题的错误,错误信息还包括C:\wamp\www\bugfree\Include\Class\ADOLit ...
- Error response from daemon: conflict: unable to remove repository reference 解决方案
由于前一章演示用的镜像没什么用准备删除 docker image rm hello-world:latest Error response from daemon: conflict: unable ...
- *** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
*** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED 在软件已经执行破解仍然出现,是因为工程是破解前建立的,要先执行 ...
- 解决访问 jar 包里面的字体报错:OTS parsing error: incorrect file size in WOFF header
前言:jar 包里面的字体加载,浏览器 console 中报警告信息,这里记录一下解决方案. 附:自己的一个 jar 包源码 https://github.com/yuleGH/querydb 错误问 ...
- 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 ...
- error: Allowed memory size
错误提示 error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in D:\www\Th ...
- 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 ...
随机推荐
- Attribute 实现Aop
1.先定义一个 拦截属性 AopAttribute using System; using System.Collections.Generic; using System.Linq; using S ...
- 【NOI2019模拟2019.6.29】组合数(Lucas定理、数位dp)
Description: p<=10且p是质数,n<=7,l,r<=1e18 题解: Lucas定理: \(C_{n}^m=C_{n~mod~p}^{m~mod~p}*C_{n/p} ...
- jqery基础知识实例(二)
无缝滚动 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3 ...
- bzoj 3207 可持久化线段树+hash
这道题要看出来这个做法还是比较容易说一下细节 1.因为要用hash的区间值域来建树,而hash为了不冲突要开的很大,所以值域就会比较的大,不过这道题好的一点是没有修改,所以直接离散一下就会小很多 2. ...
- Delphi实现程序只运行一次并激活已打开的程序
我们的程序有时候只允许运行一次,并且最好的情况是,如果程序第二次运行,就激活原来的程序.网上有很多的方法实现程序只运行一次,但对于激活原来的窗口却都不怎么好.关键就在于激活原来的程序,一般的做法是在工 ...
- xlwings结合dataframe数据的写入
一.代码 import xlwings as xw import pandas as pd xl_path=r'***' df_path=r'***' df=pd.read_excel(df_path ...
- Ubuntu 14.04 搭建 LNMP
LNMP(Linux-Nginx-MySQL-PHP)这四种软件的组合,可以成为一个免费.高效.扩展性强的网站服务系统. 一.操作步骤 1.安装Nginx sudo apt-get update su ...
- C#简单游戏外挂制作(以Warcraft Ⅲ为例)
网上有很多外挂制作的教程,大多是讲针对大型网络游戏的,主要包含一些抓包.反汇编.C++的知识综合.事实也如此,常见的外挂都是使用VC++写的,从来没有过C#或者其他.NET语言编写的外挂. 作为微软. ...
- [NOIP模拟15]题解
A.建设城市(city) 这容斥题多难啊你们是怎么考场切掉的啊 首先可以想一下,如果没有k的限制,这题怎么做? 相信你们肯定能看出来是挡板法裸题:m个物品分给n个人,每个人至少一个. 就是$C_{m- ...
- 【系统安全性】四、认证Authentication
四.认证Authentication 1.为什么要认证 对请求.数据进行认证,判断伪造的数据 HTTP请求很脆弱,抓包软件很强大,容易伪造身份,非法获取数据 2.摘要认证 对象:客户端参数.服务端响应 ...