Strange loop behavior: two copies of variable?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Strange loop behavior: two copies of variable?

2,142件の閲覧回数
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?
ラベル(1)
0 件の賞賛
2 返答(返信)

256件の閲覧回数
Sten
Contributor IV
Have you checked the write_long()-routine? The behaviour could be explained if it only printed every second nibble.
0 件の賞賛

256件の閲覧回数
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 件の賞賛