2

I am a newbie on assembly and probably this question has a very basic answer but i really can't figure it out. As the result of this code AL gets the value FE. Why is not 00 ?

MOV BL,0ff;
MOV AL,0ff;
ADD AL,BL
0

2 Answers 2

5

Because FF + FF = 1FE. So, AL will be FE, and your carry flag will be set (1).

2

You're getting 0xFE because 0xFF + 0xFF = 0x1FE. The lower byte is 0xFE, obviously.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.