Re: Trivia Question




\\\o///annabee wrote:

> Who need that? Someone dealing with writing a compiler!
Or a debugger. Or maybe someone really wants to *change* one of the
register values on return (and, therefore, needs to poke a value into
the stack frame where the value for that register is sitting).

Make all the excuses for your ignorance that you like, but, yes,
assembly programmers *should* know about this stuff. After all, the
point of assembly language is *not* to write HLL-like code in assembly,
but to take advantage of what the machine has to offer. Now, knowing
the exact sequence of the registers on the stack isn't something that
every programmer ought to have memorized (it's easy enough to look up
when you need it, or you can do something like #include( "x86.hhf" );
and get symbolic equates for these offsets), but a decent assembly
programmer *should* understand why knowing this information may be
useful. Hopefully, in a few more years, you'll discover why it just
might be important to know the order of the registers pushed on the
stack by pusha/pushad.
Cheers,
Randy Hyde

.



Relevant Pages

  • Re: Trivia Question
    ... register values on return (and, therefore, needs to poke a value into the stack frame where the value for that register is sitting). ... every programmer ought to have memorized (it's easy enough to look up ... After working with the needed instructions some ...
    (alt.lang.asm)
  • Re: Cost of calling a standard library function
    ... because, though faster from dropping the stack and using EBP, they ... exact same register we copied from, meaning that we're copying a value ... this stuff makes sense and HLL compilers and HLL ... There's no need to optimise ...
    (alt.lang.asm)
  • Re: push pop ebp
    ... > mov ebp, 9000 ... you may use it there; EBP _is_ a general purpose register ... It also nominally the so-called "base pointer" register to be ... "stack frame"...this behaviour, though, is NOT enforced in any ...
    (alt.lang.asm)
  • Re: Forth and OO design?
    ... cell circular data stack ... return stack index register ... No, that is not design. ... language which became the bastardized basis of Javascript. ...
    (comp.lang.forth)
  • Re: ml64, PROC and parameters
    ... _test_nested creates 98h bytes of stack space for the sake of the exercise. ... You should push on the stack only the non-parameter register. ... The first 4 parameters are in registers rcx, rdx, r8, r9. ... mov,rcx ...
    (microsoft.public.development.device.drivers)