Hello: I'm developing a software for Infineon XC167CI, and I'm using DAvE and Keil uVision2 for it. I cannot get through a problem concerning the intrinsic function _bfld_, whose prototype is: void _bfld_ (unsigned int sfr_, unsigned mask1, unsigned mask2) Using a statement such as:
_bfld_ (PSW, 0xF000, 0xF000); // disable interrupts
The XC16x no longer has the pipeline effect that requires the usage of the _bfld_ (PSW) method. You may now just set/clear the IEN bit by standard C statments IEN = 0; IEN = 1; See also: http://www.keil.com/support/man/docs/c166/c166_xf_interrupts.htm
The DAvE header files tend to create a mass. However, you may simply define a 2nd SFR called _PSW using the 'sfr' notation. This can then be used in _bfld_ and other intrinsic functions that require SFR.
Take a look to: http://www.keil.com/download/docs/xc16x_iap-flash.zip.asp. This example might come closer to what you need.
Hello, mr. Keil: Thanks for the suggestions. With them, I have solved the problem. Lucas