This function has the name viewstack. This function can be called from any programming language that compiles into an object file such as C, C++, X86, and Fortran. When calling this function 3 integer parameters must be passed to the function, namely, in this order: an identifying integer, a positive integer representing the number of quadwords outside of the stack that will be outputted, and a positive integer specifying the number of quadwords inside the stack that will be displayed.
If you are debugging an X86 program and you need to see the values at the top of the stack then this is the tool you need. Down load it and try it.