Classic PowerBASIC Console Compiler 5

It was so good we did it again!
Classic PowerBASIC Console Compiler is a proven product with value pricing. It's a true professional compiler... Not too long ago, it was known as PowerBASIC Console Compiler 5.0 for Windows. Competitively priced at $169. But you can buy it today for just $89! What a great way to learn about PowerBASIC... it's a wonderful gift, an entry-level compiler, perfect for anyone who wants real value pricing.

 

Ever wished for a 32-bit BASIC compiler? One with the straightforward DOS text mode interface but megabytes and megabytes of memory? Ever wished for a 32-bit Windows compiler that's truly easy to use? Well, now it's here. Today. The Classic PowerBASIC Console Compiler for Windows. With Classic PB/CC, it's a whole new Windows! Text mode every version of Windows from Win95 to WinVista and Win10.

 

This newest version of Classic PB/CC sports a number of exciting new features. Create client COM applications using Dispatch, Direct, Automation, or Dual interfaces. A complete graphics engine, a printer package for Windows-Only printers, dynamic pointers, and thread local storage, to name just a few. But more about them later.

 

PB/CC supports INPUT, PRINT, LOCATE, LINE INPUT, INKEY$, INSTAT, CLS, COLOR, KEY, KEY$, and LPRINT. All of the standard text functions. But then we added more. CONSHNDL, CURSOR, INSHIFT, PAGE, PAGEACTIVE, PAGEVISIBLE, SCREENATTR, PCOPY, WAITKEY$ and WAITSTAT. A complete set of mouse handling routines. SCROLL any region of the screen in any direction. STDIN, STDOUT, and STDERR. Even a PARSE statement and PARSE$ function to extract delimited fields, and new options for the EXTRACT$ function, too. All the text tools you'll ever need.

 

What is a Console?

The Console is a text mode interface connected right to the heart of 32-bit Windows. It looks and acts just like a text mode DOS program, but it's actually a True 32-bit Windows application! With a console application, there's no fluff, no animated puppets, just intense computing power. Port existing Basic code from DOS to Windows today! Access a flat memory model that's practically unlimited. Boost performance with true 32-bit code. Launch multiple concurrent threads. Use the CPU and numeric coprocessor directly with Inline Assembler. Choose Register Variables for your most critical code. With PB/CC, size and performance are the prime factors.

 

Graphics

Since the console device is a text-only window, can a console compiler offer graphics? Of course! Just open one or more graphic windows and you're ready to go! You'll use GRAPHIC PRINT to draw plain text or fancy text... Any font. Any size. Any color. Bold. Underline. Italic and strikeout. Mix any combination of fonts on any window. Print just about anything, just about anywhere, even on private bitmaps that aren't yet visible. You'll copy or stretch bitmaps. Shrink them or change them. Circles, ovals, lines and boxes. Fat lines, skinny lines, stylized lines. Arcs, circles, rounded rectangles. Ellipses, pie sections, polygons, polylines. Even get or set pixels -- one by one. Filled forms or empty. Colors or not. The choices are endless. You can mix new colors with those which exist, and measure proportional text size before you print it. Then create a custom scaling system, even with fractional floating point coordinates! Of course, once you've built that work of art, you need to load and save it. So load from a resource, load and save a BMP on disk!

 

Another interesting point is that graphics are extensible. Using the DC (Device Context) from PowerBASIC, you can call the Windows API, your own custom code, even third-party code for special graphic functions. With GRAPHIC GET/SET BITS, you can even manipulate the bitmap directly... each pixel is stored in succession as a long integer color value.

 

Printing
And then there's printing. Access to printers has always been something of an issue, but not any more. We've added extended printing (XPRINT), even for "Windows-Only" printers! Just like GRAPHIC for the screen, XPRINT offers it all on the printer. Print plain text or fancy text -- any font, any size, any color. Bitmaps and images, lines and boxes, circles and polygons, virtually all the features of the GRAPHIC screen are there for printers, too! You can retrieve the size of the printer page, the printable area, the margins, even the number of points per inch. Select landscape or portrait mode, even the print quality setting. The PRINTER$() function returns the name and port of every available printer. You can attach a printer by its name, by default, or just display a printer dialog to let the user decide. It's all in there.

 

So, can you get here from DOS? But of course! Classic PB/CC's high degree of compatibility with PowerBASIC, QuickBasic, GW-BASIC and BASICA means that you can port existing DOS applications to Win32 with ease. Stop CHAINing from module to module in DOS when you can create a single 32-bit machine code executable up to 2 gigabytes in size. And creating an array that uses 50 megabytes of RAM is as simple as:

 

     
 Dim x%(0 To 26214400)

 

Performance
So just how fast is PB/CC anyway? We thought you'd never ask! This tiny example may give you some idea of the power of 32-bit PB/CC.

 

     
 x## = 1
y## = 1.000001 t! = Timer For i& = 1 To 100000000     x## = x## * y##
Next t! = Timer - t!

 

What do we have here? 100,000,000 iterations of a simple floating point operation. On an AMD 64 CPU, PowerBASIC 3.5 for DOS runs this loop in 1.977 seconds. Pretty respectable, we think. PB3 has been benchmarked favorably against every sort of compiler... C++, Pascal, QuickBasic, you name it. It's always competitive.

 

So what about the 32-bit PowerBASIC? Same computer. Same operating system (WinXP Pro). Same source code, line for line. No attempt to minimize any background tasks. Elapsed time: 0.209 seconds. May we repeat that? Elapsed time: 0.209 seconds. That's an instant gain of around 945%! Win32 versions of PowerBASIC are more than nine times faster than the best DOS Basic around!

 

So why the big difference? A number of reasons... Attention to detail. Attention to results. A philosophy that requires us to provide the very best possible code generation. We simply don't believe that sloppy coding can always be overcome by ever faster hardware. At some point, every programmer (ours included!) must take on the obligation to write quality code... and we take that obligation very seriously. That's why our entire compiler, including all the library code to be linked, occupies less than 300K! Compare that to multi-megabyte compilers that seem more like dinosaurs! That's a simple example of the attention we pay to careful programming.

      "I recently bought the PowerBASIC Console Compiler for Windows. Great deal, and what a powerful package. I like it!"
- Ron Schwartz,
Pension Actuary, RKS Consultants, Inc.

 

Register Variables
Of course, performance is a factor of technical design issues, too. Like Register Variables. Normally, every time a variable is altered, assigned, or retrieved, memory must be accessed. That's a relatively slow process, as compared to accessing CPU and FPU registers. So PowerBASIC stores 4 float variables and 2 integer variables from each Sub/Function in a register instead of memory. Simple concept, but very effective. If those variables are referenced frequently, the improvement can be dramatic. Moreover, we let the programmer decide which variables should be register variables... that way, you can decide which will be most helpful. And if you still decline to choose, Classic PowerBASIC will try to pick the best candidates for you, from those at hand.

 

Just like PowerBASIC for DOS, our classic console compiler creates text mode applications. They just run faster, deal with gigabytes of memory, and offer access to the Win32 API. And since the source code is so similar to PB3 and QB45, it's incredibly easy porting DOS code to Windows today!

 

Macros
A complete Macro facility is an exciting addition to the latest version, and that's something seldom seen in a high level language. Essentially, a Macro invokes a text substitution engine which allows you to extend the PowerBASIC language in ways not seen before. Classic PowerBASIC supports single line macros, multi-line macros, even function macros which return a result. And they don't occupy one byte of code space unless actually used. Each macro may take up to 240 arguments, so configurability shouldn't be an issue. MACROTEMP may even be used to specify identifiers which are made unique to each macro expansion, thus avoiding name conflicts. With PowerBASIC macros, you can design your own unique, personal language!

 

Thread Safe Code
Classic PowerBASIC 5 is entirely thread-safe, so multi-threaded applications are a breeze. Isn't it good to know your program can handle 2, 3, or 5000 tasks, all at the same time? You can print a report, while still allowing data entry. Watch for a hardware signal, while calculating data services. All the power you need is packed right into the PowerBASIC THREAD Statement, along with its simple extensions. PowerBASIC even offers THREADED variables for "Thread Local Storage" -- each THREAD get its own unique copy of the variable -- automatically.

 

Build COM Components
Client COM services,and support for the Dispatch, Direct, Automation, and Dual Interfaces lets you tap the power of components. Invoke libraries and applications with ease, all controlled from your PowerBASIC client program. You'll find that the PowerBASIC object implementation is very efficient, with virtually no degradation of execution speed as compared to standard Subs and Functions. Invoke an instance of Microsoft Word, load and edit documents, all under the control of Classic PowerBASIC? It's all there now, waiting for your command...

 

Integrated Development Environment
The Classic PowerBASIC IDE has had some major improvements. There's support for project files. Open multiple source code files from a single project file, even if the source files are saved in different locations. Further optimized debugging speed with improved reliability. The debugger also now support evaluation and modification of Field, Bit, and SBit variables. The IDE can insert a GUID (CTRL+ALT+G) which allows insertion of a unique GUID for COM and other operations. There's improved handing of bookmarks and breakpoints. Printing from the IDE has been improved with margins and header with page, file information, date-time stamp and a separating line. All this, and even more, make the new IDE a joy to use.

 

Debugging Tools
Extra debugging tools? PowerBASIC shines with an array of built-in functions. PROFILE gives an overview. A list of every sub and function, how many times each was called, and the total time spent executing each of them. CALLSTK captures all stack frames above you. It answers, "How did I get here?". TRACE generates an execution log of each sub, function, label, and TRACE PRINT, as they're executed in sequence. It gives you parameter values, return values, even error codes. TRACE answers "Where have I been?", and "How did I get here?". With these tools, debugging might now be fun!

 

Data Types
You know, a quality compiler must offer data types to suit the needs. And PowerBASIC handles that with ease. Signed and unsigned integers to 64-bit. Single, double, and extended precision float. Two forms of currency. Dynamic strings, fixed strings, ASCIIZ strings. User-defined Types and Unions. Guids. Variants, pointers, and more. Now, we've added BIT and SIGNED BIT variables in TYPES and UNIONS. Each may be from 1 to 31 bits wide, packed one after another. Perfect for bit coding, or translation from C code. And FIELD variables? They work with the new FIELD statement, just like in DOS versions of BASIC. A FIELD is a string, mapped to a specific section of a file buffer, or even another string. They're allocated at run-time, so they can be changed as needed. Much like a TYPE that can be altered under program control. Best of all, a new internal design makes them fast, fast, fast!

 

Pointers
Pointers are great, but sometimes the syntax is daunting, particularly for very simple tasks. So we implemented Dynamic Pointers, using the original PEEK/POKE as a model: xx# = PEEK(DOUBLE,addr&) This retrieves the double precision value stored at addr&, assigning it to xx#. Very straightforward and it works for all data types. And unlike the old PEEK and POKE, it's just as fast as a pointer variable! Speaking of simplification, LOCAL, STATIC, GLOBAL, and RESET can now use a list of variables, like: STATIC abc, bcd, xyz AS STRING And, ARRAY ASSIGN lets you assign values to every element of an array in a single statement!

 

Tired of the hassle of "drag and drop form designers"? Lost in a sea of API calls just to display text and numbers in a window? With PB/CC, it's a whole new Windows! Compile Basic code to sizzling text mode programs. For Windows 95, 98, Me, NT, 2000, or even WinXP. Put your programming effort where it belongs -- at the core of your code. And when your calculations are complete, it's a simple matter to PRINT, or even LPRINT, the results!

 

Internet Programming
Did you say Internet? Create CGI apps for your web server! It's the perfect tool. PB/CC offers Standard Input & Output for easy communication. Get standalone executables as small as 10K. All with no run-time requirements of any kind. Whether your program looks up names, or simply calculates a mortgage, it can take data from a web form, process as needed, then deliver the results right to the browser of a distant end user.

 

You know, a typical shopping cart program written in Visual Basic needs some 5 Megabytes of RAM. So, using VB, you may find you're limited to around 20 simultaneous connections. But use PB/CC instead, and memory needs plummet! To around 100K total! That means 1000 simultaneous connections on that very same Web Server!

 

TCP and UDP Support
Built-in support for TCP and UDP means that your application can now communicate with far-away servers on the Internet or local servers on your Intranet. Send email messages with SMTP. Download web pages using HTTP. Even create your own TCP or UDP server for communication with other applications.

 

Serial Port Support
High-speed Serial Communications means you can access modems or other serial devices without struggling with obscure API calls. Dial into remote computers that aren't connected to the internet with just a few lines of code.

 

New Features in Classic PB/CC Version 5 ...

 

Minimum System Requirements

     
  • Personal computer with a 80386 or higher processor
  • Any version of Windows from Windows 95 through Windows 10
  • A hard disk with 11 Mb available for installation