Re:Keyboard: Problem with the (re)programmed Interrupt handl
Posted: Sun Feb 26, 2006 9:52 am
That is a "standard" method to detect if something is zero or not. Remember that the processor sets flags on instructions like test.
So, test eax, eax will set the zero flag if eax is zero and otherwise it won't.
test eax, eax
jz NullPointer
That jz will be taken if eax = 0, otherwise the jump will not be taken
So, test eax, eax will set the zero flag if eax is zero and otherwise it won't.
test eax, eax
jz NullPointer
That jz will be taken if eax = 0, otherwise the jump will not be taken