Re: Error in tutorial code?

Re: Error in tutorial code?

Robbert Haarman


View parent message

Posted by inglorion
at 2007-05-09 07:17:53

Hello. First of all, thanks for writing these tutorials. They are proving to be a very valuable resource.

You are welcome!

I wanted to make a note however that the code on this page, as it currently is written, does not quite match what you're writing about in the rest of the page. Specifically, there appears to be a critical error in the printString function: the return address pushed by call is popped off and stored in cx (instead of storing the size parameter there), and the actual size parameter is never popped and (I think) is being used as the return address instead. ... One last note, the current example pops off the function args in the wrong order: the size was pushed on first, so it should be popped off last.

You are completely right. Thanks a lot for pointing this out. I have uploaded a new version of simple_kernel.asm that fixes these problems.