| Electronic Components Datasheet Search |
|
PM0044 Datasheet(PDF) 121 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0044 Datasheet(HTML) 121 Page - STMicroelectronics |
|
121 / 162 page ![]() PM0044 STM8 instruction set Doc ID 13590 Rev 3 121/162 Syntax NEG dst e.g. NEG (X) Operation dst <= (dst XOR FF) + 1, or 00 - dst Description The destination byte is read, then each bit is toggled (inverted), and the result is incremented before it is written at the destination byte. The destination is either a memory byte or a register. The Carry is cleared if the result is zero. This instruction is used to negate signed values. This instruction is compact, and does not affect any register when used with RAM variables. Instruction overview V ⇒ R7.R6.R5.R4.R3.R2.R1.R0 Set if there is an arithmetic overflow on the 8-bit representation of the result. The V bit will set when the content of "dst" was $80 (-128) prior to the NEG operation, cleared otherwise. N ⇒ R7 Set if bit 7 of the result is set (negative value), cleared otherwise. Z ⇒ R7.R6.R5.R4.R3.R2.R1.R0 Set if the result is zero (0x00), cleared otherwise. C ⇒ R7+R6+R5+R4+R3+R2+R1+R0 Set if a borrow in the implied subtraction from zero, cleared otherwise. The C bit will be set in all cases except when the contents of "dst" was $00 prior to the NEG operation. Detailed description NEG Negate (Logical 2’s complement) NEG mnem dst Affected condition flags VI1 H I0 N Z C NEG Mem V - - - N Z C NEG A V - - - N Z C dst Asm cy lgth Op-code(s) ST7 ANEG A 1 1 40 ✗ shortmem NEG $F5 1 2 30 XX ✗ longmem NEG $F5C2 1 4 72 50 MS LS (X) NEG(X) 1 1 70 ✗ (shortoff,X) NEG($F5,X) 1 2 60 XX ✗ (longoff,X) NEG($F5C2,X) 1 4 72 40 MS LS (Y) NEG(Y) 1 2 90 70 ✗ (shortoff,Y) NEG($F5,Y) 1 3 90 60 XX ✗ (longoff,Y) NEG($F5C2,Y) 1 4 90 40 MS LS (shortoff,SP) NEG($F5,SP) 1 2 00 XX [shortptr.w] NEG($F5) 4 3 92 30 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 |