汇编干货笔记->8.0 寄存器总结
2017-10-08 本文已影响152人
Dongle聊测试













最后
欢迎光临小站:yuruotong.com
以下是文字提取部分,阅读完毕的同学可以离开了
我们用;reg;表示一个寄存器
用;sreg;表示一个段寄存器
下面我们对几个寄存器;做个总结;
8086中只有;四个寄存器;可以用在[…]
;bx,si,di,dp;
这四种寄存器可以;相互组合;
但组合对象是;固定的;
bx和si,bx和di
bp和si,bp和di
只要[…]中有;bp;
而指令中没有;显性地给出;段地址
那么段地址就;默认在ss;中
否则;默认在ds;中
指令执行前
所要处理的数据可以在;各个地方;
cpu内部,内存,端口(后面会讲)
比如下面的例子
如果数据;在内存;
我们又可以用;多种方式;定义偏移地址
称之为;寻址方式;
既然知道了数据存放的;位置;
我们就需要;表达;这个位置
汇编语言使用;三个方法;
;立即数;就是idata
;寄存器名字;
;段地址+偏移地址;
既然已经知道了;数据的位置;
下一步就要确定;数据的大小;
汇编语言一般用;下面方法;处理
通过;寄存器名;
如果;没有寄存器;
通过操作符;X ptr;
X可以是word或者byte
还有一个叫;push操作;
push默认只进行;字操作;