small change
switch instruction order to avoid partial flag write
bugfixes to make nasm happy