Texas Instruments MSP430x1xx User Manual
Page 376

Instruction Set Overview
B-26
Example
R10 is decremented by 1
DEC
R10
; Decrement R10
; Move a block of 255 bytes from memory location starting with EDE to memory location starting with
;TONI. Tables should not overlap: start of destination address TONI must not be within the range EDE
; to EDE+0FEh
;
MOV
#EDE,R6
MOV
#255,R10
L$1
MOV.B
@R6+,TONI–EDE–1(R6)
DEC
R10
JNZ
L$1
; Do not transfer tables using the routine above with the overlap shown in Figure B–4.
Figure B–4.Decrement Overlap
EDE
EDE+254
TONI
TONI+254
Example
Memory byte at address LEO is decremented by one.
DEC.B
LEO
; Decrement MEM(LEO)
; Move a block of 255 bytes from memory location starting with EDE to memory location starting with
; TONI. Tables should not overlap: start of destination address TONI must not be within the range EDE
; to EDE+0FEh
;
MOV
#EDE,R6
MOV.B
#255,LEO
L$1
MOV.B
@R6+,TONI–EDE–1(R6)
DEC.B
LEO
JNZ
L$1