81
Example 3
Purpose:
To enter characters from the keyboard and write them to
the PC using the PC WRITE statement and
READ(88/190).
Equals Flag
To next process
PC Program
ASCII Unit Program
READ(88/190)
#0002
01
DM020
OPEN #2, “KYBD:”
INPUT #2, A$
PC WRITE “2A2”; A$
Number of words to be transferred
First word to transfer
Destination word address
#0002:
01:
DM020:
Remarks:
When the PC WRITE statement is executed, the first four characters of charac-
ter string A$ are converted into ASCII code and stored in DM 0020 and 0021.
Example 4
Purpose:
The PC uses interrupt number 3 to direct the ASCII Unit to
read five words of data from the specified DM addresses.
Equals Flag
To next process
Number of words to be transferred
First word to transfer (DM 000)
Destination word address
PC Program
ASCII Unit Program
WRIT(87/191)
#0005
DM000
00
50 ON PC 3 GOSUB 200
60 PC 3 ON
MOV(21/030)
#0003
DM 000
200 PC READ “5H4” ; A, B, C, D, E
#0005:
DM000:
00:
Remarks:
When the Interrupt Input goes ON, the PC writes the interrupt number to DM 000
with the MOV(21/030) instruction and the ASCII Unit branches to the interrupt
service routine at line 200. WRIT(87/191) then writes 5 words of data to the
ASCII Unit which stores them in variables “A” through “E”.
Example 5
Purpose:
To read and print PC data at specific times using the ASCII
Unit PC READ statement and WRIT(87/191)
Programs in Two-word Mode
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...