Strange loop behavior: two copies of variable?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Strange loop behavior: two copies of variable?

2,136 Views
HarlanRosenthal
Contributor I
I've got some very strange behavior in very simple code.  Trying to read a hex number and translate it using successive multiplication, each hex digit seems to be added to an alternate copy of the accumulating variable.  The architecture is ARM, so I thought of register bank switching, but the generated code is using registers from 0 to 7.  Anyone ever see something like this before?
Labels (1)
0 Kudos
2 Replies

250 Views
Sten
Contributor IV
Have you checked the write_long()-routine? The behaviour could be explained if it only printed every second nibble.
0 Kudos

250 Views
HarlanRosenthal
Contributor I
Sten, my first reaction when I read your post was "I've gone over that already . . ."
 
  . . . and fortunately I went back over it again.  The typo was a *little* more subtle than that, but not much.  Thank you!
 
-Harlan
0 Kudos