I need to implement a custom data structure in assembly. Preferably, it needs to be dynamic. Something like a linked list in C++/Java where each element points to the next element. Please note that the size of each element may vary.
How can I do this?
The same you would in C. Assembly has functions and address spaces. Start with the basics: what functions does your stack need to have? Put the actual datastructures aside and focus on the big picture.
All you need is a function to push() and a function to pop(), a place to stick these items in the memory, and a counter to tell you how much of that space you've used up.
Oh, you should probably review your data structures before starting, as in neither C++ nor Java (or any other language, as a matter of fact) does an object pushed onto a stack point to the next object on the stack. That's called a linked list.