ARM Technical Support Knowledge Articles

DECLARING BITS IN THE SAME BYTE

Applies to: A51 Macro Assembler

Answer


Information in this article applies to:


QUESTION

How can I declare some bits in assembly that are guaranteed to be stored in the same byte in the DATA space from 0x20 to 0x2F?

ANSWER

The following program code does what you want. You may change the address of the BIT_BYTE to select a different address for the byte.

DSEG    AT      20h

BIT_BYTE:       DS      1

BIT_NO_0        BIT     BIT_BYTE.0
BIT_NO_1        BIT     BIT_BYTE.1
BIT_NO_2        BIT     BIT_BYTE.2
BIT_NO_3        BIT     BIT_BYTE.3
BIT_NO_4        BIT     BIT_BYTE.4

END

Article last edited on: 2000-05-17 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential