Ax51 User's Guide

BSEG Assembler Statement

Arguments
BSEG 〚AT address
Description

The BSEG statement selects an absolute segment within BIT space.

If the optional address is included, the assembler starts the absolute segment from that address.

There are two ways to represent a bit address:

  1. Specifying a byte base address and an bit offset. The valid address range is 20.0H-2F.7H. For example: 21H.5.
  2. Specifying a bit number. The valid address range in bit notation is 0-127 which maps to 20H.0 - 2FH.7. The address 21H.5 can be therefore represented as bit number 13.

If the optional address is omitted, the assembler starts the absolute segment from address 20H.0 (if no prior absolute BIT segment was defined). If an absolute BIT segment was previously defined, the assembler continues from the end of that segment.

Note

  • The start address must be an absolute expression.
  • The AX51 Assembler converts BSEG statements into the following:
    ?BI?modulename?n SEGMENT BIT OFFS address
    

    Where

    modulenameis the name of the source file.
    nis a sequential number.
    addressis the address specified in the BSEG statement.
See Also

BIT, CSEG, DSEG, ISEG, XSEG

Example
           BSEG  AT 10        ; absolute BIT segment at 0x20+10 bits = 0x21.2
DEC_FLAG:  DBIT  1            ; absolute bit with the name DEC_FLAG
INC_FLAG:  DBIT  1            ; absolute bit with the name INC_FLAG

           BSEG  AT 25H.1     ; absolute BIT segment at 0x25.1
MY_FLAG:   DBIT  1            ; absolute bit with the name MY_FLAG