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.

Subtract from 00 !

Status
Not open for further replies.

Suraj143

Active Member
I have a small question. After this code what is the value in W?

Thanks

Code:
	movlw	.10
	movwf	Data
	clrf	Reference
	movf	Data,W
	subwf	Reference,W	
	????
 
It will subtract W from the file and so will do 0-10 = -10 or 246 or 0xf6.

Mike.
 
Last edited:
Suraj,

I think you'll find that taking the time to learn how to use the MPLAB Simulator and "watch" those file values while single stepping through your code might be a good investment. It certainly was for me...

Kind regards, Mike
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top