MOV r,M:HL配对在哪里?

时间:2014-05-21 12:21:40

标签: assembly microcontroller instruction-set microprocessors 8085

https://encrypted.google.com/books?id=FIYGSv3-C6IC&pg=PA59&lpg=PA59&dq=mov+r,+M+8085&source=bl&ots=aX-essc34w&sig=vyGYCHeeJP_Dv_iE8ZjggI2Zh1k&hl=en&sa=X&ei=iZd8U6uJNNWhugSNoILADg&ved=0CF8Q6AEwCQ#v=onepage&q=mov%20r%2C%20M%208085&f=false

从以上链接: Content of the memory location whose address is available in H,L pair is transferred to the destination register r.

我不明白的是地址是如何进入H,L对的?我有一个内存地址,希望将其中的值传送到寄存器。我该怎么做呢? MOV r,M指示?

2 个答案:

答案 0 :(得分:2)

首先必须将所需的地址加载到HL中,然后您可以获取HL指向的地址的内容,例如

LXI HL,1000h          ; load 16 bit address 0x1000 into HL register pair
MOV B,(HL)            ; read contents of address 0x1000 into register B

答案 1 :(得分:1)

8085包含一些未在8080上找到但未由Z80实现的“无证”指令,因此很少使用。这是8085特定说明的包含文件。就我而言,这些用于基于8085的CP / M计算机的BIOS和实用程序。请注意,DE可以用作加载或存储HL为16位值的地址:

ARHL    MACRO       ;ARITH RIGHT SHIFT HL
    DB  10H
    ENDM
DSUB    MACRO       ;HL=HL-BC
    DB  08H
    ENDM
JNXC    MACRO   X   ;JMP IF NOT X CARRY (INX, DCX)
    DB  0DDH
    DW  X
    ENDM
JXC MACRO   X       ;JMP IF X CARRY
    DB  0FDH
    DW  X
    ENDM
LDHI    MACRO   I   ;DE=HL+I
    DB  28H
    DB  I
    ENDM
LDSI    MACRO   I   ;DE=SP+I
    DB  38H
    DB  I
    ENDM
LHLX    MACRO       ;HL=(DE)
    DB  0EDH
    ENDM
RDEL    MACRO       ;ROTATE DE,CY LEFT
    DB  18H
    ENDM
RIM MACRO           ;RESET INT MASK
    DB  20H
    ENDM
RSTV    MACRO       ;RST IF V SET TO 40H
    DB  0C8H
    ENDM
SHLX    MACRO       ;(DE)=HL
    DB  0D9H
    ENDM
SIM MACRO           ;SET INT MASK
    DB  30H
    ENDM