| ??? 06/04/01 08:20 Read: times |
#12167 - RE: Keil C : read two byte? |
#define LowB(x) (*((UINT8*)&(##x)+1)) if you are doing: LowB(wordvar)=P0; this macro is expanded to: (*((unsigned char*)&(wordvar)+1))=P0; One thing I forgot: you should replace my UINT8 with unsigned char. This macro is tested with Keil C51 V5 and V6 only. I know that this macro does not work with V3 compilers. It is a cast to arrray of bytes and then gets offset 0 for Highbyte or offset 1 for the lowbyte so as Andy told this is NOT portable. Thomas |
| Topic | Author | Date |
| Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
| RE: Keil C : read two byte? | 01/01/70 00:00 | |
RE: Keil C : read two byte? | 01/01/70 00:00 |



