| ??? 05/05/00 18:47 Read: times |
#2515 - Bit problem |
I have 64 bits in 8051 bits area, from Ram location 20h to 27h, bit numbers #00h to #40h.
I want to set/clr any of them according to bit number I receive from serial port. the first byte message determine whether bit should be set or clear, and second byte contains the bit number going to be effected. I am facing problem in making routine for this simple function. If it was byte address, I could use R0 or R1 as index pointer and load them with the byte number i receive from serial port, but for the bit i dont know how to use index pointer. I have to use some sort of pointer/indirect addressing otherwise I have to make a long routine, which keeps checking and comparing with all posible bit numbers and might find a bit at end of routine, it takes more time, code space and does not look elegant in design. does any one have any idea for making some sort of Index pointer for bit operation? thanks Rauf |
| Topic | Author | Date |
| Bit problem | 01/01/70 00:00 | |
| RE: Bit problem | 01/01/70 00:00 | |
| RE: Bit problem | 01/01/70 00:00 | |
| RE: Bit problem | 01/01/70 00:00 | |
RE: Bit problem | 01/01/70 00:00 |



