1、1Shanghai Jiao Tong University2Shanghai Jiao Tong University3Shanghai Jiao Tong University4Shanghai Jiao Tong University7 2107 65 4 3 2 1 0OPD W MOD REG R/MLOW DISP或 DATAHIGH DISP或 DATALOW DATAHIGH DATAB1B2B3B4B5B6操作码从/到寄存器字/字节寻址方式寄存器寄存器/存储器5Shanghai Jiao Tong University6Shanghai Jiao Tong Universit
2、y7Shanghai Jiao Tong University8Shanghai Jiao Tong UniversityOPREG0 0 1 0 0 0rrr23 7 9Shanghai Jiao Tong University10Shanghai Jiao Tong University11Shanghai Jiao Tong University12Shanghai Jiao Tong University13Shanghai Jiao Tong University14Shanghai Jiao Tong University15Shanghai Jiao Tong Universit
3、y16Shanghai Jiao Tong University 数据传送类数据传送类 算术运算类算术运算类 逻辑运算与移位类逻辑运算与移位类 串操作类串操作类 处理器控制类处理器控制类17Shanghai Jiao Tong University18Shanghai Jiao Tong University通用数据通用数据传送传送字节或字传送字节或字传送字压入堆栈字压入堆栈字弹出堆栈字弹出堆栈字节或字交换字节或字交换字节翻译字节翻译MOV MOV d,sd,sPUSH sPUSH sPOP dPOP dXCHG XCHG d,sd,sXLATXLAT目标地址目标地址传送传送装入有效地址装入有
4、效地址装入装入DSDS寄存器寄存器装入装入ESES寄存器寄存器LEA LEA d,sd,sLDS LDS d,sd,sLES LES d,sd,s标志位标志位传送传送将将FRFR低字节装入低字节装入AHAH寄存器寄存器将将AHAH内容装入内容装入FRFR低字节低字节将将FRFR内容压入堆栈内容压入堆栈从堆栈弹出从堆栈弹出FRFR内容内容LAHFLAHFSAHFSAHFPUSHFPUSHFPOPFPOPFI/OI/O数据数据传送传送输入字节或字输入字节或字输出字节或字输出字节或字IN IN 累加器累加器,端口端口OUT OUT 端口端口,累加器累加器19Shanghai Jiao Tong Un
5、iversity20Shanghai Jiao Tong University21Shanghai Jiao Tong University22Shanghai Jiao Tong University23Shanghai Jiao Tong University24Shanghai Jiao Tong University25Shanghai Jiao Tong University26Shanghai Jiao Tong University27Shanghai Jiao Tong University28Shanghai Jiao Tong University29Shanghai Ji
6、ao Tong University30Shanghai Jiao Tong University31Shanghai Jiao Tong University32Shanghai Jiao Tong University33Shanghai Jiao Tong University34Shanghai Jiao Tong University35Shanghai Jiao Tong University36Shanghai Jiao Tong University37Shanghai Jiao Tong University38Shanghai Jiao Tong University39S
7、hanghai Jiao Tong University 不允许进行段寄存器减法。不允许进行段寄存器减法。40Shanghai Jiao Tong University41Shanghai Jiao Tong University42Shanghai Jiao Tong University43Shanghai Jiao Tong University44Shanghai Jiao Tong University45Shanghai Jiao Tong University46Shanghai Jiao Tong University47Shanghai Jiao Tong Universit
8、yO S Z A P C48Shanghai Jiao Tong University49Shanghai Jiao Tong University50Shanghai Jiao Tong University51Shanghai Jiao Tong University52Shanghai Jiao Tong University53Shanghai Jiao Tong University54Shanghai Jiao Tong University55Shanghai Jiao Tong University56Shanghai Jiao Tong University57Shangha
9、i Jiao Tong University58Shanghai Jiao Tong University59Shanghai Jiao Tong University60Shanghai Jiao Tong University61Shanghai Jiao Tong University有符号数左移有符号数左移,最高位进入,最高位进入CF,最,最低位补低位补0。左移左移1位后,最高位和位后,最高位和CF不同,不同,OF置置1,否则,否则OF置置0。移位次数不为移位次数不为1时,时,OF不确定。不确定。左移左移1位,位,操作数乘操作数乘2有符号数右移,有符号数右移,最高符号位不变,最高符号位
10、不变,所有位右移所有位右移1位。位。右移右移1位,位,操作数除操作数除2无符号数左移,无符号数左移,最低位补最低位补0,最高,最高位移入位移入CF。若若CF=0,无溢出;若,无溢出;若CF1,有溢,有溢出,倍增出,倍增(x2)结果是错误的。结果是错误的。左移左移1位,位,无符号数乘无符号数乘2无符号数右移,无符号数右移,最高位补最高位补0,最右,最右边边1位移入位移入CF。CF=1,移位前是一个奇数。移位前是一个奇数。CF=0,移位前是一个偶数。移位前是一个偶数。右移右移1位,位,无符号数除无符号数除2CF7/150CF7/150CF7/150CF7/15062Shanghai Jiao To
11、ng University 逻辑左移一位相当于无符号数乘以逻辑左移一位相当于无符号数乘以2 逻辑右移一位相当于无符号数除以逻辑右移一位相当于无符号数除以263Shanghai Jiao Tong University64Shanghai Jiao Tong University65Shanghai Jiao Tong University66Shanghai Jiao Tong University67Shanghai Jiao Tong University 控制转移类指令通过控制转移类指令通过改变改变IP(和(和CS)值,实现程序值,实现程序执行顺序的改变执行顺序的改变68Shanghai
12、 Jiao Tong University69Shanghai Jiao Tong University70Shanghai Jiao Tong University71Shanghai Jiao Tong University72Shanghai Jiao Tong University73Shanghai Jiao Tong University74Shanghai Jiao Tong University75Shanghai Jiao Tong UniversityJA/JNBE 目标标号JAE/JNB 目标标号JB/JNAE 目标标号JBE/JNA 目标标号JG/JNLE 目标标号JG
13、E/JNL 目标标号JL/JNGE 目标标号JLE/JNG 目标标号76Shanghai Jiao Tong University77Shanghai Jiao Tong UniversityDEC CXJNZ label78Shanghai Jiao Tong University79Shanghai Jiao Tong University80Shanghai Jiao Tong University81Shanghai Jiao Tong University82Shanghai Jiao Tong University83Shanghai Jiao Tong University84Shanghai Jiao Tong University