msp430的段码LCD显示 里那个for小循环是什么意思

楼主
msp430的段码LCD显示 里那个for小循环是什么意思
void Disp_Signed_Long(long Value)
{
  unsigned int i;
  unsigned long Output;
  char fNeg = 0;

  if (Value < 0)                                // Test for negative value
  {
    Value = -Value;                             // Negate value
    fNeg = 1;                                   // Set negative flag
  }

  for (i = 32, Output = 0; i; i--)              // BCD Conversion, 32-Bit
  {
    Output = __bcd_add_long(Output, Output);    //功能:两个 32 位 BCD 格式的数相加,返回和。
   
    if (Value & 0x80000000)
      Output = __bcd_add_long(Output, 1);    
   
    Value <<= 1;
  }

  if (fNeg)                                     // Display neg sign?
    Output |= 0x80000000;                       // Bit 31 indicates neg. number

  Disp_BCD(Output);
}[P][LINE-HEIGHT=24px][FACE=arial, 宋体, sans-serif, ][COLOR=rgb(51, 51, 51)][SIZE=14px][/FACE][/COLOR][/SIZE][/LINE-HEIGHT][/P][P][FACE=arial, 宋体, sans-serif, ][COLOR=rgb(51, 51, 51)][SIZE=14px][BGCOLOR=rgb][URL=http://zhidao.baidu.com/question/2138209998568275788.html?quesup2&oldq=1#][i][/i][/URL][/FACE][/COLOR][/SIZE][/BGCOLOR][/P][P][/P]
1楼
看了,没看懂作者用意....

电脑版 Page created in 0.1562 seconds width 3 queries.