Exact match. Not showing close matches.
PICList
Thread
'[PIC]: labeling an indivdual bit in MPASM'
2001\06\02@014625
by
fischers
2001\06\02@023822
by
Andrew Warren
2001\06\02@101339
by
Olin Lathrop
> Is there a directive in MPASM, equivelent to CBLOCK but that labels
> indivdual bits insteed of whole bites?
You can "label" a flag with:
#define flag_afu gfl0,0
And then use it like
BSF flag_afu
However, this doesn't help with allocating the flag bits and making sure that
another flag doesn't use the same bit, etc. I run all my MPASM source code
thru a preprocessor that, among other things, implements a /FLAG directive.
This allocates individual flag bits in variables GFL0, GFL1, ... GFLn. An
assembly variable is set to the number of GFLn variables required so that
these can be allocated later.
********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olin
KILLspamembedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- Today
- New search...