CHAPTER 6 CLOCK GENERATION FUNCTION
User’s Manual U13850EJ6V0UD
199
[Example of prevention program]
LDSR
rx, 5
; Sets value of rX to PSW.
ST.B
r0, PRCMD[r0]
; Writes data to PRCMD.
ST.B
rD, PSC[r0]
; Sets PSC register.
LDSR
rY, 5
; Returns value of PSW.
NOP
; Six NOP instructions or more
NOP
NOP
NOP
NOP
BR $+2
; Eliminates discrepancy of PC
Remark
It is assumed that the following values have already been set:
rD: PSC set value, rX: Value written to PSW, rY: Value written back to PSW