954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Carry flag problem

Sorry guys im kinda new in this language and i have a small problem here. im supposed to write a code that uses addition and subtraction to clear and set a carry flag it must then display the dumpregs and i think this is how it should look, well not exactly this

main PROC

;ADDITION
MOVE AL,0FFh ;AL = 0FFh
ADD AL,0FFh
SETB C
DumpRegs
exit
.
.
.

mapaputsi
Newbie Poster
6 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

Which processor? In general any 8 bit unsigned addition that will cause a result greater than 255 or less than zero for subtraction will cause carry to be set, otherwise it will be reset respectively.

Tight_Coder_Ex
Posting Whiz in Training
215 posts since Feb 2005
Reputation Points: 47
Solved Threads: 17
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You