Download A:\gN_CUD.BAS 4/L3/95

Transcript
RC (RepeatCycle)
( FunctionI
Repeatsthe loopspecifiedby the NX commandthe specifiednumberof times.
I lnputFormatI
RC <numberof repeated cyclesr
lterml
<Numberof repeated cycles> Specifythe numberof times repeating.
'f S numberot repealed cycles (decim
all < 32767
<
& 000'l numberofrepeatedcycles (hexadecimal)
< &7FFF
I ExplanationI
(1) Used with the NX commandlo causethe loop specified by the NX commandto be
executed the specified number of times and causesthe line number following NX
to be subsequentlyexecuted.
(2) To incorporateanotherloop (betweenRC and NX) intothe existingloop is called
"nesting".Up to 9 nesting levels are possible.
I Sample programI (Movemastercommand)
10 MO 1
; Moves to position1.
20 RC 3
; Repeats loop delimited by NX three times
30 MO 2
; Moves to position2. )
40 MO 3
; Moves to position3. I Loop.
50 MO 4
; Moves to position4. ,/
60 NX
; Delimitsthe loop.
70 MO 5
; Moves to position5.
80 ED
; Ends program.
a_tn