Category : Tutorials + Patches
Archive   : DOSTIPS6.ZIP
Filename : DOSSCRN

 
Output of file : DOSSCRN contained in archive : DOSTIPS6.ZIP
More Browse Power
(PC Magazine Vol 6 No 2 Jan 27, 1987 User-to-User)

The FASTSCRN.BAS program in PC Mag Vol 5 No 17 October 14, 1986
User-to-User for displaying screens rapidly was good, but there is an
even easier way to accomplish the same thing. Just copy the BROWSE.COM
utility (PC Mag Vol 5 No 6 March 25, 1986 to another file named
DISPSCRN.COM and patch it by using DEBUG.COM:

A>DEBUG DISPSCRN.COM
-E 02AC EB 37
-W
-Q

Use any editor to create an ASCII text file (e.g., MENU.TXT) and
display this text file with the command:

DISPSCRN MENU.TXT

Although this method does not allow you to specify screen colors
as part of the menu, it has the advantage of working directly with the
text file instead of creating an additional .COM file.
To change a menu, you need only change the actual text in the
file. Since the program displays the end-of-file character as a right
arrow, be sure to add a few extra carriage returns to the end of your
text file so that it exceeds 25 lines.
The DISPSCRN program works exactly like the BROWSE command until
the first screen has been displayed. The patch inserts a JMP
instruction at this point, and the program branches to the middle of
the terminate sequence, closes the file, and returns control to DOS,
dBASE, or wherever it was called from.
Editor's Note: This will work, but it has several drawbacks.
BROWSE.COM picks up the existing screen colors, so if you want
different ones you have to run a short color-changing program
beforehand.
PCCOLOR.BAS lets you choose your border, text, and background
colors, and also lets you decide whether or not you would like to clear
the screen before you set the colors. PCCOLOR.BAS creates a short
program called PCCOLOR.COM. If you want different color clearing and
setting versions, rename th old versions before you create the new.
Another drawback to this method is that DISPSCRN.COM leaves the
cursor where it was when DOS executed it -- which means you may end up
with a distracting blinking cursor halfway up the left edge of your
screen. You have to fill out the text file with carriage returns to
avoid displaying CHR$(26)s. And using it means you have to keep one
more file on your disk in addition to the text files it displays.

100 'PCCOLOR.BAS
110 'Creates PCCOLOR.COM with or without CLS feature
120 '
130 ' Setup
140 '
150 SCREEN 0:KEY OFF:COLOR 3,0,0:LOCATE ,,0:CLS:DIM C1$(40),C2$(36)
160 FOR A=1 TO 40:READ A$:C1$(A)=A$:NEXT
170 FOR A=1 TO 36:READ A$:C2$(A)=A$:NEXT
180 '
190 ' Ask which version to create
200 '
210 'PRINT TAB(18);"Do you want this to clear the screen (Y/N)? ";
220 'W$=INPUT$(1):IF INSTR("YyNn",W$)=0 THEN 220 ELSE PRINT W$:PRINT
230 '
240 ' Get inputs
250 '
260 COLOR 3:PRINT "FOR BORDER -- ";:GOSUB 510:BORD$=I$
270 COLOR 3:PRINT "(Anything higher than 7 will blink:)"
280 COLOR 3:PRINT "FOR BACKGROUND -- ";:GOSUB 510:BACK$=I$
290 COLOR 3:PRINT "FOR FOREGROUND (TEXT) -- ";:GOSUB 510
300 IF I$=BACK$ THEN BEEP:GOTO 290 ELSE FORE$=I$
310 '
320 ' Create file
330 '
340 OPEN "PCCOLOR.COM" AS 1 LEN=1:FIELD 1,1 AS B$
350 IF INSTR("Nn",W$) THEN 380
360 C1$(14)=BORD$:C1$(28)=BACK$+FORE$
370 FOR A=1 TO 40::LSET B$=CHR$(VAL("&H"+C1$(A))):PUT 1:NEXT:GOTO 400
380 C2$(6)=BORD$:C2$(23)=BACK$+FORE$
390 FOR A=1 TO 36::LSET B$=CHR$(VAL("&H"+C2$(A))):PUT 1:NEXT
400 PRINT "PCCOLOR.COM created.":CLOSE:END
410 '
420 ' DATA
430 '
440 DATA 29,C0,1E,50,B8,03,00,CD,10,B8,00,0B,BB,00,00,CD,10,B8,00,06
450 DATA B9,00,00,BA,50,20,B7,00,CD,10,B4,02,BA,00,00,B7,00,CD,10,CB
460 DATA B4,0B,B7,00,B3,00,CD,10,B8,00,B8,8E,D8,BE,00,00,B9,D0
470 DATA 07,C6,44,01,00,83,C6,02,49,85,C9,75,F4,B8,00,4C,CD,21
480 '
490 ' Input subroutine
500 '
510 COLOR 3,0:PRINT "Pick a color: ";
520 COLOR 0,7:PRINT "0";:COLOR ,0:PRINT CHR$(32);
530 FOR A=1 TO 15:COLOR A,0:PRINT HEX$(A);CHR$(32);:NEXT:PRINT
540 I$=INPUT$(1):IF INSTR("0123456789ABCDEFabcdef",I$)=0 THEN 510
550 PRINT STRING$(80,196);:RETURN



  3 Responses to “Category : Tutorials + Patches
Archive   : DOSTIPS6.ZIP
Filename : DOSSCRN

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/