Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,532 of 4,675    |
|    R.Wieser to All    |
|    Re: Debug.exe Memory location.    |
|    26 Dec 22 13:23:48    |
   
   From: address@nospicedham.not.available   
      
   Jean,   
      
   > Can somebody please explain why 0100h is 'subtracted' from 0108h   
   > when I do the 'r' command in debug.exe ?   
      
   It isn't subtracted. The "problem" is that DS is pointing at the programs   
   "header" (0x0100 bytes infront of the code), while CS is pointing at the   
   code itself. Using the "tiny" model you first need to load DS with   
   whatever is currently in CS.   
      
   Suggestion : do a "U DS:0100" and look at what you're getting. Do you   
   recognise it ?   
      
   Also do a "D DS:0 100" and see if you recognise it. To make the recognision   
   easier add a few arguments when you load your program into the debugger   
   ("debug t.exe the quick brown fox")   
      
   Regards,   
   Rudy Wieser   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca