| Electronic Components Datasheet Search |
|
DM163006 Datasheet(PDF) 253 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
DM163006 Datasheet(HTML) 253 Page - Microchip Technology |
|
253 / 320 page ![]() 2001 Microchip Technology Inc. Advance Information DS39541A-page 253 PIC18C601/801 SUBWFB Subtract WREG from f with Borrow Syntax: [ label ] SUBWFB f [,d [,a]] Operands: 0 ≤ f ≤ 255 d ∈ [0,1] a ∈ [0,1] Operation: (f) – (WREG) – (C) → dest Status Affected: N,OV, C, DC, Z Encoding: 0101 10da ffff ffff Description: Subtract WREG and the carry flag (borrow) from register 'f' (2’s com- plement method). If 'd' is 0, the result is stored in WREG. If 'd' is 1, the result is stored back in register 'f' (default). If ’a’ is 0, the Access Bank will be selected, overriding the BSR value. If ’a’ is 1, the Bank will be selected as per the BSR value. Words: 1 Cycles: 1 Q Cycle Activity: Q1 Q2 Q3 Q4 Decode Read register ’f’ Process Data Write to destination SUBWFB (Cont.) Example 1: SUBWFB REG Before Instruction REG = 19h (0001 1001) WREG = 0Dh (0000 1101) C= 1 After Instruction REG = 0Ch (0000 1011) WREG = 0Dh (0000 1101) C= 1 Z= 0 N = 0 ; result is positive Example 2: SUBWFB REG, W Before Instruction REG = 1Bh (0001 1011) WREG = 1Ah (0001 1010) C= 0 After Instruction REG = 1Bh (0001 1011) WREG = 00h C= 1 Z = 1 ; result is zero N= 0 Example 3: SUBWFB REG Before Instruction REG = 03h (0000 0011) WREG = 0Eh (0000 1101) C= 1 After Instruction REG = 0F5h (1111 0100) [2’s comp] WREG = 0Eh (0000 1101) C= 0 Z= 0 N = 1 ; result is negative |
|
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 |