Category : Word Processors
Archive   : BROWSE31.ZIP
Filename : TUTORIAL.DOC

 
Output of file : TUTORIAL.DOC contained in archive : BROWSE31.ZIP
Richcraft, Drawer 1065, Wahmeda Industrial Park, Chautauqua, NY 14722

type BROWSE TUTORIAL.DOC and press enter version 3.1

INTRODUCTION:
In this brief tutorial we will demonstrate how to modify a .COM file using
both BROWSE.COM and the EDMOD.OBJ programs. The EDMOD.OBJ screen layout is
displayed at the end of this tutorial. In BROWSE press the End key to display
it and then the Home key to return here.

BACKGROUND:
The venerable EDLIN.COM program goes back a long, long way. Some users love it
and some users hate it. 'You pays your money and takes your choice,' the madam
said. For some idiotic reason, Microsoft/IBM in their wisdom chose to have
EDLIN.COM test the version of DOS that it was running in, and IF it did not
match the version of EDLIN.COM, display the 'Incorrect DOS version' message.
It then exits to the DOS> prompt.

Why not use the correct version? Quite simply because the orginal DOS 3.3
version of EDLIN.COM, dated 3-17-87, 7526 bytes in length, could handle files
about 33% longer files than either the DOS 4.0 or DOS 5.0 versions. Why? Who
knows what evil lurks in the hearts of men? Only Microsoft/IBM know. The DOS
5.0 version of EDLIN.COM added a HELP page, extended the maximum line length,
and added umpteen unnecessary error messages, but who needs or wants this
foolishness and why did it take a 5100 byte longer program that could only
handle 2/3rds as many bytes as the DOS 3.3 version? So.....let's ignore it
and modify the original DOS 3.3 version of EDLIN.COM to work with any version
of DOS. Only 1 byte needs to be changed.

HOW TO DO IT:
If you used INSTALL.BAT to move all the BROWSE files from A: to C:\DEMO, you
will find the file EDLIN33.COM in the DEMO subdirectory. This is the original
March 17, 1987 DOS 3.3 EDLIN.COM. There is no copyright notice in the file, so
we may assume it is not copyrighted and may legally modify it any way we wish.

STEP 1:
In C:\DEMO load it by typing BROWSE EDLIN33.COM and then press enter. Since
it is a .COM file BROWSE will display the raw first 2000 bytes of EDLIN33.COM
that start at segment 2000H, location zero. Press enter to move up 2000 bytes.
Press the minus/dash/hyphen key (the dash on the underline key) to move back
down 2000 bytes. When BROWSE loaded EDLIN33.COM from C:\DEMO, it also loaded
EDMOD.OBJ from C:\DEMO into high memory at segment 9000H:8000H.

STEP 2:
Press the F10 key to go to EDMOD. EDMOD will display the first 1024 bytes of
EDLIN33.COM starting at segment 2000H. We can logically assume that EDLIN33
somewhere in its 7526 bytes tests the DOS version that it is running in, and
if it does not match the version of EDLIN33.COM, then displays the 'Incorrect
DOS version' message and exits to the DOS> prompt. Interrupt 21H returns the
DOS version when AH is set to 30H and returns the major DOS version in AL and
the minor version in AH upon return from the interrupt.

STEP 3:
EDMOD has a global search (all segments feature) for a string, either ASCII or
optionally hex or mixed. It searches from the bottom of segment 0000H to the
top of segment F000H in about 2 or 3 seconds. With the 'EDIT MODE' message
green in EDMOD (not yellow 'MODIFY MODE' - the F2 key toggles it on and off),
press the S key (Caps Lock on & Num Lock off). The screen will clear and
SEARCH will appear at the top plus F3 for hex as a reminder.

STEP 4:
The return DOS version instruction consists of:

source code MOV AH,30H - INT 21H
program code B4 30 CD 21 <-- in hex; see Intel's iAPX 86/88,
186,188 User's Manual pages A1-A9
All we need do now is:
press F3 for hex input - press B then press 4 = B4H
press F3 for hex input - press 3 then press 0 (zero) = 30H
press F3 for hex input - press C then press D = CDH
press F3 for hex input - press 2 then press 1 = 21H

Now press enter to start the search. In a fraction of a second the top of the
display will show: 2000:049E which is the segment in hex and the location in
hex of the above instructions. A second or two later it will display DONE.
Press enter to exit search mode and return to the first 1024 bytes of segment
2000H. BEGIN will display 0000 and END will display 03FF.

STEP 5:
Since location 2000H:049EH is up a page in memory from where we are now, press
enter to move up a page. Press F2 to toggle the green EDIT MODE letters to
MODIFY MODE (turns yellow). Yellow stands for caution, so be careful. The
large blinkling cursor appears in the upper left corner of the outlined
window. Press the down arrow key twice. MEMORY now displays 0480. Press the
right arrow key 30 times till MEMORY displays 049E and the bottom left of the
screen displays the instruction, MOV AH.
0030
STEP 6:
This where SEARCH told us we would find it. Pressing the + key on the keypad
at the far right side of the keyboard will turn DISASSEMBLY yellow, move the
blinking cursor right 2 spaces, and display on the bottom left of the screen,
INT 21. Press the keypad + again and the cursor will move 2 spaces to the
right and the bottom left of the screen will display CMP AX,1E03. This is
EDLIN's test for DOS 3.3. The 03 is the major version and the 1E the minor.
One more press of the keypad + key will move the cursor right 3 spaces and
display on the bottom left of the screen, JZ 04B5. VALUE on the screen
displays 0074 which is the instruction, JZ. This where we want to change the
74 hex JZ instruction to an EB hex JMP short insruction which will allow us to
use EDLIN33.COM with most any version of DOS. EB hex is an unconditional JMP.

STEP 7:
Press F3 for hex modify, and then press E then B. The cursor will move 1
space to the right. Move it back where it was by pressing the left arrow key.
VALUE will change to 00EB and the bottom left of the screen will display JMP
04B5. This is an unconditional jump, so the Z flag that was cleared by the
previous compare instruction (assuming you not running DOS 3.3) is ignored.
Now press F2 to go to EDIT MODE and press the F1 ket to exit EDMOD and return
to BROWSE. Now in BROWSE press the Ctrl and S keys to save the updated file
in C:\DEMO. Press the Esc key to exit BROWSE and go to the DOS> prompt.
EDLIN33.COM will now work with any version of DOS from 3.0 on up thru DOS 6.0.

CONCLUSION:
BROWSE and EDMOD are fun and games programs. You may enter EDMOD from the
DOS> prompt with or without running BROWSE by typing GOEDMOD and pressing
enter. The only caution is:

- In EDIT MODE pressing the F10 key will clear the displayed page of 1024
bytes to zeros. Depending upon where you are in memory it can be a help
or hindrance. Obviously zeroing out part of the operating system is not
a wise move. Zeroing out part of BROWSE.COM or EDMOD.OBJ is a no-no.
Be sure you know exactly what you are doing when you use F10 in EDIT MODE
or change memory values when you are in MODIFY MODE. In MODIFY MODE,
pressing any alphanumeric key will place its value beneath the large
blinking cursor and advance the cursor one byte.

If you have a mouse driver loaded, EDMOD may be mouse driven as well as
keyboard driven; i.e., move the mouse cursor to F5 on the bottom of the
screen and click the left button over change segment. Now move the mouse
cursor to the 2nd line from the top of the screen and click the left button
over the segment you wish to go to. Caution: clicking the right mouse
button will immediately return you to the DOS> prompt. If wish to return
to EDMOD just type GOEDMOD and press enter.

Edit/Modify 1024K Mem and Kiss Disassembler (C) 1977 - 1993
0123456789ABCDEF
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
BEGIN º 0000000000000000000000000000000000000000000000000000000000000 º DSseg
0000 º 0000000000000000000000000000000000000000000000000000000000000 º 2000
º 0000000000000000000000000000000000000000000000000000000000000 º
MEMORY º 0000000000000000000000000000000000000000000000000000000000000 º CSseg
0000 º 0000000000000000000000000000000000000000000000000000000000000 º 9000
º 0000000000000000000000000000000000000000000000000000000000000 º
VALUE º 0000000000000000000000000000000000000000000000000000000000000 º ESseg
0000 º 0000000000000000000000000000000000000000000000000000000000000 º B800
º 000000 displays memory from location zero to 03FF here 000000 º
EDIT º 0000000000000000000000000000000000000000000000000000000000000 º SSseg
MODE º 00000000000000000000 in segment 2000H 00000000000000000000000 º 9000
º 0000000000000000000000000000000000000000000000000000000000000 º
DISAS- º 0000000000000000000000000000000000000000000000000000000000000 º SP
SEMBLY º 0000000000000000000000000000000000000000000000000000000000000 º 03F6
º 0000000000000000000000000000000000000000000000000000000000000 º
HEX º 0000000000000000000000000000000000000000000000000000000000000 º END
INPUT ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ 03FF
º : Up 1024 bytes º : Move cursor º
UNUSED º : Down 1024 bytes º : <- ^ v -> º
º : Toggle modify mode º : Change Seg 0 -F º
º : Hex Modify º : Disassemble Memory º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ


  3 Responses to “Category : Word Processors
Archive   : BROWSE31.ZIP
Filename : TUTORIAL.DOC

  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/