PowerBASIC , formerly Turbo Basic , is the brand of several commercial compilers by PowerBASIC Inc. that compile a dialect of the BASIC programming language . There are both MS-DOS and Windows versions, and two kinds of the latter: Console and Windows. The MS-DOS version has a syntax similar to that of QBasic and QuickBASIC . The Windows versions use a BASIC syntax expanded to include many Windows functions, and the statements can be combined with calls to the Windows API .
130-552: The first version of the DOS compiler was published as BASIC/Z, the very first interactive compiler for CP/M and MDOS. Later it was extended to MS-DOS/ PC DOS and in 1987 Borland distributed it as Turbo Basic . Turbo Basic was originally created by Robert "Bob" Zale (1945–2012) and bought from him by Borland . When Borland decided to stop publishing it (1989), Zale bought it back from them, renamed it PowerBASIC and set up PowerBASIC Inc. to continue support and development of it; it
260-473: A binary search can be used to find a function. The index of the found name is then used to look up the ordinal in the Export Ordinal table. In 16-bit Windows, the name table was not sorted, so the name lookup overhead was much more noticeable. It is also possible to bind an executable to a specific version of a DLL, that is, to resolve the addresses of imported functions at compile-time. For bound imports,
390-529: A .DRV extension that provided custom implementations of the same drawing API through a unified device driver interface (DDI), and the Drawing (GDI) and GUI (USER) APIs were merely the function calls exported by the GDI and USER, system DLLs with .EXE extension. This notion of building up the operating system from a collection of dynamically loaded libraries is a core concept of Windows that persists as of 2015 . DLLs provide
520-486: A DLL at compile-time. Delphi C 'Example.lib' file must be included (assuming that Example.dll is generated) in the project before static linking. The file 'Example.lib' is automatically generated by the compiler when compiling the DLL. Not executing the above statement would cause linking error as the linker would not know where to find the definition of AddNumbers . The DLL file 'Example.dll' may also have to be copied to
650-406: A DLL is usually shared among all the processes that use the DLL; that is, they occupy a single place in physical memory, and do not take up space in the page file . Windows does not use position-independent code for its DLLs; instead, the code undergoes relocation as it is loaded, fixing addresses for all its entry points at locations which are free in the memory space of the first process to load
780-412: A DLL runs in the memory space of the calling process and with the same access permissions, which means there is little overhead in their use, but also that there is no protection for the calling program if the DLL has any sort of bug. The DLL technology allows for an application to be modified without requiring consuming components to be re-compiled or re-linked. A DLL can be replaced so that the next time
910-574: A GRAPHIC (WINDOW, BITMAP, or control) is first selected as the current GRAPHIC target, then operations are done on it without requiring it to be identified again. Contrast this with the GDI API approach, where the Device Context handle is required for every drawing operation. It is not necessary when using the PB GRAPHIC statements to define a brush or pen as a separate entity, nor is it necessary to redraw
1040-454: A PBCC hello world program. By default PBCC creates a console window at runtime for displaying output. The use of Waitkey$ in this example prevents the console window from automatically closing until the operator sees the displayed text. Here is the PBWin version, which displays a Windows "dialog" message box. PBWin and PBCC support object-oriented programming in the form of COM classes, however
1170-413: A ROM firmware chip) loads the operating system from the disk in drive A: . By modern standards CP/M is primitive, owing to the extreme constraints on program size. With version 1.0 there is no provision for detecting a changed disk. If a user changes disks without manually rereading the disk directory the system writes on the new disk using the old disk's directory information, ruining the data stored on
1300-464: A competitor in the spreadsheet market in the MS-DOS world. AutoCAD , a CAD application from Autodesk debuted on CP/M. A host of compilers and interpreters for popular programming languages of the time (such as BASIC , Borland 's Turbo Pascal , FORTRAN and even PL/I ) were available, among them several of the earliest Microsoft products. CP/M software often came with installers that adapted it to
1430-528: A corporation change-of-name filing to Digital Research, Inc. By September 1981, Digital Research had sold more than 250,000 CP/M licenses; InfoWorld stated that the actual market was likely larger because of sublicenses. Many different companies produced CP/M-based computers for many different markets; the magazine stated that "CP/M is well on its way to establishing itself as the small-computer operating system". The companies chose to support CP/M because of its large library of software. The Xerox 820 ran
SECTION 10
#17330848193151560-773: A directory except those marked with the SYS attribute), DIRSYS / DIRS (list files marked with the SYS attribute in the directory), ERASE / ERA (delete a file), RENAME / REN (rename a file), TYPE / TYP (display contents of an ASCII character file), and USER / USE (change user number) as built-in commands: CP/M 3 allows the user to abbreviate the built-in commands. Transient commands in CP/M 3 include COPYSYS , DATE , DEVICE , DUMP , ED , GET , HELP , HEXCOM , INITDIR , LINK , MAC , PIP, PUT , RMAC , SET , SETDEF , SHOW , SID , SUBMIT , and XREF . The Basic Disk Operating System, or BDOS, provides access to such operations as opening
1690-460: A directory or ERA to delete a file) or loads and starts an executable file of the given name (transient commands such as PIP.COM to copy files or STAT.COM to show various file and system information). Third-party applications for CP/M are also essentially transient commands. The BDOS, CCP and standard transient commands are the same in all installations of a particular revision of CP/M, but the BIOS portion
1820-449: A dozen different CP/M systems, plus two generic versions. The operating system was described as a " software bus ", allowing multiple programs to interact with different hardware in a standardized way. Programs written for CP/M were typically portable among different machines, usually requiring only the specification of the escape sequences for control of the screen and printer. This portability made CP/M popular, and much more software
1950-469: A drawing API and mouse access. Unlike most BASIC implementations of its time, Turbo Basic was a full compiler which generated native code for MS-DOS. Other implementations were either interpreters , or relied heavily on a runtime library . The integrated development environment could run a BASIC program internally for traditional BASIC debugging (see sample below), or generate an MS-DOS stand-alone executable file that could be run on other systems without
2080-661: A file extension that describes the content of the file such as .ocx for ActiveX controls and .drv for a legacy (16-bit) device driver . A DLL that contains only resources can be called a resource DLL . Examples include the icon library , sometimes having extension .icl , and font library having extensions .fon and .fot . The file format of a DLL is the same as for an executable (a.k.a. EXE ), but different versions of Windows use different formats. 32-bit and 64-bit Windows versions use Portable Executable (PE), and 16-bit Windows versions use New Executable (NE). The main difference between DLL and EXE
2210-429: A file, output to the console, or printing. Application programs load processor registers with a function code for the operation, and addresses for parameters or memory buffers , and call a fixed address in memory. Since the address is the same independent of the amount of memory in the system, application programs run the same way for any type or configuration of hardware. The Basic Input Output System or BIOS, provides
2340-469: A part of the Amateur Computer Club of New Jersey . ZCPR2 was released on 14 February 1983. It was released as a set of ten disks from SIG/M. ZCPR2 was upgraded to 2.3, and also was released in 8080 code, permitting the use of ZCPR2 on 8080 and 8085 systems. ZCPR3 was released on 14 July 1984, as a set of nine disks from SIG/M. The code for ZCPR3 could also be compiled (with reduced features) for
2470-508: A prevailing naming scheme of the time, as in Kildall's PL/M language, and Prime Computer's PL/P ( Programming Language for Prime ), both suggesting IBM's PL/I ; and IBM's CP/CMS operating system, which Kildall had used when working at the NPS. This renaming of CP/M was part of a larger effort by Kildall and his wife with business partner, Dorothy McEwen to convert Kildall's personal project of CP/M and
2600-669: A process running under a guest account can in this way corrupt another process running under a privileged account. This is an important reason to avoid the use of shared sections in DLLs. If a DLL is compressed by certain executable packers (e.g. UPX ), all of its code sections are marked as read and write, and will be unshared. Read-and-write code sections, much like private data sections, are private to each process. Thus DLLs with shared data sections should not be compressed if they are intended to be used simultaneously by multiple programs, since each program instance would have to carry its own copy of
2730-508: A program was not standardized, so that there is no single option character that differentiated options from file names. Different programs can and do use different characters. The CP/M Console Command Processor includes DIR , ERA , REN , SAVE , TYPE , and USER as built-in commands. Transient commands in CP/M include ASM , DDT , DUMP , ED , LOAD , MOVCPM [ pl ] , PIP , STAT , SUBMIT , and SYSGEN . CP/M Plus (CP/M Version 3) includes DIR (display list of files from
SECTION 20
#17330848193152860-798: A relocating assembler and linker. CP/M 3 was available for the last generation of 8-bit computers, notably the Amstrad PCW, the Amstrad CPC , the ZX Spectrum +3 , the Commodore 128 , MSX machines and the Radio Shack TRS-80 Model 4 . There were versions of CP/M for some 16-bit CPUs as well. The first version in the 16-bit family was CP/M-86 for the Intel 8086 in November 1981. Kathryn Strutynski
2990-740: A result, some systems had more TPA memory available than others. Bank switching was a common technique that allowed systems to have a large TPA while switching out ROM or video memory space as needed. CP/M 3.0 allowed parts of the BDOS to be in bank-switched memory as well. Dynamic-link library A dynamic-link library ( DLL ) is a shared library in the Microsoft Windows or OS/2 operating system . A DLL can contain executable code (functions), data , and resources , in any combination. A DLL file often has file extension .dll , but can have any file extension. Developers can choose to use
3120-536: A run-time error if the DLL file cannot be found. The developer can catch the error and handle it appropriately. When creating DLLs in VB, the IDE will only allow creation of ActiveX DLLs, however methods have been created to allow the user to explicitly tell the linker to include a .DEF file which defines the ordinal position and name of each exported function. This allows the user to create
3250-516: A short time through their online store as free, no-nag, trial versions along with PBForms v1.0 (PowerBASIC Forms). PowerBASIC Forms, available for purchase separately, is a graphical user interface design tool add-on for PBWin. It automatically produces source code using the DDT language extension that creates forms using the Windows graphical user interface. The PowerBASIC COM Browser, which comes with PBWin,
3380-474: A single address space . Every program was meant to co-operate by yielding the CPU to other programs so that the graphical user interface (GUI) could multitask and be maximally responsive. All operating-system level operations were provided by the underlying operating system: MS-DOS . All higher-level services were provided by Windows Libraries "Dynamic Link Library". The Drawing API , Graphics Device Interface (GDI),
3510-449: A standard Windows DLL using Visual Basic (Version 6 or lower) which can be referenced through a "Declare" statement. Microsoft Visual C++ (MSVC) provides several extensions to standard C++ which allow functions to be specified as imported or exported directly in the C++ code; these have been adopted by other Windows C and C++ compilers, including Windows versions of GCC . These extensions use
3640-530: A user-installed overlay containing all the code required to access a particular machine's serial port. WordStar, one of the first widely used word processors , and dBase , an early and popular database program for microcomputers, were originally written for CP/M. Two early outliners , KAMAS (Knowledge and Mind Amplification System) and its cut-down successor Out-Think (without programming facilities and retooled for 8080/V20 compatibility) were also written for CP/M, though later rewritten for MS-DOS. Turbo Pascal ,
3770-540: A wide variety of computers. The source code for BASIC programs was easily accessible, and most forms of copy protection were ineffective on the operating system. A Kaypro II owner, for example, would obtain software on Xerox 820 format, then copy it to and run it from Kaypro-format disks. The lack of standardized graphics support limited video games , but various character and text-based games were ported , such as Telengard , Gorillas , Hamurabi , Lunar Lander , along with early interactive fiction including
3900-418: Is a disk operating system and its purpose is to organize files on a magnetic storage medium, and to load and run programs stored on a disk. Initially confined to single-tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations and were migrated to 16-bit processors . The combination of CP/M and S-100 bus computers became an early standard in
4030-563: Is a 32-bit compiler compatible with the Windows 9x series and the Windows NT series of operating systems, including Windows XP , Windows Server 2008 , Windows Vista , Windows 7 , Windows 8 ( 8.1 ), and Windows 10 . PBWin can create dynamic-link libraries . PBWin applications can read dynamic-link libraries]. PBWin comes with a compiler, IDE with editor, and stepping debugger . You can create an application's graphical user interface using
PowerBASIC - Misplaced Pages Continue
4160-629: Is a 32-bit compiler for the Windows 9x series and Windows NT series of operating systems , including Windows XP , Windows Server 2008 , Windows Vista , and Windows 7 . PBCC applications can use dynamic-link libraries (DLLs). The compiler comes with an IDE including an editor and stepping debugger . No knowledge of Windows programming is required to create character mode or graphical applications with this compiler. PBCC-compiled executables can also be used as Common Gateway Interface executables (for web servers). PBCC creates only executables, not DLLs. (PBWin — see below — can create both.) PBWin
4290-451: Is always adapted to the particular hardware. Adding memory to a computer, for example, means that the CP/M system must be reinstalled to allow transient programs to use the additional memory space. A utility program (MOVCPM) is provided with system distribution that allows relocating the object code to different memory areas. The utility program adjusts the addresses in absolute jump and subroutine call instructions to new addresses required by
4420-527: Is an application that exposes the interfaces, methods, and properties of COM objects, as described by type-library files. The PowerBASIC COM Browser exports an interface structure of a COM object for early-binding purposes in PowerBASIC code, and gives syntax reference and context-help on the interface members exposed by a COM object. PowerBASIC is a native-code BASIC compiler whose reported merits are simplicity of use and speed compared to other languages. Although
4550-406: Is called. If the DLL cannot be found or loaded, or the called function does not exist, the application will generate an exception , which may be caught and handled appropriately. If the application does not handle the exception, it will be caught by the operating system, which will terminate the program with an error message. The delayed loading mechanism also provides notification hooks , allowing
4680-419: Is common for internal functions to be exported by ordinal only. For most Windows API functions only the names are preserved across different Windows releases; the ordinals are subject to change. Thus, one cannot reliably import Windows API functions by their ordinals. Importing functions by ordinal provides only slightly better performance than importing them by name: export tables of DLLs are ordered by name, so
4810-451: Is decreasing. DLL files may be explicitly loaded at run-time, a process referred to simply as run-time dynamic linking by Microsoft, by using the LoadLibrary (or LoadLibraryEx ) API function. The GetProcAddress API function is used to look up exported symbols by name, and FreeLibrary – to unload the DLL. These functions are analogous to dlopen , dlsym , and dlclose in
4940-529: Is faster to link to the DLL directly. An experimental tool in MinGW called genlib can be used to generate import libs with MSVC-style symbols. Each function exported by a DLL is identified by a numeric ordinal and optionally a name. Likewise, functions can be imported from a DLL either by ordinal or by name. The ordinal represents the position of the function's address pointer in the DLL Export Address table. It
5070-455: Is much smaller as it only contains symbols referring to the actual DLL, to be processed at link-time. Both nevertheless are Unix ar format files. Linking to dynamic libraries is usually handled by linking to an import library when building or linking to create an executable file. The created executable then contains an import address table (IAT) by which all DLL function calls are referenced (each referenced DLL function contains its own entry in
5200-402: Is processed by the linker, rather than the compiler, and thus it is not specific to C++. DLL compilation will produce both DLL and LIB files. The LIB file (import library) is used to link against a DLL at compile-time; it is not necessary for run-time linking. Unless the DLL is a Component Object Model (COM) server, the DLL file must be placed in one of the directories listed in
5330-415: Is that a DLL cannot be run directly since the operating system requires an entry point to start execution. Windows provides a utility program (RUNDLL.EXE/RUNDLL32.EXE) to execute a function exposed by a DLL. Since they have the same format, an EXE can be used as a DLL. Consuming code can load an EXE via the same mechanism as loading a DLL. The first versions of Microsoft Windows ran programs together in
PowerBASIC - Misplaced Pages Continue
5460-411: Is used in the function declaration to signal the DLL name, followed by name to name the symbol (if different) or index to identify the index. In Visual Basic (VB), only run-time linking is supported; but in addition to using LoadLibrary and GetProcAddress API functions, declarations of imported functions are allowed. When importing DLL functions through declarations, VB will generate
5590-530: The Zork series and Colossal Cave Adventure . Text adventure specialist Infocom was one of the few publishers to consistently release their games in CP/M format. Lifeboat Associates started collecting and distributing user-written "free" software. One of the first was XMODEM , which allowed reliable file transfers via modem and phone line. Another program native to CP/M was the outline processor KAMAS. The read/write memory between address 0100 hexadecimal and
5720-578: The PDP-11 and OS/8 for the PDP-8 . Commands take the form of a keyword followed by a list of parameters separated by spaces or special characters. Similar to a Unix shell builtin , if an internal command is recognized, it is carried out by the CCP itself. Otherwise it attempts to find an executable file on the currently logged disk drive and (in later versions) user area, loads it, and passes it any additional parameters from
5850-500: The POSIX standard API. The procedure for explicit run-time linking is the same in any language that supports pointers to functions , since it depends on the Windows API rather than language constructs. Normally, an application that is linked against a DLL’s import library will fail to start if the DLL cannot be found, because Windows will not run the application unless it can find all of
5980-518: The TOPS-10 operating system of the DECsystem-10 mainframe computer , which Kildall had used as a development environment. An early outside licensee of CP/M was Gnat Computers , an early microcomputer developer out of San Diego, California . In 1977, the company was granted the license to use CP/M 1.0 for any micro they desired for $ 90. Within the year, demand for CP/M was so high that Digital Research
6110-725: The Windows API , or by using the built-in DDT language extensions. The group of BASIC statements which wrap Windows API functions, particularly in the creation and handling of dialog boxes and child controls, is collectively known as Dynamic Dialog Tools. Using DDT requires less coding than to create a similar program using the Windows API . Using the DDT and the Windows API (known as SDK style as in Microsoft Windows SDK ) are not mutually exclusive. PowerBASIC renamed PBWin v9.07 and PB/CC v5.07 as "Classic PBWin" and "Classic PB/CC", respectively, and on November 1, 2016, offered them for
6240-404: The Windows shell to load different Windows programs, and for these programs to invoke API calls from the shared USER and GDI libraries. That concept was "dynamic linking". In a conventional non-shared static library , sections of code are simply added to the calling program when its executable is built at the "linking" phase; if two programs call the same routine, the routine is included in both
6370-437: The extension .COM on disk. The BIOS directly controls hardware components other than the CPU and main memory. It contains functions such as character input and output and the reading and writing of disk sectors. The BDOS implements the CP/M file system and some input/output abstractions (such as redirection) on top of the BIOS. The CCP takes user commands and either executes them directly (internal commands such as DIR to show
6500-460: The linker saves the timestamp and checksum of the DLL to which the import is bound. At run-time, Windows checks to see if the same version of library is being used, and if so, Windows bypasses processing the imports. Otherwise, if the library is different from the one which was bound to, Windows processes the imports in a normal way. Bound executables load somewhat faster if they are run in the same environment that they were compiled for, and exactly
6630-408: The "db", "dw", and "dd" statements. Lines of assembler code can be freely interspersed with lines of BASIC code, although one must always consider the potential interactions between the two types of code. Hello world is used to give a very small example of the syntax used by a programming language and is often the smallest possible program for any given programming language. Here is an example of
SECTION 50
#17330848193156760-441: The 7-bit boundary. In the 8-bit versions, while running, the CP/M operating system loaded into memory has three components: The BIOS and BDOS are memory-resident, while the CCP is memory-resident unless overwritten by an application, in which case it is automatically reloaded after the application finished running. A number of transient commands for standard utilities are also provided. The transient commands reside in files with
6890-429: The 8080 I/O address space. All of these variations in the hardware are concealed from other modules of the system by use of the BIOS, which uses standard entry points for the services required to run CP/M such as character I/O or accessing a disk block. Since support for serial communication to a modem is very rudimentary in the BIOS or may be absent altogether, it is common practice for CP/M programs that use modems to have
7020-421: The 8080 and would run on systems that did not have the requisite Z80 microprocessor. Features of ZCPR as of version 3 included shells, aliases, I/O redirection, flow control, named directories, search paths, custom menus, passwords, and online help. In January 1987, Richard Conn stopped developing ZCPR, and Echelon asked Jay Sage (who already had a privately enhanced ZCPR 3.1) to continue work on it. Thus, ZCPR 3.3
7150-429: The CP/M base included Robert "Bob" Silberstein and David "Dave" K. Brown. CP/M originally stood for "Control Program/Monitor", a name which implies a resident monitor —a primitive precursor to the operating system. However, during the conversion of CP/M to a commercial product, trademark registration documents filed in November 1977 gave the product's name as "Control Program for Microcomputers". The CP/M name follows
7280-428: The DLL's code. If some programs (or their combination of already-loaded DLLs) do not have those addresses free, then an additional physical copy of the DLL's code will need to be created, using a different set of relocated entry points. If the physical memory occupied by a code section is to be reclaimed, its contents are discarded, and later reloaded directly from the DLL file as necessary. In contrast to code sections,
7410-407: The DLL, resulting in increased memory consumption. Like static libraries, import libraries for DLLs are noted by the .lib file extension. For example, kernel32.dll , the primary dynamic library for Windows's base functions such as file creation and memory management, is linked via kernel32.lib . The usual way to tell an import library from a proper static library is by size: the import library
7540-431: The DLL. In older versions of Windows, in which all running processes occupied a single common address space, a single copy of the DLL's code would always be sufficient for all the processes. However, in newer versions of Windows which use separate address spaces for each program, it is only possible to use the same relocated copy of the DLL in multiple programs if each program has the same virtual addresses free to accommodate
7670-427: The DLLs that the application may need. However an application may be linked against an import library to allow delayed loading of the dynamic library. In this case, the operating system will not try to find or load the DLL when the application starts; instead, a stub is included in the application by the linker which will try to find and load the DLL through LoadLibrary and GetProcAddress when one of its functions
7800-631: The Digital Research distributed core of CP/M (BDOS, CCP, core transient commands) did not use any of the Z80-specific instructions, many Z80-based systems used Z80 code in the system-specific BIOS, and many applications were dedicated to Z80-based CP/M machines. Digital Research subsequently partnered with Zilog and American Microsystems to produce Personal CP/M, a ROM-based version of the operating system aimed at lower-cost systems that could potentially be equipped without disk drives. First featured in
7930-536: The FONT NEW statement. A GRAPHIC WINDOW is the equivalent of a Windows dialog box containing a static control on which drawing operations can be done. A single BASIC statement will create a GRAPHIC WINDOW and specify its size, position and title. It is not essential to specify a WNDPROC for the GRAPHIC WINDOW. A short source code example for a complete GRAPHIC WINDOW application follows: Using PB GRAPHIC statements,
SECTION 60
#17330848193158060-516: The GDI API. Pixel operations are possible using the GRAPHIC GET|SET PIXEL statements, in a manner similar to GetPixel/SetPixel of the GDI API. GRAPHIC GET BITS allows the entire bitmap to be loaded into a dynamic string. This can be manipulated either as a string or by mapping an array onto it. It can be placed back into the GRAPHIC target by GRAPHIC SET BITS. The GRAPHIC statements contain all
8190-402: The GRAPHIC target (when in view) in response to Windows messages such as WM_PAINT and WM_ERASEBKGND. GRAPHIC targets are persistent. When GRAPHIC targets are attached, a REDRAW option can be specified which buffers the results of drawing operations until they are specifically requested. Using this technique reduces flicker in a similar way to the technique of drawing on memory DCs when using
8320-705: The IAT). At run-time, the IAT is filled with appropriate addresses that point directly to a function in the separately loaded DLL. In Cygwin/MSYS and MinGW, import libraries are conventionally given the suffix .dll.a , combining both the Windows DLL suffix and the Unix ar suffix. The file format is similar, but the symbols used to mark the imports are different ( _head_foo_dll vs __IMPORT_DESCRIPTOR_foo ). Although its GNU Binutils toolchain can generate import libraries and link to them, it
8450-580: The IBM PC after DRI threatened legal action, it never overtook Microsoft's system. Most customers were repelled by the significantly greater price IBM charged for CP/M-86 over PC DOS ( US$ 240 and US$ 40, respectively). When Digital Equipment Corporation (DEC) put out the Rainbow 100 to compete with IBM, it came with CP/M-80 using a Z80 chip, CP/M-86 or MS-DOS using an 8088 microprocessor, or CP/M-86/80 using both. The Z80 and 8088 CPUs ran concurrently. A benefit of
8580-464: The IBM-compatible platform, and it never regained its former popularity. Byte magazine, at the time one of the leading industry magazines for microcomputers, essentially ceased covering CP/M products within a few years of the introduction of the IBM PC. For example, in 1983 there were still a few advertisements for S-100 boards and articles on CP/M software, but by 1987 these were no longer found in
8710-562: The Intel 8080 processor into .A86 source code for the Intel 8086. The translator would also optimize the output for code size and take care of calling conventions, so that CP/M-80 and MP/M-80 programs could be ported to the CP/M-86 and MP/M-86 platforms automatically. XLT86 itself was written in PL/I-80 and was available for CP/M-80 platforms as well as for VAX/VMS . Many expected that CP/M would be
8840-480: The Intel-contracted PL/M compiler into a commercial enterprise. The Kildalls intended to establish the Digital Research brand and its product lines as synonymous with "microcomputer" in the consumer's mind, similar to what IBM and Microsoft together later successfully accomplished in making " personal computer " synonymous with their product offerings. Intergalactic Digital Research, Inc. was later renamed via
8970-513: The NIAT, a custom handheld computer designed for A. C. Nielsen 's internal use with 1 MB of SSD memory. In 1979, a multi-user compatible derivative of CP/M was released. MP/M allowed multiple users to connect to a single computer, using multiple terminals to provide each user with a screen and keyboard. Later versions ran on 16-bit processors. The last 8-bit version of CP/M was version 3, often called CP/M Plus, released in 1983. Its BDOS
9100-665: The OS and BIOS (this was also a common problem in early DOS machines). Bill Gates claimed that the Apple II with a Z-80 SoftCard was the single most-popular CP/M hardware platform. Many different brands of machines ran the operating system, some notable examples being the Altair 8800 , the IMSAI 8080 , the Osborne 1 and Kaypro luggables , and MSX computers. The best-selling CP/M-capable system of all time
9230-644: The PATH environment variable, in the default system directory, or in the same directory as the program using it. COM server DLLs are registered using regsvr32.exe, which places the DLL's location and its globally unique ID ( GUID ) in the registry. Programs can then use the DLL by looking up its GUID in the registry to find its location or create an instance of the COM object indirectly using its class identifier and interface identifier. The following examples show how to use language-specific bindings to import symbols for linking against
9360-486: The PowerBASIC website has been switched to maintenance mode. This was heavily discussed in PB forums. The rights owner wrote that the website will not come back. CP/M CP/M , originally standing for Control Program/Monitor and later Control Program for Microcomputers , is a mass-market operating system created in 1974 for Intel 8080 / 85 -based microcomputers by Gary Kildall of Digital Research, Inc. CP/M
9490-553: The Rainbow was that it could continue to run 8-bit CP/M software, preserving a user's possibly sizable investment as they moved into the 16-bit world of MS-DOS. A similar dual-processor adaption for the CompuPro System 816 [ sr ] was named CP/M 8-16 . The CP/M-86 adaptation for the 8085/8088-based Zenith Z-100 also supported running programs for both of its CPUs. Soon following CP/M-86, another 16-bit version of CP/M
9620-496: The S83 was quoted as $ 32 in 1,000 unit quantities. On most machines the bootstrap was a minimal bootloader in ROM combined with some means of minimal bank switching or a means of injecting code on the bus (since the 8080 needs to see boot code at Address 0 for start-up, while CP/M needs RAM there); for others, this bootstrap had to be entered into memory using front-panel controls each time
9750-537: The Sharp MZ-800, a cassette-based system with optional disk drives, Personal CP/M was described as having been "rewritten to take advantage of the enhanced Z-80 instruction set" as opposed to preserving portability with the 8080. American Microsystems announced a Z80-compatible microprocessor, the S83, featuring 8 KB of in-package ROM for the operating system and BIOS, together with comprehensive logic for interfacing with 64-kilobit dynamic RAM devices. Unit pricing of
9880-552: The Turbo Basic product or runtime libraries. The following program is an example of the ALGOL -like BASIC dialect that Turbo Basic supported. Unlike traditional BASIC, which used line numbers and had limited control structures and no support for ALGOL-like subroutines, modern BASIC dialects starting at this period were extended to make the language compatible with modern structured programming style by making line numbers optional and adding
10010-402: The ancestor of Borland Delphi , and Multiplan , the ancestor of Microsoft Excel , also debuted on CP/M before MS-DOS versions became available. VisiCalc , the first-ever spreadsheet program, was made available for CP/M. Another company, Sorcim , created its SuperCalc spreadsheet for CP/M, which would go on to become the market leader and de facto standard on CP/M. Supercalc would go on to be
10140-481: The application itself. This concept of dynamic extensibility is taken to the extreme with the Component Object Model , the underpinnings of ActiveX . In Windows 1.x, 2.x and 3.x, all Windows applications shared the same address space as well as the same memory. A DLL was only loaded once into this address space; from then on, all programs using the library accessed it. The library's data was shared across all
10270-541: The application runs it uses the new DLL version. To work correctly, the DLL changes must maintain backward compatibility . Even the operating system can be upgraded since it is exposed to the applications via DLLs. System DLLs can be replaced so that the next time the applications run, they use the new system DLLs. In Windows API , DLL files are organized into sections . Each section has its own set of attributes, such as being writable or read-only, executable (for code) or non-executable (for data), and so on. The code in
10400-402: The application to perform additional processing or error handling when the DLL is loaded and/or any DLL function is called. In a source file, the keyword library is used instead of program . At the end of the file, the functions to be exported are listed in exports clause. Delphi does not need LIB files to import functions from DLLs; to link to a DLL, the external keyword
10530-510: The attribute __declspec before a function declaration. Note that when C functions are accessed from C++, they must also be declared as extern "C" in C++ code, to inform the compiler that the C linkage should be used. Besides specifying imported or exported functions using __declspec attributes, they may be listed in IMPORT or EXPORTS section of the DEF file used by the project. The DEF file
10660-420: The basic concepts and mechanisms of early versions of MS-DOS resembled those of CP/M. Internals like file-handling data structures were identical, and both referred to disk drives with a letter ( A: , B: , etc.). MS-DOS's main innovation was its FAT file system. This similarity made it easier to port popular CP/M software like WordStar and dBase . However, CP/M's concept of separate user areas for files on
10790-531: The blocking and deblocking and the management of a disk buffer area is handled by model-specific code in the BIOS. Customization is required because hardware choices are not constrained by compatibility with any one popular standard. For example, some manufacturers designed built-in integrated video display systems, while others relied on separate computer terminals. Serial ports for printers and modems can use different types of UART chips, and port addresses are not fixed. Some machines use memory-mapped I/O instead of
10920-404: The checksum of the executable, so it is not something that can be done with signed programs, or programs that are managed by a configuration management tool that uses checksums (such as MD5 checksums) to manage file versions. As more recent Windows versions have moved away from having fixed addresses for every loaded library (for security reasons), the opportunity and value of binding an executable
11050-452: The command line. These are referred to as "transient" programs. On completion, BDOS will reload the CCP if it has been overwritten by application programs — this allows transient programs a larger memory space. The commands themselves can sometimes be obscure. For instance, the command to duplicate files is named PIP (Peripheral-Interchange-Program), the name of the old DEC utility used for that purpose. The format of parameters given to
11180-491: The commonly used GDI API functions, but if you need one that is not included it is possible to obtain the hDC of any GRAPHIC target and thereby use GDI API functions on it. PowerBASIC provides an online forum for users to ask questions and share knowledge. On 8 July 2012 the forum had 5,623 members (only a fraction of them still active) and contained 50,093 threads comprising 408,642 posts since August 26, 1998. The Source Code section alone contained 3,768 threads. In early 2024
11310-443: The compiled code is fast enough for most purposes, the compilers also support inline assembler which can be used for hand optimization of critical routines. The Windows compilers (PBWin & PBCC) support almost all of the x86 instruction set , including FPU , SIMD , and MMX , the main exceptions being a few which are useful mostly to systems programmers. One can insert any unsupported instructions by inserting their opcodes with
11440-478: The compilers do not force you to use OOP, it is merely an option. In-process and out-of-process COM Servers can also be built using these compilers. Both the Console Compiler and Windows Compiler can create graphic windows. The GRAPHICs statements are higher-level than Windows' Graphics Device Interface (GDI) library functions. GRAPHIC WINDOWS are dedicated dialogs each containing a single control which fills
11570-427: The control structures and subroutine definitions needed for structured programming. ( s$ is a string and s is a single-precision floating-point (number). They are separate variables.) Like the other Borland products of this era, the code executes within the integrated development environment. PBDOS includes an integrated development environment (IDE) and supports DOS 3.30 and all later versions. PBCC
11700-614: The correct DPI settings for the IDE) have been released. PowerBASIC Tools LLC still sells new licenses for the 32-bit Windows compilers. PowerBASIC programs are self-contained and use no runtime file to execute. In all versions of the compiler, the applications compile without external libraries, though it can use such libraries if needed. PBDOS creates 16-bit DOS MZ executable files, while PBWIN and PBCC create 32-bit Portable Executable (PE) files. Borland's Turbo Basic contains extensions to classic BASIC (without breaking compatibility), such as
11830-411: The current working directory from the DLL search path. The Python ctypes binding will use POSIX API on POSIX systems. The Component Object Model (COM) defines a binary standard to host the implementation of objects in DLL and EXE files. It provides mechanisms to locate and version those files as well as a language-independent and machine-readable description of the interface. Hosting COM objects in
11960-413: The current working directory is looked up before the system library directories), and thus to a malicious version of the library. See the reference for Microsoft's guidance on safe library loading: one should use SetDefaultDllDirectories in kernel32 to remove both the application directory and the current working directory from the DLL search path, or use SetDllDirectoryW in kernel32 to remove
12090-487: The data sections of a DLL are usually private; that is, each process using the DLL has its own copy of all the DLL's data. Optionally, data sections can be made shared, allowing inter-process communication via this shared memory area. However, because user restrictions do not apply to the use of shared DLL memory, this creates a security hole ; namely, one process can corrupt the shared data, which will likely cause all other sharing processes to behave undesirably. For example,
12220-437: The dialog's client area. GRAPHIC controls are child windows which support the same GRAPHIC drawing functionality as GRAPHIC windows. GRAPHIC BITMAPS are also defined, again supporting the GRAPHIC drawing functionality, but as purely memory objects, like Windows bitmaps or DIB sections . Keyboard and mouse handling statements are included among the GRAPHIC statements. Character output to a GRAPHIC target uses fonts specified via
12350-403: The disk. From version 1.1 or 1.2 onwards, changing a disk then trying to write to it before its directory is read will cause a fatal error to be signalled. This avoids overwriting the disk but requires a reboot and loss of the data to be stored on disk. The majority of the complexity in CP/M is isolated in the BDOS, and to a lesser extent, the CCP and transient commands. This meant that by porting
12480-524: The following components: The only hardware system that CP/M, as sold by Digital Research, would support was the Intel 8080 Development System. Manufacturers of CP/M-compatible systems customized portions of the operating system for their own combination of installed memory, disk drives, and console devices. CP/M would also run on systems based on the Zilog Z80 processor since the Z80 was compatible with 8080 code. While
12610-734: The frame buffer. When drawing to a printer, the API calls had to be transformed into requests to a printer. Although it could have been possible to provide hard-coded support for a limited set of devices (like the Color Graphics Adapter display, the HP LaserJet Printer Command Language ), Microsoft chose a different approach. GDI would work by loading different pieces of code, called " device drivers ", to work with different output devices. The same architectural concept that allowed GDI to load different device drivers also allowed
12740-409: The home market had been largely unsuccessful and most CP/M software was too expensive for home users. In 1986 the magazine stated that Kaypro had stopped production of 8-bit CP/M-based models to concentrate on sales of MS-DOS compatible systems, long after most other vendors had ceased production of new equipment and software for CP/M. CP/M rapidly lost market share as the microcomputing market moved to
12870-456: The keyboard and conveys results to the terminal. CP/M itself works with either a printing terminal or a video terminal. All CP/M commands have to be typed in on the command line . The console most often displays the A> prompt, to indicate the current default disk drive. When used with a video terminal, this is usually followed by a blinking cursor supplied by the terminal. The CCP awaits input from
13000-546: The limited number of simple routines in the BIOS to a particular hardware platform, the entire OS would work. This significantly reduced the development time needed to support new machines, and was one of the main reasons for CP/M's widespread use. Today this sort of abstraction is common to most OSs (a hardware abstraction layer ), but at the time of CP/M's birth, OSs were typically intended to run on only one machine platform, and multilayer designs were considered unnecessary. The Console Command Processor, or CCP, accepts input from
13130-649: The location where the .exe file would be generated by the following code: The following examples show how to use the run-time loading and linking facilities using language-specific Windows API bindings. Note that all of the four samples are vulnerable to DLL preloading attacks , since example.dll can be resolved to a place unintended by the author (unless explicitly excluded the application directory goes before system library locations, and without HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode or HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\CWDIllegalInDLLSearch
13260-470: The lowest address of the BDOS was the Transient Program Area (TPA) available for CP/M application programs. Although all Z80 and 8080 processors could address 64 kilobytes of memory, the amount available for application programs could vary, depending on the design of the particular computer. Some computers used large parts of the address space for such things as BIOS ROMs, or video display memory. As
13390-434: The lowest level functions required by the operating system. These include reading or writing single characters to the system console and reading or writing a sector of data from the disk. The BDOS handles some of the buffering of data from the diskette, but before CP/M 3.0 it assumes a disk sector size fixed at 128 bytes, as used on single-density 8-inch floppy disks. Since most 5.25-inch disk formats use larger sectors,
13520-500: The magazine. Later versions of CP/M-86 made significant strides in performance and usability and were made compatible with MS-DOS. To reflect this compatibility the name was changed, and CP/M-86 became DOS Plus , which in turn became DR-DOS . ZCPR (the Z80 Command Processor Replacement) was introduced on 2 February 1982 as a drop-in replacement for the standard Digital Research console command processor (CCP) and
13650-449: The members for their support. When Bob Zale died, PBWin11 and PBCC7 were in beta testing , and 64-bit compilers and PB/Pro (PBWin and CC in one compiler) were in the alpha stages . However, development of PowerBASIC products has stopped. No new version has been released since v10.03 (11 years ago as of May 2022). No 64-bit version or beta release has been announced. No development activity has been reported. No corrections (such as adding
13780-523: The microcomputer industry. This computer platform was widely used in business through the late 1970s and into the mid-1980s. CP/M increased the market size for both hardware and software by greatly reducing the amount of programming required to port an application to a new manufacturer's computer. An important driver of software innovation was the advent of (comparatively) low-cost microcomputers running CP/M, as independent programmers and hackers bought them and shared their creations in user groups . CP/M
13910-434: The new location of the operating system in processor memory. This newly patched version can then be saved on a new disk, allowing application programs to access the additional memory made available by moving the system components. Once installed, the operating system (BIOS, BDOS and CCP) is stored in reserved areas at the beginning of any disk which can be used to boot the system. On start-up, the bootloader (usually contained in
14040-451: The operating system because "where there are literally thousands of programs written for it, it would be unwise not to take advantage of it", Xerox said. (Xerox included a Howard W. Sams CP/M manual as compensation for Digital Research's documentation, which InfoWorld described as atrocious, incomplete, incomprehensible, and poorly indexed. ) By 1984, Columbia University used the same source code to build Kermit binaries for more than
14170-507: The performance of the Pentium Pro microprocessor when launched, and ultimately limited the stability and scalability of the DOS-based versions of Windows. Although the DLL technology is core to the Windows architecture, it has drawbacks. DLL hell describes the bad behavior of an application when the wrong version of a DLL is consumed. Mitigation strategies include: The executable code of
14300-509: The programs during the linking stage of the two. With dynamic linking, shared code is placed into a single, separate file. The programs that call this file are connected to it at run time, with the operating system (or, in the case of early versions of Windows, the OS-extension), performing the binding. For those early versions of Windows (1.0 to 3.11), the DLLs were the foundation for the entire GUI. As such, display drivers were merely DLLs with
14430-487: The programs. This could be used as an indirect form of inter-process communication , or it could accidentally corrupt the different programs. With the introduction of 32-bit libraries in Windows 95 , every process ran in its own address space. While the DLL code may be shared, the data is private except where shared data is explicitly requested by the library. That said, large swathes of Windows 95 , Windows 98 and Windows Me were built from 16-bit libraries, which limited
14560-513: The same disk was never ported to MS-DOS. Since MS-DOS had access to more memory (as few IBM PCs were sold with less than 64 KB of memory, while CP/M could run in 16 KB if necessary), more commands were built into the command-line shell , making MS-DOS somewhat faster and easier to use on floppy-based computers. Although one of the first peripherals for the IBM PC was a SoftCard-like expansion card that let it run 8-bit CP/M software, InfoWorld stated in 1984 that efforts to introduce CP/M to
14690-427: The same time if they are run in a different environment, so there is no drawback for binding the imports. For example, all the standard Windows applications are bound to the system DLLs of their respective Windows release. A good opportunity to bind an application's imports to its target environment is during the application's installation. This keeps the libraries "bound" until the next OS update. It does, however, change
14820-488: The standard benefits of shared libraries , such as modularity . Modularity allows changes to be made to code and data in a single self-contained DLL shared by several applications without any change to the applications themselves. Another benefit of modularity is the use of generic interfaces for plug-ins. A single interface may be developed which allows old as well as new modules to be integrated seamlessly at run-time into pre-existing applications, without any modification to
14950-504: The standard operating system for 16-bit computers. In 1980 IBM approached Digital Research, at Bill Gates ' suggestion, to license a forthcoming version of CP/M for its new product, the IBM Personal Computer. Upon the failure to obtain a signed non-disclosure agreement , the talks failed, and IBM instead contracted with Microsoft to provide an operating system. The resulting product, MS-DOS , soon began outselling CP/M. Many of
15080-609: The system was started. CP/M used the 7-bit ASCII set. The other 128 characters made possible by the 8-bit byte were not standardized. For example, one Kaypro used them for Greek characters, and Osborne machines used the 8th bit set to indicate an underlined character. WordStar used the 8th bit as an end-of-word marker. International CP/M systems most commonly used the ISO 646 norm for localized character sets, replacing certain ASCII characters with localized characters rather than adding them beyond
15210-411: The user. A CCP internal command, of the form drive letter followed by a colon, can be used to select the default drive. For example, typing B: and pressing enter at the command prompt changes the default drive to B, and the command prompt then becomes B> to indicate this change. CP/M's command-line interface was patterned after the operating systems from Digital Equipment , such as RT-11 for
15340-681: Was CP/M-68K for the Motorola 68000 . The original version of CP/M-68K in 1982 was written in Pascal/MT+68k , but it was ported to C later on. CP/M-68K, already running on the Motorola EXORmacs systems, was initially to be used in the Atari ST computer, but Atari decided to go with a newer disk operating system called GEMDOS . CP/M-68K was also used on the SORD M68 and M68MX computers. In 1982, there
15470-454: Was able to increase the license to tens of thousands of dollars. Under Kildall's direction, the development of CP/M 2.0 was mostly carried out by John Pierce in 1978. Kathryn Strutynski , a friend of Kildall from Naval Postgraduate School (NPS), became the fourth employee of Digital Research Inc. in early 1979. She started by debugging CP/M 2.0, and later became influential as key developer for CP/M 2.2 and CP/M Plus. Other early developers of
15600-460: Was also a port from CP/M-68K to the 16-bit Zilog Z8000 for the Olivetti M20 , written in C , named CP/M-8000 . These 16-bit versions of CP/M required application programs to be re-compiled for the new CPUs. Some programs written in assembly language could be automatically translated for a new processor. One tool for this was Digital Research's XLT86 , which translated .ASM source code for
15730-417: Was continuing on new versions of PowerBASIC compilers. On November 2, 2016, Vivian Zale announced her intention to seek a buyer for the company. On January 31, 2017, Adam Drake announced Drake Software had acquired the PowerBASIC source code from PowerBASIC, Inc., with the intention of updating and improving the functionality of the product. This was later confirmed by Vivian Zale with a forum post thanking
15860-399: Was designed by David K. Brown. It incorporated the bank switching memory management of MP/M in a single-user single-task operating system compatible with CP/M 2.2 applications. CP/M 3 could therefore use more than 64 KB of memory on an 8080 or Z80 processor. The system could be configured to support date stamping of files. The operating system distribution software also included
15990-463: Was developed and released. ZCPR 3.3 no longer supported the 8080 series of microprocessors, and added the most features of any upgrade in the ZCPR line. ZCPR 3.3 also included a full complement of utilities with considerably extended capabilities. While enthusiastically supported by the CP/M user base of the time, ZCPR alone was insufficient to slow the demise of CP/M. A minimal 8-bit CP/M system would contain
16120-508: Was eventually displaced by DOS following the 1981 introduction of the IBM PC . Gary Kildall originally developed CP/M during 1974, as an operating system to run on an Intel Intellec-8 development system, equipped with a Shugart Associates 8-inch floppy-disk drive interfaced via a custom floppy-disk controller . It was written in Kildall's own PL/M ( Programming Language for Microcomputers ). Various aspects of CP/M were influenced by
16250-486: Was implemented in a DLL called GDI.EXE , the user interface in USER.EXE . These extra layers on top of DOS had to be shared across all running Windows programs, not just to enable Windows to work in a machine with less than a megabyte of RAM, but to enable the programs to co-operate with each other. The code in GDI needed to translate drawing commands to operations on specific devices. On the display, it had to manipulate pixels in
16380-426: Was initially written by a group of computer hobbyists who called themselves "The CCP Group". They were Frank Wancho, Keith Petersen (the archivist behind Simtel at the time), Ron Fowler, Charlie Strom, Bob Mathias, and Richard Conn. Richard was, in fact, the driving force in this group (all of whom maintained contact through email). ZCPR1 was released on a disk put out by SIG/M (Special Interest Group/Microcomputers),
16510-470: Was later called PBDOS. PowerBASIC went on to develop BASIC compilers for Windows, first PBWIN — their flagship product — and then PBCC, described below. On November 6, 2012, Robert Zale, the creator of PowerBASIC, died. For a time, it was assumed that the company might cease operations. His wife, Vivian Zale, posted on 8 March 2014 to the PowerBASIC forums a statement that the company would continue in operation. On May 10, 2015, Vivian Zale announced that work
16640-548: Was probably the Amstrad PCW . In the UK, CP/M was also available on Research Machines educational computers (with the CP/M source code published as an educational resource), and for the BBC Micro when equipped with a Z80 co-processor. Furthermore, it was available for the Amstrad CPC series, the Commodore 128 , TRS-80 , and later models of the ZX Spectrum . CP/M 3 was also used on
16770-465: Was the project manager for the evolving CP/M-86 line of operating systems. At this point, the original 8-bit CP/M became known by the retronym CP/M-80 to avoid confusion. CP/M-86 was expected to be the standard operating system of the new IBM PCs , but DRI and IBM were unable to negotiate development and licensing terms. IBM turned to Microsoft instead, and Microsoft delivered PC DOS based on 86-DOS . Although CP/M-86 became an option for
16900-422: Was written for CP/M than for operating systems that ran on only one brand of hardware. One restriction on portability was that certain programs used the extended instruction set of the Z80 processor and would not operate on an 8080 or 8085 processor. Another was graphics routines, especially in games and graphics programs, which were generally machine-specific as they used direct hardware access for speed, bypassing
#314685