| Electronic Components Datasheet Search |
|
DM163006 Datasheet(PDF) 251 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
DM163006 Datasheet(HTML) 251 Page - Microchip Technology |
|
251 / 320 page ![]() 2001 Microchip Technology Inc. Advance Information DS39541A-page 251 PIC18C601/801 SUBFWB (Cont.) Example 1: SUBFWB REG Before Instruction REG = 3 WREG = 2 C= 1 After Instruction REG = 0FFh WREG = 2 C= 0 Z= 0 N = 1 ; result is negative Example 2: SUBFWB REG Before Instruction REG = 2 WREG = 5 C= 1 After Instruction REG = 2 WREG = 3 C= 1 Z= 0 N = 0 ; result is positive Example 3: SUBFWB REG Before Instruction REG = 1 WREG = 2 C= 0 After Instruction REG = 0 WREG = 2 C= 1 Z = 1 ; result is zero N= 0 SUBLW Subtract WREG from literal Syntax: [ label ]SUBLW k Operands: 0 ≤ k ≤ 255 Operation: k – (WREG) → WREG Status Affected: N,OV, C, DC, Z Encoding: 0000 1000 kkkk kkkk Description: WREG is subtracted from the eight bit literal 'k'. The result is placed in WREG. Words: 1 Cycles: 1 Q Cycle Activity: Q1 Q2 Q3 Q4 Decode Read literal ’k’ Process Data Write to WREG Example 1: SUBLW 02h Before Instruction WREG = 1 C= ? After Instruction WREG = 1 C = 1 ; result is positive Z= 0 N= 0 Example 2: SUBLW 02h Before Instruction WREG = 2 C= ? After Instruction WREG = 0 C = 1 ; result is zero Z= 1 N= 0 Example 3: SUBLW 02h Before Instruction WREG = 3 C= ? After Instruction WREG = 0FFh ; (2’s complement) C = 0 ; result is negative Z= 0 N= 1 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |