Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PC Assembly Porgramming Doubt

Status
Not open for further replies.

nitsakh

Member level 1
Joined
Nov 24, 2010
Messages
32
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,514
I have a doubt with PC assembly programming (Intel x86).

For this example code why do we store offset at the beginning and then the segment address in the variable abc ?? How are values stored in memory and how is the jump possible ?

.model small
.data
abc dd ?
...
.code
.....
mov word ptr abc,bx
mov word ptr abc+2,es
...
jmp dword ptr abc
...
end

Thank You !
 

segment address is the starting address of any segment various segments are data, code,extra,stack segmentsit has corresponding segment registers to store starting address.every segment is of 64k in case of 8086
 

Yes ! but why do we store offset in abc and segment in abc+2 and not the other way round ??
 

It's just the way Intel do things, it's called big-endian addressing. The high address bits, in this case the segment address come after the offset address. I think all Intel devices do this although there is technically no reason why it was chosen, 68xxx does it the other way I believe.

Brian.
 

Thanks ! But how are the values actually stored in memory ? I.e.,LSB and MSB ? and how does the call actually take place ? Sorry I'm still confused somewhat !
And If I'm not wrong Intel uses Little Endian !
 
Last edited:

Thanks ! However,I am still confused a bit ! I shall be grateful if someone would provide a graphical representation !
Meanwhile can you please explain function 1687h of int 2fh for dpmi ? I searched google, got the function details, but I am not exactly getting what do they mean by dpmi entry point !
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top