home bbs files messages ]

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 3,564 of 4,675   
   R.Wieser to All   
   Re: EXE program stack setup questions   
   08 Oct 18 14:52:50   
   
   From: address@nospicedham.not.available   
      
   Alexei,   
      
   > I asked you specifically to use my code in the experiment.   
      
   My apologies, I must have read over that, and assumed you wanted to see my   
   results.   
      
   -- My result using your code:   
   000 4D 5A 30 00 02 00 00 00 20 00 00 01 FF FF 00 00   
   010 30 10 00 00 00 00 00 00 22 00 00 00 01 00 FB 20   
   020 72 6A 00 00 00 00 00 00 00 00 00 00 00 00 00 00   
   ...   
   200 8C C8 8E D8 8E C0 50 53 E8 08 00 83 C4 04 B8 00   
   210 4C CD 21 8D 7E F0 B9 10 00 32 C0 FC F3 AA 8B 46   
   220 04 03 46 06 C3 87 DB 87 DB 87 DB 87 DB 87 DB 90   
      
   And yes, I do see that SS stays zero here.   In other words: Tasm/Tlink can   
   actually do what I want.   Thanks for bringing that under my attention. :-)   
      
   A small problem though: I have absolutily no idea how to combine it with my   
   regular setup (which handles a few things like arguments, used registers and   
   local variables & labels rather conveniently) :   
      
   - - - - - - - - - -   
   .model TINY,STDCALL   
   .386   
   locals   
   -- and eventually also   
   .stack 0100h   
   - - - - - - - - - -   
      
   > Hold on. How many segments does your code define?   
      
   I use .CODE, .DATA (initialized data) and .DATA? (uninitialized data)   
   declarations, but because of the ".model TINY" declaration they all overlap.   
   And than there is the ".stack {size}" declaration, which causes a seperate   
   segment to be appended (no idea why though, as I've explicitily declared a   
   TINY model).   
      
   > In this case however you slice it or dice it, it's unlikely to   
   > get the SS value any different than 0 in the .EXE   
   > header and the SP value any different than the segment/   
   > program size   
      
   It is quite some time ago that I manually set up segments that way, so I   
   would have to take your word for that.   
      
   But now you've proven that my Tasm / Tlink combination can actually do what   
   I'm out for the only thing that needs to be figured out is how to get it   
   from/combine it with my regular setup (which makes my programming life   
   (much!) easier).   
      
   ... which brings us back to my initial question.   
      
   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