| ||||||||
Technical Support Support Resources Product Information | A51: ADDRESSING BITS AND BYTESInformation in this article applies to:
QUESTIONHow do I address a bit-addressable byte as both bits and a byte in assembly? ANSWERHere is the code that shows the code for addressing bit addressable internal memory as bits and bytes
NAME TEST
?PR?main?TEST SEGMENT CODE
?BA?TEST SEGMENT DATA BITADDRESSABLE
EXTRN CODE (?C_STARTUP)
PUBLIC bit0
PUBLIC byte
PUBLIC main
RSEG ?BA?TEST
byte: DS 1
bit0 EQU (byte+0).0
RSEG ?PR?main?TEST
USING 0
main:
SETB bit0
?C0001:
SJMP ?C0001
RET
END
MORE INFORMATIONTo add other bits just duplicate the EQU to represent the remaining locations. SEE ALSOLast Reviewed: Saturday, March 31, 2001 | |||||||
| ||||||||