Re on Re: Message Loop [Enter xx, xx] 
Author Message
 Re on Re: Message Loop [Enter xx, xx]

> :In regards to your posted reply in comp.lang.asm.x86:
> zap...

> :Since this post, I think i figured out went wrong. in my function macro i
> :told it to pop the number of values I inputed. One last thing. Could
> :explain the 'enter x,x' command, I don't understand exactly what it does.
> :
> :
> :Thanks.
> :

I don't have your mail left, but I think I can remember some of it...
however I
can answer your question.

This is how ENTER works:

ENTER #locals, nesting

  push BP
  temp <- SP
   while( nesting  > 0)
   nesting <- nesting - 1
   BP <- BP - 2
  BP <- temp
  SP <- SP  - #locals

 Note: for 386 - 686's, convert all registers to extended versions, and
substract 4 from BP each iteration...

Enter creates a stack frame. It saves the previous stack frame pointer
BP, sets
the frame to the current stack frame pointer BP, sets the frame pointer
to the
current stack top, and allocates space for local variables. Parameters
passed to
the procedure are stored at positive offsets from BP; local variables
are stored
at negative offsets from BP..

I would likely as not use enter, I use 'local' instead... it works like

it's a simplified enter that the compiler transforms into an 'enter
; /* might be different under different compilers.. ;.\  */


Tue, 29 Aug 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. regular expression to parse 0,xx/xx/xx and replace 0 in GPEP

2. Page xx of xx?

3. page xx of XX

4. xx 2GB xx 1GB USB Flash Memory Drive

5. xx 2GB xx 1GB USB Flash Memory Drive

6. xx 2GB xx 1GB USB Flash Memory Drive

7. DOS Functions from MS Fortran versions 3.xx to 5.xx

8. MTU setting in OS9.xx

9. converting assemby code for use in PowerBASIC v3.xx instead QB45/PDS71

10. Using Relate:xx.Update

11. WTB: Smalltalk/V Mac v2.xx


Powered by phpBB® Forum Software