Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top