![]() | ![]() ![]() ![]() |
If a routine gives back the result in a register and its value is 0 on error and 1 on success, the ordinary or ax,ax
je error
There are two things to note. First, use TEST instead of OR. This does not write the result back to the register. There is however a better solution that is smaller: dec ax
jne error
For example, the XMS driver reports the errors this way. Is it fair that testing a register=0 is longer than testing if it is 1 or -1?