|
I've finished project 8 and I'm left with one doubt: what's the point of calling Sys.init as opposed to just jumping straight to it? The way I understand it, Sys.init is supposed to end in an infinite loop and never return, so there's no need to store a return address. None of the other segment pointers are initialized at this point, so there's no need to save them either. The only consequence is that our program begins running at stack address 261 instead of 256, meaning we're completely wasting 5 registers.
My code passed all the tests by simply pushing 5 zero's, because the cmp files expected the program to begin at stack 261, but other than that it's just useless code.
I haven't looked at the next chapter yet. Am I missing something or is this addressed later on?
|