sfr P0 = 0x80;
→ __sfr __at (0x80) P0;
sbit P00 = P0 ^ 0;
→ __sbit __at (0x80) P00;
data
→ __data
xdata
→ __xdata
idata
→ __idata
pdata
→ __pdata
code
→ __code
bit
→ __bit
addressable
bitsbit
→ __sbit
specific
bitsfr
→ __sfr
bytesfr16
→ __sfr16
a set sfr32
→ __sfr32
a settypedef bit Bool;
→ typedef __bit Bool;
__bit
is also an address space so don't__bit
on the same symbol.void uart_isr (void) interrupt 4 using 1
→void uart_isr (void) __interrupt (4) __using (1)
#define nop _nop_ ();
→ #define nop __asm__ ("NOP" );
a_flag=_testbit_(a_bit);
→ one of the following:if (a_bit) { a_bit=0; a_flag=1; } else a_flag=0
#define _testbit_(a_bit) ((a_bit)?(a_bit=0),1:0) a_flag=((a_bit)?(a_bit=0),1:0)
#pragma SAVE #if defined (__CX2__) #pragma FUNCTIONS(STATIC) // intrinsic functions are reentrant but need static attribute #endif extern void _nop_ (void); extern bit _testbit_ (bit); extern unsigned char _cror_ (unsigned char, unsigned char); extern unsigned int _iror_ (unsigned int, unsigned char); extern unsigned long _lror_ (unsigned long, unsigned char); extern unsigned char _crol_ (unsigned char, unsigned char); extern unsigned int _irol_ (unsigned int, unsigned char); extern unsigned long _lrol_ (unsigned long, unsigned char); extern unsigned char _chkfloat_(float); #if defined (__CX2__) extern int abs (int); extern void _illop_ (void); #endif #if !defined (__CX2__) extern void _push_ (unsigned char _sfr); extern void _pop_ (unsigned char _sfr); #endif #pragma RESTORE
Safety, accuracy and completeness of information provided herein is not
guaranteed,
so be inspired by it but do not use it as a basis for experimentation or
other actions.
TOP | ©™ |
|