the easiest question, assembly bra instruction

Post your requests and ideas on the future development of mikroC PRO for PIC.
Post Reply
Author
Message
fco1233
Posts: 7
Joined: 11 Nov 2010 22:44

the easiest question, assembly bra instruction

#1 Post by fco1233 » 11 Nov 2010 23:06

hi,

im programing in mikcroc pro 3.2.

I just want to use the assembly instruccion, BRA 'number'. but insted of number i want to use a memory adress to change constantly de value

asm bra 2 ; // just for test, work rigth

i have tried with:
asm bra _myvar; it doestn work

do you know how can i do use bra with variable or memory adress??

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: the easiest question, assembly bra instruction

#2 Post by janni » 12 Nov 2010 13:27

You cannot. This instruction has the address coded into it so it has to be a literal.

fco1233
Posts: 7
Joined: 11 Nov 2010 22:44

Re: the easiest question, assembly bra instruction

#3 Post by fco1233 » 15 Nov 2010 08:07

thanks for the answer.

so if i cant use bra with memory address,

could i run code from ram memory?
what should i have to do for run code in ram?

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: the easiest question, assembly bra instruction

#4 Post by janni » 04 Dec 2010 14:06

fco1233 wrote:what should i have to do for run code in ram?
That's also not possible :( .
If you need jumps to variable locations, you could manipulate program counter. Read about it in the datasheet of your processor or in PIC18C Reference Manual.

Post Reply

Return to “mikroC PRO for PIC Wish List”