#805 Push and pop with mulint

closed-fixed
Erik Petrich
None
5
2013-05-25
2004-09-01
Mika Rasimus
No

Now... This adds strange "push ar4" and "push ar5"
before the "lcall __mulint"...

Version is, of course, latest...

sdcc --int-long-reent --stack-auto --use-stdout
_Testi.c
---------------------
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long LONG;
typedef struct _TEXTBUFFER TEXTBUFFER;

#define LCD_D 0x0f
#define LCD_RW 0x10
#define LCD_RS 0x20
#define LCD_EN 0x40

struct _TEXTBUFFER
{
WORD beg;
WORD pos;
BYTE buf[512];
};

TEXTBUFFER txtbuf;

void convertLCD(void)
{
WORD len, locin, locout;
len=txtbuf.pos-txtbuf.beg;
if (len==0) return;
locin=txtbuf.pos-1;
locout=txtbuf.pos+(3*len)-1;
txtbuf.pos=txtbuf.beg=locout+1;
for (; len>0; len--)
{
txtbuf.buf[locout--]=LCD_RS|(txtbuf.buf[locin]
&0x0f);
txtbuf.buf[locout--]=LCD_RS|LCD_EN|(txtbuf.buf
[locin]&0x0f);
txtbuf.buf[locout--]=LCD_RS|(txtbuf.buf[locin]
>>4);
txtbuf.buf[locout--]=LCD_RS|LCD_EN|(txtbuf.buf
[locin]>>4);
locin--;
}
}

Discussion

  • Erik Petrich
    Erik Petrich
    2004-09-23

    Logged In: YES
    user_id=635249

    Fixed in sdcc 2.4.4 #847

     
  • Erik Petrich
    Erik Petrich
    2004-09-23

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed