当前位置:网站首页>汇编:jmp指令
汇编:jmp指令
2022-06-09 03:38:00 【瓜子三百克】
1、概念
1、jmp为无条件转移,可以只修改IP,也可以同时修改CS和IP;
2、jmp指令要给出两种信息:
1、转移的目的地址
2、转移的距离(段间转移、段内短转移,
段内近转移)
2、8086CPU中的jmp指令
1、CPU从何处执行指令是由CS、IP中的内容决定的,我们可以通过改变CS、IP的内容来控制CPU执行目标指令。
2、8086提供了一个mov指令(传送指令),可以用来修改大部分寄存器的值,比如:
mov ax,10
mov bx,20
mov cx,30
mov dx,40
3、但是,mov指令不能用于设置CS、IP的值,8086没有提供这样的功能
4、8086提供了另外的指令来修改CS、IP的值,这些指令统称为转移指令,最简单的是jmp指令。
一、若想同时修改CS、IP的内容,可用形如
jmp 段地址:偏移地址的指令完成,如
jmp 2AE3:3,执行后:CS=2AE3H,IP=0003H,CPU将从2AE33H处读取指令。jmp 3:0B16,执行后:CS=0003H,IP=0B16H,CPU将从00B46H处读取指令。jmp段地址:偏移地址指令的功能为:用指令中给出的段地址修改 CS,偏移地
址修改 IP。二、若想仅修改 IP 的内容,可用形如
jmp某一合法寄存器的指令完成,如1、
jmp ax,指令执行前:ax=1000H,CS=2000H,IP=0003H;
指令执行后:ax=1000H,CS=2000H,IP=1000H
2、jmp bx,指令执行前:bx=0B16H,CS=2000H,IP-0003H;
指令执行后:bx=0B16H,CS=2000H,P=0B16Hjmp某一合法寄存器指令的功能为:用寄存器中的值修改 IP。
jmp ax,在含义上好似:mov IP,ax。
5、可以jmp 直接值来改变IP的值,比如jmp 0100H。
3、问答拓展
1、内存中存放的机器码和对应的汇编指令情况如下图所示,设CPU初始状态:CS=2000H,IP=0000H,请写出指令执行序列。思考后看分析:
2、下面的3条指令执行后,CPU几次修改IP?都是在什么时候?最后IP中的值是多少?
mov ax,bx
sub ax,ax
jmp
ax
边栏推荐
- [detailed explanation of kubernetes 11] - detailed explanation of storage
- 月薪近万,3年销售助理转行测试,0经验的我如何拿到多份offer?
- Six C language final assignments KTV song selection, personal revenue and expenditure management, staff resource management, class student file management, product information management, library mana
- Concurrent operation -- the difference between reentrantlock and synchronized
- Runtime constant area - Method area
- Customized development of blind box app system
- 什么是算子下盘?
- SAS batting lab demonstrates the value of data and analysis to teenagers
- Redis6学习笔记-第一章-Redis的介绍与环境搭建
- Neural network learning (V) -- comparison of common network structures
猜你喜欢

内存飙升问题定位

Cereals mall -day13- goods on the shelves

JS逆向字体反爬,某供应商平台反爬实践

Spark - logging simple to use

Error 5 occurred in the console input command net start MySQL console output system. Access denied. MySQL service is starting MySQL service failed to start. The service did not report any errors. Plea

ERP overview

Six C language final assignments KTV song selection, personal revenue and expenditure management, staff resource management, class student file management, product information management, library mana

The key points of writing test cases for the first time

What is the value of Yuan universe virtual real estate?

【分享】网络丢包故障处理方案
随机推荐
Alook browser cookie acquisition tutorial
并发操作之——BlockingQueue
关于我的那些事【我的2022】
SQL Server counts the data volume difference between today and yesterday that is greater than 10
How to calculate the number of parameters in the LSTM layer
Ranking list of short-term financial products in 2022
[Beijing Normal University] information sharing of the first and second postgraduate entrance examinations
Structure of the actual combat battalion | module 3
富士康又遭勒索攻击,大量未加密文件泄露
Spark - logging simple to use
不要提前交卷!!!曾有人在最后35秒,拿到了13分!!!(祝所有考生顺利)...
Data: Kube flannel and kubernetes dashboard creation commands and configuration file contents
Redis6 learning notes - Chapter 1 - Introduction and environment construction of redis
Cereals mall -day13- goods on the shelves
Traversal of binary tree
Dapr 1.7 之 Unix Domain socket 他来了
ArcGIS Runtime 离线gdb数据缺失问题处理
Fault analysis | a special scenario in MySQL where a new user cannot log in
C#/VB. Net to set solid color / gradient / picture background in word
character string