Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPU flags

Status
Not open for further replies.

crush

MIS
Joined
Nov 26, 2001
Messages
2
Location
US
Is there a way to access (copy to eax or something like that) the flag-register (overflow, carry, parity, EQ, etc.) directly without jumping in sub-routines accessing the stack?
 
In assembly? Without using the stack? Yes. Use this very obsolete command:

LAHF - load AH (second byte of EAX) with lower byte of flag.

What do you mean by 'without jumping in sub-routines accessing the stack?'
If you need the whole eflags register you can always:
PUSHD
POP EAX
"Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top