|
-
December 20th, 2005, 04:12 AM
#2
Re: Check this little assingment of arithmatic operation...
There isn't a lot of sense in reducing the number of instructions, since small size doesn't necessarily equal fastest code. Speed is kind of the point with asm nowadays, unless we're talking about extremely memory-limited microcontrollers (but these don't use the x86 instruction set).
That said, the comparison stage could be a bit shorter:
Code:
cmp bl,al
jae done
cmp cl,bl
jae done
mov cx,1
done:
A couple of issues with your original code: Shouldn't it be "jbe done" instead of "jb done"? And what's "mov 0x4c00"? Missing an operand?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|