I'm taking an x86 assembly language programming class and know that certain instructions shouldn't be used anymore -- because they're slow on modern processors; for example, the loop instruction.
I haven't been able to find any list of instructions that are considered deprecated and should be avoided; any guidance would be appreciated.
Oh, but there still might be a good reason to use the
loopinstruction. For example,loop labelonly requires two bytes. As opposed todec cxfollowed byjnz labelrequires three bytes. Sometimes code size is more important than speed.I would suggest, however, that if you're just learning x86 assembly--especially if this is your first foray into assembly language--that you first concentrate on how to do things. Once you've gotten a better feel for how things work, then worry about making them faster.