4-10
IM 34M6H21-01E
2nd Edition : Aug, 2001-00
- Input
Procedure
Although interrupt branching using ON INT can be used in almost all situations,
TRANSFER is useful when you need to perform input time monitoring (SET
TIMEOUT/ON TIMEOUT) processing. Normally, interrupt input using ON INT is
used.
Data is output into the input/output buffer first and then read using ENTER.
Common variables cannot be used in the input/output buffer.
10 DEFINT I
20 DIM BUFF$ 256,A$256
30 ASSIGN RS22=5
40 ON EOT 5,2 GOSUB RSEOT@
…
Specify interrupt destination
50 TRANSFER 5,2 INTO BUFF$
… Initiate
TRANSFER
Other
processing
1000
RSEOT@ STATUS 5,2,4;IST
1010
IF IST<>0 THEN
1020
PRINT “TRANSFER ERROR!”
1030
ELSE
Interrupt processing for end of
TRANSFER
1040
ENTER BUFF$;A$
1050 PRINT A$
1060
ENDIF
1070 RETURN
z
Format Specification
When specifying the format such as the addition of terminator in a TRANSFER
statement, match it with the format specification of the ENTER/OUTPUT statement used
for buffer input/output.
For details on the operation of each individual format type, see Section 4.2.
Table 4.6 Format Specification on Output
Type
Format Specification of OUTPUT
Format Specification of
TRANSFER
Terminator
Code
Conversion
I OUTPUT
BUFF$
OUTPUT BUFF$ USING “~“; ~
TRANSFER S, P FORMAT FROM
BUFF$
Appended
automatically
Yes
II OUTPUT
BUFF$
OUTPUT BUFF$ USING “#, ~“; ~
TRANSFER S, P FROM BUFF$
Not appended
(appended by
user)
Yes
III
OUTPUT BUFF$
NOFORMAT; ~
TRANSFER S, P NOFORMAT
FROM BUFF$
Not appended
No (YM.
BASIC/FA
internal code)
S: slot number P: port number BUFF$: name of I/O buffer
Table 4.6 Format Specification on Input
Type
Format Specification of ENTER
Format Specification of
TRANSFER
Terminator
Code
conversion
I
ENTER BUFF$; A$
ENTER BUFF$ USING “~“; A$
TRANSFER S, P INTO BUFF$
Appended
automatically
Yes
II
ENTER BUFF$ FORMAT; A$
ENTER BUFF$ USING “~“; A$
TRANSFER S, P FORMAT INTO
BUFF$
Not appended
(appended by
user)
Yes
III
ENTER BUFF$ NOFORMAT; A$
TRANSFER S, P NOFORMAT INTO
BUFF$
Not appended
No (YM.
BASIC/FA
internal code)
S: slot number P: port number BUFF$: name of I/O buffer
Содержание F3RS22-0N
Страница 11: ...Blank Page...
Страница 15: ...Blank Page...
Страница 28: ...3 3 IM 34M6H21 01E 2nd Edition Aug 2001 00 External Dimensions Unit mm 83 2 28 9 2 12 1 100...
Страница 31: ...Blank Page...
Страница 59: ...Blank Page...
Страница 63: ...Appx 3 2 IM 34M6H21 01E 2nd Edition Aug 2001 00 Blank Page...
Страница 65: ...Blank Page...