# Alternative opcodes

This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I wondered if it was possible to 'exchange' various machine opcodes for alternative ones, opcodes that have the same (or practically) functionality, such as something that you could replace a nop (0x90) with, which still does as I like to say: 'naff all'. Cheers.

##### Share on other sites
Some chips were supposed to let you change the instruction set. Common x86 chips sure aren't. A NOP is a NOP is a NOP and nothing else.

Of course, that doen't mean you can't inject useless code in your program, like
   JMP labellabel:

##### Share on other sites
Yeah that is what I had in mind essentially (the latter). Basically the nops I intended to change are the clusters of nops you get between functions, which is there for padding reasons.

The problem is i'm guessing this will cause a problem with function timing if I were to alter them at all. I guess i'll give this plan a miss then ahah.

Its basically something to do because i'm bored and its the summer.

##### Share on other sites
"this will cause a problem with function timing if I were to alter them at all"
eh? Replacing nops with instructions that take up more cycles won't destroy your program if that's what you were thinking. If it's padding between functions, the code would probably never be called, so you could probably change it to absolute garbage. The purpose of nop's in the middle of functions is to align loops properly because the CPU works faster that way.

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 15
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633352
• Total Posts
3011483
• ### Who's Online (See full list)

There are no registered users currently online

×