Skip to main content
Visitor II
November 5, 2003
Question

JRS and JRR instructions

  • November 5, 2003
  • 4 replies
  • 897 views
Posted on November 05, 2003 at 01:56

JRS and JRR instructions

    This topic has been closed for replies.

    4 replies

    joern2Author
    Visitor II
    October 28, 2003
    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 ?
    Visitor II
    October 29, 2003
    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
    joern2Author
    Visitor II
    October 29, 2003
    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 ?
    Visitor II
    November 5, 2003
    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.