"KiLVaiDeN" <kilvaiden@gmail.comwrote in message
news:1162554001.853619.231180@m7g2000cwm.googlegro ups.com...
Quote:
Hi John,
>
Have you googled a bit before posting this question ?
>
If you look at this page :
http://dclh.electricalandcomputereng...b/teachos.html
you'll see relevant informations about this matter.
>
Turbo C has added those pseudo variables in order to simplify the
access to registers.
>
And as it has already been said, it's not a standard C way of doing
this.
Messing with this register access has always been tricky. It was useful for
some of the _dos_interrupt calls (a few of which were, IIRC, 'macros' which
only output the correct INT xx opcode), but with any other function the
registers could be (a) trashed or (b) saved and restored (thus, doing
nothing :). My guess is _SP is added just to get a complete set. Even in
assembly, it's dangerous to mess around with it, and in C there may just be
too many variables to use it in a useful way. Example? Suppose you figured
out for a specific function where one of your variables resides on the
stack. Just about any change to that one function may alter that position!
Even a rather simple compiler optimization, such as optimizing out a local
variable, changes the C stack.
[Jongware]