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,405 of 4,675    |
|    wolfgang kern to luserdroog    |
|    Re: indexing sp in 8086    |
|    13 May 18 10:59:32    |
      From: nowhere@never.at              "luserdroog" said:       > Hi everyone.              hello,              > I've been casually reading jonesforth and trying to translate some       > of the 386 code down to 8086. I've run into some difficulty with       > this instruction:       >       > mov 4(%esp),%eax              > There doesn't appear to me to be any 8086 instruction that does this.       > Unless I'm missing something it needs an SIB byte which was introduced       > later.              > But that strikes me a very surprising conclusion. Is there a way to       > get (SP)+immed8 from some obscure encoding that I'm just not seeing?              if your 16bit 8086 code run on a 386 (intel syntax, dunno AT&T):              66 0F B7 E4 movzx esp,sp ;needed only once, just in case       67 8B 44 24 04 mov ax,[esp+4] ;uses SS:       __       wolfgang              --- 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