home *** CD-ROM | disk | FTP | other *** search
- A PC Typewriter
- (PC Magazine Vol 5 No 13 July 1986 PC Tutor)
-
- You can make your PC act like a typewriter with the command:
-
- COPY CON PRN
-
- Although the COPY command is generally used for files, it can also copy
- between devices. "CON" means console and refers to both the keyboard
- and screen. It will be the keyboard in this case since that's where
- you're copying from. "PRN" is your printer. After you enter this
- command, you can start typing. Press Enter after each line you type.
- If you make a mistake on a line, you can use the Backspace or Left
- Arrow key to correct it, but after you hit Enter, you're stuck with
- the line. The text won't appear on the printer until you're done.
- To finish, press the F6 key (or Ctrl-Z) and press Enter. This is an
- "End of File" signal for the COPY command. The text will then be
- printed. If you type a Ctrl-L before the Ctrl-Z, you'll get a formfeed
- after the text is printed.
-
- -----------------------------------------------------------------
- ANSI.SYS Takes the Keys
- (PC World August 1986 The Help Screen)
-
- ANSI.SYS enables you to redefine keys, although this capability
- is negligible compared to that of macro processors such as ProKey,
- SuperKey, and Keyworks. Many programs, including the BASIC interpreter,
- displace installed screen and keyboard drivers with their own.
- Nevertheless, assigning definitions to DOS function keys remains
- useful.
- Be sure the line DEVICE=ANSI.SYS is in your CONFIG.SYS file. Then
- use KEY.BAT. Once KEY.BAT is run, you can press <Alt>-0 to return the
- function keys to their default DOS assignments and press <Alt>-1 when
- you want to restore the definitions in KEY.BAT.
-
- KEY.BAT:
-
- echo off
- cls
- if on==%1 goto on
- if ON==%1 goto on
- if off==%1 goto off
- if OFF==%1 goto off
- goto help
- :on
- echo on
- prompt $e[0;59;"DIR "p
- prompt $e[0;60;"TYPE "p
- prompt $e[0;61;"COPY "p
- prompt $e[0;62;"ERASE "p
- prompt $e[0;63;"A: "p
- prompt $e[0;64;0;64p
- prompt $e[0;65;"B: "p
- prompt $e[0;66;"C: "p
- prompt $e[0;67;"D: "p
- prompt $e[0;68;"A:BASICA "
- prompt $e[0;120;"A:KEY ON";13p
- prompt $e[0;129;"A:KEY OFF";13p
- echo off
- cls
- echo The function keys have been redefined.
- echo Press Alt-0 when you want to return the default DOS definitions.
- echo Press Alt-1 when you want to restore these definitions.
- goto end
- :off
- echo on
- prompt $e[0;59;0;59p
- prompt $e[0;60;0;60p
- prompt $e[0;61;0;61p
- prompt $e[0;62;0;62p
- prompt $e[0;63;0;63p
- prompt $e[0;64;0;64p
- prompt $e[0;65;0;65p
- prompt $e[0;66;0;66p
- prompt $e[0;67;0;67p
- prompt $e[0;68;0;68p
- echo off
- cls
- echo The function keys have been returned to their default DOS definitions.
- echo Press Alt-1 when you want to restore the KEY.BAT definitions.
- echo Press Alt-0 when you want to return the default DOS definitions.
- goto end
- :help
- echo Type KEY ON to activate KEY.BAT key definitions
- :end
- prompt $p$g
-
- -----------------------------------------------------------------
- Lone Star Look
- (PC World September 1986 Star-Dot-Star)
-
- You can design a DOS prompt that displays the state flag of Texas
- on a color system when ANSI.SYS is installed. The trick is adding
- ANSI.SYS commands to the DOS prompt. When the prompt is displayed,
- the ANSI.SYS driver generates the image. The $p$g near the end of the
- PROMPT command displays the current path and the greater-than symbol to
- the right of the flag. When you actually create the PROMPT command,
- replace each of the 19 carets (^) with a space, and in the place of
- each of the 5 exclamation points, hold down the Alt key, type 223 on
- the numeric keypad, and then release the Alt key.
- Instead of scrolling when it reaches the bottom of the screen,
- the flag prompt leaves a partially drawn image. The image, though
- perhaps inelegant, is unique.
-
- -----------------------------------------------------------------
- Forced Entry
- (PC Magazine Vol 5 No 18 Oct 28, 1986 User-to-User)
-
- A certain battery-powered clock that sets the time and date
- requires the Enter key to be hit twice. ENTER.COM places the scan
- code for the Enter key into the first two memory locations of the
- keyboard buffer. Create ENTER.COM by using the ENTER.SCR file below,
- then redirect this script file into any version of DEBUG 2.0 or later
- with DEBUG < ENTER.SCR. Then just precede the DATE and TIME commands
- in the AUTOEXEC.BAT file with the command ENTER.
-
- N ENTER.COM
- A
- PUSH AX
- PUSH DS
- MOV AX,0040
- MOV DS,AX
- MOV AX,1C0D
- MOV [001E],AX
- MOV [0020],AX
- MOV AX,001E
- MOV [001A],AX
- MOV AX,0022
- MOV [001C],AX
- POP DS
- POP AX
- INT 20
-
- RCX
- 20
- W
- Q
-
- Editor's Note: It's crazy for a board manufacturer to insist that
- users hit the Enter key manually to read the time and date from a
- clock into DOS. Preceding TIME and DATE with ENTER will save the
- manual key taps, but it's just as easy to create a small file called
- CR that contains nothing but a carriage return and then redirect it
- into DOS:
-
- TIME < CR
- DATE < CR
-