From: Alain P. <ala...@fr...> - 2013-06-08 17:34:26
|
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? |