home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
500
/
488
/
command.mod
< prev
next >
Wrap
Text File
|
1982-10-28
|
10KB
|
394 lines
PC/DOS R1.1 Resident COMMAND.COM Modification
RESIDENT COMMAND INTERPRETER
by
John Chapman
844 S. Madison St.
Hinsdale, Illinois 60521
COMPUSERV ID 70205,1217
DISCLAIMER
This modification is provided without warranty of any kind. The
author assumes no liability for failure of this code to perform
in any environment. The user is completely responsible for
determining the applicability of this modification to a
particular environment.
LIMITATIONS
This modification causes the transient portion of COMMAND.COM to
be made resident at system IPL. Re-booting the system with an
unmodified COMMAND.COM is the only way to remove this
modification.
This modification alters the starting segment [paragraph] address
available to programs, lowering the amount of storage available
by 4288 bytes [for PC/DOS 1.1 with a normal load segment address
of 02C1. The starting segment of COMMAND.COM can be found at
location 0000:9E, and should display [debug] as
0000:009E 2C 01
John Chapman [Compuserv 70205,1217] Page 1
PC/DOS R1.1 Resident COMMAND.COM Modification
PC/DOS Initialization Overview
The IBM Personal Computer DOS is brought in from disk by the
bootstrap loader read from track 0 of drive A by the ROM routines
after the initial hardware tests are performed at power-on, and
subsequently when ALT-CTRL-DEL re-boot is requested. In both
cases, the following sequence occurs:
1) The "boot" program is read from track 0.
2) It reads IBMBIO.COM from a specific location
3) IBMBIO is given control and builds the environmental
control blocks, initializes peripherals, and then
reads IBMDOS.COM from its specific location on disk
4) IBMDOS is passed control. After initializing the
remainder of the operating system, IBMDOS loads
the COMMAND.COM file [the command interpreter], and
passes it control
5) The command interpreter immediately relocates all of the
main line code for command prompting, parsing, and the
code which supports the resident commands to the high end
of memory, where it can be more easily destroyed by
wandering programs.
6) Resident COMMAND.COM will now [pretend to] detect a
checksum error in the transient portion of itself,
immediately causing a Re-load from disk, thus setting
the tone for a long and tedious interaction, interrupted
frequently by disk I/O and requests for a DOS disk
in the default drive.
This set of two DEBUG scripts will alter the IBM Personal
Computer DOS command interpreter (COMMAND.COM) to remain entirely
resident, rather than be half resident and half transient. The
whole purpose of this modification is to suppress 99% of the
occurrances of the refresh of the transient portion. This will
remove the requirement to ALWAYS have a disk with a valid
COMMAND.COM in drive A. This change has been especially useful
with multiple DISKCOPY type activities, and with those
application packages which use all of memory, including the top
4880 bytes where the transient COMMAND.COM resides.
**NOTE**
We have experienced a limited number of cases where the
refreshable, or transient portion of COMMAND.COM, which now
resides in LOW memory, has been damaged. This damage causes the
checksum code to refresh the transient portion from dosk. If you
experience repeated occurances of this, see Part Two ov this
modification.
John Chapman [Compuserv 70205,1217] Page 2
PC/DOS R1.1 Resident COMMAND.COM Modification
Part One
Begin installation by copying the "model" PC/DOS diskette you
wish to modify onto a fresh diskette using DISKCOPY. If you are
producing a system diskette that will NOT have a copy of the
DEBUG command on it, you must have a diskette with DEBUG
available.
Part One: DEBUG Script
DEBUG COMMAND.COM <cr>
-d,0460,0479 <cr>
XXXX:0460 46 00 A3 03 01 A1 02 00-8C 1E 05 01 A3 52 04 2D
XXXX:0470 0C 01 90 A3 4F 04 E8 1B-FE E8
-d,10D3,10D7
XXXX:10D3 8C C8 05 C0 00
**Verify the above displayed bytes. THE CONTENTS OF THIS DISPLAY
MUST MATCH EXACTLY. If any discrepancies are detected, DO NOT
INSTALL ANY OF THE PATCH WHICH FOLLOWS.
-e,460,54,00,A3,4F,04,05,0C,01 <cr>
-e,46C,40,A3,03,01,A1,02,00,A3,52 <cr>
-e,479,B8 <cr>
-e,658,90,A1,02,00,2B,06,9F <cr>
-e,65F,0F,BA,10,00,F7,E2,73 <cr>
-e,10D3,90,A1,02,00,48 <cr>
**The above enters the first section of the patch.
John Chapman [Compuserv 70205,1217] Page 3
PC/DOS R1.1 Resident COMMAND.COM Modification
Part One (Continued)
Next, we will display the modified code, to verify that the patch
was correctly installed:
-u,045F,0479 <cr>
ADD AX,0054
MOV [044F],AX
ADD AX,010C
MOV [0105],DS
INC AX
MOV [0103],AX
MOV AX,[0002]
MOV [0452],AX
CALL 0294
MOV AX,FDB4
-u,0658,0665 <cr>
NOP
MOV AX,[0002]
SUB AX,[0F9F]
MOV DX,0010
MUL AX,DX
JNC 066A
-u,10D3,10D7
NOP
MOV AX,[0002]
DEC AX
Before proceeding to the next entry, you must verify that the
display produced by "Unassemble" on your machine matches the
display shown above; if it does, then proceed with:
-w <cr>
WRITING 135F BYTES
-q <cr>
A> ***WHEN THE "A" PROMPT APPEARS YOU ARE READY TO REBOOT***
You should use this modification with only this portion installed
UNLESS you encounter any of the problems described in the second
section.
Please do not install PART TWO of this modification unless you
experience a problem using PART ONE by itself.
John Chapman [Compuserv 70205,1217] Page 4
PC/DOS R1.1 Resident COMMAND.COM Modification
Part Two: Refresh Suppression
We have experienced a limited number of cases where the 'refresh'
of the transient portion of COMMAND.COM, which now resides in LOW
memory, has been damaged. This damage causes the checksum code
to refresh the transient portion from disk.
The changes provided in Part Two allow specific protection
against the damage possible in an environment where a program[s]
has been written with specific architecture dependencies.
IF, and ONLY IF, you receive the "Insert DOS Disk in DRIVE A and
strike any key when ready" message, or see that an unsolicited
I/O
has occurred on the default drive during program execution..
AND ONE OF THESE OCCURANCES IS FOLLOWED BY A SYSTEM "HANG"
If it becomes necessary to apply Part TWO, please document to the
author the circumstances that caused the hang, including, if
possible, the [source] program that was executing. If the
software you were using is proprietary, please indicate:
a) The package name, vendor, etc.
b) The memory size on your machine, and
c) The language used to produce the program which caused the
modified command interpreter to "hang".
**PLEASE REPORT BUGS** to the address/id shown on the first
page.
John Chapman [Compuserv 70205,1217] Page 5
PC/DOS R1.1 Resident COMMAND.COM Modification
Part Two: DEBUG Script
DEBUG COMMAND.COM <cr>
-d,111B,111E <cr>
XXXX:111B 3B D1 77 51
-d,1134,1137 <cr>
XXXX:1136 3B D1 77 38
As before, be sure that the displays above match your system, and
do not enter the patch below unless each byte verifies.
-e,023A,90,90 <cr>
-e,0242,90,90 <cr>
-e,0246,90,90 <cr>
-e,03ED,00 <cr>
-e,111D,90,90 <cr>
-e,1136,90,90 <cr>
-w <cr>
WRITING 135F BYTES
-Q <cr>
A> *** reboot at this point ***
John Chapman [Compuserv 70205,1217] Page 6