tuhdo / os01

Bootstrap yourself to write an OS from scratch. A book for self-learner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[pg. 101, fg. 4.9.6][Content or Typo] Wrong representation of stack layout

leifhelm opened this issue · comments

The memory addresses given in the Figure 4.9.6 do not correlate with the label ebp+0xc, ebp+0x8 and ebp+0x4. ebp points to 0x1000f. so ebp+0x4 should be 0x10013 and the other ones would follow afterwards. The label to i should be ebp-0x4 like in the disassembly and the byte order has to be reversed as well. If it should somewhat resemble Intel's memory layout style the whole second row has to be flipped and only the addresses of the first row have to be flipped as well.
And finally the second row should start at 0xfff0.