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,397 of 4,675   
   luserdroog to luserdroog   
   Re: indexing sp in 8086   
   11 May 18 17:10:17   
   
   From: luser.droog@nospicedham.gmail.com   
      
   On Friday, May 11, 2018 at 6:53:44 PM UTC-5, luserdroog wrote:   
   > Hi everyone.   
   >   
   > 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?   
      
   FWIW here's what I /do/ have translated. MRM bytes are in octal then   
   the equivalent hex, cuz the octal's easier to write.   
      
   macro next   
           lodsl           ad   
           jmp *(eax)      ff 0350 e8   
      
      
   drop   
           pop eax         58   
           next   
      
   swap   
           pop eax         58   
           pop ebx         5b   
           push eax        50   
           push ebx        53   
           next   
      
   dup   
           mov (esp),eax   8b 0340 e0   
           push eax        50   
           next   
      
   over   
           mov 4(esp),eax   
           push eax        50   
           next   
      
   The goal with all this is to have a forth that runs on my partially-complete   
   emulator. https://github.com/luser-dr00g/8086   
      
   --- 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