simple maths

Status
Not open for further replies.

trennonix

New Member
Hello everybody,
I'm programming a pic in assembly,

and i want to substract one value from another, but of them are situated in general purpose registers, so how do i get one of those values into W???

when i try
movlw var,
W will have the value of the address of the register
 
Which PIC, the 18F have a proper subtract instruction, the 16F have a funky one.

The movlw instruction will move a literal into W
**broken link removed**
 
aaaaaaaahhh, thanks alot, i didn't even know that this function existed, i was limited to
movwf and movlw

btw, blueroomelectronics, i'm using a 16f
 
thanks blueroomelectronics, i knew that, i just wanted to get a value from a register to W.

The movwf worked just fine
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…