| Electronic Components Datasheet Search |
|
D17133CS Datasheet(PDF) 222 Page - NEC |
|
|
|||||||||||||||||||||||||||||
D17133CS Datasheet(HTML) 222 Page - NEC |
|
222 / 289 page ![]() CHAPTER 18 INSTRUCTION SET 207 (3) SUBC r, m Subtract data memory from general register with carry flag <1> OP code 10 87 43 0 00011 mR mC r <2> Function When CMP=0, (r) ← (r) – (m) – CY Subtracts the data memory contents and the value of carry flag CY from the general register contents. Stores the result in general register. By using this SUBC instruction, 2 or more words can be easily subtracted. When CMP=1, (r) – (m) – CY The result is not stored in the register. Carry flag CY and zero flag Z are changed, according to the result. Sets carry flag CY, if a borrow occurs as a result of the subtraction. Resets the carry flag CY, if no borrow occurs. If the subtraction result is other than zero, zero flag Z is reset, regardless of compare flag CMP. If the subtraction result is zero, with the compare flag reset (CMP=0), the zero flag Z is set. If the subtraction result is zero, with the compare flag set (CMP=1), the zero flag Z is not changed. Subtraction can be executed in binary 4-bit or BCD. The BCD flag for program status word PSWORD specifies which kind of subtraction is to be executed. <3> Example 1 Subtracts the 12-bit contents for addresses 0.2DH through 0.2FH from the 12-bit contents for addresses 0.0DH through 0.0FH and stores the result in 12 bits for addresses 0.0DH through 0.0FH, when row address 0 (0.00H-0.0FH) in bank 0 is specified as a general register: (0.0FH) ← (0.0FH) – (0.2FH) (0.0EH) ← (0.0EH) – (0.2EH) – CY (0.0DH) ← (0.0DH) + (0.2DH) – CY MEM00D MEM 0.0DH MEM00E MEM 0.0EH MEM00F MEM 0.0FH |
|
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 |