Hi,
I get the following error when i try to compile my program for DS89C450
microcontroller using sdcc

[EMAIL PROTECTED] display_module]# sdcc n3510i_display.c
?ASxxxx-Error-<o> in line 473 of n3510i_display.asm
             <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<o> in line 475 of n3510i_display.asm
             <o> .org in REL area or directive / mnemonic error
removing n3510i_display.rel

======= Contents of n3510i_display.c ==================
#include "sdcc_reg420.h"

#define SDATA    P2_0;
#define CMD_INVOFF        0x20   /* display inversion off */
#define CMD_INVON         0x21   /* display inversion on */
..........
........
.....
void msleep(unsigned char);    // sleep for 1ms (the function argument
determines no of milliseconds to sleep)
void usleep(unsigned char);    // sleep for 1us (the function argument
determines no of microseconds to sleep)

void main(void)
{
   while(1)
   {
       msleep(10);
       usleep(10);
   }
}
void msleep(unsigned char ms)
{
   unsigned char delay_ms = ms;
   _asm
           MOV R5,_delay_ms;
       L1_ms:    MOV R6,#0A
       L2_ms:    MOV R7,#0FF
       L3_ms:    DJNZ R7,L3_ms
           DJNZ R6,L2_ms
           DJNZ R5,L1_ms
   _endasm;
}
void usleep(unsigned char us)
{
   unsigned char delay_us = us;
   _asm
           MOV R6,_delay_us
       L1_us:    MOV R7,#3
       L2_us:    DJNZ R7,L2_us
           DJNZ R6,L1_us
   _endasm;
}

======= END of Contents of n3510i_display.c ==================

Please help
--
Abhishek
http://www.myjavaserver.com/~thelinuxmaniac
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to