1) где листинг (ассемблера), что не так? Варнинги -- атас! Всё нужно исправлять:
$ avr-gcc -mmcu=atmega32 -Wall -O3 -S char_display.c
In file included from char_display.h:11:0,
from char_display.c:2:
sys_timer.h:45:54: warning: no semicolon at end of struct or union [enabled by default]
sys_timer.h:45:16: warning: useless storage class specifier in empty declaration [enabled by default]
char_display.c: In function 'clr_dsp_buf':
char_display.c:136:1: warning: array subscript has type 'char' [-Wchar-subscripts]
char_display.c: In function 'drv_char_dsp':
char_display.c:206:5: warning: variable 'a' set but not used [-Wunused-but-set-variable]
char_display.c: In function 'get_addr_line':
char_display.c:170:1: warning: control reaches end of non-void function [-Wreturn-type]
char_display.c: In function 'lcd_send_data':
char_display.c:105:1: warning: control reaches end of non-void function [-Wreturn-type]
char_display.c: In function 'lcd_send_com':
char_display.c:96:1: warning: control reaches end of non-void function [-Wreturn-type]
Но компилируется нормально:
clr_dsp_buf:
/* prologue: function */
/* frame size = 0 */
/* stack size = 0 */
.L__stack_usage = 0
ldi r30,lo8(dsp_buf)
ldi r31,hi8(dsp_buf)
ldi r24,lo8(32)
.L9:
st Z+,r24
ldi r25,hi8(dsp_buf+80)
cpi r30,lo8(dsp_buf+80)
cpc r31,r25
brne .L9
/* epilogue start */
ret