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,629 of 4,675   
   Martin Str|mberg to R.Wieser   
   Re: EXE program stack setup questions   
   29 Oct 18 11:18:26   
   
   From: ams@nospicedham.ludd.luth.se   
      
   R.Wieser  wrote:   
   > Martin,   
      
   > > I thuoght you said you wanted the tiny model.   
      
   > Correct.   
      
   > > SS==CS, SP==0 is the tiny model, isn't it?   
      
   > Among 65535 possible other values of SP, yes.   
      
   Nitpickly here but at least one of those other 65535 do contain a RET   
   (or even two that contain INT 0x20), doesn't it. And isn't there also   
   the INT 0x20 somewhere in the PSP for a .COM, so you only have 65532   
   other possible values... OTOH perhaps you don't even have a DOS .COM   
   program?   
      
   > > I you expect more than almost 64kB of code and data, the tiny model   
   > > is not what you want.   
      
   > No, its the other way around.   I expect my programs to take quite a bit   
   > less than 64 KB, including uninitialized data and stack space.     I do not   
   > want my 16 KB program to occupy a 64 KB block of memory.   
      
   I see. Then you just put "mov $(my program size including stack), %sp"   
   somewhere at the start of your program.   
      
   _If_ it's a DOS .COM one, then you problably need to INT 0x21   
   something to tell it that you don't need the full 64kb segment.   
      
      
   --   
   MartinS   
      
   --- 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