SNAX/APN Application Programming Manual

The CRT Interface
SNAX/APN Application Programming Manual420111-001
2-7
Special CDI Mode
Figure 2-5 shows the enhanced CDI mode.
When enhanced CDI mode is specified, the CDI function might not be transparent to an
application if the application is dependent on the CDI bit being set in a single RU. In
this case, either use normal CDI mode or change the application so that enhanced CDI
mode works.
In enhanced CDI mode, as in normal CDI mode, the WRITEREAD procedure call is
only valid when used in two-step reads. In a two-step read, the WRITEREAD must
have read count value of two. See Two-Step Reads
on page 2-3.
Special CDI Mode
With normal and enhanced CDI modes, the CRT protocol enables the CDI after
examining the contents of the outbound data stream for specific character codes and bit
settings. Special CDI (or WRITEREAD) mode enables the CDI without requiring the
protocol to read the data stream.
Special CDI mode allows an application to use a normal WRITEREAD procedure call;
that is, one that has a read count greater than 2 and that is not part of a two-step read.
When you use a WRITEREAD call with a read count greater than 2, CDI is enabled.
On the WRITEREAD portion of the WRITEREAD, a CDI request is sent to the device;
the read portion of the operation completes by reading data.
In special CDI mode, a READ procedure call is allowed only when it is part of a two-
step read. See Two-Step Reads
on page 2-3. The WRITE procedure functions just as it
does in normal CDI mode.
Summary of the Three CDI Modes
Table 2-1 summarizes the differences between normal, special, and enhanced CDI mode
operation.
Figure 2-5. Enabling CDI by a WRITE Procedure Call in Enhanced CDI Mode
205CDT .CDD
File-System
Procedure
Call
WRITE
WRITE
READ
-----
CDI
Status
OFF
ON
ON
ON
Data
Stream
Outbound
Outbound
Null Request Unit (Outbound)
Inbound
Keyboard
Restore
Indicator
0
1
NA