0

首先,感谢迄今为止的所有帮助。

完整的代码可以在这里找到

我很难理解这些台词。我写了一些评论...

该行,例如 mov es:[si+6], al 表示将 al 中的数据移动到 si+6 标记的​​内存地址(我认为这将是一个偏移量计算)。

那么在循环中添加 si,40是什么?

任何帮助对我来说意味着一切!谢谢你。

L0_95:         ; this segment prints ASCII code 0 - 95
mov si,6       ; refers to the string we declared at the beginning
mov cx,4       ; I think this is the height?

C1A:
; this loop adds the name of the column
mov al,string[0]
mov es:[si],al
mov al,string[2]
mov es:[si+6],al
mov al,string[4]
mov es:[si+24],al
mov al,string[6]
mov es:[si+28],al
add si,40           ;;;; what is this line?
loop C1A

mov si,122          ;;;; and these three lines?
mov bx,0
mov cx,4
C1B:push cx  

mov cx,24
add si,40
C1C:push cx
call DEC_CONVERT
add si,2
call HEX_CONVERT
add si,2
call BIN_CONVERT
add si,2
call CHAR_CONVERT
inc bx
add si,126
pop cx
loop C1C
pop cx
sub si,3840
loop C1B

ret

L96_191:
4

1 回答 1

2

add si将 si 寄存器提前 40。
mov si,122将 si 寄存器设置为 122,可能是某些数据的地址。剩下的两条指令现在应该是不言自明的了。

于 2011-04-13T00:32:03.457 回答