Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "aduc812.h"
- #define MAXBASE 0x8
- void write_max( unsigned char xdata *regnum, unsigned char val )
- {
- unsigned char oldDPP = DPP;
- DPP = MAXBASE;
- *regnum = val;
- DPP = oldDPP;
- }
- void writeor( unsigned char xdata *regnum, unsigned char val )
- {
- unsigned char oldDPP = DPP;
- DPP = MAXBASE;
- *regnum |= val;
- DPP = oldDPP;
- }
- unsigned char read_max( unsigned char xdata *regnum )
- {
- unsigned char oldDPP=DPP;
- unsigned char val;
- DPP = MAXBASE;
- val = *regnum;
- DPP = oldDPP;
- return val;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement