Category : OS/2 Files
Archive   : OS2CMAPI.ZIP
Filename : ACDI.ME

 
Output of file : ACDI.ME contained in archive : OS2CMAPI.ZIP


Version 1.1 (c) Copyright International Business Machines Corp., 1988


ACDI SAMPLE PROGRAM

The ACDI sample programs are a sample of writing application programs
using the ACDI interface verbs. The function of the sample programs is
to echo line by line, screen image from one Personal Computer to the
second Personal Computer. To support the function, there are two
sample programs. One for the transmit side, and the other for the
receive side. Characters typed on the transmit side are echoed on the
receive side, line at a time.

The sample programs are designed to work in the OS/2 protected mode,
with the Communications Manager of the OS/2 Extended Edition. The
sample program source code and the supporting files are for C, PASCAL,
and MASM languages.

RESTRICTIONS

1. Only alphanumeric keys are supported. Backspace, cursor movement
keys etc.. are not supported by the sample program.

PREREQUISITES

To run the sample program, a user must be familiar with the following
things:

1. OS/2 installation and command prompt

2. TOOLKIT installation

3. Communications Manager installation

4. Compiler of the language in which you are interested

INSTALLATION

Install OS/2 and TOOLKIT according to the OS/2 installation procedure.
Then, install the Communications Manager using its full function
installation procedure. The Async feature group of the Communications
Manager needs to be installed. This will copy the ACDI API structures
to the Communications Manager directory, which is C:\CMLIB.

Install the compiler of the language in which you are interested. Use
the installation procedure of the compiler. Refer to the following
language section for additional information.

NOTES


1



1. The instructions for typing at the OS/2 command prompt shows the
command line with the path for information only. For example,
[C:] is displayed, and you must not type it at the OS/2 command
prompt.

SUPPORTED LANGUAGES

1. C LANGUAGE

a. INSTALL C COMPILER

Install the IBM C/2 compiler Version 1.0 using the
installation procedure of the compiler. The INSTAID program is
used to install the compiler. Have the CVP diskette of the
compiler in drive A, and type the following on the OS/2
command prompt:

[C:\]instaid a:C11.pip [Press Enter]

Follow the directions provided by the menus. Choose the
default directories and subdirectories, and be certain the
large model compiler is selected. The compiler is installed at
this point.

b. C SAMPLE PROGRAMS

There are two ACDI sample programs. The transmit side is
called ACDICXMT. The receive side is called ACDICRCV. Copy
the files with the filename ACDICXMT and ACDICRCV into
directory C:\IBMC2. The files to be copied are Source code (.C
extension), Module definition (.DEF extension), Make file (no
extension), and Link response (.LRF extension). The Bind
message files (.BND extension) are to be copied later.

All the INCLUDE files are required in \IBMC2\INCLUDE directory.
Copy ACDI_C.H from the Communications Manager directory
(C:\CMLIB) into the \IBMC2\INCLUDE directory. Also copy
DOSCALLS.H and SUBCALLS.H from C:\TOOLKT11\C\INCLUDE directory
into \IBMC2\INCLUDE directory.

c. LIBRARY FILES FOR C SAMPLE PROGRAM

All the LIBRARY files must reside in \IBMC2\LIB directory. Copy
ACS.LIB from the Communications Manager directory (CMLIB) into
the \IBMC2\LIB directory and DOSCALLS.LIB from the OS/2 directory
(OS2) into the \IBMC2\LIB directory.

d. COMPILE/LINK C SAMPLE PROGRAMS

During installation of the compiler, a file NEW-VARS.CMD is
created in your \IBMC2\BIN directory. Change your current
directory to \IBMC2\BIN. Type the following at the OS/2
command prompt to set up the environment for the compiler.

2



[C:\IBMC2\BIN]new-vars [Press Enter]

Change your current directory to C:\IBMC2

To compile and link the transmit program, type the following
at the OS/2 command prompt:

[C:\IBMC2]make acdicxmt [Press Enter]

To compile and link the receive program, type the following on
the command line:

[C:\IBMC2]make acdicrcv [Press Enter]

The files ACDICXMT.EXE and ACDICRCV.EXE will be created.

e. BIND MESSAGE FILES

You must have installed the TOOLKIT already to bind the
message files to the sample programs.

ACDICXMT.EXE and ACDICRCV.EXE files must be bound with the
ACDI sample program message file. Copy the ACDI message text
file ACX.TXT into \TOOLKT11\BIN directory. Change the current
directory to \TOOLKT11\BIN, and then type the following on the
OS/2 command prompt:

[C:\TOOLKT11\BIN]mkmsgf acx.txt acx.msg [Press Enter]

A message file ACX.MSG is created. This file must be bound
with the executable files. Copy the files ACDICXMT.BND and
ACDICRCV.BND to the \TOOLKT11\BIN directory.

To bind the message file with the transmit program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdicxmt.bnd [Press Enter]

To bind the message file with the receive program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdicrcv.bnd [Press Enter]

After the above procedure, the executable files ACDICXMT.EXE
and ACDICRCV.EXE are in directory C:\IBMC2 in executable form.

2. PASCAL LANGUAGE

a. INSTALL PASCAL COMPILER

3



Install the IBM PASCAL/2 compiler Version 1.0 using the
installation procedure of the compiler. The INSTAID program is
used to install the compiler. Have the master diskette of the
compiler in drive A, and type the following on the OS/2
command prompt:

[C:\]instaid [Press enter]

Follow the directions provided by the menus. Choose the
default directories and subdirectories. The compiler is
installed at this point.

b. PASCAL SAMPLE PROGRAMS

There are two ACDI sample programs. The transmit side is
called ACDIPXMT. The receive side is called ACDIPRCV. Copy
the files with the filename ACDIPXMT and ACDIPRCV into
directory C:\PASCAL. The files to be copied are Source code
(.PAS extension), Module definition (.DEF extension), Make
file (no extension), and Link response (.LRF extension). The
Bind message files (.BND extension) are to be copied later.

All the INCLUDE files are required in \PASCAL\SRC directory.
Copy ACDI_P.INC from the Communications Manager directory
(C:\CMLIB) into the \PASCAL\SRC directory.

To compile ACDIPRCV properly, change the stack pointer to
ADSMEM for DosCreateThread function in the DOSCALLS.INT file
in \PASCAL\SRC directory.

NewThStk : ADSMEM ) (* Address of stack for new thread *)
: WORD ; EXTERN ;

c. LIBRARY FILES FOR PASCAL SAMPLE PROGRAM

All the LIBRARY files must reside in \PASCAL\LIB directory.
Copy ACS.LIB from the Communications Manager directory (CMLIB)
into the \PASCAL\LIB directory and DOSCALLS.LIB from the OS/2
directory (OS2) into the \PASCAL\LIB directory.

d. COMPILE/LINK PASCAL SAMPLE PROGRAMS

During installation of the compiler, a file PASCENVR.CMD is
created in your \PASCAL\BIN directory. Change your current
directory to \PASCAL\BIN. Type the following on the OS/2
command prompt to set up the environment for the compiler.

[C:\PASCAL\BIN]pascenvr [Press Enter]

Change your current directory to C:\PASCAL


4



To compile and link the transmit program, type the following
at the OS/2 command prompt:

[C:\PASCAL]make acdipxmt [Press Enter]

To compile and link the receive program, type the following at
the OS/2 command prompt:

[C:\PASCAL]make acdiprcv [Press Enter]

The files ACDIPXMT.EXE and ACDIPRCV.EXE will be created.

e. BIND MESSAGE FILES

You must have installed the TOOLKIT already to bind the
message files to the sample programs.

ACDIPXMT.EXE and ACDIPRCV.EXE files must be bound with the
ACDI sample program message file. Copy the ACDI message text
file ACX.TXT into \TOOLKT11\BIN directory. Change the current
directory to \TOOLKT11\BIN, and then type the following on the
OS/2 command prompt:

[C:\TOOLKT11\BIN]mkmsgf acx.txt acx.msg [Press Enter]

A message file ACX.MSG is created. This file must be bound
with the executable files. Copy the files ACDIPXMT.BND and
ACDIPRCV.BND to the \TOOLKT11\BIN directory.

To bind the message file with the transmit program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdipxmt.bnd [Press Enter]

To bind the message file with the receive program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdiprcv.bnd [Press Enter]

After the above procedure, the executable files ACDIPXMT.EXE
and ACDIPRCV.EXE are in directory C:\PASCAL in executable
form.

3. MACRO ASSEMBLER

a. INSTALL MACRO ASSEMBLER

Install the IBM Macro Assembler/2 version 1.0 using the
installation procedure of the assembler. The INSTAID program

5



is used to install the assembler. Have the master diskette of
the assembler in drive A, and type the following on the OS/2
command prompt:

[C:\]instaid [Press Enter]

Follow the directions provided by the menus. Choose the
default directories and subdirectories. The assembler is
installed at this point.

During installation of the assembler, directory \MASM\BIN is
created.

b. ASSEMBLER SAMPLE PROGRAMS

There are two ACDI sample programs. The transmit side is
called ACDIMXMT. The receive side is called ACDIMRCV. Copy
the files with the filename ACDIMXMT and ACDIMRCV into
directory C:\MASM\BIN. The files to be copied are Source code
(.ASM extension), Module definition (.DEF extension), Make
file (no extension), and Link response (.LRF extension). The
Bind message files (.BND extension) are to be copied later.

All the INCLUDE files are required in \MASM\BIN directory.
Copy ACDI_A.INC from the Communications Manager directory
(C:\CMLIB) into \MASM\BIN directory. Also copy SYSMAC.INC,
DOSCALLS.INC, and SUBCALLS.INC from C:\TOOLKT11\SAMPLES\MASM
directory into \MASM\BIN directory.

c. LIBRARY FILES FOR ASSEMBLER SAMPLE PROGRAM

All the LIBRARY files must reside in \MASM\BIN directory.
Copy ACS.LIB from the Communications Manager directory (CMLIB)
into the \MASM\BIN directory and DOSCALLS.LIB from the OS/2
directory (OS2) into the \MASM\BIN directory.

d. ASSEMBLE/LINK ASSEMBLER SAMPLE PROGRAMS

Change your current directory to C:\MASM\BIN.

To assemble and link the transmit program, type the following
at the OS/2 command prompt:

[C:\MASM\BIN]make acdimxmt [Press Enter]

To assemble and link the receive program, type the following
at the OS/2 command prompt:

[C:\MASM\BIN]make acdimrcv [Press Enter]

The files ACDIMXMT.EXE and ACDIMRCV.EXE will be created.

6



e. BIND MESSAGE FILES

You must have installed the TOOLKIT already to bind the
message files to the sample programs.

ACDIMXMT.EXE and ACDIMRCV.EXE files must be bound with the
ACDI sample program message file. Copy the ACDI message text
file ACX.TXT into \TOOLKT11\BIN directory. Change the current
directory to \TOOLKT11\BIN, and then type the following on the
OS/2 command prompt:

[C:\TOOLKT11\BIN]mkmsgf acx.txt acx.msg [Press Enter]

A message file ACX.MSG is created. This file must be bound
with the executable files. Copy the files ACDIMXMT.BND and
ACDIMRCV.BND to the \TOOLKT11\BIN directory.

To bind the message file with the transmit program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdimxmt.bnd [Press Enter]

To bind the message file with the receive program, type the
following on the OS/2 command prompt:

[C:\TOOLKT11\BIN]msgbind acdimrcv.bnd [Press Enter]

After the above procedure, the executable files ACDIMXMT.EXE
and ACDIMRCV.EXE are in directory C:\MASM\BIN in executable
form.

To run the ACDI sample program, you have to go through the following
additional steps.

HARDWARE REQUIREMENTS

The two PC AT's are connected to each other through a null modem on a
RS232 cable to ports COM1 for a non-switched connection. If your
machines are different from this, then you must select the appropriate
parameters on the "Select Modem/Interface Device" and "Select Line
Interface" panels.

CONFIG.SYS CHANGES

The ACDI device driver COM1 is added to the config.sys file by adding
the "DEVICE=...." statement in the CONFIG.SYS file:

For PC/AT, PC/XT286, add the following statement:

DEVICE=C:\CMLIB\ASYNCDDA.SYS COM1

7




For PS/2 systems, add the following statement:

DEVICE=C:\CMLIB\ASYNCDDB.SYS COM1

If you are using a different port, configure it according to the
Communications Manager's requirements.

You must restart your system (Alt+Ctrl+Del) for changes to take effect.

CONFIGURATION STEPS

Create a configuration file for the ACDI sample program using the
configuration functions in Communciations Manager.

The following instructions will configure two OS/2 Extended Edition
machines to run the ACDI sample programs. They guide you through the
configuration process, panel by panel, until complete.

On the machine that will run the receive side of the sample program,
copy the system-supplied configuration file, ACSCFG.CFG, to
ACDISAMP.CFG in the C:\IBMC27LIB directory.

Start the Communications Manager for the receive side using ACDISAMP
as the startup configuration file.

Beginning at the "Communications Manager Main Menu" follow the
instructions below.

Press F10
Select "Advanced" from action bar
Select "Configuration"
Press Enter

Select "Workstation profile (and auto-start options)"
Select "Change"
Specify "Machine type-model number"
Specify "IBM plant of manufacture-machine sequence number"
Press Enter

Select "Asynchronous feature profiles"
Select "Asynchronous communication port profiles"
Select "Create"

"Country Code and Profile Name" panel displayed
Specify "Country code" 011
Select "Profile name" COM1
Press Enter


8



"Select Modem/Interface Device" panel displayed
Select "Modem/Device" as "Other modem or device"
Press Enter

"Select Line Interface" panel displayed
Select "Non-switched"
Press Enter
Press ESC

Press F10
Select "Verify" from action bar
Select "Run verify"

Press F10
Select "Exit" from action bar
Select "Exit communication configuration"

You need to exit the Communications Manager.

The receive and the transmit configuration file is the same. You can
copy ACDISAMP.CFG to the other machine instead of going through the
configuration steps again.

RUNNING THE SAMPLE PROGRAMS

Create a new directory SAMPLE on the transmit side workstation. Copy
the transmit sample program (ACDICXMT.EXE, ACDIPXMT.EXE, or
ACDIMXMT.EXE) to the SAMPLE directory.

Create a new directory SAMPLE on the receive side workstation. Copy
the receive sample program (ACDICRCV.EXE, ACDIPRCV.EXE, or
ACDIMRCV.EXE) to the SAMPLE directory.

Bring up Communications Manager on both PC's, the transmit side and
the receive side with the configuration file ACDISAMP. Start ACDI
service on both workstations by selecting "Start communications", then
select "ACDI service".

Select "OS/2 command prompt" from the Program Selector panel on each
workstation. Change the current directory to SAMPLE. Start your
receive program (ACDICRCV.EXE, ACDIPRCV.EXE, or ACDIMRCV.EXE). Then
start your transmit program (ACDICXMT.EXE, ACDIPXMT.EXE, or
ACDIMXMT.EXE) on the other workstation.

You will see a blank screen displayed. Start typing on the screen on
the transmit side. It will be echoed on the receive side, line by
line.



9


  3 Responses to “Category : OS/2 Files
Archive   : OS2CMAPI.ZIP
Filename : ACDI.ME

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/