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,401 of 4,675   
   Anton Ertl to luserdroog   
   Re: indexing sp in 8086   
   12 May 18 12:09:50   
   
   From: anton@nospicedham.mips.complang.tuwien.ac.at   
      
   luserdroog  writes:   
   >So using si I have   
   >   
   >mov si, sp   
   >mov ax, [si]   ; smaller encoding=20   
      
   From your definition of NEXT in the other posting I see that you   
   already use SI as Forth IP (you use LODS in your NEXT), so that's not   
   a good choice.   
      
   One thing you could do is to use SP as return stack pointer, and   
   something else (BX or BP?) as data stack pointer.  Indexed return   
   stack accesses are less frequent (mostly for DO...LOOPs).   
      
   One other thing I would do is to keep the TOS in a register across   
   word boundaries.  This does not increase register pressure in most   
   cases (probably in none), because the words with the highest register   
   pressure have the TOS in a register at the place of the highest   
   register pressure even if they keep it in memory across NEXT.   
      
   - anton   
   --   
   M. Anton Ertl                    Some things have to be seen to be believed   
   anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen   
   http://www.complang.tuwien.ac.at/anton/home.html   
      
   --- 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