HOME

TheInfoList



OR:

QBasic is an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(IDE) and interpreter for a variety of dialects of
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
which are based on
QuickBASIC Microsoft QuickBASIC (also QB) is an Integrated Development Environment (or IDE) and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on DOS, though there was also a short-lived version for the c ...
. Code entered into the IDE is compiled to an
intermediate representation An intermediate representation (IR) is the data structure or code used internally by a compiler or virtual machine to represent source code. An IR is designed to be conducive to further processing, such as optimization and translation. A "good" ...
(IR), and this IR is immediately executed on demand within the IDE. Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBasic is a
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection ( if/then/else) and repetition ( ...
language, supporting constructs such as
subroutine In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may ...
s.
Line number In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and increm ...
s, a concept often associated with BASIC, are supported for compatibility, but are not considered good form, having been replaced by descriptive
line label In programming languages, a label is a sequence of characters that identifies a location within source code. In most languages, labels take the form of an identifier, often followed by a punctuation character (e.g., a colon). In many high-le ...
s. QBasic has limited support for user-defined data types (
structures A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
), and several primitive types used to contain strings of text or numeric data. It supports various inbuilt functions. For its time, QBasic provided a state-of-the-art IDE, including a
debugger A debugger or debugging tool is a computer program used to software testing, test and debugging, debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the pr ...
with features such as on-the-fly expression evaluation and code modification.


History

QBasic was intended as a replacement for
GW-BASIC GW-BASIC is a dialect of the BASIC programming language developed by Microsoft from IBM BASICA. Functionally identical to BASICA, its BASIC interpreter is a fully self-contained executable and does not need the Cassette BASIC ROM found in the or ...
. It was based on the earlier
QuickBASIC Microsoft QuickBASIC (also QB) is an Integrated Development Environment (or IDE) and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on DOS, though there was also a short-lived version for the c ...
4.5 compiler but without QuickBASIC's compiler and linker elements. Version 1.0 was shipped together with
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
5.0 and higher, as well as
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
, Windows NT 3.x, and
Windows NT 4.0 Windows NT 4.0 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the direct successor to Windows NT 3.51, which was released to manufacturing on July 31, 1996, and then to retail ...
. IBM recompiled QBasic and included it in
PC DOS PC or pc may refer to: Arts and entertainment * Player character or playable character, a fictional character controlled by a human player, usually in role-playing games or computer games * ''Port Charles'', an American daytime TV soap opera * ...
5.x, as well as
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
2.0 onwards.
eComStation eComStation or eCS is an operating system based on OS/2 Warp for the 32-bit x86 architecture. It was originally developed by Serenity Systems and Mensys BV under license from IBM. It includes additional applications, and support for new hardwa ...
and
ArcaOS ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and l ...
, descended from OS/2 code, include QBasic 1.0. QBasic 1.1 is included with MS-DOS 6.x, and, without EDIT, in
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
,
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
and
Windows Me Windows Millennium Edition, or Windows Me (marketed with the pronunciation of the pronoun "me"), is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It is the successor to Windo ...
. Starting with
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RTM), releas ...
, Microsoft no longer includes QBasic with their operating systems, but still makes it available for use on newer versions of Windows.


Contents

QBasic (as well as the built-in
MS-DOS Editor __NOTOC__ MS-DOS Editor, commonly just called ''edit'' or ''edit.com'', is a TUI text editor that comes with MS-DOS 5.0 and later, as well as all "x86" SKUs of Windows, until Windows 11. It supersedes edlin, the standard editor in earlier versi ...
) is backwards-compatible with DOS releases prior to 5.0 (down to at least DOS 3.20). However, if used on any
8088 The Intel 8088 ("''eighty-eighty-eight''", also called iAPX 88) microprocessor is a variant of the Intel 8086. Introduced on June 1, 1979, the 8088 has an eight-bit external data bus instead of the 16-bit bus of the 8086. The 16-bit registers and ...
/
8086 The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allowi ...
computers, or on some
80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non-multiplexed address and data buses and also the fi ...
computers, the QBasic program may run very slowly, or perhaps not at all, due to DOS memory size limits. Until
MS-DOS 7 MS-DOS 7 is a real mode operating system for IBM PC compatibles. Unlike earlier versions of MS-DOS it was not released separately by Microsoft, but included in the Windows 9x family of operating systems. Windows 95 RTM reports to be MS-DOS 7.0, ...
, MS-DOS Editor and
Help Help is a word meaning to give aid or signal distress. Help may refer to: Arts, entertainment, and media Films * ''Help'' (2010 film), a Bollywood horror film * ''Help'' (2021 theatrical film), a British psychological thriller film * '' ...
required QBasic: the EDIT.COM and HELP.COM programs simply started QBasic in editor and help mode only, and these can also be entered by running QBASIC.EXE with the /EDITOR and /QHELP switches (i.e., command lines QBASIC /EDITOR and QBASIC /QHELP). QBasic came complete with four pre-written example programs. These were '' Nibbles'', a variant of the
Snake Snakes are elongated, Limbless vertebrate, limbless, carnivore, carnivorous reptiles of the suborder Serpentes . Like all other Squamata, squamates, snakes are ectothermic, amniote vertebrates covered in overlapping Scale (zoology), scales. Ma ...
game; ''
Gorillas Gorillas are herbivorous, predominantly ground-dwelling great apes that inhabit the tropical forests of equatorial Africa. The genus ''Gorilla'' is divided into two species: the eastern gorilla and the western gorilla, and either four or fi ...
'', an
artillery game Artillery games are two or three-player (usually turn-based) video games involving tanks (or simply cannons) trying to destroy each other. The core mechanics of the gameplay is almost always to aim at the opponent(s) following a ballistic trajec ...
; ''
MONEY MANAGER Investment management is the professional asset management of various securities, including shareholdings, bonds, and other assets, such as real estate, to meet specified investment goals for the benefit of investors. Investors may be instituti ...
'', a personal finance manager; and ''RemLine'', a Q-BASIC code line-number-removing program. QBasic has an
Easter egg Easter eggs, also called Paschal eggs, are eggs that are decorated for the Christian feast of Easter, which celebrates the resurrection of Jesus. As such, Easter eggs are common during the season of Eastertide (Easter season). The oldest tr ...
accessed by pressing and holding simultaneously after running QBasic at the DOS prompt but before the title screen loads: this lists ''The Team'' of programmers.


See also

*
Microsoft Small Basic Microsoft Small Basic is a programming language, interpreter and associated IDE. Microsoft's simplified variant of BASIC, it is designed to help students who have learnt visual programming languages such as Scratch learn text-based programming ...
*
QB64 QB64 (originally QB32) is a Self-hosting (compilers), self-hosting BASIC compiler for Microsoft Windows, Linux and Mac OS X, designed to be compatible with Microsoft QBasic and QuickBASIC. QB64 is a C++ Code generation (compiler), emitter, which ...


References


External links


Runnable QBasic 1.1
via the Internet Archives
Download QBASIC 1.1 from the Internet Archive

QB Express: Qbasic and Freebasic programming magazine
* : created in 1997, one of the oldest QBasic sites on the web

an introduction {{Authority control BASIC interpreters Discontinued Microsoft BASICs DOS software Articles with example BASIC code 1991 software BASIC programming language family Microsoft programming languages Programming languages created in 1991