Stuart Baker Software offers high quality consulting services and products to users of IBM PCs and compatibles (DOS and Windows)
    as well as Interdata, Perkin-Elmer and Concurrent Computer Corporation 3200 series machines (OS/32).

BIOC Upload/Download


BIOC Upload/Download

by Stuart Baker
Stuart Baker Software
9370 Golondrina Drive
La Mesa, CA 91941-5654
(619) 466-8811

This article describes the BIOC Upload Download feature and the procedures used to tailor the BIOC driver from an application program. My last article on CTD stated, "I will defer the hands on discussion until the problems are resolved." Well, the CTD problems are still not resolved, so I will once again defer my hands on discussion.

BIOC, like CTD, has a Upload Download function. This undocumented feature has been in place since BIOC became a standard part of OS/32. The SETTERM program, available through the Interchange Library, uses Upload Download to display and modify many characteristics of the BIOC driver. Likewise, application programs may tailor the driver on-the-fly. This is almost like performing an instant sysgen. If you program in assembly language, the SETTERM program provides examples of the Upload Download function.

In the DVRM macro library, you will find the BIOCATR and BIOCEQU macros. The BIOCATR macro defines the structure of the BIOC Upload Download data storage area. This structure has not changed since the introduction of BIOC, so programs utilizing Upload Download work on all revisions of OS/32. The BIOCEQU macro defines bit offsets for flags used within BIOC. Caution must be exercised when using these features because BIOC performs no error checking on the Download. If a program Downloads invalid data, the terminal may become inoperable and you will need to re-boot to correct this condition.

Your application program must first perform an Upload to fill the data buffer with the current driver information. Depending upon the function you intend to perform, you may want to keep a copy of the original driver state to restore at program termination. A note of interest, unlike CTD, the Upload Download function of BIOC only works on connected lines. For example, you may not perform the function on a dial line that does not have carrier present. Because of this, you can wait for carrier by performing an Upload with the extended options of S1XO.LCM.

Your application program must be linked with XSVC1 because the Upload Download functions are a VFC operation. To do an Upload, your application program must perform the following steps:

  • Define a buffer equal in size to the BIOCATR structure. This buffer must be aligned to a fullword boundary.
  • Place a Hex 01 (SOH) into the first byte of the data buffer.
  • Set the SVC 1 beginning and ending addresses to the exact buffer length defined by BIOCATR.
  • Perform a VFC Write/Read. Use a function code of SV1.WRIT!SV1.READ!SV1.XOP and an extended option of S1XO.VFM!S1XO.FMM.

BIOC insures that the buffer is fullword aligned and that the size matches the BIOCATR structure. If you receive a zero status, your buffer contains information uploaded from the BIOC DCB. You should always check the status of the Upload to insure that your buffer contains valid data. Never perform a Download using a buffer filled by an Upload that returned bad status.

Once you have Uploaded the information, you may make changes to the data contained in the buffer. I suggest you look at the SETTERM program as an example of making changes to this data. The following list outlines several items that you may be interested in changing.

  • You have control over command two (CMD2) which is used to program the comm-mux. This allows you to select line parity, data and stop bits. This is very handy if you are developing a program that needs to perform full 8-bit data transfers on a line sysgened with DCB39.
  • You can change the record length and page size for a BIOC terminal. This is useful if your system uses terminals that can dynamically change their page size and line width. You may want to develop a program that not only configures the terminal, but changes the BIOC driver to match the new configuration.
  • You may also change the XDCOD sysgen value. The BIOCEQU macro defines the bits within the XDCOD field. This field allows you to control such things as suppression of Break/Esc, enabling Ctrl-A for auto baud adjust and enabling full BIOC functions.

After you have made changes to the data in the buffer you may Download the new information. You perform the Download using the same buffer as the Upload. The only changes are to the SVC 1 function code. Use a VFC write to perform the Download. Use a function code of SV1.WRIT!SV1.XOP and an extended option of S1XO.VFM!S1XO.FMM.

Well that about does it for this issue. Stay tuned for more on CTD in the next news letter (maybe). I hope to have some hands on experience to report. Looking forward to seeing everyone at Interchange 89.

Return to Index

This SBSW.COM page has been optimized for printing.
Web Content Copyright © 1997 - 2010 Stuart Baker Software. All rights reserved.

Please use our Feedback form to submit questions or comments about this web site.
Web Content Copyright © 1997 - 2010 Stuart Baker Software. All rights reserved.
This site was last modified: Wednesday, December 29, 2010