UBI EasyCoder 201 IIE Manuale delle Istruzioni Pagina 176

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 332
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 175
Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7174
Chapter 2 Program Instructions
ON BREAK GOSUB
Field of Application
Statement for branching to a subroutine, when break interrupt
instruction is received.
Syntax ON
BREAK<nexp>GOSUB<ncon>|<line label>
<nexp> is one of the following communication channels:
0 = "console:"
1 = "uart1:"
2 = "uart2:"
3 = "uart3:"
4 = "centronics:"
<ncon>|<line label> is the number or label of the program line to be branched to.
Remarks
This statement is closely related BREAK and BREAK ON/OFF. When break
interrupt is enabled (see BREAK ON) and the operator issues a break interrupt
instruction (see BREAK), the execution of the currently running program will
be interrupted and branched to a speci ed line in a subroutine.
Examples
In this example, the printer emits a special signal when a break interrupt is
issued from the printers keyboard:
10 ON BREAK 0 GOSUB 1000
20 GOTO 20
. . . . .
. . . . .
1000 FOR A%=1 TO 3
1010 SOUND 440,50
1020 SOUND 349,50
1030 NEXT A%
1040 END
The same example without line numbers will look like this:
IMMEDIATE OFF
ON BREAK 0 GOSUB QQQ
WWW: GOTO WWW
. . . . .
. . . . .
QQQ: FOR A%=1 TO 3
SOUND 440,50
SOUND 349,50
NEXT A%
END
IMMEDIATE ON
Vedere la pagina 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 331 332

Commenti su questo manuale

Nessun commento