Hi Charles,
It's been too long and I can't remember if this is something I fixed in
my assembler, but I use the following macro in my code without a problem:
136 : : .macro assert_bit_clear
137 : : ; ---
138 : : .mparam p1
139 : : .mparam p2
140 : : QBBCLdone, p1, p2
141 : : HALT
142 : : Ldone:
143 : : .endm
144 :
If this doesn't work with the assembler you're using, have a look at my
version here: https://github.com/modmaker/am335x_pru_package
-- Bas
On 9-6-2014 0:05, Charles Kerr wrote:
If I put the labels in the macro, then I will get a duplicate label
(for the macro will be expanded out, and have multiple labels.
I have worked around this, by having the labels passed in, but would
like to not have to do that.
Or is there something I am missing about scope on macros?
On Sunday, June 8, 2014 12:32:50 PM UTC-4, Charles Kerr wrote:
I have been trying how to find a way to do a relative branch (from
the current instruction pointer) for a branch.
I have something like this:
|
.macro SETBIT
.mparam reg,bit,lab,lab2
QBBC lab, BYTE_VALUE,bit
SET r30, 14
QBA lab2
lab:
CLR r30,14
lab2:
|
What I would like to do is on the first QBBC, provide a relative
label (so I don't have to pass a unique name to the macro. The
same for QBA lab2.
On a PIC one can do a $+#, where $ is the current instruction
pointer, and the # is is the number of instructions to jump
forward (or backward if negative). Is something like this possible?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send
an email to beagleboard+unsubscr...@googlegroups.com
mailto:beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.