??? 05/23/07 20:36 Read: times |
#139690 - Byte used as bit |
I had used P89LPC952 in a project some time back and I could use assembly code like
; initialize the byte as 8 bit variable. MISC_FLAGS EQU 41 ; BIT ADDRESSABLE. ; BIT 0: KB ENABLED; SET AT FE ACK ; BIT 1: INTERNAL BEEP SUPPRESSED ; BIT 2: RE-START ; BIT 3: THE FIRST "FD" OF THE PACKET HAS COME FROM MAIN PROCESSOR ; BIT 4: IF SET FUNCTION IS RECEIVED FOR PACKETIZED MODE ; BIT 5: IF SET FIRST "FD" HAS BEEN TRANSMITTED FROM Q2 ; BIT 6: IF SET ADDRESS IS RECEIVED FOR PACKETIZED MODE ; BIT 7: PACKETIZED MODE .... .... later in my code I could use this byte as a bit. TX_QUEUE1: JB MISC_FLAGS.7,TX_QPACKET ; JIF 'PACKET CODE' RECEIVED PUT_C1: JB MISC_FLAGS.5,TX_QPACKET ;JIF IN THE MIDDLE OF SENDING Q2 PACKETS TX_QPACKET: ret When i do the samething in Silabs C8051F310 micro-controller I get this error on compiling: " INVALID BYTE BASE IN BIT ADDRESS EXPRESSION" Why does the Silabs compiler not allow MISC_FLAGS.0,MISC_FLAGS.1,MISC_FLAGS.2, and so on?? Thanks. |
Topic | Author | Date |
Byte used as bit | 01/01/70 00:00 | |
which compiler? | 01/01/70 00:00 | |
Silabs IDE | 01/01/70 00:00 | |
and was this inline assembler in C-program? | 01/01/70 00:00 | |
No, not an assembler in C | 01/01/70 00:00 | |
SILabs IDE is NOT a compiler | 01/01/70 00:00 | |
I was just referring to the IDE used. | 01/01/70 00:00 | |
Terminology | 01/01/70 00:00 | |
Assuming The Keil C Compiler | 01/01/70 00:00 | |
No, that's wrong | 01/01/70 00:00 | |
So much for the manual | 01/01/70 00:00 | |
Yes, that's it! | 01/01/70 00:00 | |
assembler | 01/01/70 00:00 | |
assembling not compiling | 01/01/70 00:00 | |
MISC_FLAGS EQU 20h | 01/01/70 00:00 | |
re:MISC_FLAGS EQU 20h | 01/01/70 00:00 | |
Bytes as bits | 01/01/70 00:00 | |
stop expreimenting, read the manual | 01/01/70 00:00 | |
Or use Acc![]() | 01/01/70 00:00 | |
Accurate terminology | 01/01/70 00:00 | |
C51.exe | 01/01/70 00:00 | |
No and definitely not | 01/01/70 00:00 | |
Check Byte Address | 01/01/70 00:00 | |
i do not recall | 01/01/70 00:00 |