当前位置:网站首页>数据传送指令
数据传送指令
2022-07-06 09:29:00 【My71】
传送指令 MOV
功能
将源操作数(一个字节或一个字)传送到目的操作数。
规则
- 立即数作为源操作数可以存放在存储器和通用寄存器中,但不能直接存入段寄存器中。
- 存储器和通用寄存器之间可以相互存储。
- 段寄存器和存储器可以相互存储。
- 段寄存器和通用寄存器可以相互存储。
- 不允许在两个存储器之间直接进行传送。
代码实现

偏移地址传送指令 lea
功能
去源操作数地址的偏移量,并把它传送到目的操作数中。
用法
- lea bx,a 这句话的意思是将 a 的地址传到 bx 中,类似于指针的概念。
- 接下来可以使用 [bx] 的方式获取地址 a 中的数据。
代码实现

堆栈指令
压栈:push
弹栈:pop
压栈和弹栈针对的都是 16 位的数据(AX、BX等),不允许对 8 位的数据(AH、AL等)进行堆栈操作。
不允许对一个立即数进行压栈。
…… push ax …… pop ax ……
交换指令 XCHG
功能
交换两个存储空间里的数据。
规则
- 操作数可以是字,也可以是字节。
- 两个存储器中的数据不能直接交换,可以借助寄存器来完成交换。
代码实现

边栏推荐
- Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment
- 我在字节跳动「修电影」
- Shell_ 00_ First meeting shell
- ~75 background
- LeetCode 1551. Minimum operand to make all elements in the array equal
- js垃圾回收机制和内存泄漏
- Error occurred during initialization of VM Could not reserve enough space for object heap
- The most lost road I have ever walked through is the brain circuit of ByteDance programmers
- Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution
- Cmake Express
猜你喜欢
![Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]](/img/e6/c53ad67ead1793a2acb93c26e8d377.jpg)
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]

~83 form introduction

Yao BanZhi and his team came together, and the competition experts gathered together. What fairy programming competition is this?

这116名学生,用3天时间复刻了字节跳动内部真实技术项目

JS encapsulates the method of array inversion -- Feng Hao's blog

The 116 students spent three days reproducing the ByteDance internal real technology project

7-5 blessing arrived

Some instructions on whether to call destructor when QT window closes and application stops

Shell_ 06_ Judgment and circulation
![Story of [Kun Jintong]: talk about Chinese character coding and common character sets](/img/d5/9a9e3a0ba57328749d80ec71cb9467.png)
Story of [Kun Jintong]: talk about Chinese character coding and common character sets
随机推荐
FLV格式详解
~83 form introduction
~82 style of table
LeetCode 1566. Repeat the pattern with length m at least k times
SQL快速入门
7-10 punch in strategy
[graduation project] QT from introduction to practice: realize imitation of QQ communication, which is also the last blog post in school.
The "advertising maniacs" in this group of programmers turned Tiktok advertisements into ar games
~77 linear gradient
Hbuilder x format shortcut key settings
~73 other text styles
Shell_ 03_ environment variable
字节跳动开源GAN模型压缩框架,算力最高节省97.8%丨ICCV 2021
Fdog series (VI): use QT to communicate between the client and the client through the server (less information, recommended Collection)
Two weeks' experience of intermediate software designer in the crash soft exam
Tencent interview algorithm question
Eureka single machine construction
Usage of insert() in vector
LeetCode 1550. There are three consecutive arrays of odd numbers
这116名学生,用3天时间复刻了字节跳动内部真实技术项目