hc-05传输数据指令_数据复制/传输说明 8086微处理器指令集

本文详细介绍了8086微处理器的数据复制/传输指令,包括MOV、PUSH、POP、XCHG等,涉及内存、寄存器、堆栈以及端口的交互操作。例如,MOV用于在寄存器和内存之间传输数据,PUSH将内容压入堆栈,POP则从堆栈中弹出数据。此外,还提到了IN和OUT指令用于输入和输出端口,以及特殊指令如XLAT用于查找表进行代码转换。
摘要由CSDN通过智能技术生成

hc-05传输数据指令

8086 instructions are divided into following types:

8086指令分为以下几种类型

  1. Data copy/ Transfer Instruction

    数据复制/传输指令

  2. Arithmetic and logical instruction

    算术和逻辑指令

  3. Branch instruction

    分支指令

  4. Loop instruction

    循环指令

  5. Machine control instruction

    机器控制指令

  6. Flag manipulation instruction

    标志操作指令

  7. Shift and rotate instruction

    移位和旋转指令

  8. String instruction

    字符串指令

数据复制/传输指令 (Data copy/ Transfer Instruction)

1)移动 (1) MOV- Move)

Transfers data from 1 register/memory to another register/memory. Direct loading of segment register with immediate data is not permitted.

将数据从一个寄存器/存储器传输到另一个寄存器/存储器。 不允许直接加载带有立即数据的段寄存器。

Example:

例:

    Mov     Ax,Bx
    Mov     Ax,1000x
    Mov     Ds,1000H
    Load    5000H
    Load    Ds with 5000H
    Mov     Ds,As

2)PUSH:推入堆叠 (2) PUSH: Push to stack)

This instruction pushes the content of specified register or memory location onto the stack. Stack pointer decremented by 2.

该指令将指定寄存器或存储器位置的内容压入堆栈。 堆栈指针减2。

First- Higher byte

第一个高字节

Second-Lower byte

低位字节

Instruction set push

3)POP:从堆栈弹出 (3) POP: Pop from stack)

This instruction when executed loads a specified register memory location with the contents of the memory location of which the address is formed using the current stack segment and stack pointer.

该指令在执行时将使用当前堆栈段和堆栈指针形成地址的存储位置的内容加载到指定的寄存器存储位置。

4)XCHG:交换 (4) XCHG: Exchange)

Exchanges the content of specified source and destination operand.

交换指定的源和目标操作数的内容。

Note: Exchange of two memory location is not allowed.

注意:不允许交换两个内存位置。

5)IN:输入代码 (5) IN: input code)

This is used for reading an input code address of input code, may be specified either directly or indirectly.

这用于读取输入代码的输入代码地址,可以直接或间接指定。

AL (8 bit) & AX (16bit) are destination register.

AL(8位)AX(16位)是目标寄存器。

Dx is the default register which is allowed to have implicit post register.

Dx是默认寄存器,允许具有隐式后置寄存器。

IN AL, O3H – reads data from 8bit port whose address is 03H.

IN AL,O3H –从地址为03H的 8位端口读取数据。

6)OUT:输出到端口 (6) OUT: Output to the port)

It is used for writing output to the port. The address may be specified directly or indirectly data odd address is transfer from D18 – D15 even address code is transfer from D0-D7.

用于将输出写入端口。 可以直接或间接指定地址,即使从D0-D7传送地址代码,也可以从D18 – D15传送数据奇数地址。

Example:

例:

    OUT 03H, AL

7)XLAT:翻译 (7) XLAT: Translate)

The translate instruction is used for finding out the Codes in case of code conversion problem using lookup table technique.

如果使用查找表技术进行代码转换时遇到问题,则翻译指令用于查找代码。

8)LEA指令(负载有效平衡) (8) LEA instruction (load effective balance))

It loads the effective address formed by destination operant into the specified source register.

它将目标操作形成的有效地址加载到指定的源寄存器中。

LEA BX, ADR( offset of label ADR is transferred to reg- BX)

LEA BX,ADR(标签ADR的偏移量已转移到regBX)

9)LDS / LES指令:加载DS / ES的指针 (9) LDS/LES instruction: load pointer to DS/ES)

It loads the Ds and Es register with the content of memory location specified as source in the instruction.

它将指令中指定为源的存储器位置的内容加载到Ds和Es寄存器中。

Example:

例:

    LDS DS, 5000H

10)LAHF:从标志的低字节加载AH (10) LAHF: Load AH from lower byte of flag)

Store AH to lower byte of the flag Register.

将AH存储到标志寄存器的低字节。

Instruction sex LAHF

11)SAHF:将AH存储到标志寄存器的低字节 (11) SAHF: Store AH to lower byte of flag register)

Instruction sex SAHF

翻译自: https://www.includehelp.com/embedded-system/instruction-set-of-8086-microprocessor.aspx

hc-05传输数据指令

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值