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 ...
随机推荐
- bzoj 2631
lct 基础(' ' ) 就当个纪念吧(' ' ) 毕竟写了4h, cut 部分一直naive 总是想找谁是儿子,然后最后发现直接提根就好了啊(' ' ) #include <i ...
- Dubbo 如何成为连接异构微服务体系的最佳服务开发框架
从编程开发的角度来说,Apache Dubbo (以下简称 Dubbo)首先是一款 RPC 服务框架,它最大的优势在于提供了面向接口代理的服务编程模型,对开发者屏蔽了底层的远程通信细节.同时 Dubb ...
- js-原生js触发器使用
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- Windows注册表的学习
什么是注册表 注册表是Windows在Win95/98系统开始引入的一种核心数据库,里面存放着各类的配置信息.参数等.直接控制着系统的启动.硬件的装载以及Winodws程序的运行 手册表的功能 记录用 ...
- Block 使用总结
- (void)testBlockWeakObj1 { UILabel *tl = [[UILabelalloc]init];//本地局部变量 __weak UILabel *weakTL = tl; ...
- date和string转换用joda包
import org.joda.time.DateTime;import org.joda.time.format.DateTimeFormat;import org.joda.time.format ...
- linux jps命令
原文链接: http://www.cnblogs.com/qlqwjy/p/7928410.html https://blog.csdn.net/u013250071/article/details/ ...
- hexo next博客之无敌之舒服之美妙之轻松之发布博客(mweb,github自主开发插件)
文章目录 **前言:** 具体用法 **mweb for mac** 注意 **github插件下载** 个人博客:https://mmmmmm.me 源码:https://github.com/da ...
- 1.1 React 介绍
1.1.1 React 是什么 React IS A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES 来自:React 官方网站 狭义来讲 React ...
- 软件测试工程师如何提高提BUG逼格
某个周四早上,沏好一杯茶,刚要坐到座位上,就听开发说,你们测试怎么提的Bug,给个截图能说明啥?截图上面显示的奔溃,如果是必现还好,如果不是必现,那么我们怎么去定位?至少给个日志吧?当时我的内心活动是 ...