Sharp OZ-707 Operation Manual - Page 100

required, using, commands.

Page 100 highlights

If OUTPUT is specified using an existing filename, that file is erased before the new one is created. An error occurs when using the APPEND or INPUT mode if the specified file does not exist. An error occurs when using the APPEND or OUTPUT mode if the specified file has the UP" attribute set {write-protection: see SET command}. An error occurs if an attempt is made to open a file which has already been opened, or to allocate a file number which has already been allocated. Example: For RAM disk E OPEN "E:PR01" FOR OUTPUT AS #21 Creates a new file on the RAM disk E named PR01 with file number 21. In format 2, the following parameters can be selected: Baud Rate: 300, 600, 1200, 2400, 4800, 9600 Specifies the modulation rate {transfer rate}. (1 baud = 1 bit/sec) Parity: N, E, 0 Specifies the type of parity. N: No parity bit is transmitted nor received. E: Specifies even parity. 0: Specifies odd parity. Word Length: 7, 8 Specifies how many bits to be transmitted or received per character. Number of Stop Bits: 1, 2 Type of Code: A Always specify A, since only ASCII codes can be sent or received. Delimiter: C, F, L Specifies the type of delimiter to indicate the end of data, end of a program line, etc. C: Specifies the CR (carriage return) code. F: Specifies the LF (line feed) code. L: Specifies the CR code + LF code. End-of-file Code: &HOO--&HFF Specifies the end-of-file code used to indicate the end of the program, etc. (May be required when using the SAVE or LOAD commands.) 188 XON: N,X Specifies communication control using XON and XOFF. N: Specifies no control using XON and XOFF. X: Specifies control using XON and XOFF. Shift code: S, N When the word length is specified as 7 characters, the SO, SI switching enables transfer of characters whose codes are 128 or greater. S: Specifies to switch SO and SI N: Specifies not to switch SO and SI Example: OPEN "COM:1200,N,8,1,A,C,&H1A,N,S" AS #22 1200...... Baud rate (1200 baud) N Parity (none) 8 Word length (8 bits) 1 Number of stop bits (1 bit) A ...........Type of code (ASCII) C Delimiter (CR code) &H1A ....End-of-file code (&H1A) N ...........XON (none) S ...........Shift code (Yes) The device name "COM:" can be omitted. The conditions in the example above are set after the batteries have been replaced or after the RESET button is pressed. Any condition specified in the OPEN command can be omitted. If omitted, the current condition remains unchanged. OPEN "",2" Only the number of stop bits is changed. In format 3, all conditions set previously are retained. This format enables data to be transferred through the I/O interface. File number 1 is always used. Note: To open files on the device COM and another device at the same time, open the file on the device COM first. If the file on another device is opened first, the files may not be opened properly. 189

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

If OUTPUT is specified using an existing filename, that file is erased
before the new one
is
created.
An error occurs when using the APPEND or INPUT mode if the
specified file does not exist.
An
error occurs when using the APPEND or OUTPUT mode if the
specified file has the
UP"
attribute set {write-protection: see SET
command}.
An error occurs if
an
attempt is made to open a file which has already
been opened, or
to
allocate a file number which has already been
allocated.
Example:
For RAM disk E
OPEN "E:PR01" FOR OUTPUT AS
#21
Creates a new file
on
the RAM disk E named PR01 with file number 21.
In
format 2, the following parameters can
be
selected:
Baud Rate:
300, 600, 1200, 2400, 4800, 9600
Specifies the modulation rate {transfer rate}.
(1
baud
=
1 bit/sec)
Parity:
N,
E,
0
Specifies the type of parity.
N: No parity bit
is
transmitted nor received.
E: Specifies even parity.
0:
Specifies odd parity.
Word Length:
7,
8
Specifies how many bits to be transmitted or received per character.
Number of Stop Bits:
1,
2
Type of Code: A
Always specify
A,
since only ASCII codes can be sent or received.
Delimiter:
C,
F,
L
Specifies the type of delimiter to indicate the end of data, end of a
program line, etc.
C:
Specifies the
CR
(carriage return) code.
F:
Specifies the
LF
(line feed) code.
L:
Specifies the
CR
code
+
LF code.
End-of-file Code:
&HOO--&HFF
Specifies the end-of-file code used to indicate the end of the
program, etc.
(May
be
required
when
using
the
SAVE
or
LOAD
commands.)
188
XON:
N,X
Specifies communication control using XON and XOFF.
N:
Specifies no control using XON and XOFF.
X: Specifies control using XON and XOFF.
Shift code:
S,
N
When the word length
is
specified as 7 characters, the SO,
SI
switching enables transfer of characters whose codes are
128
or
greater.
S: Specifies
to
switch
SO
and
SI
N: Specifies not to switch SO and SI
Example:
OPEN "COM:1200,N,8,1,A,C,&H1A,N,S" AS #22
1200
......
Baud rate (1200 baud)
N
...........
Parity (none)
8
............
Word length
(8
bits)
1
....
..
...
..
. Number of stop bits
(1
bit)
A
...........
Type of code (ASCII)
C
...........
Delimiter (CR code)
&H1A .
..
. End-of-file code (&H1A)
N
...........
XON (none)
S
...........
Shift
code (Yes)
The device name "COM:"
can
be omitted.
The conditions in the example above are set after the batteries have
been replaced or after the RESET button is pressed.
Any condition specified
in
the OPEN command can be omitted. If
omitted, the current condition remains unchanged.
OPEN "",2"
Only the number of stop bits is changed.
In format
3,
all conditions set previously are retained. This format
enables data to be transferred through the I/O interface. File number 1
is always used.
Note:
To open files on the device COM and another device at the same time,
open the file on the device COM first. If the file on another device
is
opened first, the files may not
be
opened properly.
189