Programming language – Toshiba T2N User Manual

Page 238

Advertising
background image

5. Programming Language

User's manual

225

(4)

With respect to the index registers (I,J,K), the data of these
registers are saved when interrupt occurs and restored when
operation returns to main program automatically. However,
beacuse of this, even if an index register is used only in an
interrupt program, the data continuity of the index register
between interrupt intervals is not kept.
In such case, use another register to store index value substitute
the value into an index register in the interrupt program.

Example)

[ RW30 MOV I ] [ D2000 MOV RW50 ]

Interrupt program

[ I MOV D1000 ]

store the index register (I)
(for main program)

[ D1000 MOV I ]

restore the index register (I)

[ IRET ]

1

n-1

n

I

Interrupt may occur here

Advertising