Transferring the value of a register to a variable.

Status
Not open for further replies.

Peet19

Member
Hi All!

How can you transfer the value of a register to a local variable within a macro?

I've tried the following but it doesn't work.

Code:
TESTM    MACRO
    
    LOCAL    B    = SPEED
    MOVLW    B
    MOVWF    MSH

ENDM

Thus, you pass the address to the variable, not its value.

Thank you in advance for your help!
 
We've already answered the same question multiple times in your previous threads, and you're still completely ignoring all the answers you've had.

For a brief repeat - DON'T USE MOVLW!!!!

Thread closed, go back and read the existing answers you've already had!.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…