cancel
Showing results for 
Search instead for 
Did you mean: 

JRS and JRR instructions

joern2
Associate II
Posted on November 05, 2003 at 01:56

JRS and JRR instructions

4 REPLIES 4
joern2
Associate II
Posted on October 28, 2003 at 10:55

Reading nearly all available documentation about the ST62 instruction set I got confusing statements:

Do the JRR and JRS instructions write back the tested byte ? Could they be used on a I/O port data register without the need of a shadow register ?
vikas2
Associate II
Posted on October 29, 2003 at 05:31

The instructions JRR and JRS does not write back the tested byte. There is no need of shadow registers for these instrucions.

Instead the instructions SET/RES write back into the source register. So there is need of shadow register in case of setting/resettig the bits of data register. For more detail you can refer to AN432 at www.stmcu.com/files/mcu/2485.pdf
joern2
Associate II
Posted on October 29, 2003 at 08:40

Thanks a lot,

find on page 6 of this Application Note the following text:

The ST62XX instruction set includes four different instructions operating on single bits,

- SET Set Bit in Register

- RES Reset Bit in Register

- JRS Jump Relative IF Bit in Register is set

- JRR Jump Relative IF Bit in Register is reset

These instructions use a read-modify-write cycle.

This is wrong then ?
vikas2
Associate II
Posted on November 05, 2003 at 01:56

Only SET and RES instructions use READ-MODIFY-WRITE cycle. The insructions JRR and JRS are only READ and jump instructions. The statement ''These instructions use a read-modify-write cycle'' is valid only for SET and RES instructions.

The AN432 will soon be modified accordingly.