| Electronic Components Datasheet Search |
|
D17133CS Datasheet(PDF) 225 Page - NEC |
|
|
|||||||||||||||||||||||||||||
D17133CS Datasheet(HTML) 225 Page - NEC |
|
225 / 289 page ![]() CHAPTER 18 INSTRUCTION SET 210 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 or BCD. The BCD flag for program status word PSWORD specifies which kind of subtraction is to be executed. <3> Example 1 Subtracts 5 from the 12-bit contents for addresses 0.0DH through 0.0FH and stores the result in addresses 0.0DH through 0.0FH: (0.0FH) ← (0.0FH) – 05H (0.0EH) ← (0.0EH) – CY (0.0DH) ← (0.0DH) – CY MEM00D MEM 0.0DH MEM00E MEM 0.0EH MEM00F MEM 0.0FH SUB MEM00F, #05H SUBC MEM00E, #00H SUBC MEM00D, #00H Example 2 To subtract 5 from the 12-bit contents for addresses 0.4DH through 0.4FH and store the result in addresses 0.4DH through 0.4FH: (0.4FH) ← (0.4FH) – 05H (0.4EH) ← (0.4EH) – CY (0.4DH) ← (0.4DH) – CY MEM00D MEM 0.0DH MEM00E MEM 0.0EH MEM00F MEM 0.0FH MOV BANK, #00H ; Data memory bank 0 MOV IXH, #00H ; IX ← 00001000000B (0.40H) MOV IXM, #04H ; MOV IXL, #00H ; SET1 IXE ; IXE flag ← 1 SUB MEM00F, #5 ; (0.4FH) ← (0.4FH) – 5 SUBC MEM00E, #0 ; (0.4EH) ← (0.4EH) – CY SUBC MEM00D, #0 ; (0.4DH) ← (0.4DH) – CY |
|
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 |