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 Win7.
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
dynamic pointers, and thread local storage, to name just a few. But
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
we added more. CONSHNDL, CURSOR, INSHIFT, PAGE, PAGEACTIVE,
SCREENATTR, PCOPY, WAITKEY$ and WAITSTAT. A complete set of mouse
routines. SCROLL any region of the screen in any direction. STDIN,
and STDERR. Even a PARSE statement and PARSE$ function to extract
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.
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
Any font. Any size. Any color. Bold. Underline. Italic and strikeout.
Mix any combination of fonts on any window. Print just about anything,
about anywhere, even on private bitmaps that aren't yet visible. You'll
or stretch bitmaps. Shrink them or change them. Circles, ovals, lines
boxes. Fat lines, skinny lines, stylized lines. Arcs, circles, rounded
rectangles. Ellipses, pie sections, polygons, polylines. Even get or
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
system, even with fractional floating point coordinates! Of course,
you've built that work of art, you need to load and save it. So load
a resource, load and save a BMP on disk!
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,
offers it all on the printer. Print plain text or fancy text -- any
any size, any color. Bitmaps and images, lines and boxes, circles and
polygons, virtually all the features of the GRAPHIC screen are there
printers, too! You can retrieve the size of the printer page, the
area, the margins, even the number of points per inch. Select landscape
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
user decide. It's all in there.
Another interesting point is that
graphics are extensible. Using the DC
(Device Context) from PowerBASIC, you can call the Windows API, your
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.
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
you can port existing DOS applications to Win32 with ease. Stop
from module to module in DOS when you can create a single 32-bit
code executable up to 2 gigabytes in size. And creating an array that
50 megabytes of RAM is as simple as:
Dim x%(0 To 26214400)
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
x## = 1
y## = 1.000001
t! = Timer
For i& = 1 To 100000000
x## = x## * y##
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
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
Attention to detail. Attention to
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.
Of course, performance is a factor of
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
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
A complete Macro facility is an
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!
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
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
unique copy of the variable -- automatically.
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...
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 handeling 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.
Extra debugging tools? PowerBASIC
shines with an array of built-in
functions. PROFILE gives an overview. A list of every sub and
how many times each was called, and the total time spent executing each
them. CALLSTK captures all stack frames above you. It answers, "How did
get here?". TRACE generates an execution log of each sub, function,
and TRACE PRINT, as they're executed in sequence. It gives you
values, return values, even error codes. TRACE answers "Where have I
and "How did I get here?". With these tools, debugging might now be fun!
You know, a quality compiler must
offer data types to suit the needs. And
PowerBASIC handles that with ease. Signed and unsigned integers to
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
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
that can be altered under program control. Best of all, a new internal
design makes them fast, fast, fast!
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
the double precision value stored at addr&, assigning it to xx#.
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
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!
Did you say Internet? Create CGI
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
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!
Built-in support for TCP and UDP
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.
High-speed Serial Communications
you can 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
#ALIGN metastatement aligns the next instruction to a boundary.
#BREAK ON metastatement enables "Control-Break" as a means of terminating the program.
#BREAK OFF metastatement disables "Control-Break" as a means of terminating the program.
#DEBUG CODE ON metastatement activates generation of debug code.
#DEBUG CODE OFF metastatement suppresses generation of debug code, from that line, until a subsequent #DEBUG CODE ON (or the end of the Sub/Function/Method/Property) is reached.
#DEBUG DISPLAY ON metastatement enables error display mode when an untrapped run-time error occurs within a compiled PowerBASIC program.
#DEBUG DISPLAY OFF metastatement suppresses displaying of untrapped error messages.
#INCLUDE ONCE metastatement includes a file only one time during compilation, regardless of how many times it appears in the program
#OPTIMIZE metastatement chooses between faster execution or smaller code size.
#UTILITY metastatement. Compiler directive to allow external utility programs to read text inserted on the #UTILITY line.
ACODE$ function may now contain an optional code page parameter. The code page parameter represents the code page to be used for the conversion process.
ARRAY SORT statement now offers a custom array sorting option. A custom array may be user-defined types, fixed-length strings, or ASCIIZ strings. With a custom array sort, you can write your own simple function to tell PowerBASIC the correct sequence for any two array elements.
ASM statement has been expanded to support the full range of SIMD opcodes. ASM statements may now contain a label - ASM Label: or ! Label:. Support for returning METHOD and PROPERTY return value assignments have been added.
BITSE function compares Integer class values for equivalent bits regardless of sign.
BGR function now accepts individual red, green, and blue values or a single RGB value.
BUILD$ function concatenates multiple strings with high efficiency.
CLASS / END CLASS Block creates the code and data for an object.
CLIPBOARD GET ITEM statement retrieves a data item from the Windows ClipBoard.
CLIPBOARD GET TEXT statement retrieves a string from the Windows ClipBoard.
CLIPBOARD RESET statement deletes the contents of the Windows ClipBoard.
CLIPBOARD SET ITEM statement stores a new data item in the Windows ClipBoard.
CLIPBOARD SET TEXT statement stores a string in the Windows ClipBoard.
COMM function has been enhanced to retrieve the Clear-To-Send (CTS) and Data-Set-Ready (DSR) states.
COMMAND$ function has been improved with an option to either return the complete trailer, or any one of the arguments.
DECLARE statements now support declarations of THREAD FUNCTIONS.
DIR$ function has been expanded with an optional ONLY keyword to return only files that match the specified attribute. For example: DIR$(mask$, ONLY %SUBDIR ) just the directory entries which match mask$ are returned. The DIR$ function may optionally assign the complete directory data structure that receives information about the found file or subdirectory. to an appropriate UDT variable if you include the TO clause as a parameter.
EOF function now supports an optional # symbol preceding the file number parameter.
ERL$ function returns the last label, line number, or procedure name executed prior to the most recent error.
EVENTS statement attaches or detaches an event handler to/from an event source.
EXE.EXTN$ read-only user defined type returns the extension (with a leading period) of the program which is currently executing.
EXE.FULL$ read-only user defined type returns the complete drive, path, and file name of the program which is currently executing.
EXE.NAME$ read-only user defined returns just the file name of the program which is currently executing.
EXE.NAMEX$ read-only user defined returns the file name and the extension of the program which is currently executing.
EXE.PATH$ read-only user defined returns the complete drive and path of the program which is currently executing.
EXIT METHOD transfers program execution out of a METHOD structure.
EXIT PROPERTY transfers program execution out of a PRPOPERTY structure.
FIELD statement has been updated with two new options. FIELD STRING converts a field string to a dynamic string, assigns the current sub-section data to it. FIELD RESET converts a field string to a nul (zero-length) dynamic string.
FONT END statement destroys a font when it is no longer needed.
FONT NEW statement creates a new font for use with GRAPHIC PRINT, XPRINT, etc.
FOR/NEXT statements have been optimized. In certain situations, previous versions of PowerBASIC optimized FOR/NEXT loops to count down instead of up for improved execution speed. This optimization could cause the counter variable to contain a value which was not expected when execution of the loop was complete. This optimization has been improved so that the counter variable value is always correct upon loop completion, even if EXIT FOR was used to force an early termination.
FUNCTION/END FUNCTION statements may now be prepended with the word THREAD for clarity and self-documentation.
GLOBALMEM ALLOC statement allocates a moveable memory block.
GLOBALMEM FREE statement de-allocates a memory block.
GLOBALMEM LOCK statement lock a moveable memory block at a specific memory location.
GLOBALMEM SIZE statement returns the size of memory block.
GLOBALMEM UNLOCK statement unlocks a moveable memory block.
GRAPHIC BITMAP LOAD statement has been improved with an optional stretch mode parameter to enhance the quality of bitmaps which are changed in size.
GRAPHIC DETACH statement detaches a graphic target (Window or Bitmap) which may be currently attached to the process.
GRAPHIC GET LINES statement retrieves the number of lines that can be printed on the graphic target.
GRAPHIC GET SCALE statement retrieves the current coordinate limits for the graphic target.
GRAPHIC FONT statement has been enhanced to allow the points and style attributes to be optional parameters.
GRAPHIC INKEY$ statement reads a keyboard character if one is ready.
GRAPHIC INPUT statement reads data from the keyboard from within a Graphic Window.
GRAPHIC INPUT FLUSH statement removes all buffered keyboard data.
GRAPHIC INSTAT statement determines whether a keyboard character is ready.
GRAPHIC LINE INPUT statement reads an entire line from the keyboard from within a Graphic Window or a Graphic Control.
GRAPHIC SCALE PIXELS statement sets or resets the graphic coordinate system to pixel coordinates.
GRAPHIC SET FONT statement selects a font for the GRAPHIC PRINT, GRAPHIC INPUT, and GRAPHIC LINE INPUT statements.
GRAPHIC STRETCH statement has been improved with an optional stretch mode parameter to enhance the quality of resized bitmaps.
GRAPHIC WAITKEY$ statement reads a keyboard character, waiting until one is ready.
GRAPHIC WINDOW CLICK statement checks whether a GRAPHIC WINDOW has been clicked with the mouse.
IDISPINFO.CODE pseudo-object. When OBJRESULT is %DISP_E_EXCEPTION, this Get Property returns a long integer value which represents a more specific error code.
IDISPINFO.CONTEXT pseudo-object. When OBJRESULT is %DISP_E_EXCEPTION, this Get Property returns a long integer value which is the context of the topic within the help file (IDISPINFO.HELP$).
IDISPINFO.DESC$ pseudo-object. When OBJRESULT is %DISP_E_EXCEPTION, this Get Property returns a string containing a textual, human-readable description of the status.
IDISPINFO.HELP$ pseudo-object. When OBJRESULT is %DISP_E_EXCEPTION, this Get Property returns a string containing drive, path, and filename of a Help File with more information about this particular status code.
IDISPINFO.PARAM pseudo-object. When OBJRESULT is either %DISP_E_PARAMNOTFOUND or %DISP_E_TYPEMISMATCH, this Get Property returns a long integer value which represents the parameter number of the first parameter which failed to match the requirements needed.
IDISPINFO.SOURCE$ pseudo-object. When OBJRESULT is %DISP_E_EXCEPTION, this Get Property returns a string containing a textual, human-readable description of the source of the exception.
IDISPINFO.CLEAR pseudo-object. Clears all properties which may have been set by prior execution of IDISPINFO.SET in this thread.
IDISPINFO.SET pseudo-object. Sets the properties which for future execution of IDISPINFO.
INSTANCE statement declares an INSTANCE variable which is unique to each object.
INTERFACE / END INTERFACE Block (Direct) declares a direct object interface and its member Methods/Properties.
ISFILE function determines whether or not a file exists.
ISINTERFACE function determines whether an object supports a particular interface.
ISMISSING function determines whether an optional parameter was passed by the calling code.
LET statement has been improved to support compound assignments (+=, -=, *=, /=. \=, &=, AND=, OR=, XOR=, EQV=, IMP=, and MOD=).
ME pseudo-variable. A pseudo object variable to reference the current object.
METHOD / END METHOD statements defines a Method procedure within a class.
MYBASE pseudo-variable. A pseudo object variable to reference the inherited parent object.
OBJRESULT$ function returns a string which describes an OBJRESULT (hResult) code.
PATHNAME$ function parses a path/file name to extract its component parts.
PATHSCAN$ function finds a file on disk and returns the path and/or file name parts.
PRINT# statement, when used without any parameters outputs a blank line to the file (i.e. a CR/LF only).
PROCESS GET PRIORITY retrieves the Priority Value for the current process.
PROCESS SET PRIORITY sets the Priority Value for the current process.
PROGID$ function, has been enhanced to accept ProgIDs up to 99 characters, even though COM rules indicate that a ProgID cannot contain more than 39 characters.
PROPERTY GET statement retrieves a data value from an object.
PROPERTY SET statement assigns a data value to an object.
RAISEEVENT statement calls an Event Handler code.
RGB function now accepts individual red, green, and blue values or single BGR value.
SHELL statement now supports an optional EXIT TO clause. If specified, the exit code of the child process (the value returned by the WinMain function) is retrieved.
THREAD CREATE statement now supports an optional stack size parameter to specify the requested size of the stack for this newly created thread.
TIX statement measures elapsed CPU cycles.
UCODE$ function may now contain an optional code page parameter. The code page parameter represents the code page to be used for the conversion process.
UCODEPAGE statement sets the default codepage used for ANSI / UNICODE conversions.
THREAD GET PRIORITY retrieves the Priority Value for a thread.
THREAD SET PRIORITY sets the Priority Value for a thread
WRITE# statement, when used without any parameters outputs a blank line to the file (i.e. a CR/LF only). WRITE# has been extended to allow a trailing comma or semicolon, the final carriage return / line feed is suppressed and replaced with a comma delimiter.
XPRINT GET COLLATE statement retrieves the XPRINT collate status.
XPRINT GET COLORMODE statement retrieves the XPRINT colormode status.
XPRINT GET COPIES statement retrieves the XPRINT copy count.
XPRINT GET DUPLEX statement retrieves the XPRINT duplex status.
XPRINT FONT statement has been enhanced to allow the points and style attributes to be optional parameters.
XPRINT GET PAPER statement retrieves the current paper size/type.
XPRINT GET PAPERS statement retrieves a list of supported paper types.
XPRINT GET SCALE statement retrieves the current coordinate limits for the host printer page.
XPRINT GET TRAY statement retrieves the active printer tray.
XPRINT GET TRAYS statement retrieves a list of supported paper trays.
XPRINT SCALE PIXELS resets the coordinate system to the original default pixel coordinates.
XPRINT SET COLLATE statement changes the XPRINT collate status.
XPRINT SET COLORMODE statement changes the XPRINT colormode status.
XPRINT SET COPIES statement changes the XPRINT copy count.
XPRINT SET DUPLEX statement changes the XPRINT duplex status.
XPRINT SET FONT statement selects a font for the XPRINT statement.
XPRINT SET PAPER statement sets a new paper size/type.
XPRINT SET TRAY statement sets a new active printer tray.
Special features of Classic PowerBASIC
#STACK sets the program stack size
ACODE$() translates unicode strings
ARRAY SORT, SCAN, INSERT, DELETE
ARRAYATTR() returns status, data
type, subscripts, etc.
ASCIIZ strings supported for
Assembler is built-in for opcodes
through Pentium class
BIN$() allows optional leading
zeros to a fixed field size
BIT CALC set/reset a bit based upon
a dynamic calculation
BIT SHIFT, ROTATE, TEST, SET, RESET
BITS() function for bit pattern
conversion between signed/unsigned
CALLSTK captures the entire stack
choice2...) chooses one of several values
CHR$() function may take multiple
or a range of parameters
communications using TCP and UDP
CLSID$(program_id$) returns the
Code pointer variables particularly
suitable for callbacks
Compile to true machine code for