Can someone suggest how to avoid the allocation in DSEG (which is
overfull) in the following code snippet?
...
void lcd_puts (char xdata *str)
{
uint8 xdata i;
for (i=0; str[i] != '\0'; i++) {
lcd_datas (str[i]);
}
}
/*---------------------------------------------------------------------------*/
void lcd_set_text (uint8 xdata row, char xdata *lcd)
{
lcd_gotoxy (0, row);
lcd_puts (lcd);
}
...
which produces an allocation in DSEG for the argument (which it seems
desirable to avoid as it fills DSEG reasonably quickly on the 8051):
...
368 ;-----------------------------------------------
---------
369 ; internal ram data
370 ;-----------------------------------------------
---------
371 .area DSEG (DATA)
0000 372 _lcd_set_text_PARM_2:
0000 373 .ds 2
...
693 ;-----------------------------------------------
-------------
694 ;Allocation info for local variables in function
'lcd_set_text'
695 ;-----------------------------------------------
-------------
696 ;lcd Allocated with name '
_lcd_set_text_PARM_2'
697 ;row Allocated with name '
_lcd_set_text_row_1_1'
698 ;-----------------------------------------------
-------------
699 ; lcd.c:204: void lcd_set_text (uint8 xdat
a row, char xdata *lcd)
700 ; ----------------------------------------
-
701 ; function lcd_set_text
702 ; ----------------------------------------
...
Peter Van Epp
------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user