17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ON BREAK GOSUB<br />

Chapter 2 Program Instructions<br />

Field of Application Statement for branching to a subroutine, when break interrupt instruction<br />

is received.<br />

Syntax ON BREAKGOSUB|<br />

↔<br />

is one of the following communication channels:<br />

0 = "console:"<br />

1 = "uart1:"<br />

2 = "uart2:"<br />

3 = "uart3:"<br />

4 = "centronics:"<br />

| is the number or label of the program line to be branched to.<br />

Remarks This statement is closely related BREAK and BREAK ON/OFF. When<br />

break interrupt is enabled (see BREAK ON) and the operator issues a break<br />

interrupt instruction (see BREAK), the execution of the currently running<br />

program will be interrupted and branched to a specified line in a subroutine.<br />

Examples In this example, the printer emits a special signal when a break interrupt is<br />

issued from the printer's keyboard:<br />

10 ON BREAK 0 GOSUB 1000<br />

20 GOTO 20<br />

. . . . .<br />

. . . . .<br />

1000 FOR A%=1 TO 3<br />

1010 SOUND 440,50<br />

1020 SOUND 349,50<br />

1030 NEXT A%<br />

1040 END<br />

The same example without line numbers will look like this:<br />

IMMEDIATE OFF<br />

ON BREAK 0 GOSUB QQQ<br />

WWW: GOTO WWW<br />

. . . . .<br />

. . . . .<br />

QQQ: FOR A%=1 TO 3<br />

SOUND 440,50<br />

SOUND 349,50<br />

NEXT A%<br />

END<br />

IMMEDIATE ON<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!