汇编学习日志——add指令
2014-02-08 09:08
281 查看
在学习Intel汇编程序设计时,有下面一段话
The first two lines, because they are directives, contain no executable instructions. But the subsequent lines are assembly language instructions, each 5 bytes long. The hexadecimal values in the second column, such as B8 00010000are the actual instruction
bytes.
The first two lines, because they are directives, contain no executable instructions. But the subsequent lines are assembly language instructions, each 5 bytes long. The hexadecimal values in the second column, such as B8 00010000are the actual instruction
bytes.
TITLE Add and Substract ;This program adds and substracts 32-bit integers. .386 .model flat,stdcall .stack 4096 ExitProcess PROTO,dwExitCode:DWORD DumpRegs PROTO .code main PROC mov eax,4h add ebx,FFh //如果这里为0x7F的话(或者说小于7F),机器码为83 C3 7F,如果大于7F,则为81 C3 00000080 //如果这里为eax,ecx,edx,小于0x7F 则为83 C0 7F,如果大于0x7F,则为05 00000080 //所以ebx为基地址寄存器,在加法上,与其他三个寄存器是不同的 call DumpRegs INVOKE ExitProcess,0 main ENDP END main
相关文章推荐
- centos6.4安装chrome浏览器
- Linux服务器性能评估与优化--转
- 微信公众平台开发(四) 订阅事件(subscribe)处理
- HTTP头相关的材料
- mono for android 学习记录
- 如何正确地刷牙?
- 如何正确地刷牙?
- VC获取屏幕分辨率及大小相关
- Java中获取前一天和后一天时间
- 类型和成员的定义
- 2013-04-22期-搜索引擎核心代码1
- PBOC/EMV之静态数据认证(SDA)与动态数据认证(DDA)
- 不要计较付出的多而得到少
- SAP SMP 3.0 国际化 i18n
- .NET 4.0 WCF WebConfig aspNetCompatibilityEnabled 属性
- 2013-04-19期-开发前准备工作
- Lua中实现观察者模式
- RAID+LVM技术之三fdisk篇
- jquery ajax 局部刷新小案例
- Inter系列处理器名称浅析