home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / MODEMS / CAS.ZIP / CAS.TXT
Encoding:
Text File  |  1990-05-30  |  85.7 KB  |  3,563 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.             DCA/Intel Communicating Applications Specification
  20.  
  21.  
  22.  
  23.                                Version 1.0B
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. Copyright (C) 1988, 1989.  All rights reserved.
  47.  
  48. Digital Communications Associates, Inc.
  49. 1000 Alderman Drive
  50. Alpharetta, GA 30201-4199
  51.  
  52. Intel Corporation
  53. 5200 N.E. Elam Young Pkwy.
  54. Hillsboro, OR 97124-6497
  55.  
  56. Intel Part Number:  301812-003
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. This specification was jointly developed by Digital Communications
  75. Associates, Incorporated and Intel Corporation.  Although it has been
  76. released into the public domain and is not confidential or proprietary, the
  77. specification is still the copyright and property of Digital Communications
  78. Associates, Incorporated and Intel Corporation.
  79.  
  80.  
  81.  
  82.  
  83. Disclaimer of Warranty
  84.  
  85. DIGITAL COMMUNICATIONS ASSOCIATES, INCORPORATED (DCA) AND INTEL CORPORATION
  86. EXCLUDE ANY AND ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF
  87. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  NEITHER DCA NOR
  88. INTEL MAKE ANY WARRANTY OF REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH
  89. RESPECT TO THIS SPECIFICATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY,
  90. OR FITNESS FOR A PARTICULAR PURPOSE.  NEITHER DCA NOR INTEL SHALL HAVE ANY
  91. LIABILITY FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
  92. OR RESULTING FROM THE USE OR MODIFICATION OF THIS SPECIFICATION.
  93.  
  94.  
  95.  
  96. This specification uses the following trademarks:
  97.  
  98.      Connection CoProcessor is a trademark and Intel is a registered
  99.      trademark of Intel Corporation.
  100.  
  101.      DCA and Digital Communications Associates are registered trademarks of
  102.      Digital Communications Associates, Incorporated.
  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.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. Table of Contents
  141.  
  142. Introduction ..............................................  1
  143. Addressing the Communication Problem ......................  1
  144. The CAS Architecture ......................................  3
  145.      DCA/Intel CAS ........................................  4
  146.      The Resident Manager .................................  4
  147.      Transfer Agents ......................................  4
  148.      Hardware .............................................  4
  149. Opportunities .............................................  5
  150. Additional Copies of CAS ..................................  5
  151. Programmer's Overview .....................................  6
  152.      Events and Control Files .............................  6
  153.      Queues ...............................................  7
  154.      Using the Resident Manager ...........................  7
  155. Control Files .............................................  8
  156.      Conventions ..........................................  8
  157.      Control File Format ..................................  9
  158.      File Transfer Record (FTR) ........................... 12
  159. Sequence of Events for Transmitting and Receiving Files ... 13
  160.      Transmitting a Single File ........................... 13
  161.      Transmitting Multiple Files as a Single Event ........ 13
  162.      Receiving Files ...................................... 14
  163. Function Table ............................................ 15
  164. Get Installed State (00H) ................................. 16
  165. Submit a Task (01H) ....................................... 17
  166. Abort a Current Event (02H) ............................... 18
  167. Find First Entry in Queue (05H) ........................... 20
  168. Find Next Entry in Queue (06H) ............................ 22
  169. Open a File (07H) ......................................... 23
  170. Delete a File (08H) ....................................... 25
  171. Delete All Files (in a queue, 09H) ........................ 26
  172. Get Event Date (0AH) ...................................... 27
  173. Set Task Date (0BH) ....................................... 28
  174. Get Event Time (0CH) ...................................... 29
  175. Set Task Time (0DH) ....................................... 30
  176. Get External Data Block (0EH) ............................. 31
  177. Get/Set Autoreceive State (0FH) ........................... 32
  178. Get Current Event Status (10H) ............................ 33
  179. Get Queue Status (11H) .................................... 34
  180. Get Hardware Status (12H) ................................. 35
  181. Run Diagnostics (13H) ..................................... 36
  182. Move Received File (14H) .................................. 37
  183. Submit a Single File to Send (15H) ........................ 38
  184. Unload Resident Manager (16H) ............................. 40
  185. Error Codes ............................................... 42
  186. Phone Number Specification ................................ 44
  187. Phonebook Format .......................................... 44
  188. PCX Format ................................................ 46
  189.      Data Encoding ........................................ 46
  190.      File Header .......................................... 47
  191. DCX Format ................................................ 48
  192.  
  193.  
  194.  
  195.  
  196.           DCA/Intel Communicating Applications Specification V1.0B      iii
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. ASCII File Interpretation for Fax Transmission ............ 48
  206. GLOSSARY .................................................. 50
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.           iv       DCA/Intel Communicating Applications Specification V1.0B
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Introduction
  275.  
  276. The DCA/Intel Communicating Applications Specification (CAS) defines a
  277. standard communication programming interface for software developers.  With
  278. this interface, software developers can add communication functions to
  279. their products in a straightforward and simple manner.  This high-level
  280. interface provides functions for both sending and receiving information.
  281.  
  282. This interface is independent of the hardware and software that provide the
  283. communications facilities.  By making the interface hardware-independent,
  284. software developers can code their applications to the interface and be
  285. assured that their applications will work with new generations of hardware
  286. products.
  287.  
  288. Version 1.0 of the CAS requires DOS 3.0 or later.
  289.  
  290.  
  291.  
  292.  
  293. Addressing the Communication Problem
  294.  
  295. Today, end users often use one set of applications to create and modify
  296. information and another set to communicate the information to others.  As a
  297. result, the communication process is often different and disjointed from
  298. the creation process.  In many instances, electronic communication is
  299. complicated and demands a sophisticated user.  The necessity of knowing
  300. about protocols, start bits, stop bits, and parity information prevents the
  301. average user from taking advantage of electronic communication.
  302.  
  303. For an easier solution, end users can use paper methods for communicating
  304. information.  Facsimile, Federal Express, and U.S. Mail are used
  305. extensively today.  However, the recipient often needs the information in
  306. an electronic form to edit or enhance the data.  Paper systems do not
  307. address this problem.
  308.  
  309. What end users really need is a simple way to send electronic information
  310. in a wide variety of data formats (file transfer, fax, etc.).  The easiest
  311. way for them to do this would be through applications that they're already
  312. familiar with.
  313.  
  314. For example, using a favorite word processor, an end user could create a
  315. memo to be distributed to the sales offices.  While in the word processor,
  316. the end user would invoke the "send" command.  The underlying hardware and
  317. software would then distribute the memo using whatever communications
  318. technologies are required (facsimile, modem, MCI, etc.).
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.           DCA/Intel Communicating Applications Specification V1.0B    - 1 -
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337. The DCA/Intel Communicating Applications Specification (CAS) is designed to
  338. allow software developers to easily integrate communications into their
  339. applications.  The CAS programming interface is hardware-independent and
  340. shields software developers from the details typically associated with
  341. using communication hardware today.  By using the CAS interface, software
  342. developers can offer new or enhanced communication features with less
  343. effort.  As new hardware technologies become available, software developers
  344. can incorporate those new features with little or no additional coding.
  345.  
  346.  
  347.  
  348.  
  349.                            End-user
  350.  
  351.        ZDDDDDDDDDDDDBDDDDDDDDDADDDDBDDDDDDDDDDDDDDDDDDDD?
  352. ZDDDDDDADDDDD?  ZDDDADDDD?   ZDDDDDADDDDDD?      ZDDDDDDADDDDDDD?
  353. 3 Word       3  3 Spread 3   3 Electronic 3  ... 3   In-House   3
  354. 3 Processors 3  3 Sheets 3   3 Mail       3      3 Applications 3
  355. @DDDDDBDDDDDDY  @DDDBDDDDY   @DDDDDBDDDDDDY      @DDDDDDBDDDDDDDY
  356.       3             3              3                    3
  357.       @DDDDDDDDDDDDDADDDDDDDBDDDDDDADDDDDDDDDDDDDDDDDDDDY
  358.                             3
  359.              ZDDDDDDDDDDDDDDADDDDDDDDDDDDDDDD?
  360.              3                               3
  361.              3        CAS Software           3
  362.              3        and Hardware           3
  363.              3                               3
  364.              @DDDDDDDDDDDDDDBDDDDDDDDDDDDDDDDY
  365.                             3
  366.        ZDDDDDDDDDDDDDBDDDDDDADDDDDBDDDDDDDDD?
  367.  ZDDDDDADDDD?     ZDDADD?     ZDDDADD?      3
  368.  3 MCI Mail 3     3 Fax 3     3 3270 3     ...   Communication
  369.  @DDDDDDDDDDY     @DDDDDY     @DDDDDDY               Media
  370.  
  371.  
  372.  
  373. With communications integrated into the application, end users can both
  374. create and communicate information without leaving their applications.  The
  375. communication process has the same "look and feel" as their applications.
  376. Because the communication techniques are simplified, end users are more
  377. productive and require less sophistication.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.           - 2 -    DCA/Intel Communicating Applications Specification V1.0B
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404. The CAS Architecture
  405.  
  406. The CAS architecture consists of four components: CAS, the Resident
  407. Manager, Transfer Agents, and the hardware.  These components provide
  408. transparent communication for the end user while supporting a wide range of
  409. communication technologies.
  410.  
  411.  
  412.  
  413.  
  414.  ZDDDDDDDDDDDDDDD?  ZDDDDDDDDDDDDDDD?
  415.  3 Developer     3  3 Developer     3    ...
  416.  3 Application 1 3  3 Application 2 3
  417.  @DDDDDDBDDDDDDDDY  @DDDDDDBDDDDDDDDY     3
  418.         3                  3              3
  419.         @DDDDDDDDDDDDDDDDDDEDDDDDDDDDDDDDDY
  420.                            3
  421.              DCA/Intel CAS 3 Programming Interface *
  422.   -------------------------3----------------------------
  423.                            3
  424.               ZDDDDDDDDDDDDADDDDDDDDDDDDDDDD?
  425.               3                             3
  426.               3     Resident Manager        3
  427.               3                             3
  428.               @DDDDDDDDDDDDBDDDDDDDDDDDDDDDDY
  429.                            3
  430.               ZDDDDDDDDDDDDADDDDDDDDDDDDDDDD?
  431.               3                             3
  432.               3      Transfer Agents        3
  433.               3                             3
  434.               @DDDDDDDDDDDDBDDDDDDDDDDDDDDDDY
  435.                            3
  436.                            3
  437.         ZDDDDDDDDDDDDDDDDDDABDDDDDDDDDDDDDDDDDDD?
  438.         3                   3                   3
  439.  ZDDDDDDADDDDD?  ZDDDDDDDDDDADDDDDDDDD?  ZDDDDDDADDDDDDDD?
  440.  3            3  3                    3  3               3
  441.  3 Fax modem  3  3 Asynchronous modem 3  3 3270 Hardware 3  ...
  442.  3            3  3                    3  3               3
  443.  @DDDDDDDDDDDDY  @DDDDDDDDDDDDDDDDDDDDY  @DDDDDDDDDDDDDDDY
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453. * The software developer is responsible for writing code using the CAS
  454. programming interface.  The underlying software and hardware would be
  455. provided by the communication product vendor.
  456.  
  457.  
  458.  
  459.  
  460.           DCA/Intel Communicating Applications Specification V1.0B    - 3 -
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. DCA/Intel CAS
  470.  
  471. The DCA/Intel Communicating Applications Specification (CAS) is a
  472. programming interface for software developers.  With this interface, the
  473. developer initiates a request by calling the Resident Manager.  The
  474. Resident Manager handles all incoming and outgoing data.
  475.  
  476.  
  477.  
  478. The Resident Manager
  479.  
  480. The Resident Manager implements the DCA/Intel CAS.  When sending, it takes
  481. the information from the application and determines the appropriate
  482. communication method and routing to reach the individual.  Once it decides
  483. on the method of communication, the Resident Manager invokes the correct
  484. Transfer Agent to handle the actual transmission.  When receiving, the
  485. Resident Manager receives and stores the information, and makes it
  486. available to the application.
  487.  
  488.  
  489.  
  490. Transfer Agents
  491.  
  492. In its simplest form, a Transfer Agent is a data dump truck.  The Transfer
  493. Agent is responsible for moving the data to or from the desired location.
  494. It handles all issues concerning connecting, transmitting, and
  495. disconnecting from the recipient.  Each service and protocol has a unique
  496. Transfer Agent.  The Transfer Agent ensures that the data is transmitted
  497. reliably and reports any status information.
  498.  
  499. The Transfer Agent can execute either on the PC microprocessor or, assuming
  500. an intelligent board, on the communication hardware.  For intelligent
  501. hardware, Transfer Agents are downloaded from the PC.  If the Transfer
  502. Agent executes on the communication hardware, the transmission can take
  503. place in the background.  Therefore, the architecture supports multiple
  504. transfer agents and allows easy updating of existing agents.
  505.  
  506.  
  507.  
  508. Hardware
  509.  
  510. The DCA/Intel Communicating Applications Specification (CAS) is designed to
  511. support a wide variety of communications hardware.  Version 1.0 of this
  512. specification provides functions that are applicable to fax modem hardware.
  513. This type of hardware can be used for both facsimile and file transfer.
  514. Over time, the DCA/Intel CAS will evolve to add functions appropriate for
  515. other hardware.  Software developers who include CAS support in their
  516. applications can be assured of upward compatibility with future versions of
  517. the CAS.
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.           - 4 -    DCA/Intel Communicating Applications Specification V1.0B
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536. Opportunities
  537.  
  538. Using CAS functions, software developers can offer new features to their
  539. end users.  With version 1.0, developers can treat remote fax machines as
  540. another output device and/or provide direct file transfer capability.
  541.  
  542. Using the facsimile aspect of the specification, developers can treat fax
  543. machines as remote printers.  For example, they can design word processors
  544. that let end users send memos to remote sales offices using facsimile
  545. transfer.  Developers can even take the mail merge concept and combine it
  546. with fax technology to create new features such as fax merge.  Also, they
  547. can design database report generation tools that send output to the fax
  548. machines in the field offices.
  549.  
  550. The file transfer capabilities of the specification enable software
  551. developers to provide easy data-sharing capabilities for remote users.
  552. Word processing, spreadsheet, and database files can be easily transmitted
  553. by end users, allowing both parties to make more efficient edits and
  554. changes to working documents.
  555.  
  556. Developers of LAN-based applications (such as E-mail, groupware, and shared
  557. databases) can also use CAS functions to easily extend the services of
  558. their products.  These developers can use CAS functions to provide high-
  559. speed bridges between networks, high-speed links to support remote end-
  560. users, and fax gateways to communicate with non-PC users.
  561.  
  562.  
  563.  
  564.  
  565. Additional Copies of CAS
  566.  
  567. You can obtain additional copies of this specification by contacting Intel
  568. at one of the following numbers:
  569.  
  570. (800) 538-3373  (inside the U.S. or Canada)
  571. (503) 629-7354  (outside the U.S. or Canada)
  572.  
  573. The Intel Electronic Bulletin Board contains an ASCII version of this
  574. specification that you can download with a modem using the XMODEM transfer
  575. protocol.  You can reach the Bulletin Board 24 hours a day by calling:
  576.  
  577.      (503) 645-6275
  578.  
  579. Before you call, set your modem for 300, 1200, or 2400 bits per second; 8
  580. data bits; no parity; and 1 stop bit.
  581.  
  582. You can also obtain a copy of this specification if you have a touch-tone
  583. phone and a fax machine or Intel Connection CoProcessor.  FaxBack is
  584. available 24 hours a day.  You can reach FaxBack by calling:
  585.  
  586.      (503) 629-7576
  587.  
  588.  
  589.  
  590.  
  591.  
  592.           DCA/Intel Communicating Applications Specification V1.0B    - 5 -
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602. Programmer's Overview
  603.  
  604. The DCA/Intel CAS provides a standard interface that allows multiple
  605. software developers to access the communication services provided by the
  606. hardware.  The software that implements the CAS controls the interface to
  607. the hardware such that multiple applications/processes can use the hardware
  608. without conflict.
  609.  
  610. The Resident Manager provides a kernel of primitives designed to allow
  611. software developers to implement support in a variety of possible
  612. applications.  To support as many types of applications as possible and
  613. relieve certain classes of applications from being forced to use functions
  614. specific to other classes, the set of CAS primitives (functions) has been
  615. kept simple and generic.
  616.  
  617. Applications access CAS functions through interrupt 2FH (Multiplex
  618. interrupt on DOS versions 3.0 and above).  Similar to DOS function calls
  619. accessed through interrupt 21H, CAS functions are accessed by loading
  620. registers with defined values, issuing an interrupt 2FH, and examining the
  621. values returned in the appropriate registers.  The following convention is
  622. used for function calls:
  623.  
  624.      Register       Usage
  625.  
  626.      AH             Multiplex Number (0CBH)
  627.      AL             Function Code
  628.      BX             Event Handle
  629.      CX             File Number
  630.      CX, DX         Date, Time
  631.      DS:DX               Pointer to Data Area
  632.      DL             Queue
  633.                     0 - Task Queue
  634.                     1 - Receive Queue
  635.                     2 - Log Queue
  636.  
  637. The Resident Manager conceptually manages three queues of Control Files.
  638. Much of the information needed by applications is in the Control File.  One
  639. queue is used for managing tasks created by applications to be sent out.  A
  640. second queue is used for managing received data.  The third queue is used
  641. to manage a historical log of activities.
  642.  
  643.  
  644.  
  645. Events and Control Files
  646.  
  647. Control Files contain information about events.  An event can be one of
  648. several actions the Resident Manager can perform.  These actions are:
  649.  
  650.   Send         The local computer transmits information to a remote
  651.                computer.
  652.  
  653.   Receive      The local computer receives information from a remote
  654.                computer.
  655.  
  656.  
  657.  
  658.           - 6 -    DCA/Intel Communicating Applications Specification V1.0B
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.   Polled Send  The local computer waits for a remote computer to call and
  668.                then automatically sends information to it.
  669.  
  670.   Polled Receive    The local computer calls a remote computer and receives
  671.                information from it.
  672.  
  673.   Log          The local computer records the details of a successful or
  674.                unsuccessful communication activity.
  675.  
  676. A subset of these events (Send, Polled Send, and Polled Receive) are
  677. started by the local computer and are called tasks.  For tasks, the
  678. application usually creates the Control Files.  In the case of a Receive or
  679. Log event, which are events initiated by the remote computer, the Resident
  680. Manager automatically creates the Control Files.
  681.  
  682.  
  683.  
  684. Queues
  685.  
  686. The Resident Manager maintains three queues internally: a Task Queue, a
  687. Receive Queue, and a Log Queue.  The Resident Manager uses queues to manage
  688. Control Files.  This management is needed to control when events occur and
  689. to provide uniform, collision-free access to Control Files for various
  690. applications.  Any activity can be classified as a receive, a send, or a
  691. log activity.  To avoid some bottlenecks, activities have been classified
  692. into the three groups such that one application may, for instance, examine
  693. the Log Queue while another application is preparing a send activity.
  694. These are two different classes of activities (events) and can occur
  695. simultaneously.
  696.  
  697.  
  698.  
  699. Using the Resident Manager
  700.  
  701. When an application wants to perform a task (a Send event, a Polled Receive
  702. event, or a Polled Send event), it must create a Task Control File.  This
  703. file contains information such as the name of the file(s) to send, the
  704. phone number of the destination, and the date and time for transmission.
  705. The application then enters the task into the Resident Manager's Task Queue
  706. and receives a unique event handle which is used to keep track of this
  707. particular event.  Note: Event handles are never 0.
  708.  
  709. Upon completion of the task, the Resident Manager updates the status
  710. information in the Control File and transfers it to the Log Queue.  At this
  711. point, the control file becomes a Log Control File.  The application can
  712. then use the DCA/Intel CAS functions to query the Log Queue to check for
  713. the status of a completed task.  Note: the event handle remains the same
  714. even though the event has changed from a task to a log event.
  715.  
  716. For Receive events, the Resident Manager creates both a Receive Control
  717. File and a Log Control File.  Each remains in existence until the
  718. application deletes the associated receive or log event.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.           DCA/Intel Communicating Applications Specification V1.0B    - 7 -
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734. Control Files
  735.  
  736. The Resident Manager controls events with queues that rely on information
  737. contained in Control Files.  Control files can refer to a scheduled task (a
  738. Task Control File), a current receive event (a Receive Control File), or a
  739. completed event (a Log Control File).  Various fields in a Control File are
  740. meaningful only in certain instances; for example, the "Time length of
  741. phone connection" fields are not meaningful in a Task Control File for a
  742. Send event and will contain zeros.
  743.  
  744.  
  745.  
  746. Conventions
  747.  
  748. In the description of the Control File that follows, several terms are used
  749. that require further explanation.  These include ASCIIZ string, DOS file
  750. time format, and phone number.
  751.  
  752.  
  753. ASCIIZ String
  754.  
  755. An ASCIIZ string is simply a string of ASCII characters followed by a zero
  756. byte to indicate the end of the string.
  757.  
  758.  
  759. DOS File Date and Time Format
  760.  
  761. DOS file date and time format is a convention that DOS uses for storing the
  762. date and time in two-byte fields.  The format of the date is:
  763.  
  764.      Bits      Description
  765.  
  766.      0-4       A value from 1 to 31, indicating the day of the month (where
  767.                  1 is the first day).
  768.      5-8       A value from 1 to 12, indicating the month of the year
  769.                  (where 1 is January, 2 is February, etc.).
  770.      9-15      A value from 0 to 119 (which corresponds to 1980 to 2099)
  771.                  indicating the year.
  772.  
  773. The format of the time is:
  774.  
  775.      Bits      Description
  776.  
  777.      0-4       The number of two-second increments.
  778.      5-10      A value from 0 to 59, indicating the minutes.
  779.      11-15       A value from 0 to 23, indicating the hours.
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.           - 8 -    DCA/Intel Communicating Applications Specification V1.0B
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799. Phone Numbers
  800.  
  801. When specifying a phone number, you can include not only the digits 0
  802. through 9 and the characters # and *, but also the following special
  803. characters:
  804.  
  805.    Character     Description
  806.  
  807.      ,         Causes the hardware to pause when dialing.  This is useful
  808.                  when waiting for a tone for an outside line.
  809.      !         Signals a hook flash, for use with special PBX functions.
  810.      P         Specifies pulse dialing for rotary phones.
  811.      T         Specifies tone dialing for touch-tone phones.
  812.      M         Causes the hardware to use the current connection without
  813.                  dialing a new number (manual dialing).
  814.  
  815. All other characters are ignored.
  816.  
  817.  
  818.  
  819. Control File Format
  820.  
  821. Listed below is the general format of a Control File.  The fields preceded
  822. by bullets (77) and whose first lines are in bold are fields the programmer
  823. must fill in when creating a Control File for a task.  Other fields are
  824. filled in by the Resident Manager and should be set to 0 when creating the
  825. Control File.  For a receive or log event, the Resident Manager fills in
  826. all the fields.
  827.  
  828. The Offset column indicates the offset of the field (in bytes) from the
  829. start of the file.  The Length column indicates the length of the field in
  830. bytes.  The values listed in the Description field are values, not bit
  831. positions.  Multi-byte fields containing numeric, date, or time values have
  832. the least-significant byte first.
  833.  
  834. When using high-level languages to create a Control File, make sure the
  835. data structures are packed (aligned on byte boundaries).
  836.  
  837.       Offset   Length Description
  838.  
  839. **   0    1    Event type:
  840.                0 - Send
  841.                1 - Receive
  842.                2 - Polled Send
  843.                3 - Polled Receive
  844.                4 - 127 Reserved
  845.                -1 (0FFH) - Serious hardware error not associated with an
  846.                  ordinary event.
  847.  
  848.      Note:            When filling out this field, you must set it to 0, 2,
  849.                  or 3.  The value 1 is used by the Resident Manager when
  850.                  creating a receive Control File.  The value -1 is not
  851.                  valid for Task Control Files and results in an error.
  852.  
  853.  
  854.  
  855.  
  856.           DCA/Intel Communicating Applications Specification V1.0B    - 9 -
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.       Offset   Length Description
  866.  
  867. **   1    1    Transfer type:
  868.                0 - 200x200 dpi, fax mode.
  869.                1 - 100x200 dpi, fax mode.
  870.                2 - File transfer mode.
  871.                3-127 - Reserved.
  872.  
  873.      Note:            You must set the Transfer type field to 0, 1, or 2
  874.                  for a send event (the field doesn't apply for a polled
  875.                  receive event).  Setting this field to a value greater
  876.                  than 2 results in an error.
  877.  
  878.      2    2    Status of event:
  879.                0 - Successfully completed.
  880.                1 - Waiting to be processed.
  881.                2 - Number has been dialed.
  882.                3 - Connection made -- sending.
  883.                4 - Connection made -- receiving.
  884.                5 - Send event was aborted.
  885.                6-127 - Reserved.
  886.                128-32,767 - Available for application-defined events.
  887.                Negative value - error.
  888.  
  889.      Note:            This field is set by the Resident Manager and should
  890.                  be set to "0" in a Task Control File.
  891.  
  892. **   4    2    For send events, this is the time you want to send the
  893.                  information.  For receive events, this is the time the
  894.                  receive event occurred.  The format is in DOS file date
  895.                  and time format.
  896. **   6    2    For send events, this is the date you want to send the
  897.                  information.  For receive events, this is the date the
  898.                  receive event occurred.  The format is in DOS file date
  899.                  and time format.
  900.  
  901.      Note:            Setting both the time and date fields to zero
  902.                  schedules the file to be sent immediately.  Therefore, to
  903.                  send a file at once, zero the four bytes (long word) at
  904.                  offset 4.
  905.  
  906. **   8    2    Number of files to transfer, maximum 32766.
  907. **   10   2    Offset in this control file of first File Transfer Record.
  908.  
  909.      Note:            If you don't plan to include cover page text
  910.                  (described at offset 383), this field must specify offset
  911.                  383.  Otherwise, this field must specify the offset
  912.                  immediately after the cover page text.
  913.  
  914. **   12   47   Phone number to call, as an ASCIIZ string.
  915.       Offset   Length Description
  916.  
  917.      59   64   Application-specific tag field, as an ASCIIZ string.
  918.  
  919.  
  920.  
  921.  
  922.           - 10 -   DCA/Intel Communicating Applications Specification V1.0B
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.      Note:            This field is used by applications to identify
  932.                  Control Files that are "owned" by that application.  For
  933.                  example, when an application creates control files, it can
  934.                  fill this field with a specific ASCII string.  Later, when
  935.                  it checks Control Files, it can check for the same string
  936.                  to ensure that it handles only the Control Files that
  937.                  apply to it.  If a file was sent using Non-Standard Format
  938.                  (NSF), this field will have meaning for a Receive Control
  939.                  File.  If a file was sent as a fax, this field will be
  940.                  filled with zeros.
  941.  
  942. **   123  1    Reserved.  Set to zero.
  943.      124  1    Time length of phone connection: seconds (0 - 59).
  944.      125  1    Time length of phone connection: minutes (0-59).
  945.      126  1    Time length of phone connection: hours (0-23.)
  946.      127  4    Total number of pages in all files.
  947.      131  4    Number of pages transmitted so far.
  948.      135  2    Number of files transmitted so far.
  949. **   137  1    Cover page flag:
  950.                0 - Don't send cover page.
  951.                1 - Send cover page.
  952.                2-127 - Reserved.
  953.  
  954.      Note:            If you plan to send only a cover page, set this field
  955.                  to 1 and the number of files to transfer (offset 8) to 0.
  956.                  Setting both fields to 0 results in an error.
  957.  
  958.      138  2    Number of transmission errors reported by the hardware for
  959.                  all transmissions controlled by this Control File.
  960. **   140  78   Reserved.  Set to zero.
  961.      218  21   Remote CSID (the CCITT identification of the fax device), as
  962.                  an ASCIIZ string (set by the Resident Manager).
  963. **   239  32   Destination Name, as an ASCIIZ string (To: field).
  964. **   271  32   Sender Name, as an ASCIIZ string (From: field).
  965. **   303  80   Path and name of PCX logo file (maximum size 1728 x 800
  966.                  pels), as an ASCIIZ string.
  967. **   383  var  Cover page text, as an ASCIIZ string.  the length is
  968.                  variable, as indicated by var, but a maximum of 36 lines
  969.                  of text is recommended (or else the received page might be
  970.                  longer than 11 inches).  Lines can be separated by new
  971.                  line characters (0AH) or CR-LF pairs (0DH, 0AH).  Lines
  972.                  longer than 80 characters are wrapped around.
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.           DCA/Intel Communicating Applications Specification V1.0B   - 11 -
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.       Offset   Length Description
  998.  
  999.      Note:            The text field is not required to be present.  If it
  1000.                  is absent, the first File Transfer Record (FTR) must start
  1001.                  at offset 383.  In all cases, the field at offset 10
  1002.                  identifies the start of the first FTR.
  1003.  
  1004. **   var  var  Table of 128-byte File Transfer Records (FTRs). The first
  1005.                  FTR begins at the offset specified by the word at offset
  1006.                  10 of the control file.  The following section describes
  1007.                  the format of each FTR.
  1008.  
  1009.  
  1010. File Transfer Record (FTR)
  1011.  
  1012. Listed below is the general format of a File Transfer Record.  These
  1013. records appear at the end of the Control File, one for each file that is
  1014. transferred as part of the event.  Fields preceded by bullets (**) and
  1015. whose first lines are in bold are fields the programmer must fill in when
  1016. creating an FTR.  Other fields are filled in by the Resident Manager
  1017. software and should be set to 0 when creating the FTR.  When creating an
  1018. FTR for a file transfer, specify only the file name.  When creating an FTR
  1019. for a fax, you must also specify the text size and page length fields.  In
  1020. both cases, set the other fields to zero.  The Resident Manager will fill
  1021. in the other fields.  Each FTR has the following format:
  1022.  
  1023.       Offset   Length Description
  1024.  
  1025. **   0    1    File type (has meaning only for faxes):
  1026.                0 - ASCII
  1027.                1 - PCX
  1028.                2 - DCX
  1029.                3-127 - Reserved
  1030. **   1    1    Text size to use if file type is ASCII (has meaning only for
  1031.                  faxes):
  1032.                0 - 80 column by 66 lines (11 inches)
  1033.                1 - 132 column by 88 lines (11 inches)
  1034.                2-127 - Reserved
  1035.      2    1    Status of this file:
  1036.                0 - Untouched
  1037.                1 - Has been opened
  1038.                2 - Has been moved
  1039.                3 - Has been deleted
  1040.                4 - Not yet received
  1041.                5-127 - Reserved
  1042.      3    4    Bytes of this file transmitted so far.
  1043.      7    4    Size in bytes of this file.
  1044.      11   2    Number of pages in this file transmitted so far.
  1045.      13   2    Number of pages in this file.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.           - 12 -   DCA/Intel Communicating Applications Specification V1.0B
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.       Offset   Length Description
  1064.  
  1065. **   15   80   Path and name of file to send, as an ASCIIZ string.
  1066. **   95   1    If you set the Inches field (offset 96) to a value in the
  1067.                  range 1 through 127, this field specifies the number of
  1068.                  additional 1/8-inch increments in page length.  If the
  1069.                  Inches field is outside that range, this field has no
  1070.                  meaning.  This field has meaning only for faxes.
  1071. **   96   1    Page length in inches (has meaning only for faxes).
  1072.                0 -    Page length is 11 inches.
  1073.                1-127 -  Page length is the specified number of inches, plus
  1074.                  the number of 1/8 inches specified in the 1/8 inches field
  1075.                  (offset 95).
  1076.                -1 -   ASCII pages end with form feeds only.
  1077.                All other values are reserved.
  1078. **   97   31   Reserved.  Set to zero.
  1079.  
  1080.  
  1081.  
  1082. Sequence of Events for Transmitting and Receiving Files
  1083.  
  1084. This section provides an overview of the steps a programmer should follow
  1085. to transmit and receive files using the DCA/Intel CAS function calls.
  1086. Although these sections are general, they refer to specific function calls.
  1087. Later sections of this specification provide detailed descriptions of the
  1088. function calls.
  1089.  
  1090.  
  1091.  
  1092. Transmitting a Single File
  1093.  
  1094.   1. Invoke CAS function 00H (Get Installed State) to determine if the
  1095.      Resident Manager is installed.  If it is, continue with the following
  1096.      steps.
  1097.  
  1098.   2. Create the data file you wish to transmit.
  1099.  
  1100.   3. Create the data structure required by function 15H (Submit a Single
  1101.      File to Send).
  1102.  
  1103.   4. Invoke function 15H (Submit a Single File to Send).
  1104.  
  1105.   5. Check for errors in sending.
  1106.  
  1107.  
  1108.  
  1109. Transmitting Multiple Files as a Single Event
  1110.  
  1111.   1. Invoke CAS function 00H (Get Installed State) to determine if the
  1112.      Resident Manager is installed.  If it is, continue with the following
  1113.      steps.
  1114.  
  1115.   2. Create the data files you wish to transmit.
  1116.  
  1117.  
  1118.  
  1119.  
  1120.           DCA/Intel Communicating Applications Specification V1.0B   - 13 -
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.   3. Create a Task Control File that includes one File Transfer Record
  1130.      (FTR) for each file you wish to transmit.
  1131.  
  1132.   4. Invoke function 01H (Submit a Task).
  1133.  
  1134.   5. Check for errors.
  1135.  
  1136.  
  1137.  
  1138. Receiving Files
  1139.  
  1140.   1. Invoke CAS function 00H (Get Installed State) to determine if the
  1141.      Resident Manager is installed.  If it is, continue with the following
  1142.      steps.
  1143.  
  1144.   2. Invoke function 05H (Find First Entry in Queue) to determine if any
  1145.      receive events have occurred.  If a receive event has occurred,
  1146.      continue with the following steps.
  1147.  
  1148.   3. Invoke function 07H (Open a File) to open the Receive Control File
  1149.      obtained in step 2.  Check the application-specific tag field in the
  1150.      control file to determine if the receive event is of interest to your
  1151.      application.  If the tag is appropriate, continue with step 4.
  1152.      Otherwise, invoke DOS function 3EH (Close File Handle) to close the
  1153.      Receive Control File and continue with step 8.
  1154.  
  1155.   4. For each File Transfer Record in the Receive Control File, examine the
  1156.      "Status of this file" field to determine if the associated received
  1157.      file has been moved or deleted.  For each received file that has not
  1158.      been moved or deleted, continue with step 5.  If no such files remain,
  1159.      close the Receive Control File and continue with step 8.
  1160.  
  1161.   5. Invoke function 14H (Move Received File) to move the received file to
  1162.      the appropriate directory or filename or invoke function 08H (Delete a
  1163.      File) to delete the received file.
  1164.  
  1165.   6. Once you have moved, renamed, or deleted all the received files,
  1166.      invoke DOS function 3EH (Close File Handle) to close the Receive
  1167.      Control File.
  1168.  
  1169.   7. Invoke function 08H (Delete a File) to delete the Receive Control
  1170.      File.
  1171.  
  1172.   8. Invoke function 06H (Find Next Entry in Queue) to determine if
  1173.      additional receive events have occurred.  If there are additional
  1174.      receive events, repeat steps 3 through 7.
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.           - 14 -   DCA/Intel Communicating Applications Specification V1.0B
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196. Function Table
  1197.  
  1198. Function Name                                Function Number
  1199.  
  1200.  
  1201.  
  1202. Get Installed State....................................00H
  1203. Submit a Task..........................................01H
  1204. Abort the Current Event................................02H
  1205. Reserved.........................................03H - 04H
  1206. Find First Entry in Queue..............................05H
  1207. Find Next Entry in Queue...............................06H
  1208. Open a File............................................07H
  1209. Delete a File..........................................08H
  1210. Delete All Files (in a queue)..........................09H
  1211. Get Event Date.........................................0AH
  1212. Set Task Date..........................................0BH
  1213. Get Event Time.........................................0CH
  1214. Set Task Time..........................................0DH
  1215. Get External Data Block................................0EH
  1216. Get/Set Autoreceive State..............................0FH
  1217. Get Current Event Status...............................10H
  1218. Get Queue Status.......................................11H
  1219. Get Hardware Status....................................12H
  1220. Run Diagnostics........................................13H
  1221. Move Received File.....................................14H
  1222. Submit a Single File to Send...........................15H
  1223. Unload Resident Manager................................16H
  1224. Reserved.........................................17H - 80H
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.           DCA/Intel Communicating Applications Specification V1.0B   - 15 -
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.           00H
  1262.           Get Installed State                                              
  1263.  
  1264.  
  1265. Description:
  1266.  
  1267. Get Installed State (00H) detects whether the Resident Manager is currently
  1268. installed.
  1269.  
  1270. Input:
  1271.  
  1272.      AH = Multiplex number
  1273.      AL = 00H
  1274.  
  1275. Return:
  1276.  
  1277. On return, AL contains the installed state as follows:
  1278.  
  1279.      AL = 00H Not installed
  1280.      AL = 01H Not installed, not OK to install
  1281.      AL = FFH Installed
  1282.  
  1283. There is no error returned.
  1284.  
  1285. See Also:
  1286.  
  1287.      Get External Data Block (OEH)
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.           - 16 -   DCA/Intel Communicating Applications Specification V1.0B
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                                                                         01H
  1328.                                                               Submit a Task
  1329.  
  1330.  
  1331. Description:
  1332.  
  1333. The Submit a Task function (01H) schedules a send, a polled send, or a
  1334. polled receive event.  Before invoking this function, you must first
  1335. prepare a Task Control File.  The function adds this Task Control File to
  1336. the Task Queue.  The event handle returned by this function is a positive
  1337. integer that must be used in all subsequent references to this event.
  1338.  
  1339. For sends and polled sends, once the event has completed, the Task Control
  1340. File will automatically be deleted and a corresponding Log Control File
  1341. created without programmer action.  However, files associated with the
  1342. event (the files to send) will not be deleted.  For polled receives,
  1343. neither the Task Control File nor the received files will be deleted.
  1344.  
  1345. Input:
  1346.  
  1347.      AH = Multiplex number
  1348.      AL = 01H
  1349.      DS:DX points to ASCIIZ path and name of Task Control File
  1350.  
  1351. Return:
  1352.  
  1353.      AX = Positive event handle or negative error code
  1354.  
  1355.      Note:            Files associated with a task must remain in existence
  1356.                  until the task is complete or an error results.
  1357. See Also:
  1358.  
  1359.      Submit a Single File to Send (015H)
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.           DCA/Intel Communicating Applications Specification V1.0B   - 17 -
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.           02H
  1394.           Abort the Current Event                                          
  1395.  
  1396.  
  1397.  
  1398. Description:
  1399.  
  1400. The Abort the Current Event function (02H) aborts the currently executing
  1401. event.  To prevent the execution of a pending event, use the Delete a File
  1402. function (08H).
  1403.  
  1404.      Note:            Terminating an event is not instantaneous.  It might
  1405.                  take up to 30 seconds.
  1406.  
  1407. Input:
  1408.  
  1409.      AH = Multiplex number
  1410.      AL = 02H
  1411.  
  1412. Return:
  1413.  
  1414.      AX = Event handle of aborted event or negative error code
  1415.  
  1416. See Also:
  1417.  
  1418.      Delete a File (08H)
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.           - 18 -   DCA/Intel Communicating Applications Specification V1.0B
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                                                                   03H - 04H
  1460.                                                                    Reserved
  1461.  
  1462.  
  1463.  
  1464. These functions are reserved.
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.           DCA/Intel Communicating Applications Specification V1.0B   - 19 -
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.           05H
  1526.           Find First Entry in Queue                                        
  1527.  
  1528.  
  1529.  
  1530. Description:
  1531.  
  1532. The Find First Entry in Queue function (05H) searches the queue you specify
  1533. in the DL register for an event whose status matches the one you specify in
  1534. the CX register.  Entries in queues are ordered by the date and time in
  1535. which the corresponding events occurred (or are scheduled to occur).
  1536. Depending on the value you place in the DH register, the function searches
  1537. for the earliest or latest such event.  The function returns a 15-bit event
  1538. handle of the entry it finds.
  1539.  
  1540. Once you use this function to obtain an event handle, you can access the
  1541. file associated with that event by calling the Open a File function (07H).
  1542. Use the Find Next Entry in Queue function (06H) to find subsequent entries
  1543. in the queue.
  1544.  
  1545. Input:
  1546.  
  1547.      AH = Multiplex number
  1548.      AL = 05H
  1549.      CX = Status of the event you are seeking.  This value is compared with
  1550.             the field at offset 2 of the Control File.
  1551.             0 - Event has successfully completed.
  1552.             1 - Event is waiting to be processed.
  1553.             2 - Number has been dialed.
  1554.             3 - Connection has been made -- sending.
  1555.             4 - Connection has been made -- receiving.
  1556.             5 - Event was aborted.
  1557.             -1  Chooses an event without regard to status.  This value will
  1558.                  probably be used most often.
  1559.             Other negative values
  1560.                 Matches error codes in Control File.
  1561.      DH = Direction:
  1562.             0 - Search forward chronologically (from the first occurring
  1563.                  event to the last occurring event).
  1564.             1 - Search backward chronologically (from the last occurring
  1565.                  event to the first occurring event).
  1566.      DL = Queue to search:
  1567.             0 - Find first control file in Task Queue.
  1568.             1 - Find first control file in Receive Queue.
  1569.             2 - Find first control file in Log Queue.
  1570.  
  1571. Return:
  1572.  
  1573.      AX = 0 if successful or a negative error code.
  1574.      BX = Event handle for this file.
  1575.  
  1576. If the queue is empty, this function returns error 204H (no more events) in
  1577. the AX register.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.           - 20 -   DCA/Intel Communicating Applications Specification V1.0B
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                                                                         05H
  1592.                                                   Find First Entry in Queue
  1593.  
  1594.  
  1595.  
  1596. See Also:
  1597.  
  1598.      Find Next Entry in Queue (06H)
  1599.      Open a File (07H)
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.           DCA/Intel Communicating Applications Specification V1.0B   - 21 -
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.           06H
  1658.           Find Next Entry in Queue                                         
  1659.  
  1660.  
  1661.  
  1662. Description:
  1663.  
  1664. After a call to the Find First Entry in Queue function (05H), you can step
  1665. chronologically through a queue using the Find Next Entry in Queue function
  1666. (06H).  Each subsequent call to Find Next Entry in Queue returns the event
  1667. handle of the next event chronologically (as set by function 05H) in the
  1668. specified Queue.  For example, if you set the Find First Entry function to
  1669. search forward chronologically, the Find Next Entry function searches
  1670. forward for the next entry that matches the specifications set with Find
  1671. First Entry.  If you set Find First Entry to search backwards
  1672. chronologically, Find Next Entry also searches backwards.
  1673.  
  1674. You must invoke the Find First Entry in Queue function (05H) prior to using
  1675. the Find Next Entry in Queue function.  Once you use this function to
  1676. obtain an event handle, you can access the file associated with that event
  1677. by calling the Open a File function (07H).
  1678.  
  1679. Input:
  1680.  
  1681.      AH = Multiplex number
  1682.      AL = 06H
  1683.      DL = Queue to search:
  1684.             0 - Find next control file in Task Queue
  1685.             1 - Find next control file in Receive Queue
  1686.             2 - Find next control file in Log Queue
  1687.  
  1688. Return:
  1689.  
  1690.      AX = 0 if successful or a negative error code
  1691.      BX = Event handle for this file
  1692.  
  1693. See Also:
  1694.  
  1695.      Find First Entry in Queue (05H)
  1696.      Open a File (07H)
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.           - 22 -   DCA/Intel Communicating Applications Specification V1.0B
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                                                                         07H
  1724.                                                                 Open a File
  1725.  
  1726.  
  1727.  
  1728. Description:
  1729.  
  1730. After you obtain an event handle (by either scanning a Queue using the Find
  1731. First Entry in the Queue (05H) and Find Next Entry in the Queue (06H)
  1732. functions or by creating a task using the Submit a Task (01H) function),
  1733. you can use the Open a File function (07H) to access the DOS file
  1734. corresponding to the event.  For events in the Task and Log Queues, this
  1735. function opens the control file for the event.  For events in the Receive
  1736. Queue, this function opens either the control file or one of the received
  1737. data files.
  1738.  
  1739. This function opens the desired file in read-only mode and returns an
  1740. ordinary DOS file handle.
  1741.  
  1742.  
  1743. Input:
  1744.  
  1745.      AH = Multiplex number
  1746.      AL = 07H
  1747.      BX = Event handle
  1748.      CX = Receive file number.  This file number specifies which file to
  1749.             open among those associated with a receive event.  This number
  1750.             applies only to events in the Receive Queue and is ignored for
  1751.             events in the Task and Log Queues. The number is interpreted as
  1752.             follows:
  1753.             0 - The Receive Control File. The format of this file is
  1754.                  described earlier in this document.
  1755.             1 - First received file. Corresponds to the first file in the
  1756.                  list of received filenames (file transfer record 0).
  1757.             2 - Second received file.
  1758.             3 - Third received file.
  1759.             n - nth received file.
  1760.  
  1761.      DL = Queue:
  1762.             0 - Open control file in Task Queue.
  1763.             1 - Open control file in Receive Queue or the received data
  1764.                  file specified in the CX register.
  1765.             2 - Open control file in Log Queue.
  1766.  
  1767. Return:
  1768.  
  1769.      AX = 0 if successful or a negative error code.
  1770.      BX = DOS file handle for the requested file.
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.           DCA/Intel Communicating Applications Specification V1.0B   - 23 -
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           07H
  1790.           Open a File                                                      
  1791.  
  1792.  
  1793. See Also:
  1794.  
  1795. Submit a Task (01H)
  1796. Find First Entry in Queue (05H)
  1797. Find Next Entry in Queue (06H)
  1798. Move Received File (14H)
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.           - 24 -   DCA/Intel Communicating Applications Specification V1.0B
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                                                                         08H
  1856.                                                               Delete a File
  1857.  
  1858.  
  1859.  
  1860. Description:
  1861.  
  1862. The Delete a File function (08H) deletes one or more files in a specific
  1863. Queue.
  1864.  
  1865.  
  1866. Input:
  1867.  
  1868.      AH = Multiplex number
  1869.      AL = 08H
  1870.      BX = Event handle
  1871.      CX = Receive file number.  This number specifies which file to delete
  1872.             among those associated with a receive event.  This number
  1873.             applies only to events in the Receive Queue and is ignored for
  1874.             events in the Task and Log Queues.  The number is interpreted
  1875.             as follows:
  1876.             0 - Delete all files associated with the specified Receive
  1877.                  Control File (including the Receive Control File).
  1878.             1 - Delete the first received file associated with the event
  1879.                  handle.
  1880.             2 - Delete the second received file associated with the event
  1881.                  handle.
  1882.             n - Delete the nth received file associated with the event
  1883.                  handle.
  1884.  
  1885.      DL = Queue:
  1886.             0 - Delete control file in Task Queue.
  1887.             1 - Delete a file or files associated with an event in the
  1888.                  Receive Queue.
  1889.             2 - Delete control file in Log Queue.
  1890. Return:
  1891.  
  1892.      AX = 0 if successful or a negative error code.
  1893.  
  1894. See Also:
  1895.  
  1896.      Abort the Current Event (02H)
  1897.      Delete All Files (09H)
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.           DCA/Intel Communicating Applications Specification V1.0B   - 25 -
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           09H
  1922.           Delete All Files (in a queue)                                    
  1923.  
  1924.  
  1925.  
  1926. Description:
  1927.  
  1928. The Delete All Files function (09H) deletes all Task Control Files, all
  1929. Receive Control Files and the associated received files, or all Log Control
  1930. Files.
  1931.  
  1932.  
  1933. Input:
  1934.  
  1935.      AH = Multiplex number
  1936.      AL = 09H
  1937.      DL = Queue:
  1938.             0 - Delete all control files in the Task Queue
  1939.             1 - Delete all control files in the Receive Queue and all
  1940.                  received files
  1941.             2 - Delete all control files in the Log Queue
  1942.  
  1943. Return:
  1944.  
  1945.      AX = 0 if successful or a negative error code
  1946.  
  1947. See Also:
  1948.  
  1949.      Delete A File (08H)
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.           - 26 -   DCA/Intel Communicating Applications Specification V1.0B
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.                                                                         0AH
  1988.                                                              Get Event Date
  1989.  
  1990.  
  1991.  
  1992. Description:
  1993.  
  1994. The Get Event Date function (0AH) gets the date associated with a given
  1995. event handle.
  1996.  
  1997.  
  1998. Input:
  1999.  
  2000.      AH = Multiplex number
  2001.      AL = 0AH
  2002.      BX = Event handle of the event whose date you want to obtain
  2003.      DL = Queue:
  2004.             0 - Task Queue
  2005.             1 - Receive Queue
  2006.             2 - Log Queue
  2007.  
  2008. Return:
  2009.  
  2010.      AX = 0 if successful or a negative error code
  2011.      CX = Year (1980 - 2099)
  2012.      DH = Month (1 - 12)
  2013.      DL = Day (1 - 31)
  2014.  
  2015. Refer to the "DOS Date and Time Format" section earlier in this
  2016. specification for more information on the format of the data returned.
  2017.  
  2018. See Also:
  2019.  
  2020.      Set Task Date (0BH)
  2021.      Get Event Time (0CH)
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.           DCA/Intel Communicating Applications Specification V1.0B   - 27 -
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.           0BH
  2054.           Set Task Date                                                    
  2055.  
  2056.  
  2057.  
  2058. Description:
  2059.  
  2060. The Set Task Date function (0BH) sets the execute date of a Task Control
  2061. File specified by the event handle.
  2062.  
  2063. This function is valid only for task events, not for receive or log events.
  2064.  
  2065.      Note:            Setting the date for a task event to a value that is
  2066.                  earlier than the current date causes the transmission to
  2067.                  occur immediately.
  2068.  
  2069. Input:
  2070.  
  2071.      AH = Multiplex number
  2072.      AL = 0BH
  2073.      BX = Event handle
  2074.      CX = Year (1980 - 2099)
  2075.      DH = Month (1 - 12)
  2076.      DL = Day (1 - 31)
  2077.  
  2078. Refer to the "DOS Date and Time Format" section earlier in this
  2079. specification for more information on the format of the data in these
  2080. registers.
  2081.  
  2082. Return:
  2083.  
  2084.      AX = 0 if successful or a negative error code
  2085.  
  2086. See Also:
  2087.  
  2088.      Get Event Date (0AH)
  2089.      Set Task Time (0DH)
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.           - 28 -   DCA/Intel Communicating Applications Specification V1.0B
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.                                                                         0CH
  2120.                                                              Get Event Time
  2121.  
  2122.  
  2123.  
  2124. Description:
  2125.  
  2126. The Get Event Time function (0CH) gets the time associated with a given
  2127. event handle.
  2128.  
  2129.  
  2130. Input:
  2131.  
  2132.      AH = Multiplex number
  2133.      AL = 0CH
  2134.      BX = Event handle
  2135.      DL = Queue:
  2136.             0 - Task Queue
  2137.             1 - Receive Queue
  2138.             2 - Log Queue
  2139.  
  2140. Return:
  2141.  
  2142.      AX = 0 if successful or a negative error code
  2143.      CH = Hour (0 - 23)
  2144.      CL = Minutes (0 - 59)
  2145.      DH = Seconds (0 - 59)
  2146.      DL = 0
  2147.  
  2148. Refer to the "DOS Date and Time Format" section earlier in this
  2149. specification for more information on the format of the data returned.
  2150.  
  2151. See Also:
  2152.  
  2153.      Get Event Date (0AH)
  2154.      Set Task Time (0OH)
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.           DCA/Intel Communicating Applications Specification V1.0B   - 29 -
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.           0DH
  2186.           Set Task Time                                                    
  2187.  
  2188.  
  2189.  
  2190. Description:
  2191.  
  2192. The Set Task Time function (0DH) sets the execute time of a Task Control
  2193. File specified by the event handle.
  2194.  
  2195. This function is valid only for Task events, not Receive or Log events.
  2196.  
  2197.      Note:            Setting the time for a task event to a value that
  2198.                  makes the date and time earlier than the current date and
  2199.                  time causes the transmission to occur immediately.
  2200.                  Therefore, an easy way to execute a task immediately is to
  2201.                  set the task time and task date to zero.
  2202.  
  2203. Input:
  2204.  
  2205.      AH = Multiplex number
  2206.      AL = 0DH
  2207.      BX = Event handle
  2208.      CH = Hour (0 - 23)
  2209.      CL = Minutes (0 - 59)
  2210.      DH = Seconds (0 - 59)
  2211.  
  2212. The value of DL is unused.
  2213.  
  2214. Refer to the "DOS Date and Time Format" section earlier in this
  2215. specification for more information on the format of the data in these
  2216. registers.
  2217.  
  2218. Return:
  2219.  
  2220.      AX = 0 if successful or a negative error code
  2221.  
  2222. See Also:
  2223.  
  2224.      Set Task Date (0BH)
  2225.      Get Event Time (0CH)
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.           - 30 -   DCA/Intel Communicating Applications Specification V1.0B
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                                                                         0EH
  2252.                                                     Get External Data Block
  2253.  
  2254.  
  2255.  
  2256. Description:
  2257.  
  2258. The External Data Block contains additional information about the current
  2259. Resident Manager installation (such as the name of the default logo file).
  2260.  
  2261. Input:
  2262.  
  2263.      AH = Multiplex number
  2264.      AL = 0EH
  2265.      DS:DX points to a 256-byte EDB area
  2266.  
  2267. Return:
  2268.  
  2269.      AX = 0 if successful or a negative error code
  2270.      EDB area is filled with the External Data Block
  2271.  
  2272. The format of the External Data Block is as follows: (values in decimal):
  2273.  
  2274.       Offset   Length Description
  2275.  
  2276.      0    1    CAS major version number.
  2277.      1    1    CAS minor version number.
  2278.      2    68   ASCIIZ string specifying pathname to directory containing
  2279.                  Resident Manager and other software that implements the
  2280.                  CAS.  The path ends with a backslash. The user specifies
  2281.                  this name when installing the software.
  2282.      70   13   Name of default phonebook file, as an ASCIIZ string.  This
  2283.                  file is assumed to be in the Resident Manager and software
  2284.                  directory.
  2285.      83   13   Name of default logo file, as an ASCIIZ string.  This file
  2286.                  is assumed to be in the Resident Manager and software
  2287.                  directory.  The user specifies this name when installing
  2288.                  the software.
  2289.      96   32   Default sender name, as an ASCIIZ string.  The user
  2290.                  specifies this name when installing the software.
  2291.      128  21   CSID (the CCITT identification of the fax device) as an
  2292.                  ASCIIZ string.
  2293.      149  107  Reserved.
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.           DCA/Intel Communicating Applications Specification V1.0B   - 31 -
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.           0FH
  2318.           Get/Set Autoreceive State                                        
  2319.  
  2320.  
  2321.  
  2322. Description:
  2323.  
  2324. The Get/Set Autoreceive State function (0FH) examines or alters the receive
  2325. state of the hardware.  If an event is in progress, the new autoreceive
  2326. state will not take effect until the event is completed.
  2327.  
  2328. Input:
  2329.  
  2330.      AH = Multiplex number
  2331.      AL = 0FH
  2332.      DL = Function code:
  2333.             0 - get current autoreceive state
  2334.             1 - set current autoreceive state to value in DH
  2335.      DH = Number of rings before answer or 0 to disable
  2336.  
  2337. Return:
  2338.  
  2339.      AX = current autoreceive state or negative error code
  2340.             0 - Autoreceive disabled
  2341.             positive number - Number of rings before the hardware answers
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.           - 32 -   DCA/Intel Communicating Applications Specification V1.0B
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                                                                         10H
  2384.                                                    Get Current Event Status
  2385.  
  2386.  
  2387.  
  2388. Description:
  2389.  
  2390. The Get Current Event Status function (10H) returns the status of the
  2391. currently executing event.
  2392.  
  2393. Input:
  2394.  
  2395.      AH = Multiplex number
  2396.      AL = 10H
  2397.      DS:DX points to a 512-byte status area
  2398.  
  2399. Return:
  2400.  
  2401.      AX = 0 if successful or a negative error code
  2402.      BX = Event number of the current event (if the function completed
  2403.             without an error)
  2404.  
  2405. This function fills the status area pointed to by DS:DX on entry with a
  2406. truncated version of the Control File for the current event.  This data
  2407. structure is identical to the Control File structure with two exceptions:
  2408.  
  2409.   *  Only one File Transfer Record (FTR) is included.  The FTR included is
  2410.      the one controlling the current file transfer.
  2411.  
  2412.   *  No cover page text field is included.  Instead the current FTR begins
  2413.      at offset 383.
  2414.  
  2415. Therefore, the end of the Control File has the following format:
  2416.  
  2417.       Offset   Length Description
  2418.  
  2419.      303  80   Path and name of PCX logo file (maximum size 1728 x 800
  2420.                  pels)
  2421.      383  128  The File Transfer Record corresponding to the current event
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.           DCA/Intel Communicating Applications Specification V1.0B   - 33 -
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.           11H
  2450.           Get Queue Status                                                 
  2451.  
  2452.  
  2453.  
  2454. Description:
  2455.  
  2456. The Get Queue Status function (11H) returns the current status of a queue
  2457. you specify.
  2458.  
  2459. Input:
  2460.  
  2461.      AH = Multiplex number
  2462.      AL = 11H
  2463.      DL = Queue:
  2464.             0 - Find status of Task Queue
  2465.             1 - Find status of Receive Queue
  2466.             2 - Find status of Log Queue
  2467.  
  2468. Return:
  2469.  
  2470.      AX = Total number of changes made to this queue since the Resident
  2471.             Manager was started, or a negative error code.  If the number
  2472.             of changes exceeds 7FFFH, the count begins again at 0.
  2473.      BX = Current number of Control Files in this queue.
  2474.      CX = Current number of received files.  (This register is non-zero
  2475.             only if you request the status of the Receive Queue by
  2476.             specifying DL = 1.)  The value in this register is incremented
  2477.             for each file received.
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.           - 34 -   DCA/Intel Communicating Applications Specification V1.0B
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.                                                                         12H
  2516.                                                         Get Hardware Status
  2517.  
  2518.  
  2519.  
  2520. Description:
  2521.  
  2522. The Get Hardware Status function (12H) returns the status of the
  2523. communication hardware.
  2524.  
  2525.      Caution:    The values and structure returned by this function are
  2526.                  hardware-dependent and will vary according to type of
  2527.                  hardware used to implement the CAS services.  It is
  2528.                  recommended that you use the Get Current Event (10H) and
  2529.                  Get Queue Status (11H) functions, or examine the Control
  2530.                  File, instead of using this function.
  2531.  
  2532.  
  2533. Input:
  2534.  
  2535.      AH = Multiplex number
  2536.      AL = 12H
  2537.      DS:DX points to a 128-byte status area
  2538.  
  2539. Return:
  2540.  
  2541.      AX = 0 if successful or a negative error code.  If successful, the
  2542.             function fills the status area with hardware-dependent status
  2543.             information.  Contact the manufacturer of your communications
  2544.             hardware for information on the content and format of the
  2545.             status information.
  2546.  
  2547. See Also:
  2548.  
  2549.      Get Task Status (10H)
  2550.      Get Queue Status (11H)
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.           DCA/Intel Communicating Applications Specification V1.0B   - 35 -
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.           13H
  2582.           Run Diagnostics                                                  
  2583.  
  2584.  
  2585.  
  2586. Description:
  2587.  
  2588. The Run Diagnostics function (13H) runs a set of diagnostics or reports on
  2589. their progress.
  2590.  
  2591. Input:
  2592.  
  2593.      AH = Multiplex number
  2594.      AL = 13H
  2595.      DL = Mode:
  2596.             0 - Report progress of diagnostics
  2597.             1 - Start running diagnostics
  2598.  
  2599. Return:
  2600.  
  2601. If request was to start running diagnostics (DL = 1), AX contains either a
  2602. 0 (diagnostics successfully begun) or a negative error code.
  2603.  
  2604. If request was to report the progress of diagnostics, AX contains a 40H
  2605. (diagnostics in process) or some other positive number indicating that
  2606. diagnostics passed.  If AX contains a negative number, the diagnostics
  2607. failed and the value indicates the reason for failure.  The values are
  2608. hardware-dependent.  Contact the manufacturer of your communications
  2609. hardware for information on the failure codes.
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.           - 36 -   DCA/Intel Communicating Applications Specification V1.0B
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.                                                                         14H
  2648.                                                          Move Received File
  2649.  
  2650.  
  2651.  
  2652. Description:
  2653.  
  2654. The Move Received File function (14H) moves a received file to a different
  2655. directory and gives it a new name.  The new directory can be on a different
  2656. device.
  2657.  
  2658.      Note:            The path to the new directory must exist.  This
  2659.                  function cannot create directories.
  2660.  
  2661. Input:
  2662.  
  2663.      AH = Multiplex number
  2664.      AL = 14H
  2665.      BX = Event handle
  2666.      CX = Receive file number (must be nonzero to specify a received file)
  2667.             1 - First received file
  2668.             2 - Second received file
  2669.             3 - Third received file
  2670.             n - nth received file
  2671.      DS:DX = Pointer to a new path and name of the file (in the form of an
  2672.             ASCIIZ string).  This file must not exist already.
  2673.  
  2674. Return:
  2675.  
  2676.      AX = 0 if successful or a negative error code.
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.           DCA/Intel Communicating Applications Specification V1.0B   - 37 -
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.           15H
  2714.           Submit a Single File to Send                                     
  2715.  
  2716.  
  2717.  
  2718. Description:
  2719.  
  2720. The Submit a Single File to Send function (15H) provides a simple method of
  2721. sending a single file, either as a fax or as a file transfer.  The function
  2722. creates and submits the necessary Task Control File and returns the
  2723. corresponding event handle (or negative error code).  Before invoking this
  2724. function, you must create a data structure (described later) that contains
  2725. the appropriate information.
  2726.  
  2727. Input:
  2728.  
  2729.      AH = Multiplex number
  2730.      AL = 15H
  2731.      DS:DX = Pointer to a variable-length data area, described later in
  2732.             this section
  2733.  
  2734. Return:
  2735.  
  2736.      AX = positive event handle or a negative error code
  2737.  
  2738.  
  2739. The format of the data area pointed to by DS:DX is as follows.  The
  2740. individual fields have the same meaning as in a Task Control File.
  2741.  
  2742.       Offset   Length Description
  2743.  
  2744.      0    1    Transfer type:
  2745.                0 - 200x200 dpi, fax mode
  2746.                1 - 100x200 dpi, fax mode
  2747.                2 - File transfer mode
  2748.                3-127 - Reserved.
  2749.      1    1    Text size (if ASCII file, fax mode)
  2750.                0 - 80-column
  2751.                1 - 132-column
  2752.                2-127 - Reserved.
  2753.      2    2    Time to send, in DOS file date and time format
  2754.      4    2    Date to send, in DOS file date and time format
  2755.  
  2756.      Note:            Setting both the time and date fields to zero
  2757.                  schedules the file to be sent immediately.  Therefore, to
  2758.                  send a file at once, zero the four bytes (long word) at
  2759.                  offset 2.
  2760.  
  2761.      6    32   Destination Name, as an ASCIIZ string (To: field)
  2762.      38   80   Path and name of the file to send, as an ASCIIZ string
  2763.       Offset   Length Description
  2764.  
  2765.      118  47   Phone number to call, as an ASCIIZ string
  2766.  
  2767.  
  2768.  
  2769.  
  2770.           - 38 -   DCA/Intel Communicating Applications Specification V1.0B
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.                                                                         15H
  2780.                                                Submit a Single File to Send
  2781.  
  2782.  
  2783.      165  64   Application-specific tag field, as an ASCIIZ string
  2784.      229  1    Reserved; set to zero
  2785.      230  1    Cover page flag:
  2786.                0 - Don't send cover page
  2787.                1 - Send cover page
  2788.                2-127 - Reserved
  2789.      231  23   Reserved; set to zero
  2790.      254  var  Cover text, as an ASCIIZ string.  This text is sent if the
  2791.                  cover page flag (offset 230) is set to 1.
  2792.  
  2793. You must set all fields, except for the Application-Specific Tag field,
  2794. before calling this function.  However, you can set the Destination Name
  2795. and Cover Text fields to the empty string, if desired.
  2796.  
  2797. See Also:
  2798.  
  2799.      Submit A Task (01H)
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.           DCA/Intel Communicating Applications Specification V1.0B   - 39 -
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.           16H
  2846.           Unload Resident Manager                                          
  2847.  
  2848.  
  2849.  
  2850. Description:
  2851.  
  2852. The Unload Resident Manager function (16H) unloads the Resident Manager
  2853. from memory.  Unloading frees the memory the Resident Manager used, making
  2854. it available for other applications.  However, once the Resident Manager is
  2855. unloaded, the manager functions are no longer available.   For example,
  2856. unloading the manager from memory suspends all pending tasks.  If there is
  2857. a task which is scheduled to be sent in five minutes, it will not be sent
  2858. until the manager is reloaded.  Once the manager is reloaded, however, it
  2859. will immediately send tasks that should have been sent while it was
  2860. unloaded.  In addition, when the manager is not installed, you cannot
  2861. receive anything.
  2862.  
  2863. Unloading the Resident Manager from memory will fail if a terminate and
  2864. stay resident (TSR) program has been loaded after the manager, if there is
  2865. a polled sent, or if the manager or corresponding communications board is
  2866. busy doing a task.
  2867.  
  2868. Input:
  2869.  
  2870.      AH = Multiplex number
  2871.      AL = 16H
  2872.      BX = 1234H
  2873.      CX = 5678H
  2874.      DX = 9ABCH
  2875.  
  2876. Return:
  2877.  
  2878.      AX = 0 if successful or a negative error code
  2879.  
  2880. This function returns error 209H if the communications board is busy.  It
  2881. returns error 20BH if it can't remove the Resident Manager.
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.           - 40 -   DCA/Intel Communicating Applications Specification V1.0B
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.                                                                   17H - 80H
  2912.                                                                    Reserved
  2913.  
  2914.  
  2915. These functions are reserved.
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.           DCA/Intel Communicating Applications Specification V1.0B   - 41 -
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980. Error Codes
  2981.  
  2982. An error code consists of two parts, an error class and an error subcode.
  2983. The error class is returned in AH and the error subcode is returned in AL.
  2984. The error class indicates the general type of operation in which the error
  2985. occurred.  Examples of general operations are: manipulation of the
  2986. schedule, manipulation of a Control File, etc.  The error subcode can be a
  2987. DOS error code or an error code defined by the Resident Manager.  Error
  2988. subcodes indicate the specific kind of error that occurred.
  2989.  
  2990. This method of handling error codes allows an application to examine either
  2991. the full error code returned in AX, or the class/subcode of an error
  2992. individually.
  2993.  
  2994. Error codes are listed in the following table.  All codes are in
  2995. Hexadecimal.  Before each listing of specific errors is a description of
  2996. the error class code.  The full error code (class + subcode) is listed in
  2997. the Error column, and the class and subcode are listed separately in the
  2998. next two columns.  When these errors are returned to an application, they
  2999. are returned as the negative of these codes.  For example, a "No more
  3000. events" error will be returned in AX as 0FDFCH which is the negative (2's
  3001. complement) of 0204H.
  3002.  
  3003. Table of Error Codes
  3004.  
  3005. Error Class Subcode Description
  3006.  
  3007.       0          Class: Fax warnings (not an error)
  3008. 0000  0     0    No error
  3009. 0002  0     2    Bad scanline count
  3010. 0003  0     3    Page sent with errors, couldn't resend
  3011. 0004  0     4    Received data lost
  3012. 0005  0     5    Invalid or missing logo file
  3013. 0006  0     6    File name doesn't match nonstandard format (NSF) header
  3014. 0007  0     7    File size doesn't match nonstandard format (NSF) header
  3015.  
  3016.       1          Class: DOS warnings; data was sent.  The error subcode is
  3017.                   the error returned by DOS.  Examples are:
  3018. 0101  1     1    Invalid function number
  3019. 0105  1     5    Access denied
  3020. 0106  1     6    Invalid handle
  3021. 01xx  1     ...  (See the DOS Technical Reference)
  3022.  
  3023.       2          Class: Fatal errors.  The function failed or the data was
  3024.                   not sent.
  3025. 0200  2     0    Multiplex handler failed
  3026. 0201  2     1    Unknown command (bad function number)
  3027. 0202  2     2    Event not found (bad event handle)
  3028. 0203  2     3    Attempted to Find Next before Find First
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.           - 42 -   DCA/Intel Communicating Applications Specification V1.0B
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041. Error Class Subcode Description
  3042.  
  3043. 0204  2     4    No more events
  3044. 0207  2     7    Invalid Queue type (bad Queue number)
  3045. 0208  2     8    Bad Control File
  3046. 0209  2     9    Communication board is busy
  3047. 020A  2     A    Invalid command parameter
  3048. 020B  2     B    Can't uninstall the Resident Manager
  3049. 020C  2     C    File already exists
  3050. 0280  2     80   Unknown task type (not a Send or Poll event)
  3051. 0281  2     81   Bad phone number
  3052. 0282  2     82   Bad PCX file header
  3053. 0283  2     83   Unexpected EOF
  3054. 0284  2     84   Unexpected disconnect
  3055. 0285  2     85   Exceeded maximum dialing retries
  3056. 0286  2     86   No files specified for Send event
  3057. 0287  2     87   Communication board timeout
  3058. 0288  2     88   Received more than 1023 (maximum) pages of data
  3059. 0289  2     89   Manual connect posted too long ago
  3060. 028A  2     8A   Hardware command set error
  3061. 028B  2     8B   Bad nonstandard format (NSF) header file
  3062.  
  3063.       3          Class: Fatal DOS errors.  The error subcode is the error
  3064.                   returned by DOS.  Examples are:
  3065. 0302  3     2    File not found
  3066. 0303  3     3    Path not found
  3067. 03xx  3     ...  (See the DOS Technical Reference Manual)
  3068.  
  3069.       4          Class: Fax errors
  3070. 0401  4     1    Remote unit not Group 3 compatible
  3071. 0402  4     2    Remote unit didn't send its capabilities
  3072. 0403  4     3    Remote unit requested disconnect
  3073. 0404  4     4    Remote unit isn't capable of file transfers
  3074. 0405  4     5    Exceeded retrain or fax resend limit
  3075. 0406  4     6    Line noise or the local and remote unit don't
  3076.                   agree on a bit rate
  3077. 0407  4     7    Remote unit disconnected after receiving data
  3078. 0408  4     8    No response from remote unit after sending data
  3079. 0409  4     9    Capabilities of remote unit aren't compatible
  3080. 040B  4     B    Invalid response from remote unit after sending
  3081.                   data
  3082. 040D  4     D    Phone line dead or remote unit disconnected
  3083. 0411  4     11   Invalid command from remote after receiving data
  3084. 0415  4     15   Tried to receive from incompatible hardware
  3085. 041F  4     1F   Unexpected end of file while receiving
  3086. 045C  4     5C   Received data overflowed input buffer
  3087. 045D  4     5D   Remote hardware unexpectedly stopped sending
  3088.                   data
  3089. 045E  4     5E   Remote hardware didn't send any data
  3090. 045F  4     5F   Remote hardware took too long to send fax scan
  3091.                   line
  3092. 0463  4     63   Can't get through to remote unit
  3093. 0464  4     64   User canceled event
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.           DCA/Intel Communicating Applications Specification V1.0B   - 43 -
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110. Phone Number Specification
  3111.  
  3112. Digits (0-9), phone number characters (# and *), and the following special
  3113. characters have meaning in a phone number field.  All other characters are
  3114. ignored.
  3115.  
  3116. P - Switch to pulse dialing
  3117. T - Switch to tone dialing
  3118. , - Pause
  3119. ! - Signal on-hook (flash)
  3120. M - Manual dial
  3121.  
  3122.  
  3123.  
  3124.  
  3125. Phonebook Format
  3126.  
  3127. The phonebook is used by Intel's Main Application (CONNECT.EXE) but may be
  3128. used by other applications as well.  It is not actually a part of the
  3129. DCA/Intel CAS. It has an extendible format that will be very useful for
  3130. many applications.
  3131.  
  3132. A phonebook file has two major parts, a header and a data space for the
  3133. variable length records.
  3134.  
  3135. Each record has a unique record number from 0 to 999.  This number is
  3136. always used to refer to the record.  There is an array of record offsets in
  3137. the phonebook header.  The offset of record N from the beginning of the
  3138. file is the (4 x N)th byte in the array.  An offset of 0 means that the
  3139. corresponding record number is unused.
  3140.  
  3141. There are up to 10 variable ASCIIZ fields defined for any phonebook.  The
  3142. application that created the phonebook defines what they are called.  Each
  3143. variable field has a maximum length of 60 bytes.  The names of these fields
  3144. are stored in the header, and the values of these fields are stored with
  3145. each record.
  3146.  
  3147. The phonebook header looks like this:
  3148.  
  3149.       Offset   Length Description
  3150.  
  3151.      0    2    ID Field: must be 1AH BBH
  3152.      2    1    Major version number (from Get External Data Block, function
  3153.                  0EH)
  3154.      3    1    Minor version number
  3155.      4    2    Number of records in the file, 0 to 1000
  3156.      6    2    Number of unused bytes in the file, 0 to 32766
  3157.       Offset   Length Description
  3158.  
  3159.      8    2    Number of variable fields in this phonebook, 0 to 10
  3160.      10   150  Array of 10 variable field names, 15 bytes apiece, as ASCIIZ
  3161.                  strings
  3162.      160  4000 Array of record offsets, 4 bytes apiece
  3163.  
  3164.  
  3165.  
  3166.           - 44 -   DCA/Intel Communicating Applications Specification V1.0B
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176. When a record is deleted, an offset of 0 is placed in the offset array and
  3177. the length of the record is added to the unused bytes count.
  3178.  
  3179. When a record is changed and its new length is larger than its old length,
  3180. the record is written at the end of the file, its offset in the offset
  3181. array is updated, and the number of freed bytes is added onto the unused
  3182. bytes count.
  3183.  
  3184. A record is variable in length.  There are two types of records: Person and
  3185. Group.
  3186.  
  3187. Person Records look like this:
  3188.  
  3189.       Offset   Length Description
  3190.  
  3191.      0    2    Record ID
  3192.      2    2    Number of groups the individual belongs to.
  3193.      4    2    Number of bytes the record occupies.
  3194.      6    1    Record type.  This is 1 for a Person Record.
  3195.      7    1    Type of hardware:
  3196.                0 -    Limited to fax
  3197.                1 -    Faxes and file transfer using fax modem
  3198.                2-127  Reserved
  3199.      8    32   ASCIIZ name. Must NOT be blank.
  3200.      40   47   ASCIIZ phone number.  At least one digit or M is required.
  3201.      87   var  ASCIIZ variable fields
  3202.      var  var  Array of 2-byte record IDs of groups that this person
  3203.                  belongs to.
  3204.  
  3205. Group records look like this:
  3206.  
  3207.       Offset   Length Description
  3208.  
  3209.      0    2    Record ID
  3210.      2    2    Number of members in the group
  3211.      4    2    Number of bytes the record occupies
  3212.      6    1    Record type.  This is 2 for a group record.
  3213.      7    1    File transfer capability:
  3214.                0 -    At least one member doesn't have file transfer
  3215.                  capability.
  3216.                1 -    All members have file transfer capability.
  3217.                2-127  Reserved
  3218.      8    32   ASCIIZ name.  Must not be blank.
  3219.      40   47   reserved - must be zeros.
  3220.      87   var  Array of 2-byte record IDs of the members in the group.
  3221.  
  3222. The first four fields of both record types are basically the same, so a 40-
  3223. byte record header can be read in from any record.
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.           DCA/Intel Communicating Applications Specification V1.0B   - 45 -
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242. PCX Format
  3243.  
  3244. Note: This section is adapted from "Technical Documentation for PC
  3245. Paintbrush & Frieze Graphics," (C) 1985 ZSoft Corporation.  To obtain this
  3246. document, contact ZSoft Corporation at (404) 428-0008.
  3247.  
  3248. A PCX format file stores one page image in the form of a rectangular
  3249. bitmap.  PCX files have a 128-byte header followed by compressed image
  3250. data.  The PCX file format allows for multiple colors each with multiple
  3251. shades, but Fax Mode transfers require black and white, no shades.  The PCX
  3252. file format also allows for different resolutions, but a PCX file for Fax
  3253. Mode transfer is interpreted as having 200 pels per inch both horizontally
  3254. and vertically, no matter what the file header says.  The PCX file format
  3255. can handle very large page sizes, but for Fax Transfer mode, the bitmap
  3256. width must be a less than 1728 pels (about 8.5 inches wide).  Lengths are
  3257. unlimited, since fax paper comes in rolls, but 2200 pels is 11 inches, and
  3258. that is the recommended maximum length for easy handling by the receiver.
  3259. Pel locations can be given in X,Y coordinates where the origin is at the
  3260. top left corner of the page, X increases toward the right, and Y increases
  3261. toward the bottom.
  3262.  
  3263.  
  3264.  
  3265. Data Encoding
  3266.  
  3267. The compression technique used is a simple run length encoding, where
  3268. duplicate bytes (not bits) are compressed.  To compress a bitmap, it is
  3269. read one horizontal line at a time from top to bottom.  Each line is read
  3270. from left to right.  The line is read eight pels at a time (one byte).
  3271. Within a byte, the most significant bit corresponds to the leftmost pel.
  3272. Runs of up to 63 bytes that are all the same are stored as a run pair: a
  3273. count byte followed by the byte that repeats. The count byte of a run pair
  3274. has the two most significant bits set, and the 6 other bits contain the
  3275. count.  If a byte of data does not repeat, it is stored just as is, unless
  3276. it happens to have its two most significant bits set, in which case it is
  3277. stored as run pair with a repeat count of one.
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.           - 46 -   DCA/Intel Communicating Applications Specification V1.0B
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307. This is the algorithm for decompressing the byte stream from a PCX file:
  3308.  
  3309.     FOR each byte, X, read from the file
  3310.     IF the top two bits of X are 1's
  3311.       BEGIN
  3312.         runlength = 6 lowest bits of X
  3313.         data      = net byte following X
  3314.       END
  3315.     ELSE
  3316.       BEGIN
  3317.         runlength = 1
  3318.         data = X
  3319.       END
  3320.  
  3321.  
  3322.  
  3323. File Header
  3324.  
  3325. Here is the structure at the start of a PCX file for fax images:
  3326.  
  3327.        Offset  Length Description
  3328.  
  3329.      0    1    PCX ID, Must be 0Ah.
  3330.      1    1    Version info.  A value of 2 is suggested. Anything higher is
  3331.                  allowed.
  3332.      2    1    Encoding method.  Must be 1.
  3333.      3    1    Bits per pixel.  Must be 1 for Fax Mode transfer.
  3334.      4    2    X position of the upper left corner, usually 0.
  3335.      6    2    Y position of the upper left corner, usually 0.
  3336.      8    2    X position of the bottom right corner, maximum 1728.  The
  3337.                  difference between this field and the upper left corner X
  3338.                  position plus 1 is the width of the bitmap.  This width
  3339.                  must be a multiple of 8.
  3340.      10   2    Y position of the bottom right corner, 2200 recommended
  3341.                  maximum.
  3342.      12   2    Display card horizontal resolution.  Ignored in Fax Transfer
  3343.                  mode.  A value of 640 is recommended for compatibility
  3344.                  with Intel's Graphics Editor.
  3345.      14   2    Display card vertical resolution.  Ignored in Fax Transfer
  3346.                  mode.  A value of 200 is recommended for compatibility
  3347.                  with Intel's Graphics Editor.
  3348.      16   48   Palette information.  Ignored in Fax Transfer mode.  Should
  3349.                  be 0's.
  3350.      64   1    Reserved.  Must be 0.
  3351.      65   1    Number of color planes.  Must be 1 for Fax Transfer Mode.
  3352.      66   2    Horizontal line width in bytes, equal to (XRight - XLeft +
  3353.                  1)/8.
  3354.      68   60   Reserved.  Should be 0.
  3355.  
  3356. The data for the first line starts immediately after the header.
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.           DCA/Intel Communicating Applications Specification V1.0B   - 47 -
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374. DCX Format
  3375.  
  3376. The DCX file format allows multiple pages to be stored in one file.  A DCX
  3377. file has a header followed by pages.  Each page is exactly the same as a
  3378. PCX file, including the PCX header for each bitmap.
  3379.  
  3380. The DCX file header starts with a 4-byte integer ID used to verify the file
  3381. type.  This ID is always 987654321 (decimal).  After the ID is a list of
  3382. offsets into the file for the pages of the document.  The list is a simple
  3383. array of 4-byte integers, the last of which has a value of 0 to mark the
  3384. end of the array.  The first page is page 0, and the offset from the
  3385. beginning of the file of the nth page is stored at array location n.  The
  3386. array has a maximum of 1024 entries, including the 0 terminator.  This
  3387. means that up to 1023 pages can be stored in one DCX file, and that the
  3388. maximum size of the index is 4096 bytes.  The index can be smaller if fewer
  3389. than 1023 pages are in the file, though this is optional.
  3390.  
  3391.  
  3392.  
  3393.  
  3394. ASCII File Interpretation for Fax Transmission
  3395.  
  3396. ASCII text files are automatically converted to graphics by the hardware as
  3397. the files are sent.  The hardware interprets the text file in the same
  3398. manner as a nonintelligent printer with 8.5- by 11-inch paper.  The full
  3399. IBM 8-bit character set, including characters from 80h to FFh, is supported
  3400. (see the "Characters, Keystrokes, and Colors" section of the IBM Technical
  3401. Reference). These special characters are recognized:
  3402.  
  3403.   Value Description
  3404.  
  3405.   0D    Carriage return.  Moves "printhead" to column 0.  Line contents are
  3406.         NOT erased.  Overstrike is OK.
  3407.  
  3408.   0A    Line feed.  Current line is output.  Moves the "printhead" to the
  3409.         beginning of the next line.
  3410.  
  3411.   0C    Form feed.  Causes the current page to end, and a new page is
  3412.         started.  The "printhead" moves to the beginning of the top line of
  3413.         the new page.
  3414.  
  3415.   08    Backspace.  moves "printhead" back one space.  Previous character
  3416.         is NOT erased.  Overstrike is OK.
  3417.  
  3418.   09    Tab.  Moves "printhead" to next tabstop.  Tabstops are every eight
  3419.         columns.
  3420.  
  3421.   1A    End of file.  Interpretation of the file stops.  This is optional,
  3422.         interpretation will stop at the end of the file if this character
  3423.         is not present.
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.           - 48 -   DCA/Intel Communicating Applications Specification V1.0B
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439. Lines that are wider than the page wrap onto the next line.  After 11
  3440. inches have passed vertically from the top of the current page, a new page
  3441. is started.  Two text sizes are available; An 80-column by 66-line text
  3442. size, and a 132-column by 88-line text size.  See the section on Control
  3443. Files for text size selection.
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.           DCA/Intel Communicating Applications Specification V1.0B   - 49 -
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506. GLOSSARY
  3507.  
  3508. Control File: A file created by either an application or the Resident
  3509. Manager that contains information necessary to complete an Event.
  3510.  
  3511. External Data Block (EDB): Data used by the Resident Manager that may be of
  3512. use to an application.
  3513.  
  3514. Event: An action to be performed by the Resident Manager.  This action can
  3515. be a fax send, a File Transfer, a Polled Send, a Polled Receive, Receive,
  3516. or Log action.
  3517.  
  3518. Event handle: A unique non zero 15-bit value that the Resident Manager
  3519. assigns to an event to keep track of it.
  3520.  
  3521. Log Control File (LCF): A Control File containing status information about
  3522. a completed (or aborted) Task or Receive.  This Control File is created and
  3523. maintained as part of the Resident Manager's Log Queue.
  3524.  
  3525. Non-Standard Facilities (NSF): Any format different from the Facsimile
  3526. transfer format as defined in the CCITT specification.  Used to transfer
  3527. files directly without first translating into a bit image.
  3528.  
  3529. Polled Receive: An Event (one of the Task Events) that allows a machine to
  3530. call other machines to receive a transmission.
  3531.  
  3532. Polled Send: An Event (one of the Task Events) that allows a machine to be
  3533. called by another machine before sending a transmission.  Similar to a send
  3534. except that the receiving machine initiates the transaction.
  3535.  
  3536. Queue: A data structure internal to the Resident Manager that manages
  3537. Control Files.  Three types of Queues exist: Task, Receive, and Log.
  3538.  
  3539. Receive Control File (RCF): A Control File containing information about a
  3540. Receive Event.  It refers to data files.
  3541.  
  3542. Resident Manager: A terminate-and-stay-resident program that manages Events
  3543. in the "background."  It provides the functional interface to applications.
  3544.  
  3545. Send: A Fax or File Transfer initiated by the Host machine.
  3546.  
  3547. Task: A Fax or File Transfer, a Polled Receive, or a Polled Send Event.
  3548.  
  3549. Task Control File (TCF): A Control File containing information about a
  3550. Task.  It contains the Task type as well as a list of files to send (if
  3551. needed).
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.           - 50 -   DCA/Intel Communicating Applications Specification V1.0B
  3563.