68k chip, Diab Compiler and odd behavior
From: Scott (sts_222_at_hotmail.com)
Date: 04/09/04
- Next message: Ian C. PG Trionic Inc: "Re: How to find a "diff" visually?"
- Previous message: Gerard Zagema: "Re: How to find a "diff" visually?"
- Next in thread: Gene S. Berkowitz: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: Gene S. Berkowitz: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: CBFalconer: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: Scott: "Re: 68k chip, Diab Compiler and odd behavior"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Apr 2004 07:00:44 -0700
Let me first say that I am new to the embedded development community.
I have been tasked with determining the problem with the code below.
Let me explain what is happening and why I find it strange. The
problem is in the inner for loop. The first 16 times through the loop
all lines execute as expected. After that, when I step through with
the debugger, line 12 is executed and the debugger skips 13 and 14,
and goes to line 15. The debugger will not step into the function on
line 15, gScreenIO.Special(), it just pops out and goes to line 12
again to repeat the pattern.
I am using Diab Data 4.0b, SingleStep 7.03 on a Windows NT
environment. I have never seen this kind of thing before. I find it
quite odd. I have tried changing the data types of shiftcnt, shift and
count to the largest types possible; same behavior. We can't get any
help from Windriver (I think they bought Diab compiler) because we
haven't given them enough money.
Any help would be *greatly* appreciated.
TIA.
1void SetSysWin( void ) // Highlight all fault buttons //
{
2 register _faults *fltptr = Disfaults;
3 ulword tmpfaultvalue;
4 ulword shiftcnt;
5 ulword shift;
6 uword count;
7 for( count = 0; count < MaxFaults; count++ )
{
8 tmpfaultvalue = fltptr[count].faultvalue;
9 if(tmpfaultvalue)// don't need to check all the bits if there is
no fault
{
10 for(shiftcnt = 0; shiftcnt < 32; shiftcnt++) // 16 bits to
shift through
{
11 shift = 1;
12 if( ( shift <<= shiftcnt ) & tmpfaultvalue )
13 if( ! ( fltptr->faultsalreadydisplayed & shift ) )
{
14 fltptr->faultsalreadydisplayed |= shift;
15 gScreenIO.Special(butPress, Faults[count][shiftcnt]);
}
}
16 gScreenIO << flush; // STS
}
} // end of for count loop
17 return;
}
- Next message: Ian C. PG Trionic Inc: "Re: How to find a "diff" visually?"
- Previous message: Gerard Zagema: "Re: How to find a "diff" visually?"
- Next in thread: Gene S. Berkowitz: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: Gene S. Berkowitz: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: CBFalconer: "Re: 68k chip, Diab Compiler and odd behavior"
- Reply: Scott: "Re: 68k chip, Diab Compiler and odd behavior"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]