Strange loop behavior: two copies of variable?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Strange loop behavior: two copies of variable?

2,640 次查看
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 回复数

754 次查看
Sten
Contributor IV
Have you checked the write_long()-routine? The behaviour could be explained if it only printed every second nibble.
0 项奖励
回复

754 次查看
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 项奖励
回复