os-tutorial icon indicating copy to clipboard operation
os-tutorial copied to clipboard

Stack Access Misinterpretation

Open ggrammar opened this issue 7 years ago • 2 comments

There's a comment in here that's not quite right. We can access different parts of the stack, but this example wasn't pointing to a different part of the stack.

This updated code shows that we can access different parts of the stack, and explains why.

ggrammar avatar Sep 21 '18 18:09 ggrammar

@gamagori I think comment on line 32 is misleading as well:

; data that has been pop'd from the stack is garbage now
mov al, [0x8000]

Data on 0x8000 was garbage even before popping from the stack, as 0x8000 is the stack base and doesn't contain data. It would be better to print the content of the stack instead to show that it doesn't contain the data anymore

michelesr avatar Oct 06 '18 14:10 michelesr