Click here to Skip to main content
15,880,427 members
Home / Discussions / C#
   

C#

 
AnswerRe: Here is a stumper.... Pin
JollyMansArt2-Sep-09 3:51
JollyMansArt2-Sep-09 3:51 
QuestionAccess WMP Playlist without WMP Player [modified] Pin
Ian McCaul1-Sep-09 9:47
Ian McCaul1-Sep-09 9:47 
QuestionStack Question Pin
Alexander DiMauro1-Sep-09 8:56
Alexander DiMauro1-Sep-09 8:56 
AnswerRe: Stack Question Pin
harold aptroot1-Sep-09 9:11
harold aptroot1-Sep-09 9:11 
GeneralRe: Stack Question Pin
harold aptroot1-Sep-09 9:40
harold aptroot1-Sep-09 9:40 
AnswerRe: Stack Question Pin
Tony Richards1-Sep-09 9:18
Tony Richards1-Sep-09 9:18 
GeneralRe: Stack Question Pin
Alexander DiMauro1-Sep-09 9:36
Alexander DiMauro1-Sep-09 9:36 
AnswerRe: Stack Question Pin
Luc Pattyn1-Sep-09 13:50
sitebuilderLuc Pattyn1-Sep-09 13:50 
Hi,

the stack is a region in memory pointed to by a special register, the stack pointer.
It is special in the sense that some assembly instructions implicitly use the stack pointer:
CALL/JSR push the current PC on the stack
RETURN/RTS pop the old PC value from stack and store it in the PC register
PUSH pops anything onto the stack
POP pops anything from the stack

On top of that, the stack pointer can be used as a regular base register, so indexed addressing is supported. Local variables, while stored on the stack are accessed with an offset (or "displacement") so there is no pushing/popping involved.

Summary: the stack works as a regular stack (implied pushes and pops) when program flow alters (CALL, RETURN); it is used as a memory region (with base address+offset) when local variables are accessed.

All the above is valid at two different levels:
- assembly instructions (as in native code applications);
- .NET environment with IL instructions (managed code).

Smile | :)

Luc Pattyn
Badger | [badger,badger,badger,badger...] Jig | [Dance] Badger | [badger,badger,badger,badger...] Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.Jig | [Dance] Badger | [badger,badger,badger,badger...] Jig | [Dance]

QuestionSorting strings [modified] Pin
gamer11271-Sep-09 8:29
gamer11271-Sep-09 8:29 
AnswerRe: Sorting strings Pin
OriginalGriff1-Sep-09 8:39
mveOriginalGriff1-Sep-09 8:39 
AnswerRe: Sorting strings Pin
PIEBALDconsult1-Sep-09 8:53
mvePIEBALDconsult1-Sep-09 8:53 
AnswerRe: Sorting strings Pin
Not Active1-Sep-09 8:53
mentorNot Active1-Sep-09 8:53 
AnswerRe: Sorting strings Pin
DaveyM691-Sep-09 9:06
professionalDaveyM691-Sep-09 9:06 
AnswerRe: Sorting strings Pin
dan!sh 1-Sep-09 9:09
professional dan!sh 1-Sep-09 9:09 
GeneralRe: Sorting strings [modified] Pin
gamer11271-Sep-09 9:11
gamer11271-Sep-09 9:11 
GeneralRe: Sorting strings Pin
dan!sh 1-Sep-09 9:49
professional dan!sh 1-Sep-09 9:49 
GeneralRe: Sorting strings Pin
gamer11271-Sep-09 10:02
gamer11271-Sep-09 10:02 
GeneralRe: Sorting strings Pin
PIEBALDconsult1-Sep-09 11:21
mvePIEBALDconsult1-Sep-09 11:21 
QuestionDesign Question (Class vs Structs) Pin
student_rhr1-Sep-09 8:00
student_rhr1-Sep-09 8:00 
AnswerRe: Design Question (Class vs Structs) Pin
PIEBALDconsult1-Sep-09 8:54
mvePIEBALDconsult1-Sep-09 8:54 
Questionusing webbrowser to Interact with a Flash control??? Pin
Member 65252411-Sep-09 6:54
Member 65252411-Sep-09 6:54 
QuestionDatabase connection question Pin
tonyrdye1-Sep-09 6:35
tonyrdye1-Sep-09 6:35 
AnswerRe: Database connection question Pin
musefan1-Sep-09 6:43
musefan1-Sep-09 6:43 
AnswerRe: Database connection question Pin
Kevin Marois1-Sep-09 18:24
professionalKevin Marois1-Sep-09 18:24 
AnswerRe: Database connection question Pin
seoamitk1-Sep-09 22:42
seoamitk1-Sep-09 22:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.