;assumes SI is already loaded with the desired value.
;assumes segment where var is stored is already loaded into DS
mov al, byte ptr [ds:var] ;in this example, loads 3Fh into AL
xor ah,ah ;set AH to zero, so that AX = 003F
add bx,ax ;BX = BX + 3Fh
mov ax, word ptr [bx+si] ;load from [BX + SI + value of var]
1条答案
按热度按时间pxiryf3j1#
你必须根据变量
var
存储在哪一段来调整这段代码,但这里有一个通用的例子: