Link:http://output.to/sideway/default.asp?qno=110700241 QBASIC MS DOS Command: QBASIC.EXEReference from Microsoft MS-DOS cmd help DescriptionStarts MS-DOS QBasic, a program that reads instructions written in the Basic computer language and interprets them into executable computer code. The QBasic program provides a complete environment for programming in the Basic language. QBasic includes extensive online Help. For more information about using QBasic, press ENTER immediately after starting QBasic or press F1 any time while running QBasic. SyntaxQBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI] [[/RUN][drive:][path]filename] Parameters
Switches
RemarksCannot use MS-DOS Editor if MS-DOS QBasic is not present To use MS-DOS Editor, you must have the QBASIC.EXE file in the current directory, or in the same directory as the EDIT.COM file in your search path. If you delete QBASIC.EXE to save space on your hard disk, you cannot use MS-DOS Editor. Running consecutive Basic programs You can run consecutive Basic programs from a batch file by using the Basic SYSTEM statement and the QBASIC command with the /RUN switch. A SYSTEM statement quits QBASIC and returns control to MS-DOS after a Basic program has run, instead of returning to QBasic. This allows you to run more than one Basic program from a batch file without having to intervene. Display of shortcut keys Some monitors may not support the display of shortcut keys by default. If your monitor does not display shortcut keys, use the /B switch (for CGA monitors) and the /NOHI switch (for systems that do not support bold characters). Link:http://output.to/sideway/default.asp?qno=110700239 PROMPT MS DOS Command: PROMPTReference from Microsoft MS-DOS cmd help DescriptionChanges the appearance of the command prompt. You can customize the command prompt to display any text you want, including such information as the name of the current directory, the time and date, and the MS-DOS version number. SyntaxPROMPT [text] Parameters
Related CommandsFor information about setting the current date and time, see the DATE and TIME commands. For information about ANSI escape sequences, see the ANSI.SYS topic. RemarksUsing the PROMPT command without the text parameter When you use the PROMPT command without specifying a value for text, PROMPT resets the command prompt to the default setting--the current drive letter followed by a greater-than sign (>). Using the $P value for text If you include the $P character in the text parameter, MS-DOS reads your disk after you enter each command to determine the current drive and path. This can take extra time, especially for floppy disk drives. Defining the MS-DOS command prompt in Windows If you use Microsoft Windows 3.1, you can change the command prompt with the WINPMT environment variable. For example, suppose you want the following message to precede the MS-DOS command prompt: Type "exit" when you're ready to return to Windows. To display this message, include the following command to your AUTOEXEC.BAT file: set winpmt=Type "exit" when you're ready to return to Windows.$_$p$g ExamplesThe following example sets the command prompt to display the current drive and path followed by the greater-than sign (>): prompt $p$g The following command displays a two-line prompt in which the current time appears on the first line and the current date appears on the second line: prompt time is: $t$_date is: $d If your CONFIG.SYS file loads ANSI.SYS, you can use ANSI escape sequences in your prompts. The following command, for example, displays your prompt in reverse video mode and returns to usual video mode for other text: prompt $e[7m$n:$e[m The characters following the escape code ($E) are ANSI escape sequences. Link:http://output.to/sideway/default.asp?qno=110700238 PRINT MS DOS Command: PRINT.EXEReference from Microsoft MS-DOS cmd help DescriptionPrints a text file while you are using other MS-DOS commands. This command can print in the background if you have an output device connected to one of your system's serial or parallel ports. SyntaxPRINT [/D:device] [/B:size] [/U:ticks1] [/M:ticks2] [/S:ticks3] [/Q:qsize] [/T] [[drive:][path]filename[ ...]] [/C] [/P] To install PRINT with the default parameters or to display the contents of the print queue on your screen without affecting the queue, use the following syntax: Parameters
Switches
Related CommandsFor information about configuring a printer connected to a parallel port, see the MODE (configure printer) command. For information about displaying the status of a printer, see the MODE (display device status) command. For information about configuring a printer connected to a serial port, see the MODE (redirect printing) command. For information about preparing printers for character-set switching, see the MODE (set device code pages) command. RemarksLength of a PRINT queue entry Each print queue entry can contain a maximum of 64 characters. Each queue entry includes the drive letter, directory, and any subdirectories. Limitations on switches You can only use the /D, /B, /U, /M, /S, and /Q switches the first time you use the PRINT command after starting MS-DOS. To use one of these switches after using PRINT, you need to restart MS-DOS. Use an application's print command when possible Many applications have their own print commands. You should use an application's print command to print files that you create with the application. ExamplesTo view the status of the print queue, type the following at the command prompt: MS-DOS displays the name of the file being printed (if any), the names of files in the queue, and an error message, if an error condition exists. The following command removes the PENCIL.TST file from the print queue: print a:pencil.tst /c The next command shows how to remove the file PENCIL.TST from the queue and add the file PEN.TST to the queue: print pencil.tst /c pen.tst /p The remaining examples use switches that work only with the first PRINT command you use after starting MS-DOS. The following command sets up the print queue for printing on LPT1: print /d:lpt1 To specify that the PRINT command is to wait 60 clock ticks for a printer to be available and that the MS-DOS scheduler is to allocate 25 clock ticks to the PRINT command for background printing rather than the default value of 8 clock ticks, type the following command: print /u:60 /s:25 The following example specifies that PRINT has 4 clock ticks available to print each character rather than the default value of 2 clock ticks: print /m:4 To change the default maximum number of files for the print queue, use the PRINT command with the /Q switch, as the following example shows: print /q:32 |
Sideway BICK Blog 29/07 |