문제

I'm a little confused about this following line:

add ax, [si+4]

Does this take the value of SI and add 4H to it, and then add that to AX?

For example, we'll say AX = 1000 and SI = 0010. What would AX's value be?

도움이 되었습니까?

해결책

It takes the value at SI+4 and adds it to AX. In other words, it adds 4 to SI, retrieves a 16-bit integer value from memory at that address (in the DS segment), and adds that value to AX.

We don't know what will be the value of AX because we don't know what's at address DS:0014. :)

다른 팁

First of All this is Register Relative Addressing Mode not Based Index.

Assuming that the value of SI is 0010 and not 0010H

it would add 10+4=14 i.e. 'E' so it would be DS:000E H

if you mean 0010H it would be DS:0014H

And at last whatever is in the data segment in the 15th Location in 1st Case and the 20th Location in the second , the content of that will be added to AX.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top