Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 10th, 2008, 6:56 PM   #1
Grich
Hobbyist Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 148
Rep Power: 1 Grich is on a distinguished road
Flag Question

Another question from me. Although I am a noob at assembly, I love learning it.

My questions are:
  • What are flags?
  • When are they used?

Thanks in advance guys.
__________________
SYNTAX ERROR ...
Grich is offline   Reply With Quote
Old Mar 10th, 2008, 7:12 PM   #2
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 548
Rep Power: 4 Benoit is on a distinguished road
Re: Flag Question

Flags are just a collection of bits that tell you different things about the current state of the processor. For example, if you do a byte addition and the result is greater than 255, then the carry flag will be set. The zero flag is also popular, to signify that the result of a computation is zero. The sign flag tells you if a number is interpreted as signed or unsigned. Most CPU's have atleast those three.
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Mar 10th, 2008, 8:06 PM   #3
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: olympia,WA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
Re: Flag Question

flags can be single bit registers, or memory mapped registers.
they are used in conditional operations. branch on negative/zero/positive
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Boolean Flag issue dwizzle13 Visual Basic .NET 4 Dec 7th, 2006 5:58 PM
Question about passing objects into member functions aznluvsmc C++ 7 Sep 27th, 2005 11:41 PM
How to post a question nnxion C++ 10 Jun 3rd, 2005 11:53 AM
How to post a question nnxion C++ 0 Jun 3rd, 2005 8:55 AM
How to post a question nnxion C 0 Jun 3rd, 2005 8:55 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:38 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC