|
NSB8 Datasheet, PDF (72/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family | |||
|
◁ |
grifo®
ITALIAN TECHNOLOGY
MULTIPLE I/O DEVICES
A system may iclude several input/output (I/O) devices, such as a video terminal, printer, graphics
display, etc. NSB8 provides a convenient means for BASIC programs to make use of up to 8 separate
I/O devices. A unique integer number from 0 to 7 is assigned to each one. Device #0 must correspond
to your main communication link to your computer, also known as the console terminal. It is
generally a the terminal emulation window of GET80. When your GDOS 80 has been personalized
to handle multiple I/O devices, your BASIC programs will be able to access the many I/O devices
through the PRINT statements.
A PRINT, INPUT1 or LINE statement accomodates an optional device expression, which consist
of a cross hatch (#), followed by a numeric expression which evaluates to an integer number from
0 to 7. This expression indicates the device desired for input or output. If used in any of these
statements, the divice expression must be the first thing after the statementâs keyword. Here are some
examples:
PRINT #1, âTESTâ
PRINT#Q, X, B, 7
PRINT#D+3, âCRAZYâ, Q
PRINT#D7 (X)
INPUT #B, L3
INPUT#7, âCOMMANDâ: â, C$
LINE#1, 132
LINE#D, L
If the device expression is omitted, it is assumed to be 0 (the console).
As a final example, assume that device #0 is the console terminal, device 1 is a remote printer, and
device 2 is a remote display. the following program causes a different message to be printed on each
of the three devides:
10 REM Multiple I/O demonstration.
20 PRINT âTHIS MESSAGE GOES TO THE CONSOLEâ
30 PRINT#0, âTHIS ONE DOES, TOO.â
40 PRINT #1, âTHIS WILL GO TO REMOTE PRINTERâ
50 PRINT #2, âTHIS SHOWS UP ON THE REMOTE DISPLAYâ.
The PRINT/INPUT device expression, characterized by a cross hatch, should not be confused with
begins with a percent sign (%).
SEE ALSO:
Statement PRINT
Statement INPUT
Statement INPUT1
GDOS 80 user manual
Page 60
NSB8
Rel. 5.10
|
▷ |