汇编学习日志——add指令

来源:互联网 发布:刷排名龙卷风优化软件 编辑:程序博客网 时间:2024/05/18 13:27

在学习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.


TITLE Add and Substract;This program adds and substracts 32-bit integers..386.model flat,stdcall.stack 4096ExitProcess PROTO,dwExitCode:DWORDDumpRegs PROTO.codemain 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 DumpRegsINVOKE ExitProcess,0main ENDPEND main



1 0
原创粉丝点击