Le samedi 8 juin 2013 12:19:18 Alain Portal a écrit :
> Hi,
> 
> Le samedi 8 juin 2013 17:28:33 JIA Pei a écrit :
> > Hi, all:
> > 
> > Since a lot of the testing codes were written under Windows with Keil C51,
> > it's seriously a big problem for me to recompile everything under Linux
> > using sdcc.
> > 
> > Again, the following line is in one of my codes, which seems to declare a
> > function delayNOP() which pauses 4 CPU clocks.
> > 
> > *#define delayNOP(); {_nop_();_nop_();_nop_();_nop_();};*
> > 
> > However, what is the function equal to Keil C51 *_nop_()* in *sdcc* ?
> > 
> > I don't want to re-write the code, but just simply modify it and make it
> > work after flash it onto my board. So, can anybody help me please?
> 
> I don't remember if a such function exists in the sdcc libraries, but you can 
> write your own as is:
> 
> #define Nop() \
>     __asm     \
>         nop   \
>     __endasm  \
> 
> #define delay4NOP() \
>     __asm     \
>         nop   \
>         nop   \
>         nop   \
>         nop   \
>     __endasm  \

Does it help?

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to