Mid-Michigan Computer Consultants - Bay City, Michigan

CONTENTS       (old style)
Mid-Michigan Computer Consultants
509 Center
Bay City, Michigan

Sales (989) 892-9242
Support (989) 686-8860

Plb-0610.cfm v1.0


ANSI Standard PL/B Language and Visual PL/B

This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will! BUT PLEASE... if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to:

Visual PL/B Language

DOS Style Screens


A common strategy for moving DOS based, character mode, PL/B programs to the Windows environment is to simply recompile the programs with the PLBWIN compilers and then run them under the PLBWIN runtime.

That's all there is to it!

Although the programs work, they look almost the same as the old programs did. The next objective is to convert the programs to true GUI style. This can be done one piece at a time which makes the transition relatively painless.


WINSHOW: You must be sure that a WINSHOW instruction has been issued before you try a DOS style program that includes any KEYIN. If you have NOT issued a WINSHOW and get to a KEYIN, the runtime just bounces your entire session and it's over.

As a practice, we include a WINSHOW at the beginning of EVERY DOS style program. If we have a Windows style menu on top of the syste we do a WINHIDE there after returning from any program.

FONTS: Although character mode program work the same under PLBWIN, they do not LOOK the same. This is simple to resolve using two techniques:

COLORS may also seem different when DOS programs are recompiled and run under PLBWIN. A PLBWIN INI file setting resolves this as follows:

CURSOR FORMAT: For simple recompiles of a program, the cursor may seem to disappear. What happens is that it's represented as a skinny verticle bar that is all but invisible.

You can change the cursor to something more acceptable by using the SETMODE statement in your program to make a BLOCK style cursor. We usually do this immediately after the WINSHOW instruction at the beginning of the program.


TAB KEY TRAPPING We hit a problem with the TAB key. Our programs follow every KEYIN with a canned routine that tests all of the possible control keys and sets a flag. The TAB key was never sensed by this routine on PLBWIN versions of DOS programs.

The problem is that Sunbelt made a decision concerning the TAB key and how it related to the CANCEL key on old Datapoint Terminals. Both of the keys trapped the same and the CANCEL came first.

This can be changed by altering the ANSI.DEF control file. That's the PLBWIN version of the old SUNDB86A SUNSCRN.DEF file. To fix the TAB key, you need to run the MAKEDEF.EXE program and change ANSI.DEF file in the folder where it's found for runs.

Run the program and drill down to the "Change any simple terminal control strings" line, as follows:
 C:\Sunbelt\plbwin.85\code>makedef .\ansi.def

Sunbelt Screen Definition File Editor   Version 8.5    16 N
(C) Copyright 1987-2000   Sunbelt Computer Systems, Inc   N

Using .\ansi.def as the screen definition file name.

Would you like instructions?                     [y or N]:
Toggle subwindow emulation (currently 'y')?      [y or N]:
Toggle Color Screen Support (currently 'y')?     [y or N]:
Change any simple terminal control strings?      [y or N]:
At this point you need to drill down to the CANCEL key. Answer "Y" to the "change" question then enter 0xFF as the new character value. For example:
Change any simple terminal control strings?      [y or N]: y
Current value: h08
Change Backspace character?                      [y or N]:
Current value: h09
Change Cancel character?                         [y or N]: y


Write to MMCC Technical Support at:               Send e-mail to MMCC.
MMCC - Technical Support
600 W. Midland
Bay City, MI 48708
(989) 686-8860
© 1997 - 2024 MMCC - All Rights Reserved