This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I define a bit number as a symbol?

Using the A51 assembler for 8051 based products (actually an 80C320) how do I create a symbol representing a bit number which I can subsequently use in setb acc.bitnum type instructions?

I'm trying to do this:

bitnum EQU 7
...
setb acc.bitnum

Actually this seems to be working, but now I want to use the same symbol in a different module. Ive therefore added to the first file:

PUBLIC bitnum
...
bitnum EQU 7

And in the second file I've put:

EXTRN NUMBER (bitnum)
...
setb acc.bitnum

This gives me Error 18: out of range or non-typeless bit offset.

Somehow bitnum seems to have acquired a type. How do I do the PUBLIC/EXTRN thing without giving it a type?

Thanks - Rowan

0