0

假设我在 SP 寄存器中有一个 16 位地址 1964h,如何将此地址复制到 8085 中的连续 8 位内存?

PS:我将 SP 用于通用操作(例如存储操作数)。

4

2 回答 2

1

这样做了:

    lxi h,0h        ; initialize hl to zero
    dad sp          ; add sp to hl
    shld [dest]     ; store to memory
于 2014-01-15T11:49:01.267 回答
0

我曾经不得不为 HD-mikko(Mikromikko 1 的变体)的启动舞会(启动监视器)编写此代码。

; !----------------------------------------------------
; ! sptohl      0090
; !
; ! moves sp to hl (the value of sp before the call)
; !
; ! on return :
; !   hl = sp
; !   other registers are saved
; !
sptohl :
        push    psw
        lxi     h,00000h
        ana     a
        dad     sp
        inx     h
        inx     h
        inx     h
        inx     h
        pop     psw
        ret
于 2014-01-15T19:58:11.143 回答