Hello Mike,

It seems like you discovered a bug. Would you be so kind as to open 
a bug tracker item for it?

Thanks,
Maarten

> Hi All,
> 
> Perhaps someone can help with the two functions shown below.
> 
> The scenario is:
>    I desire to empty a hardware buffer, and just throw away it's contents.
>    In both functions the requirement is to read BtRdl1 until the hardware 
> device at this address shows empty as in (BtRdl1Stat & Rmpty)
> 
> Assumption:
>    Just placing an identifier, BtRdl1, will cause it to be read.
> 
> The result:
>    Function 1 does not work
>    Function 2 does work
> 
> The question:
>     Why does function 1 not work?
> 
> Target:
>    mcs51
> 
> SDCC:
>    C:\SDCC>sdcc -v
>    SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 
> 2.7.4 #5003 (Feb 11 2008) (MINGW32)
> 
> 
> volatile __xdata uchar at (Bt8370_Base + 0xA8) BtRdl1;
> volatile __xdata uchar at (Bt8370_Base + 0xA9) BtRdl1Stat;
> #define Rmpty 0x04
> 
> Func 1
> ---------
> 
> void l1_ClrBt8370_DL(void)
> {
>    while (BtRdl1Stat & Rmpty) BtRdl1;
> }
> 
> 
> Func 2
> ---------
> 
> 
> void l1_ClrBt8370_DL(void)
> {
>    while (BtRdl1Stat & Rmpty)
>    {
>       BtRdl1;
>    }
> }
> 
> 
> Kind Regards, Mike
> 
> 
> Mike Allsworth
> Tel: +27 (0)11 794 5273
> Cell: +27 (0)82 572 3079
> email: [EMAIL PROTECTED]



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to