-5
.data

len dw 10
msg db "1234567890"

.code
....

Address for segments DS= 0ACA CS =0AC7

What is the absolute address for string msg?

What I understand is effective address for msg is 21 in dec which 15H, then I do DS:0015 which is ACB5 but it's not working..

The answers available are:

0ACA2

0ACC0

0ACC

0ACA0
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Mostfa shma
  • 193
  • 1
  • 6
  • 2
    Dude, stop posting your homework questions here. Nobody is going to do your homework for you. – fuz Oct 30 '20 at 08:27

1 Answers1

2

Given your curent assumptions, you are making a sound calculation for the linear address.

(0ACAh << 4) + 0015h does indeed produce the linear address 0000ACB5h.

However, why do you understand that the msg label is at offset 21 (15h)?

Making the acceptable assumption that the DS segment register is pointing at the .data section and seeing next code snippet

.data
len dw 10
msg db "1234567890"

where the len variable occupies 2 bytes because that is what dw (DefineWord) does, the offset to msg will rather be 2.

If you redo your calculation, you'll see that the correct answer in on the provided list...

Sep Roland
  • 33,889
  • 7
  • 43
  • 76