??? 06/21/09 18:59 Read: times |
#166315 - doesn't SDCC warn about line 36? Responding to: ???'s previous message |
there is a lot to say about your code but
why should xmt_flag be tested for not being zero in line 36 if its value is known zero? _uart_send: mov _SBUF,dpl ; uart.c:31: xmt_flag = 0; clr a mov _xmt_flag,a mov (_xmt_flag + 1),a ; uart.c:34: while (1) 00105$: ; uart.c:39: opti_fooler++; inc _opti_fooler clr a cjne a,_opti_fooler,00105$ inc (_opti_fooler + 1) sjmp 00105$ Hint: lookup "volatile", then recheck, then remove the variable:) |
Topic | Author | Date |
UART code porting to SDCC | 01/01/70 00:00 | |
doesn't SDCC warn about line 36? | 01/01/70 00:00 | |
that's it | 01/01/70 00:00 | |
ah ha | 01/01/70 00:00 | |
Don't blame the optimiser! | 01/01/70 00:00 | |
doesn't SDCC warn about line 36 | 01/01/70 00:00 | |
hmmm | 01/01/70 00:00 | |
modified dog![]() | 01/01/70 00:00 | |
I cannot remember now | 01/01/70 00:00 | |
xmt_flag., why "int"? | 01/01/70 00:00 | |
if you want to use it as "int" / "char" | 01/01/70 00:00 | |
You destroy succeding putchar()'s | 01/01/70 00:00 | |
"Volatile" Helps | 01/01/70 00:00 | |
"bit" is more useful | 01/01/70 00:00 | |
buzzzzz | 01/01/70 00:00 | |
family | 01/01/70 00:00 | |
stdbool | 01/01/70 00:00 |