![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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 ???? | |
| |
| | #2 |
|
It will subtract W from the file and so will do 0-10 = -10 or 246 or 0xf6. Mike. Last edited by Pommie; 29th October 2009 at 06:01 AM. Reason: typo do was to as quoted below. | |
| |
| | #3 |
| | |
| |
| | #4 |
|
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 | |
| |
|
| Tags |
| subtract |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Simple Add/Subtract Circuit | insttechbazza | Electronic Projects Design/Ideas/Reviews | 6 | 18th June 2005 12:06 AM |