home *** CD-ROM | disk | FTP | other *** search
- 4/25/82
- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
- IBM ASYNCHRONOUS COMMUNICATIONS SUPPORT PROGRAM MODIFICATIONS
- BY ROBERT C. RICE
-
- PROGRAM NOTES
-
- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
- The IBM Asynchronous Communications Support Program Modifications have been
- provided to correct and enhance the original version of the IBM program.
- This section, Program Notes, will describe how to implement these improvements
- in your copy of the program. A section on how to create a new version and
- merge it with the original program is provided. Then, a description of the
- program and values that must be supplied by you, completes the process. When
- finished with creating the new program version, you'll be ready to proceed
- to the tutorial on how to use the program. Persons receiving a program disk-
- ette with the modifications installed, should now proceed to section II.
-
- I. In describing the procedures required to build a program diskette with mod-
- ifications included, I assume a basic level of knowledge on the part of the
- person trying to perform the tasks involved. He or she must have a complete
- understanding of BASIC commands to load, edit and save programs, as well as
- commands within the DOS for copying, formatting, and calling batch files.
-
- There are several different ways to go about modifying or creating this new
- program version. I will suggest one way, but if you feel more comfortable
- with some other way, use your own. The instructions that follow apply to both
- the 64K and 96K versions unless specifically noted. Use the following steps
- to build a new Asynchronous Communications diskette:
-
- 1. Format a diskette with the DOS system on it. Use DOS command FORMAT with
- the "/S" option.
-
- 2. For people who are obtaining this program modification through a computer
- network, such as the SOURCE, or CompuServe and will be using a Download
- to obtain it, proceed with the Download onto the newly formatted diskette
- under file name "MODS.BAS". After completing the Download and logging off,
- utilize EDLIN and remove all commands and prompts from both the beginning
- and end of file "MODS.BAS". The result should be that the only thing left
- in the file is program code. For those who are entering the modification
- from the keyboard, load a DOS diskette and type BASIC. Begin entering
- the modification from the listing provided. I suggest that you NOT use
- the automatic line numbering feature of the BASIC interpreter since line
- numbers within the modification are not contiguous. When all program lines
- have been entered, store the program on the newly formatted diskette as
- follows: SAVE "MODS",A and enter. The ",A" is important since only ASC
- files may be used for the merging process that will take place later. File
- name extension ".BAS" will be provided automatically by the BASIC program.
-
- 3. If having entered the program modifications manually, then return to DOS
- by typing SYSTEM. In any case you should now utilize the COPY command and
- place files DATE.COM, TIME.COM, and BASIC.COM on the new program diskette
- from the DOS program diskette.
-
- 4. Utilize the original or a copy of the original IBM Asynchronous Communica-
- tions Support program and copy RS232INT.BAS on to the new program diskette.
-
- 5. Create a new AUTOEXEC.BAT file as follows:
- (enter) means depress enter key
-
- COPY CON:AUTOEXEC.BAT (enter)
- REM ..Entry of TIME and DATE optional. ENTER only, to bypass (enter)
- DATE (enter)
- TIME (enter)
- BASIC SHORTERM.BAS/S:0/C:50 (enter) (64K VERSION ONLY)
- BASIC LONGTERM.BAS (enter) (96K VERSION ONLY)
- F6 (enter) (displayed on screen as ^Z)
-
- 6. Load the original program named TERMINAL.BAS into memory utilizing the
- load command. From DOS first type BASIC and enter. This will put you
- into BASIC. Now type LOAD "TERMINAL" and enter.
-
- 7. For the 64K VERSION ONLY, delete program line numbers as follows:
-
- 600-625 2843
- 740-765 13000-13020
- 975 13050-13260
- 1001-1003 13319-13369
- 2050-2511 13450-13530
- 2541-2560 13995-14031
- 2600-2700 14034-14720
- 2815-2822 15100-16145
-
- (Note: Single lines may be deleted by entering line number, then "ENTER".
- For multiple lines, use DELETE. Enter them exactly as shown, followed by
- "ENTER". Each line of numbers with a "-" between them must be done individ-
- ually. In otherwords, one for each DELETE command.)
-
- 8. Now use the MERGE command and merge the file named MODS.BAS into the
- original program stored in memory. (Be sure to include the disk drive
- designator if necessary. Also, it may take some time for the merge to be
- completed. The red light on the disk drive will cycle on and off several
- times. However, the merge process is not complete until the BASIC prompt
- Ok has been displayed.)
-
- 9. Utilize the BASIC "SAVE" command and store the modified program on disk-
- ette. Be sure to use file name SHORTERM.BAS for the 64K version and
- LONGTERM.BAS for the 96K version.
-
- 10. Depress CTRL,ALT, DEL and load/run the program. When asked to enter Time
- and Date, simply depress "ENTER" and bypass the entry. If the new program
- will not load and run, displaying the program name and the question "Bypass
- intermediate menus (y/n)?", then return to step 1. and redo, otherwise
- depress CTRL,BREAK, stop program execution and proceed with Section II.
-
- II. This begins the second section of Program Notes. First, information is
- provided so that the user will be able to supply the program with required
- data. Secondly, a description of all major program modifications and some of
- the reasoning behind them is provided for the experienced programmer.
-
- ADAPTING THE PROGRAM TO YOUR SPECIFICATIONS. These data are listed by line
- number, followed by the description of the needed or optional data you must
- supply.
-
- 635 - 781 (64K version) 605 - 781 (96K version) The data statements in this
- area have been modified to provide two new user selectable parameters for each
- terminal type. Also, certain values in the Full Duplex data statement have
- been changed to provide compatibility with the SOURCE, CompuServe, and like
- networks. The two new parameter values supplied are Display Selection and
- for the Hayes Smartmodem a selection for Type of Dialing, touch tone or pulse
- type. Display selection need not be set since it does not affect which dis-
- play the program uses first. This is determined by the setting of the SW1
- switch on the system board. The selection menu does not display a default
- value for this reason, but provides the user with the ability to change dis-
- plays during the operation of the program. The Dialing Type selection is pre-
- set to touch tone. If your telephone requires pulse type dialing, this value
- may be changed as follows: (64K version) change lines 775 and 781.(96K version)
- change lines 745, 755, 775, and 781. Counting from the first value in the
- data statement on the left side, change the 17th value from a 1 to a 2.
- Other values changed from the original program include values set for Full
- Duplex operation. They are Parity type Even, mode of character echoing, in
- this case "Chars Displayed when Echoed by Host", First character to be deleted
- is Carriage return, Second character to be deleted is Line Feed, Third char-
- acter to be deleted is Escape. All other values for Full Duplex operation
- remain the same as the original program. If you wish to change these values
- I suggest looking at the program listing lines 6208 - 6218 for parity, lines
- 7510 - 7515 for Mode of Character Echoing, lines 321 - 327 for Character to
- be deleted. Utilize the number within the "()" for the desired attribute.
- Insert the value in the data statement counting from the left, for parity
- change the second value, for Mode of Character Echoing change the nineth value,
- for Deleted Characters 1, 2, and 3, change the tenth, eleventh and twelveth
- values respectively. Line number 775 should be modified to contain the values
- desired as described above. (Note: Users without a Hayes Smartmodem need not
- make changes to the Pulse or Touch tone parameter since it will not affect
- you.)
-
- 937 Variable VDO determines the width to be used for monitors connected to the
- color graphics adapter. Screen width is selected automatically by the pro-
- gram depending upon the type of monitor used. The screen or character width
- used for the monochrome display is 80, and the width for color video monitors
- and televisions is set by variable VDO. VDO=40 in the present program. If
- the color video monitor you are using is capable of an 80 character screen
- width, then reset VDO=80.
-
- 1811 The last statement on this line is SMART=TRUE. This statement is used
- to set the type of modem used. If a Hayes Smartmodem is not used, set this
- statement to SMART=FALSE. This statement is used during the Autodial/LOG-ON
- portion of the program modification.
-
- 32000 The last statement on this line is TLN=9. TLN represents the number
- of telephone numbers listed in the telephone menu. The minimum value is 1 and
- the maximum number is 9. A value of 1 will result in the telephone menu not
- being displayed, but when used with a Smartmodem will cause the one number
- supplied to be dialed. When not used with a Smartmodem, the one number listed
- will be displayed when instructed to place the call manually.
-
- 32320 - 32410 This is the most important part of the information to be
- supplied by the user. The DATA statements that occur on these lines supply
- the program with the information needed for the telephone menu and the auto-
- matic LOG-ON feature. It is extremely important that this information be
- provided correctly and completely for the program to operate as designed. The
- DATA statements provided in the program are samples to be used as a guide. Each
- element within the data statement must be separated by a comma as shown and
- data which contains commas must be enclosed with "" (double quote marks).
- of the data statements is as follows:
-
- #1. Company name, such as SOURCE or CompuServe (shortened to CSERVE, must not
- exceed 6 characters.)
-
- #2. Telephone number to be dialed. This number may include an area code if
- necessary, however if included, will cause a wrap-around on a 40 character
- display. Provision has not been made for dial-ups using independent
- telephone networks such as MCI shich require dialing two separate numbers.
- If you require such a dial-up contact me for information.
-
- #3. City in which the telephone number specified in #2 above is located.
- This is helpful when determining if the call being made is a local or toll
- call. I suggest providing at least two telephone numbers for each company
- or at least the same telephone number with an alternate sign-on procedure
- in which case the city in the entry may be replace by a notation of the
- alternate sign-on. (See item 10 in the first document, Program Descrip-
- tion for more information on alternate sign-ons.)
-
- #4. Name of the Telephone network being utilized by the phone number supplied
- in #2. This is needed information when having to manually intervene in the
- sign-on procedure since each network requires a unique set of entries.
-
- #5. The number of the Telephone LOG-ON procedure to be used. Numbers should
- be supplied depending upon combination of Network and Telephone Company
- as follows: SOURCE via TYMNET = 1. SOURCE via TELENET = 2. CompuServe
- via CompuServe network = 3. CompuServe via TYMNET = 4.
-
- #6. LOG-ON data. This item for the SOURCE includes log-in to a particular
- system number. For CompuServe this item should be your user identification
- number enclosed in " " double quotation marks.
-
- #7. ID/PASSWORD. For the SOURCE this item includes ID number and password.
- For CompuServe this item includes password only.
-
- Here are two examples of the DATA statements you must provide:
-
- 32320 DATA SOURCE,764-4321,Seattle,TYMNET,1,SOURCE11;PRIM;,ID TCA123 PASWRD
-
- 32330 DATA CSERVE,987-6543,Bellvue,TYMNET,4,"77000,1100",PASS/WORD
-
- Once you have completed changes, utilize the BASIC SAVE command and store the
- modified program on diskette. DO NOT use the ",A" option of the save command.
- This will store the program in a compressed binary format, and will allow the
- program to load faster than in ASC format. Be sure to use file name SHORTERM.
- BAS for the 64K version and LONGTERM.BAS for the 96K version.
-
- The next section is designed for experienced programmers and is optional, nice
- to know information only. Read it at your leisure. When ready, you may pro-
- ceed to the Tutorial.
-
-
- PROGRAM MODIFICATION CODING NOTES. This information is organized by program
- line number. The data provided appears like program line remarks, only in more
- detail. These remarks should be read in conjunction with a program listing.
-
- 115 - 210 (96K version only) The DEF SEG statements were changed to relocate
- the RS232INT.BAS machine language routine in memory above 64K. Line 200 was
- changed to eliminate reserving 35K for the machine language program in BASICs
- 64K work space.
-
- 223 This statement determines whether time was entered into the system when
- the program was loaded. If the time is not entered upon system startup, then
- the time will not be displayed on line 25 in the time/date/status area. One
- work of caution is in order. If the system is initialized and the entered
- time is between 00:00:00 and 00:09:59, then the program will consider the
- time not to have been entered. The time/date/status line coding begins on line
- 33000.
-
- 223 - 225 (64K version only) Variables IZF and ICN have been reset to conserve
- memory in the 64K version.
-
- 330 The error message array has been expanded to include a printer error msg.
-
- 400 - 403 (64K version) 400 - 460 (96K version) A terminal type array has been
- added so that "Starting up as" and "Returning as" screen printouts also in-
- clude information as to which terminal type has been selected.
-
- 866 - 867 The terminal parameter array has been expanded to include a Display
- Selection option and a Modem Dialup option.
-
- 937 - 949 Screen width is determined by reading display flags set in mem-
- ory. Then, a new program title is provided indicating the program version,
- acknowledging contributers and centering the display.
-
- 950 - 966 An option is provided to bypass intermediate menus, proceeding
- directly to terminal operation.
-
- 1004 - 1005 (64K version only) The size of the Terminal Selection Menu has
- been reduced in the 64K version to conserve memory. These lines redesignate
- C$(1) and (2), eliminating VM370, TSO, and Half Duplex terminal selections
- from the menu.
-
- 1050 When the user elects to bypass intermediate menus, the menu selection
- is provided by the program. Variable IMEN contains the menu item number sel-
- ected. In the 64K version IMEN = 1 and in the 96K version IMEN = 4. This dif-
- ference is due to the number of terminal selections available in each version.
- If a user has a special application and would prefer bypassing intermediate
- menus and starting up as something other than a Full Duplex Terminal, then
- the value assigned to IMEN may be changed to the number of the corresponding
- terminal selection menu item.
-
- 1066 String variable TMSL$ is set to equal the terminal type selected.
-
- 1170 Terminal type now used as part of terminal parameter selection title.
-
- 1185 When intermediate menus are bypassed and Full Duplex or other terminal
- type is automatically designated this statement will cause the "Start Up
- Selected Terminal" option of the Terminal Feature menu to be executed.
-
- 1520 The ON IP GOTO statement now includes the additional line numbers to im-
- plement the additional terminal features added to the program. (Display Selec-
- tion and Modem Dialup options.)
-
- 1800 GOSUB 35000 added to implement the Display Selection feature.
-
- 1811 - 1820 Additional string variables added to provide for more function
- key features. Variables LON, ULON are set to indicate Log File, and Upload
- are initially off. Variable INIT set to indicate F8 function key initially
- set for dialup menu mode. Additional code to handle new function key features
- begins on line 2751.
-
- 2005 Statement added to key machine code Set Sense routine to end input
- string on Back Space code. The rest of Back Space handler begins on line 5106.
-
- 2024 GOSUB 2788 added so that error messages are turned on when terminal
- operation is begun.
-
- 2025 "Starting up as" message now includes selected terminal type.
-
- 2027 BASICs string space is re-organized and unused space is re-allocated.
- GOSUB statements are provided to display function key help menu and startup
- comments when terminal initialization is performed.
-
- 2480 - 3603 (96K version only) Half Duplex SENDING state function key handler
- routine, including error message for use of function keys not used in the
- SENDING state.
-
- 2531 Entry point for Download of incoming data.
-
- 2710 - 2713 Error trapping provided for printer when F1 function key used.
-
- 2751 - 2785 Function key handler routines.
-
- 2803 - 2830 Additional menu items added to Terminal Function Selection menu
- entered through use of F2. Upload, Download, BASIC (pause), Exit Comm. to
- BASIC, Exit Comm. to DOS have been added. Upload and Download selections
- will indicate either open file or close file, including file name depending
- upon status of the function. Exit Comm. routines provide for the complete
- close out of Com1: to eliminate possibility of program hangup.
-
- 2843 In the 64K version this line has been removed. No options would be
- present that would not be available to the terminal type selected. In the 96K
- version the IMEN values have been adjust to account for additional menu items.
-
- 2844 If the return to terminal selection menu is selected, then the flag
- indicating automatic selection Full Duplex is cleared.
-
- 2845 Additional line numbers are provided in the ON IMEN GOTO statements
- to implement the additional menu selections.
-
- 3100 - 3101 Error trapping is provided for the printer routine.
-
- 3400 A call has been added to the Transmit function of the machine code
- routine which provides for the transmission of an XON if XOFF/XON is being
- supported in the program so that when returning from the terminal function
- selection menu, transmission from the Host system will resume. See line
- 5215 for XOFF transmission.
-
- 3405 "Back as " terminal type is implemented here.
-
- 3430 - 3435 This code allows for the use of F5 to return from BASIC, instead
- of having to type "CONT" and then "enter" as the original program version did.
-
- 3440 - 3450 This is the error handling routine for the printer.
-
- 3540 - 3544 These lines are added to the error message array for printer
- errors. See line 330 for new DIM statement.
-
- 3815 - 3825 This code provides for the correct handling of time/date/status
- line in conjunction with error message printouts for 40 character width
- screens. Status printouts appear on line 25, while error messages will appear
- on line 24.
-
- 3955 This code disables input parity error messages.
-
- 5002 Variable TME is set to a value which will cause the initial time/date/
- status line to be printed for terminal startup.
-
- 5106 - 5107 This code insures that a received Back Space code is handled
- properly to perform an actual back space.
-
- 5110 - 5116 This code allows for the printout of incoming data on the printer
- when the print function has been enable by use of F7. Lines 2783 - 2785
- handle the F7 function key input.
-
- 5200 The additional GOSUB provides for the update of time during the Full
- Duplex loop. Time will be updated only once each minute.
-
- 5201 - 5202 This is the entry point for the Upload function. If active and
- an XOFF has not been received from the Host then control is given to the Upload
- function to determine if it is time to send another line.
-
- 5215 This change provides for the transmission of an XOFF to the Host system
- when XON/XOFF is supported and the F2 terminal function menu is called to the
- screen. This prevents input buffer overflow since the program is not looping
- through the section of the program which checks for buffer size when in the
- terminal function selection menu. This is helpfull when a log file runs out
- of space and a new one must be opened to capture the rest of the incoming data.
-
- 5265 - 5266 Error trapping is provided for the printer.
-
- 5290 - 5300 This routine is called from line 5215 to transmit an XOFF.
-
- 7900 - 7970 This routine provides menu data for the additional Display Sel-
- ection option.
-
- 8000 - 8070 This routine provided menu data for the additional Modem Dialing
- option.
-
- 17200 - 17300 This routine handles the opening of a Log File for Download
- purposes. The file is opened for append to prevent accidental erasure of an
- existing file name.
-
- 17310 - 17400 This routine is entered from line 2531 and handles writing data
- to the Log File. Error trapping is provided to prevent program stoppage when
- a diskette becomes full.
-
- 17410 - 17500 This routine handles the opening of a file for Upload.
-
- 17510 - 17640 This routine handles the Uploading of file data for transmission
- to the Host system. If an Upload file has been opened and the Upload function
- is active, then a check is made to determine if the transmit buffer is empty.
- If so, then a line of data is output to the communications port.
-
- 17660 - 17820 This routine allows for the optional printout of file direc-
- tories prior to naming a Log or Upload file name. Error trapping is provided
- for disk and file errors.
-
-
- MAJOR SUBROUTINES are catalogued by function and starting line number as
- follows:
-
- 31000 - Function Key and terminal startup help menu.
- 32000 - Telephone/LOG-ON Function handler.
- 33000 - Time/Date/Status line Function handler.
- 34000 - Terminate Comm. program Function handler.
- 35000 - Display Selection Function handler.
-
- 31000 - 31120 This routine prints a Function Key Help Menu. It is called
- upon terminal startup and also when the F5 key is depressed during terminal
- operation.
-
- 31130 - 31190 This portion of the Help Menu routine is called upon terminal
- startup only and prints information on the screen that is helpful at that
- time. If a Smartmodem is not used then the first line of data "Insure CAPS
- LOCK is on" is not printed since the reason for this warning is to insure
- capitals will be used when manually sending commands to the modem.
-
- 32000 - 32310 This routine handles the Telephone Dialup Menu. There are 9
- possible entries in the menu in its present form. Variable TLN on line 32000
- sets the number of entries in the menu. A value of 1 will cause the menu to
- NOT be displayed, however, the entered telephone number will be dialed. If
- a Smartmodem is not used, then the telephone menu selection provides the pro-
- per selection of LOG-ON data for the company being called and the telephone
- network being used. It then prompts the user to make the call manually and
- displays the selected telephone number. Make sure the PRINT USING statements
- located on lines 32100 and 32110 utilize a "\" and NOT a "/". Line 32100
- contains 6 spaces between the backlashes and line 32110 has 11 spaces between
- the backlashes. Variable SMART is located on line 1811 and is set to FALSE
- if a Smartmodem is not being used.
-
- 32320 - 32410 These line numbers contain the DATA statements required for the
- telephone menu and the auto LOG-ON function. The format and content of these
- statements are fully covered in the previous section titled ADAPTING THE PRO-
- GRAM TO YOUR SPECIFICATIONS.
-
- 32420 - 32570 This routine handles the automatic LOG-ON procedure. LOG-ON
- procedures for the SOURCE and CompuServe are supported both including various
- procedures for different telephone networks. Additional procedures may be
- added to this function. Contact me for details if you have a unique applica-
- tion. The use of additional keys in conjunction with this function allow for
- protection from accidentally disconnecting the modem, repeating a sign-on
- procedure, and initializing the F8 key from the beginning of the telephone
- dialup menu. First, the LOG-ON sequence is manipulated by incrementing one
- of two variables. Value GO is used to determine which of a non-repeatable
- set of commands will be executed to connect with a particular telephone net-
- work. The variable GO is set initially by reading item 5 in the supplied
- data statements. This directs the program to execute the statement beginning
- at the line number specified within the ON GO GOTO statement on line 32420.
- Additional commands within the GO sequence may be executed by resetting the
- GO variable such as on line 32460. When telephone network log-in procedures
- have been completed, then value LGGR is set for the next sequence. The next
- sequence contains user ID and Password Data. These commands may be repeated
- by depressing the curson left (numeric key 4) and then F8. The cursor left
- key is handled on line 2752. The disconnect protection is provided on line
- 32540; an error message is displayed instructing the user to display the F8
- Help Menu. The disconnect feature is enabled by depressing the END key and
- then F8. The END key handler is located on line 2753. After disconnect, the
- value INIT is set to true, enabling the F8 key from the beginning of the
- telephone dialup menu. The telephone dialup menu may be called at any time
- by depressing HOME and then F8. The HOME key handler is located on line 2751.
-
- 32580 - 32670 This routine prints the F8 Help Menu on the screen and is called
- by the use of ALT H keys from line 2754.
-
- 33000 - 33120 This routine handles the time/date/status information on line
- 25. Time is normally updated once a minute. When status symbols are changed
- other routines call upon this handler routine but enter on line 33010.
- Duplex terminals do not display the time/date/status line since in Half Duplex
- this line is used to display the SEND or RECEIVE state. Time is converted
- from 24hr. format to 12hr. format displaying "AM" or "PM". Cursor location is
- saved at the beginning of the routine and restored at the end. Time and date
- are not displayed if they were not originally entered at program startup.
-
- 34000 - 34100 This routine handles the termination of the Communications
- program and exit to either BASIC or DOS. Error protection is provided by
- asking the user if he or she is sure that they want to terminate the program.
- If so, files are closed and "COM1:" is closed to prevent future program hang-
- up. If not, control is returned to the function selection menu.
-
- 35000 - 35050 This routine is used to change from one display to the other.
- Width statements are executed both before and after the display selection
- (performed by use of a peek and poke) to insure the screen is cleared and
- the cursor is properly positioned on the screen. Cursor height is also adjust-
- ed according to the display used.
-
- This completes the section on Program Notes.
-
- <* End of file *>
-