Alternative opcodes
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.
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
Of course, that doen't mean you can't inject useless code in your program, like
JMP labellabel:
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.
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.
"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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement