0

我无法弄清楚在汇编表中的不同情况下如何处理数据。

我有以下简单的程序:

section .data
        Digits:  db "0123456789ABCDEF"
        Sums:    dd 15,12,6,0,21,14,4,0,0,19
        Sums2:   db 15,12,6,0,21,14,4,0,0,19

section .text   
global _start


_start:
    nop                    ; Put your experiments between the two nops...
    mov ecx,2
    mov al, byte [Sums+ecx*2]
    mov bl, byte [Sums2+ecx*2]
    mov dl, byte [Digits+ecx*2]
    nop

现在,当我逐条调试它时,我查看寄存器并且无法理解发生了什么。

rcx --> as expected it contains the decimal 2
rdx --> as expected it contains the hexadecimal 34 which represents the decimal 4
rax --> has c which represents new page
rbx --> has 15 which represents negative acknowledge (NAK character)

我希望在 rax 中找到 6 个,在 rbx 中找到 1 个。我无法弄清楚为什么它没有发生。我在一个小端架构上。谢谢

4

0 回答 0