Basic PDS User Interface (UI) Toolbox Modified for OS/2 (66692)



The information in this article applies to:

  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0

This article was previously published under Q66692

SUMMARY

The User Interface (UI) Toolbox sample code provided with Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 is written specifically for the MS-DOS operating system and requires code modifications to compile and run under MS OS/2 protected mode.

MORE INFORMATION

The following files are available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The files UIASM.ASM, GENERAL.BAS, MENU.BAS, MOUSE.BAS, and WINDOW.BAS require code modifications to work properly under OS/2. These modifications are necessary to transform the program from MS-DOS interrupt services to the OS/2 API services for each specific function.

Microsoft Technical Support has provided a second set of sample UI Toolbox files for use under OS/2 protected mode. All the UI Toolbox files have been replaced by a modified version, which includes all Basic source code, the assembler code, and all include files. This information is provided as is with no guarantees regarding performance. You may freely modify the code.

When you decompress UIDEMOS2, you will receive the following files:
   GENERAL.BAS   GENERAL.BI   MENU.BAS     MENU.BI      MOUSE.BAS<BR/>
   MOUSE.BI      WINDOW.BAS   WINDOW.BI    UIDEMO.BAS   UIASM.BAS<BR/>
   READ.ME       UIDEMO.MAK   DOSBEEP.BAS
				
READ.me is a copy of this article.

UIASM.asm has been replaced by a Basic version that calls OS/2 VIO API routines called UIASM.BAS.

UIDEMO.mak is a Programmer's WorkBench (PWB) MAKE file that can be used to rebuild an executable UIDEMO program.

DOSBEEP.bas contains a BSOUND routine to replace calls to SOUND, which is not supported under OS/2.

NOTE: GENERAL.bas for OS/2 was modified 7/29/91, so if you obtained UIDEMOS2 from the Software Library earlier than 7/29/91, you should download the latest copy of UIDEMOS2. The modification corrected a problem where keyboard input would be disabled during the execution of a SHELL statement.

List of Modifications: MS-DOS to OS/2

In adapting the UI Toolbox code from MS-DOS to OS/2, the main areas that have changed are at low levels, normally where the routines make specific calls to PEEK, INTERRUPT, GetCopyBox, PutCopyBox, and AttrBox routines, or calls to statements that are not supported under OS/2, such as the SOUND statement.

All references to the SOUND statement have been replaced by calls to a BSOUND routine, which is located in DOSBEEP.BAS. The SOUND statement is not supported under OS/2; instead, you should use the OS/2 DOSSOUND function or the Basic BEEP statement.

The assembler code located in the original UIASM.ASM has been replaced with Basic code making calls to the OS/2 VIO API routines.

All references to CALL INTERRUPT have been replaced by calls to the appropriate OS/2 API calls. The MS-DOS INTERRUPT calls for the mouse support now use the OS/2 MOU API. PEEKing in MS-DOS to get the keyboard SHIFT state "GetSHIFTState" has been replaced by OS/2 KBD API calls.

Various other locations have been modified at high levels in the UI Toolbox code to correct performance that would match the MS-DOS version of the UI Toolbox.

Most modified areas have been marked with '| comments in the provided source code files.

Modification Type:MinorLast Reviewed:8/4/2004
Keywords:kbdownload kbfile kbinfo KB66692 kbAudDeveloper