77
SECTION 6
Program Examples
In order for the PC and the ASCII Unit to communicate with each other, both an ASCII Unit program written in BASIC and a
PC program must be prepared. These two programs work with each other to coordinate the timing of communications and data
transfer between the two devices.
The ASCII Unit can be set in one of two modes: two-word mode or four-word mode. If the ASCII Unit is set in two-word
mode, the PC can use READ(88/190) and WRIT(87/191) for data transfer with the ASCII Unit. If the ASCII Unit is set in
four-word mode, the PC must use the MOV(21/030) instruction to transfer data with the ASCII Unit.
The first part of this section presents an explanation of the timing between the ASCII Unit and the PC when READ(88/190)
and WRIT(87/191) are used with the PC READ, PC WRITE, PC GET, and PC PUT statements. In order to understand the
programming examples in this section, it is necessary to fully understand the timing explained in this section. Please study this
section carefully before going on to the examples.
The second part of this section presents example programs written for the ASCII Unit and PC with the ASCII Unit set in
two-word mode.
The third part of this section presents example programs written for the ASCII Unit and PC with the ASCII Unit set in
four-word mode.
The fourth and last part of this section presents an assembly language programming example.
Some of the examples also present detailed explanations of what the PC and ASCII Unit are doing during execution of each
devices respective programs. When this material is present, it is listed under the heading Execution Sequence.
6-1
Timing Considerations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2
Programs in Two-word Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3
Programs in Four-word Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-4
Assembly Language Examples
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...