SSTR

Storing a string

SSTR

String SToRe


[Syntax]

SSTR.size

 

[Operation]

unsigned { char | short | long } *R1, R2;

unsigned long R3;

while ( R3 != 0 ) {

*R1++ = R2;

R3 = R3 - 1;

}

Note

1. If this instruction is executed with R3 set to 0, it is ignored and has no effect on registers and flags.

Note

2. R1++: Incrementation is by the value corresponding to the size specifier (.size), i.e. by 1 for .B, 2 for .W, and 4 for .L.

Note

3. R2: How much of the value in R2 is stored depends on the size specifier (.size): the byte from the LSB end of R2 is stored for .B, the word from the LSB end of R2 is stored for .W, and the longword in R2 is stored for .L.

 

[Function]

-

This instruction stores the contents of R2 successively proceeding in the direction of increasing addresses specified by R1 up to the number specified by R3.

-

On completion of instruction execution, R1 indicates the next address in sequence from that for the last transfer.

-

An interrupt request during execution of this instruction will be accepted, so processing of the instruction will be suspended. That is, execution of the instruction will continue on return from the interrupt processing routine. However, be sure to save the contents of the R1, R2, R3, and PSW when an interrupt is generated and restore them when execution is returned from the interrupt routine.

 

[Instruction Format]

Syntax

size

Processng Size

Code size

(Byte)

SSTR.size

B/W/L

L

2

[Flag Change]

-

This instruction does not affect the states of flags.

 

[Description Example]

SSTR.W