add CMP instruction, fix flags for SUB and CMP