MS OS/2 as well as MS-DOS! Plus you get the exceptional debug- ging power of Microsoft Code View, the revolutionary window- oriented source-level debugger. Microsoft BASIC compiler 6.0: it's the most advanced BASIC compiler available for the profes- sional nroqrammer.

Product Overview

Microsoft BASIC compiler version a powerful window-oriented tected mode or real mode. 6.0 supports the MS OS/2 and source-level debugger. You can There's also a new alternate MS-DOS operating systems, let- use Microsoft CodeView under fast math library for programs ting you create both protected- both MS OS/2 and MS-DOS, that don't use a math coprocessor, mode and real-mode programs. debugging programs as large as so your programs will run faster. This broad operating-system 128 MB under MS OS/2. And its And if you're interested in support, together with the debug- support for expanded memory writing instrumentation and manu- ging power of Microsoft CodeView, lets you debug large MS-DOS facturing control programs, you'll significant new language enhance- programs, too. appreciate the compiler's ability ments, and a host of new utilities, Multiple windows show you to trap and respond to hardware- makes Microsoft BASIC compiler everything that's going on—both or software-based user-defined the most advanced BASIC com- inside the program and inside the interrupts. piler available for the personal CPU—while the program is run- We've also added advanced computer environment —and ning. And Microsoft CodeView language features such as user- the total BASIC solution for the features a visual interface, plain- defined types, recursion, and huge professional. language commands, and on-line arrays. And new structured pro- gram constructs shorten your Take advantage of protected- help that make it easy to learn mode features. and use. development and maintenance time and simplify program logic. Under MS OS/2, there's no longer New power for professional programmers. Support for interlanguage a 640K limit to addressable mem- calling lets your BASIC programs ory, so your programs can use up Microsoft BASIC compiler version include modules written in several 128 6.0 includes a host of new fea- to 16 MB of real memory or MB Microsoft languages, including tures designed specifically for the of virtual memory! Microsoft C 5.1, QuickCT, FORTRAN 4.1, BASIC compiler version 6.0 also professional programmer. For Macro Assembler, and Pascal 4.0. supports other MS OS/2-specific example, you now have more con- Finally, you get Microsoft capabilities, including multitask- trol over which portions of the QuickBASIC version 4.0 with ing and direct calls to the oper- run-time library are linked to Microsoft BASIC compiler 6.0, ating system. your program, so you can create providing an instant development Debug faster with smaller standalone executables. environment for your MS-DOS Microsoft CodeView. And if you use the separate run- programs. time module, you can customize Microsoft BASIC compiler version it by adding your own routines— 6.0 includes Microsoft CodeView, whether you're working in pro-

, * / k, 1 ;t- ,, #I 1 Technical Highlights

New support for MS 0S12. with no symbols or full symbols, use Microsoft BASIC compiler version 6.0 language-specific expressions, and change gives you all the tools you need to cre- any symbol by name, including common. Th ate protected-mode programs for the shared, and local variables. For graphics- MS OS/2 environment. oriented applications, there's even a A flexible compiler, Microsoft screen-swapping function that lets you BASIC compiler version 6.0 lets you switch back and forth easily between choose whether you want to compile and your code and the resulting output. link your program to run in protected Debug in mixed languages. mode under MS OS/2 or in real mode Microsoft CodeView lets you debug under MS-DOS. mixed-language programs. In addition to Among the special MS OS/2 fea- BASIC, CodeView supports Microsoft C, • iple ii,zilows let von see eihin rl,i: -- both insule i/it 17, O. 1t11)1 tort/ mode the CPU— tures supported by Microsoft BASIC QuickC, FORTRAN, Macro Assembler, compiler 6.0 are the SHELL function and and Pascal. the OPEN PIPE: statement, which let Support for modular and Choice of three math libraries. your program communicate asynchro- structured programming. With Microsoft BASIC compiler version nously with other programs. Using By supporting modular and structured 6.0, you have a choice of three floating- SHELL, your program can start a pro- programming. Microsoft BASIC reduces point math libraries. The first, an 8087/ cess running and then continue executing, your development time, simplifies pro- so time-consuming tasks such as printing 80287/80387 library, offers the fastest gram logic, and makes your programs execution as well as high precision and won't slow it down. And OPEN PIPE: easier to maintain. Language features that lets it transfer information to and from requires the presence of a math copro- enhance this support include program- cessor. The second, a floating-point emu- other MS OS/2 programs during execu- ming constructs such as SELECT CASE, lator, provides the same 80-bit precision tion. Other new MS OS/2 features are DO ... LOOP, FUNCTION, and block without a coprocessor. Or if a copro- ON SIGNAL and SLEEP IF/THEN! ELSE/END IF statements. cessor is available at run time, the emu- Powerful debugging. lator switches to the coprocessor library Customized run-time modules. Microsoft BASIC compiler now comes instead. The third choice, an alternate You can compile your BASIC programs with Microsoft CodeView, the powerful math package, offers added speed with either as standalone executable files window-oriented source-level debugger. 64-bit precision for machines without or as files that require a Microsoft BASIC Microsoft CodeView gives you total con- a coprocessor- compiler 6.0 run-time module to execute. trol over your program's execution, sig- If you choose the latter, you can extend New language enhancements. nificantly shortening the debugging the standard BASIC run-time module We've significantly extended the capabili- . And now you can use CodeView with routines you write yourself. for both protected- and real-mode ties of the BASIC language with a broad This option, available for both range of enhancements. These include: programs. protected-mode and real-mode programs, • Neii' Improved error handling that lets H/ate/i Your code execute can result in considerably reduced pro- you use a common error-handling gram size on disk. By embedding often- The window-oriented visual interface routine for multiple-module programs. used routines in the run-time module, of Microsoft CodeView helps you catch • Ne-tt! User-defined events that let you where they can be instantly accessed problems quickly by letting you view write applications for test instrumen- by any application you create, you stream- source code, disassembly code, variables, tation and industrial control. line both the development process and registers, and stack—all at the same time. • User-defined data types and records your executable files. You can set and watch expressions and that let you organize data for easy variables, animate or single-step through access, simplifying file I/O. The first protected-mode editor. the program's execution, trace the con- • Recursioa so your subprograms and Microsoft Editor is a "smart" editor. It tents of the stack, and set conditional FUNCTION procedures can call them- lets you run programs from within itself breakpoints to stop execution whenever selves—a feature that's useful for tasks and reports compilation errors directly a variable or expression reaches a critical such as sorting. to the source code. value. The screen even updates auto- • Arra\z as large as available memory It's also programmable, so you can matically as the program executes, so you (up to l6MBof RAM or 128MBof customize it to meet your needs. For always see the current values in all the virtual memory under MS OS/2). example, you can change keyboard func- windows. • Long integers that eliminate rounding tions, create macros that perform com- plex editing functions with a single Y)ure in control. errors and increase speed in calculations p With Microsoft CodeView, you can debug involving very large whole numbers. keystroke, or write your own editing in your original source code or the • Fixed-length strings that can be used functions in C. resulting assembly language—or both with huge arrays to manipulate string You can even make Microsoft Editor at once. You can view assembly code data as large as available memory or to look like your favorite text editor. To hold string data in records.

—a Technical Highlights (coin.)

make the process simpler, it comes with - code, Microsoft QuickBASIC 4.0 incor- language and call them directly from built-in keystroke mapping to emulate porates your changes so quickly—usually your Microsoft BASIC programs. Alk BRIEF, WordStar, Epsilon, Microsoft at 150,000 lines per minute*_that it • ILINK, a high-speed incremental QuickC, and Microsoft QuickBASIC. seems instantaneous! linker for MS OS/2 programs that And since Microsoft Editor works in real Microsoft QuickBASIC comes with works up to 20 times faster than a full mode as well as protected mode, you a multi-window, multi-file, full-screen link because it only relinks the can use it to edit both MS-DOS and editor that automatically checks your modules that have been changed since MS OS/2 programs. code for syntax errors as you enter each the last link. Microsoft Qu1ckBASIC version 40 line. And if you aren't sure how to correct • MAKE, a maintenance utility that included, an error, context-sensitive help is avail- keeps your program components up To help you create MS-DOS programs able on line. to date by automatically recompiling faster than ever, we've included Microsoft Microsoft QuickBASIC also includes and relinking them as you make source QuickBASIC 4.0 with Microsoft BASIC a built-in code outliner that lets you code changes. compiler 6.0. With its in-memory editing view and manipulate all modules in • EXEPACK, a utility that removes null and debugging, Microsoft QuickBASIC memory. And you can edit any two sub- characters from EXE files and opti- provides an instant programming environ- programs or functions from a module mizes the relocation table, resulting in ment for MS-DOS programs, letting you simultaneously. smaller files and faster loading. move from one function to another Time-saving utilities. • EXEMOD, a utility that lets you fine- without compiling. You can run, edit and We've added several new utilities that tune file header information such as memory allocation values and the debug, then continue to run your pro- provide you with additional flexibility initial stack pointer, normally set by gram. There's no time-consuming corn- while also reducing your development default. pile step. And whenever you edit your and maintenance time. These include: U LIB, a library manager that lets you store modules written in any Microsoft Language Details

Program statements CALL DEFDBL FOR...NEXT ON...GOTO REM SIGNAL ON • OFF • STOP CALL ABSOLUTE DEFLNG FUNCTION ON KEY GOSUB RESET SLEEP CALLS DEFSTR GOSUB..RETURN ON PLAY GOSIJB RESUME STATIC CALL INT86OLD DIM GOTO ON SIGNAL RETURN STOP CALL INTERRUPT DO LOOP IF...THEN...ELSE ON TIMER RUN SUB END SUB CHAIN END (DEF • IF • SUB) INP ON UEVENT SELECT CASE SWAP COMMON ERASE LET OPTION BASE SHARED SYSTEM CONST ERR ON COM GOSUB PEEK SHELL TYPE DECLARE ERL ON ERROR GOTO POKE UEVENT ON • OFF • STOP DEFFN ERROR ON...GOSUB REDIM WAIT DEFINT EXIT (DO. FOR • DEF SUB) WHILE WEND DEFSNG Input/output statements & functions CLOSE DATA INPUT# LOCK NAME PRINT # SPC CLS EOF INPUTS LOF OPEN PRINT USING TAB COM FIELD KEY LPOS OPEN COM... PUT UNLOCK CSRLIN FILEATTR KILL LPRINT OPEN PIPE: READ WIDTH CVD FREEFILE LINE INPUT LPRINT USING OUT RESET WIDTH LPRINT CVI GET LINE INPUT# MKDS PCOPY RESTORE WRITE CVL INKEYS LOC MKIS PUS SEEK WRITE # CVS INPUT LOCATE MKSS PRINT Arithmetic functions ABS CINT COS EXP INT SGN SQR ATN CLNG CSNG FIX LOG SIN TAN CDBL String functions ASC CVS LEFTS MKDS MKSS RSET SIRS Am CHRS CVSMBF LEN MKDMBFS MKSMBFS RTRIMS STRINGS CVI HEXS [SET MKIS OCTS SADD UCASES CVD INSTR LTRIMS MKLS RIGHTS SPACES VAL CVDMBF LCASES MIDS Language Details (corn.)

Graphics statements & functions VIEW PRINT CIRCLE GET PALETTE PMAP PSET SCREEN WINDOW COLOR LINE PALETTE USING POINT PUT VIEW DRAW PAINT PEN PRESET Sound & music BEEP PLAY PLAY ON • OFF • STOP SOUND Special-purpose statements & functions VARPTR BLOAD COMMANDS ERDEV IOCTL RANDOMIZE TIMES VARSEG BSAVE DATES ERDEVS IOCTLS RMDIR TIMER TIMER ON • OFF • STOP VARPTRS CHDIR ENVIRONS FILES LBOUND RND CLEAR ENVIRON FRE MKDIR SETMEM UBOIJND Operators = I EQV MOD OR - + .-'= IMP NOT XOR *<> AND Metacommands SDYNAMIC SINCLUDE SSTATIC

• - r Specifications

System requirements Users Guide - Microsoft Code View and Utilities. • MS OS/2 1.0 or higher or MS-DOS 2.1 This manual describes the new features Microsoft Editor or higher (for MS-DOS. IBM x Person- of Microsoft BASIC compiler version 6.0. This comprehensive manual is a complete guide to the capabilities and operation al Computer or compatible required) Learning and Using Microsoft QuickBA SIC of the window-oriented debugger. text • 320K available user memory This user's manual describes the pro- editor, and other utilities included with • One double-sided disk drive and gramingni environment and features of the compiler. a hard disk Microsoft QuickBASIC version 4.0, NOTE: Use of i/ic Microsoft Mouse is opiioitaL including the compiler options available Shipping media Documentation for Microsoft BASIC compiler version 6.0. • 5 1/4" disks in standard MS-DOS and The manuals supplied with Microsoft Programming in BASIC Selected Topics MS OS/2 format. BASIC compiler version 6.0 come in This tutorial helps familiarize both pro- • 31/2" disks available at no charge; sturdy three-ring binders and are coin- fessionals and beginners with powerful details provided in package. prehensive, well organized, and full techniques in a variety of areas, including of illustrative examples. graphics, error handling, and file I/O. Complete examples are included on disk. BASIC Language Reference This reference manual describes the syntax and use of all BASIC commands, statements, and functions.

* On an IBM PC/AT n running at 8 MHz. This data sheet is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Microsoft. the Microsoft logo. MS. MS-DOS. and CodeVtew are registered trademarks and QuickC is a trademark of Microsoft Corporation.

IBM and PC/AT are registered trademarks of International Business Machines Corporation, BRIEF is a registered trademark of UnderWare. inc. Epsilon is a trademark of Lugaru Software Ltd. WordStar is a registered trademark of MicroPro International Corporation.

© Copyright 1988. Microsoft Corporation. All rights reserved. Printed in USA.

______ •. . . ., ,': Microsoft Corporation I)li NE 36th Way • IR,x 97017 • Redmond. WA 98073-9717 1287 Rio No. 098-007-229 FVIICIVSOft