From: <wei...@t-...> - 2001-09-19 16:13:50
|
Hi i'm again. There is a little problem i have here. I have the following C-Code: dummy = graRD1; //Dummy Read grafik_wbusy(); dummy = graRD1; grafik_wbusy(); graRD1 is a XRAM location declared as: volatile xdata at 0xF003 unsigned char graRD1; Now the asm file look's like the optimizer only use: dummy = graRD1; grafik_wbusy(); one time. The second read is optimized. I understand why this is so but i have to do a dummy read before the normal read. The compiler always otimize the second read away. I can define a variable and do something with it. temp = graRD1; //Dummy Read grafik_wbusy(); dummy = graRD1; grafik_wbusy(); /*do something with dummy*/ dummy = dummy | temp; But this can't be the right way to do that. Is there a statement or something to tell the compiler not to otimize these four lines? Please excuse (<- Hope this is "entschuldigt") my bad English. Matthias Weißer Wer einen Rechtschreibfehler findet darf ihn behalten http://www.matwei.de/ mat...@ma... |