| Electronic Components Datasheet Search |
|
PM0044 Datasheet(PDF) 95 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0044 Datasheet(HTML) 95 Page - STMicroelectronics |
|
95 / 162 page ![]() PM0044 STM8 instruction set Doc ID 13590 Rev 3 95/162 Syntax CPW dst,src e.g. CPW Y,(tbl,X) Operation {N, Z, C} = Test (dst - src) Description The source byte is subtracted from the destination byte and the result is lost. However, N, Z, C flags of Condition Code (CC) register are updated according to the result. The destination is an index register, and the source is a memory or data word. This instruction generally is used just before a conditional jump instruction. Instruction overview V ⇒ (X15.M15 + X15.R15 + X15.M15.R15) ⊕ (X14.M14 + X14.R14 + X14.M14.R14) Set if the signed subtraction of the destination (dst) value from the source (src) value generates a signed overflow (signed result cannot be represented on 16 bits). N ⇒ R15 Set if bit 7 of the result is set (negative value), cleared otherwise. Z ⇒ R15.R14.R13.R12.R11.R10.R9.R8.R7.R6.R5.R4.R3.R2.R1.R0 Set if the result is zero (0x00), cleared otherwise. C ⇒ (X15.M15 + X15.R15 + X15.M15.R15) Set if the unsigned value of the contents of source (src) is larger than the unsigned value of the destination (dst), cleared otherwise. Detailed description CPW Compare word CPW mnem dst src Affected condition flags VI1 H I0 N Z C CPW Reg Mem V --- N Z C dst src Asm cy lgth Op-code(s) ST7 X #word CPW X,#$10 2 3 A3 MS LS ✗ X shortmem CPW X,$10 2 2 B3 XX ✗ X longmem CPW X,$1000 2 3 C3 MS LS ✗ X(Y) CPW X,(Y) 2 2 90 F3 ✗ X (shortoff,Y) CPW X,($10,Y) 2 3 90 E3 XX ✗ X (longoff,Y) CPW X,($1000,Y) 2 4 90 D3 MS LS ✗ X (shortoff,SP) CPW X,($10,SP) 2 2 13 XX X [shortptr.w] CPW X,[$10.w] 5 3 92 C3 XX ✗ X [longptr.w] CPW X,[$1000.w] 5 4 72 C3 MS LS X ([shortptr.w],Y) CPW X,([$10.w],Y) 5 3 91 D3 XX ✗ |
|
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 |