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 2,876 of 4,675   
   James Harris to Terje Mathisen   
   Re: Look back to "just for the H@ck"   
   20 Jul 17 12:32:17   
   
   From: james.harris.1@nospicedham.gmail.com   
      
   On 20/07/2017 11:57, Terje Mathisen wrote:   
   > James Harris wrote:   
      
   ...   
      
   >> * Not rely on [SP] being zero - in case of non-compliant environment.   
   >> (I haven't found the .COM spec but from what people have said I guess   
   >> that that 16-bit word is supposed to be zero ... perhaps so that a   
   >> near return gets to CS:0 which is termination code.)   
   >   
   > Impossible! [SP] == 0 is an absolute requirement for all COM files,   
   > otherwise the one-byte RET program wouldn't work.   
      
   Couldn't there be [SP] = 0x42, say, and PSP:0x42 et sec holding a   
   termination routine - perhaps directly int 0x20 or even a shim prior to   
   int 0x20? In that case, RET would still work.   
      
   Hence, my "non-compliant environment" comment. And even if the /spec/   
   says zero, most code would work with non-zero and, in fact, be unaware   
   of it.   
      
   Am not trying to add a spanner to the works. I am just used to dealing   
   with the BIOS and know that different machines sometimes behave   
   differently - including not per spec - so I am wary of what a program   
   gets handed by another agency.   
      
      
   --   
   James Harris   
      
   --- 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