Chapter 2 Syntax
2-15
call statement
Instruction to unconditionally branch to a subroutine
- Format
Format
Description
call
<subroutine name>
This instruction branches processing unconditionally to the subroutine
specified by
<subroutine name>
.
- Explanation
This instruction branches processing unconditionally to the subroutine specified by
<subroutine name>
.
After the subroutine is executed, processing proceeds to the instruction that follows the calling step.
- Sample program
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷
㩷
entry
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
call SUB1
㩷
㩷
㩷
㩷
: Call subroutine "SUB1".
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
end
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
㩷
sub SUB1
㩷
㩷
㩷
㩷
: Called subroutine
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
Y(00)= 1
㩷
㩷
㩷
㩷
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
sub end
㩷
㩷
㩷
㩷
㩷
㩷
inc statement
Instruction to increment a variable
- Format
Format
Description
inc
<variable>
This instruction increments
<variable>
by 1.
- Explanation
This instruction adds 1 to the value of
<variable>
.
- Sample program
(Code area [Code Window])
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷
㩷
entry
㩷
㩷
㩷
㩷
㩷
㩷
LOOP inc
U(00)
㩷
㩷
㩷
㩷
: Assign "U (00) + 1" to U (00).
㩷
U(00)= U(00)
and U(01)
㩷
㩷
: Mask the 6 low-order bits of U (00).
㩷
Yw= U(00)
㩷
㩷
㩷
: Output the content of U (00) to terminals
Y (00) to Y (05).
㩷
wait 0.5
㩷
㩷
㩷
㩷
: Wait 0.5 second.
㩷
goto LOOP
㩷
㩷
㩷
㩷
㩷
㩷
end
㩷
㩷
㩷
㩷
㩷
㩷
(Data area [Data Window])
U (00) = 255
U (01) = 63
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...