0

I am running a disassembly of a firmware image for a Cortex-M4 and the entry point is doing something strange.

EntryPoint:
00001000         db  0x00 ; '.'
00001001         db  0xff ; '.'
00001002         lsls       r7, r7, #0x3

Why run decrement before on 0x00 and 0xff, what is the reasoning behind it?

  • 4
    Are you sure that that's executable code? db is not a decrement; it means define byte, so those first two lines form a literal 0xFF00. lsls r7,r7,#0x3 also encodes to 0x00FF. Seems to me that it's actually data, not executable code. – Jeff E Jun 14 at 15:19
  • I am not sure that it is executable code at all, its a firmware file that gets flashed onto a Sphero toy's STM32 cpu. Searching for db in the cpu documentation only yielded "decrement before" and not define byte which makes much more sense. There do seem to be function calls in the disassembly. – Bob R Jun 14 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.