Check this little assingment of arithmatic operation...
The assignment is:
"Consider the following pseudo-code and write the corresponding assembly code for it.
Note: There is more credit for a shorter code.
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:
Re: Check this little assingment of arithmatic operation...
Dear Synthetic Being!
Thanx a lot for shortening the code. The speed isn't issue here in shortening the code, it is just an assignment. The "move cx, 04c00" command is to end the programm.
Bookmarks