Skip to main content
GameDev.net gamedev.net
🔒 Locked

Assembly Question

Started by snowball123 Jan 15, 2003 at 7:23 PM 2 replies 250+ views
Original Post
snowball123
snowball123
Hi, Why would anyone use a nop in assembly??? Thanks
LostBoy
LostBoy
It''s when you go into a hex editor and change the hex value to "90" which means - no opperation, to the processor. So you would do this when you want an instruction ignored. For example, if the assembly code contained a call to a section of code (IE, maybe a serial checking routine) and it was possible to nop the call statement and fake the correct values into the registers, you could bypass the routine and register the software.

Nops are typically used on calls and jump statements.

Now maybe you can help me. Do you know much about collision detection ?
CodeJunkie
CodeJunkie
NOPs were intended to be used to align code along specific memory boundaries. However, people have found more interesting uses for it.
LostBoy
LostBoy
Good point CodeJunkie. My explanation was from a cracker''s point of view.

As you explained, programmers also have a use for nops.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.