why this assembly program is loaded from the address 0B3D:0000?

Posted by viperchaos on Stack Overflow See other posts from Stack Overflow or by viperchaos
Published on 2011-11-24T07:55:01Z Indexed on 2011/11/24 9:54 UTC
Read the original article Hit count: 226

Filed under:
|

I have seen a assembly program written from a book about assemble:

assume cs:code
   code segment 
   dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
   mov bx,0
   mov ax,0

   mov cx,8
s: add ax,cs:[bx]
   add bx,2
   loop s

   mov ax,4c00h
   int 21h
 code ends
 end

This program's function is to add eight numbers. The author compiled this program in the

DOS and use the DEBUG to see how this program be loaded.

The author use the R command and got that

DS = 0B2DH ES = 0B2D SS = 0B3D CS = 0B3D IP = 0000

And then the author said that this program is loaded from the address 0B3D:0000.

I'm a confused that why this program is loaded from the address 0B3D:0000?

Is this because the existence of the Program Segment Prefix(PSP)?

If the answer is the existence of the PSP, what is in the PSP?

© Stack Overflow or respective owner

Related posts about assembly

Related posts about dos