Sharp MZ-700 Basic Manual page 65

Disk basic interpreter
Hide thumbs Also See for MZ-700:
Table of Contents

Advertisement

64
IOUT@(OUT)
Outputs data to 1/0 ports.
Format:
OUT @ <port number>, <numerical data>
Abbreviated form:
OU.@
Explanation:
• Converts <numerical data> values (0 - 255) to binary numbers and outputs to the
<port number> output port.
• From 0 to 127 ($00 - $7F in hexadecimal), the <port number> can be determined
freely. From 128 to 255 ($FO - $80 in hexadecimal), tne use is exclusively as ports
for external devices.
• For control of peripheral devices, etc., data are output to 110 ports. Thus, if there
is a mistake of the <port number>, etc. by this OUT@ command, there is the
possibility that such a mistake will cause abnormal operation of the peripheral
equipment, etc., so care must be taken in that regard.
Example:
1 0
FOR
1 =0
TO
20
20
C =1 +32
30
GOSUB
"SUB"
40
NEXT
1
50
60
70
80
90
100
1 1 0
120
1 30
140
END
LABEL
"SUB"
1 NP@ $FE, A
1 F
NOT
(A
AND
$ 0 D) =0
OUT@ $FF,C
OUT@ $FE, $80
1 NP@ $FE, A
1 F
NOT
(A
AND
$ 0 D) =1
OUT@ $ F,E, 0
RE T UR N
Reference:
INP@ (page 63)
THE N
70
THEN
110

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mz-2z009

Table of Contents