From what I\'ve read, seems like there are 9 different flags. Is it possible to read/change them directly? I know I can know for example if the zero flag is set after doing
Save a copy of the flags in a variable for safekeeping
.data
saveflags BYTE ?
.code
lahf ; load flags into AH
mov saveflags,ah ; save them into a variable
SAHF: stores AH into status flags
Retrieve the value of flags stored earlier
.code
mov ah, saveflags ; load save flags into AH
sahf ; copy into flags register