Page 1 of 1

Please confirm NOP = 0x 0000_0011 ?

Posted: Sun Jun 14, 2015 6:26 am
by Digital Larry
I'm working on making my program output Intel Hex directly.

Looks like when Spin IDE does this it fills space past the end of the explicit instructions with 0x0000_0011. However there is no reference to "NOP" giving its bit pattern in the ASM manual.

Thanks!

Posted: Sun Jun 14, 2015 1:53 pm
by frank
I thought it was 0x0000000F which is an OR with all bits 0 so nothing changes.

Posted: Sun Jun 14, 2015 3:23 pm
by Digital Larry
Here's the section of Patch 0's generated hex (from Spin IDE) where it goes from having some instructions to all no-op or whatever.

:04005400400004A4C0
:04005800400002C69C
:04005C00000002E6B8
>>> right here <<<
:04006000000000118B
:040064000000001187
:040068000000001183
:04006C00000000117F

Last byte is the checksum. It really looks like 0x0000_0011 to me.

But then the pattern changes once we hit the transition to data for patch 1.

:0401F80000000011F2
:0401FC0000000011EE
>>> right here <<<
:0402000011000000E9
:0402040011000000E5
:0402080011000000E1

I'm guessing that's actually a bug because it only happens when you generate hex on a single program without the dev board attached, and save the hex.

Posted: Sun Jun 14, 2015 3:33 pm
by Digital Larry
Looks like 0x 0000_0011 is equivalent to:

SKP 0,0

There are no bits set to match any condition, and in any case it was just skipping 0, which is to execute the next instruction. So I'd call that a NOP.

Posted: Sun Jun 14, 2015 5:30 pm
by frank
Keith managed the guy doing the assembler so they may have changed it after telling me what it was. SKP 0,0 is fine as a NOP.

Posted: Sun Jun 14, 2015 6:56 pm
by Sandrine
I noticed that too the other day. It seems to only change on an 8 bit roll. I thought it had some deep dark purpose..