scdoro
Member level 5

assembly language subtraction pic
Hi,
I am new to assembly language. I need to write a routine to compare VALUE1 with VALUE2, if VALUE1 is better than VALUE2, will skip the next statement.
I am using PIC 16 F872 thus there is this no compare instruction set.
If i use the substraction instruction, i need to take care of the complement value too ....
May I know how to write the routine ?
eg, if i want to subtract 99 from 44, sure there will be a negative, how do i takecare of that using complement method.
or is there any other alternative ?
Is there any sample which i can make references to ?
thanks..
Hi,
I am new to assembly language. I need to write a routine to compare VALUE1 with VALUE2, if VALUE1 is better than VALUE2, will skip the next statement.
I am using PIC 16 F872 thus there is this no compare instruction set.
If i use the substraction instruction, i need to take care of the complement value too ....
May I know how to write the routine ?
eg, if i want to subtract 99 from 44, sure there will be a negative, how do i takecare of that using complement method.
or is there any other alternative ?
Is there any sample which i can make references to ?
thanks..