From: Mr.Cashe <mr...@ma...> - 2006-05-24 07:54:33
|
[mrcashe@mrcashe src]$ sdcc --version SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.0 #1020 (Jun 15 2005) (UNIX) [mrcashe@mrcashe src]$ net.c: ..... static short mar_write(short wdata) reentrant; .... /* Erroneous definition: missing "reentrant" */ static short mar_write(short wdata) { MAR = wdata; return 0; } The compiler does not generate any errors or warnings. Poor... net.asm: ;------------------------------------------------------------ ;Allocation info for local variables in function 'mar_write' ;------------------------------------------------------------ ;wdata Allocated with name '_mar_write_wdata_1_1' ;------------------------------------------------------------ ;../net.c:90: mar_write(short wdata) { ; ----------------------------------------- ; function mar_write ; ----------------------------------------- _mar_write: ; genReceive mov r2,dph mov a,dpl mov dptr,#_mar_write_wdata_1_1 movx @dptr,a inc dptr mov a,r2 movx @dptr,a ;../net.c:91: MAR = wdata; ; genAssign mov dptr,#_mar_write_wdata_1_1 movx a,@dptr mov r2,a inc dptr movx a,@dptr mov r3,a ; genAssign mov dptr,#_MAR mov a,r2 movx @dptr,a inc dptr mov a,r3 movx @dptr,a ;../net.c:92: return 0; ; genRet ; Peephole 182.b used 16 bit load of dptr mov dptr,#0x0000 00101$: ret Best regards! |