flat assembler
Message board for the users of flat assembler.
Index
> Main > Question on Segments and Offsets |
Author |
|
Tomasz Grysztar 17 Mar 2007, 19:13
No, it doesn't load the address, it loads the contents of the memory.
That is, you provide as a source the 32-bit memory operand, which contains the complete segment:offset address. An example data definition Code: x DD 12h:34h ; same as "x dd 00340012h" and the instruction: Code: LDS AX,[x] ; loads 0012h into DS and 0034h into AX |
|||
17 Mar 2007, 19:13 |
|
asmfan 17 Mar 2007, 19:44
Is it right Tomasz?
AFAIK for getting address segment component left shifted by 4 only, say 0F000h:0FFF5h will be <(0F000h << 4) + 0FFF5h> = 0FFFF5h _________________ Any offers? |
|||
17 Mar 2007, 19:44 |
|
Tomasz Grysztar 17 Mar 2007, 20:14
Such computation is needed to convert between the linear/physical address and the segmented one. However the LDS instruction loads the segmented address, not the linear one (just like the far call, too).
|
|||
17 Mar 2007, 20:14 |
|
Alboin 17 Mar 2007, 23:17
Thanks for the help!
_________________ Anyone for tennis, wouldn't that be nice? |
|||
17 Mar 2007, 23:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.