Home Artists Posts Import Register

Content

The stack gets mentioned a lot in my videos, and it is a common thing that is asked about in the comments. Hopefully this will bring some insight on how it works! A good chunk of the content in this video actually applies to today's computers too, but I tried to stick to more primitive tech in this video.

Files

The Stack: Last in, First out

The "stack" is referenced a lot when dealing with memory and control flow, but what does it actually do? It's all explained right here. LINKS Twitter (updates): https://twitter.com/RetroGameMechEx Patreon (support): https://www.patreon.com/rgmechex Discord (discussion): https://discord.me/rgmechex PATRONS Thank you everyone for your help! It means so much to me. Markus Persson, Jay Logan, Avi Drissman, Ange Albertini, Mark Whittington, Chris, Curtis Ware, Igor Skorokhodov, Sebastian Stabinger, gaspump, Dave Voyles, Brandon Pelfrey, Hex Witch Circe, null, Vaendryl, Austin Hughes, LiraNuna, Daniel L, Steven, Adam Sidelsky, David Mazarro, Chell Jones, Jordan Wiens, Glenn Sugden, Juli Mallett, Stephen1704, D Money, Corrodias, Andrew, Joseph Edwards, Diarmaid Roche, Matthew Bettcher, Navarro Parker, Dakota Brink, Ben Salvidrim, Luke Chang, Zack Zimmerman, Josh Wolfe, Hans Eriksson, Vangald, Christopher Mayfield, Alex Yancey, John Armstrong, Ryan, Richard Small, Jordan, Rich, Matthew, Leon, Alejandro Cadavid, hyperforce, Brian Henriquez, Aaron, silsha fux, Nicholas Wall, nathanisbored, & Dan Amlund Thomsen.

Comments

Anonymous

Sad face seeing the stack grow up as opposed to down. I know there are arguments for both, but heck, even the descriptions are thrown off because of this: "ascending" goes down as a result?! Whoops, meant to add this as well: I think the + and - on the "SP" on the ascending/descending stack diagram isn't right. Currently it shows them on the same side so it's not clear which operation is which in the diagram which might be helpful to clarify.

Anonymous

Pretty much every diagram of a stack I've seen has had the stack grow upwards. Stack traces in debuggers have the most recent stack frames at the top of the stack, too.