From: SourceForge.net <no...@so...> - 2005-04-20 08:00:43
|
Bugs item #1185672, was opened at 2005-04-19 08:21 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1185672&group_id=599 Category: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Erno (epapa) >Assigned to: Maarten Brock (maartenbrock) Summary: Hi-Lo byte change in IF Initial Comment: #include <at89x52.h> #define DEF_H0100 0x0100 data int srlen; int l_regrd(int ad){ /* ... */ return ad; } void head_send(int i){ srlen= i; if((l_regrd(0x1234) & DEF_H0100) == 0){ srlen= 0; } } void main(void){ head_send(1); } /* The resoult: ; File Created by SDCC : FreeWare ANSI-C Compiler ; Version 2.4.0 Tue Apr 19 07:52:01 2005 ...... ;sdccbug.c:17: if((l_regrd(BUSSTA_REG) & RDY_TX_F) == 0){ ; genCall ; Peephole 182.b used 16 bit load of dptr mov dptr,#0x0138 lcall _l_regrd mov a,dpl mov b,dph ; genAnd mov r2,#0x00 anl a,#0x01 <<<<<<Here that is no resoult Hi byte mov r3,a ....... */ ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2005-04-20 10:00 Message: Logged In: YES user_id=888171 Thanks, This bug has probably been around since the beginning of time! Surprising it never came up before. But I think I will wait with the fix until SDCC 2.5.0 is out. Maarten ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1185672&group_id=599 |