Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

hunter123

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-17-2008
02:00 PM

98 Views

Compute eflags

Sincerely,

Hunter

Link Copied

1 Reply

ILevi1

Valued Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-27-2008
08:36 PM

98 Views

Hunter,

Let me try to address your question. You have to understand what each flag means first and you have to have basic knowledge of electronics as well as Boolean algebra (Boolean logic), and then you will be able to understand how they are "computed".

As for your example, ADD instruction produces carry (and thus sets CF) if an adder inside of a CPU ALU produces carry as a result of addition operation.

I suggest you start with Boolean algebra (Boolean logic) if you are not familiar with this subject.

If you are mainly interested in emulation, and how emulators compute EFLAGS, please start reading those excellent EFLAGS emulation ideas presented by Darek Mihocka from this article onwards.

Let me know if this helps.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.