beautypg.com

Hyundai HI4 User Manual

Page 381

background image

11. Robot Language Explanation

------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------

11 - 16

11.2.4 Program Flow Control

11.2.4.1 GOTO Command

11.2.4.2 GOSUB ∼ RETURN Command

11.2.4.3 JMPP Command

Description Jumps to the specified address.

Syntax

GOTO

Parameter

Address Address to be jumped.

example

GOTO 99
GOTO *ERRHDL

Description

Calls for the address specified by GOSUB.
When met with RETURN command, returns to the next line of GOSUB command.

Syntax

GOSUB

...... RETURN

Parameter

Address Address to call

example

GOSUB 150
END
150 REM ---- Subroutine for testing ----
PRINT #0, "Subroutine Start"
PRINT #1, "Subroutine End"
RETURN

Description Jumps to the specified program

Syntax

JMPP

Parameter

Program
Number

Positive integer, Program number to call

1∼999

example

IF DI29=1 THEN
JMPP 909
ENDIF

REM --- subprogram 909 - ERROR STOP
PRINT #0, "Unrecoverble Error!!!", TIME$
END