There are no other files named patmon.rno in the archive.
SYSTEM PROGRAMMING PROCEDURES
.title SYSTEM PROGRAMMING PROCEDURES
^&PATCHING AND DEBUGGING THE MONITOR WITH DDT\&
The information in this document is subject to change
without notice and should not be construed as a
commitment by Digital Equipment Corporation.
Digital Equipment Corporation assumes no responsibility
for any errors that may appear in this manual.
The software described in this document is furnished
under a license and may be used or copied
in accordance with the terms of such license.
Digital Equipment Corporation assumes no responsibility for
the use or reliability of its software
on equipment that is not supplied by DIGITAL.
Copyright (C), 1972,1977 by Digital Equipment
Corporation, Maynard, Massachusetts.
1.0 INTRODUCTION ......................................... 3
2.0 PATCHING COMPONENTS .................................. 3
2.1 Patching With FILDDT Under Timesharing ....... 3
2.2 Patching with EDDT Under Timesharing ......... 3
3.0 PATCHING WITH FILDDT UNDER TIMESHARINGA............... 3
4.0 PATCHING WITH EXEC DDT UNDER TIMESHARING ............. 4
5.0 PATCHING CONVENTIONS ................................. 5
APPENDIX - SOME USEFUL MONITOR PATCHES ....................... 10
.hl 1 ^&INTRODUCTION\&
The following instructions describe how to patch a monitor with FILDDT
under timesharing or EDDT under timesharing. Refer
also to the System Programming Procedure FILDDT and to Appendix B of the DDT-10 Programmer's Reference Manual.
.hl 1 ^&PATCHING COMPONENTS\&
.hl 2 Patching with FILDDT under TImesharing
Monitor on disk.
A running monitor.
.hl 2 Patching with EDDT under Timesharing
Monitor on disk that was loaded with EDDT
(Answer Y to MONGEN dialogue question).
A running monitor.
.hl 1 ^&PATCHING WITH FILDDT UNDER TIMESHARING\&
FILDDT is a modified form of DDT that examines or modifies
a file on disk instead of in memory.
For example, to patch the current monitor to make a modified one, type the following:
.COPY SYSTEM.EXE=SYS:S603A.EXE ;Give a new
;name to the
Make patches as usual, then exit.
^Z ;AT THE END OF PATCHING, TERMINATE
; THE OPERATION WITH A ^Z (THIS CAUSES
; FILDDT TO WRITE OUT THE LAST SET OF
; CHANGES AND THEN OUTPUT THE
; UPDATED SYMBOL TABLE).
The file S603AA.EXE is now in your disk area and
is ready to be loaded by BOOTS. If you wish to check
the patches, you can type:
To patch the running monitor, a monitor-specific
FILDDT is needed. Type:
and make patches as usual.
The /M and /P switches indicate that a monitor is
to be patched. You must have the "POKE" privilege to
patch a running monitor. One
restriction is that the current value of the
location to change must be the last
This minimizes the chance of error. When making
patches this way, be sure that two related changes are
made in the proper order.
.hl 1 PATCHING WITH EXEC DDT UNDER TIMESHARING
Patching under timesharing is recommended instead of
stand-alone time, because the machine can be
used by other users when you patch it under normal
(Note that a copy
of the monitor is patched, not the one controlling the machine.) Patching under timesharing requires more memory than patching in the
stand-alone enviroment. To load EDDT with the monitor, you must
have answered Y to the MONGEN question. If not, you must
reload the monitor. However, be sure to specify
the /LOCALS switch so that local symbols are loaded also.
Patching without local symbols is not recommended.
Get a copy of the monitor by typing:
to the running timesharing system. When the
monitor responds with:
Type the following:
which starts EDDT in user mode.
After all patches have been made, press CTRL/Z, and type:
Do not press CTRL/C twice, or your console
may return to monitor mode before DDT makes its last
.hl 1 ^&PATCHING CONVENTIONS\&
The following techniques for monitor patching are part
convention and part necessity. Follow them
carefully. Note that $ in this section indicates where
you should press the ALTMODE key (ESCAPE key).
EDDT and FILDDT behave similarly to USER DDT as described in the DDT
Programmer Reference Manual. You should be thoroughly familiar
with this document before you attempt to
use EDDT. EDDT is entered by starting the machine
at, or transferring to, absolute location 401 in all monitors.
This may be accomplished through commands to BOOTS or by means of the
Always patch a freshly loaded copy of the monitor; one that
has not yet run through the initialization
dialogue beyond the enter TIME: request in the
Loaded into each monitor is a block of patching space beginning at
global location PATCH. By convention, the value of this symbol is not
changed when patches are made; instead, you are
to change another global symbol, PAT, after each patch.
Change the value of PAT to point at
all times to the next
free location in the patching area.
Initially, PAT is defined to be
equal to PATCH + 10 (saving 10 locations for POKE patching)
(FILDDT/M/P). Therefore, all patches will be
made starting at symbolic location PAT.
You should change PAT to point to the next
free location as the last step
in making any given patch. By this means, the next
person to patch the monitor will be able to
find the patching space.
Suggested patches are distributed in a notation
consistent with the above mechanism. Everything that you must type to
EDDT is included in the suggested
patch, including the DDT command that unlocks
the proper set of local symbols and the Monitor Change
Order (MCO) number associated with the patch.
The monitor begins to allocate free core for
various internal functions just above the last patch
location in use. For this reason,
it is very important, as the last step in any patching session, that you inform the monitor of
how much additional patch space was used.
Otherwise, this space is allowed and the patched
area destroyed. You should have redefined the symbol PAT
as the first free location. Whenever
the monitor starts, it looks up the value of the
symbol PAT in the Symbol Table
and starts allocation at max (PAT, RH (PATSIZ)).
It is considered good practice to change the name
of the monitor every time it is patched. For
example, 5603A might become 5603AA when patched for the
first time. The new name should be entered as 7-bit ASCII text
in location CONFIG (and the several locations that follow,
up to 24 characters).
Note that this is marginally simpler if the header
line is arranged for the patch level character to be at the end
of a word ($Q+2). This increases the last character by one.
If the name is a multiple of 5 characters in length, make sure that
the next word contains a zero to delimit
the text string. Similarly, the system date
in location SYSDAT and SYSDAT+1 should be
updated in 7-bit ASCII text.
Never save a monitor that has already been run; since, it is useless for
reloading. If the system is accidentally run before
being saved, start again with a fresh copy and remake the patches.
The time to make patches is after the monitor has been loaded but before it has
been run. In order
to patch a monitor, it is necessary to have a copy of EXEC
mode DDT loaded with the monitor. If your
saved version of the monitor does not
contain DDT, repeat the MONGEN dialogue answering YES to the
Both are necessary for patching the monitor, it is
possible to patch
without local symbols, but it is not
recommended. Distributed patches
will assume local symbols.
The patches themselves are given in the format of
DDT terminal dialog. The locations are renamed by
their names. If you do not have local symbols
loaded, you should refer to your monitor storage map and listing to
translate local symbols to global symbols and literals.
The first command in each group is the command to
unlock the local symbol table in the named routine.
At the end of the monitor is a space of about 300 (octal) locations that is reserved for monitor patches. This patch buffer begins at global
location PAT. To insert a patch within a monitor
routine, write the patch beginning at location PAT. The last
instruction in the patch should be a jump
back to the monitor.
The following is an example of making a patch.
In the routine BAH, change the code as shown below.
BAH2: JFCL TO: BAH2: JFCL
HRRS 0,0 ADDI 0,0
FMPR 1,1 HRRS 0,0
In DDT, you would give the command
BAH$: which unlocks the local symbols in BAH
Then, you would type:
BAH2+1/ which opens and types out the contents
The system then types:
(TAB) HRRS 0,0 (TAB)
You would then type:
JRST PAT(TAB) The tab closes the
location BAH2+1 that is now
modified and opens location
The system then types:
You then insert the following:
ADDI 0,0(LINE FEED) The line feed closes the
location and opens the next
The system then outputs:
You then insert the following:
HRRS 0,0 (LINE FEED)
The system then outputs:
You then type:
The system then types:
(TAB) FMPR 1,1 You can verify this is the
correct return point.
Then, you insert:
The system outputs:
PAT: (CR) This redefines the current location
with the global symbol PAT.
The entire dialog would look like the following.
BAH$: BAH@+1/ HRRS 0,0 JRST PAT
PAT/ 0 ADDI 0,0
PAT+1/ 0 HRRS 0,0
PAT+2/ 0 JRST BAH2+2\ FMPR 1,1
PAT+3 0 PAT:
This last step is important. The global patch always points to the
beginning of the patch area. After each patch is made,
the first unused location should be
renamed to PAT. This is necessary to determine
where successive patches should
PAT should be redefined to the next free location as the last step in making
any patch. By this
procedure, the next person to patch the monitor
will be able to find the patching space.
This informs the monitor where the current end of
the patch is. A common error is to forget this
step, which will cause the monitor to loop when
started up instead of running the null job. This is
because the monitor will have created copies of
multiple device data blocks on top of your patch.
In addition, the global locations CONFIG and SYSDAT
should be updated to identify the new monitor
version and the date of the update.
EX: CONFIG$7T/ 603A "/603AA/
$7T is a command to print the contents of the
preceding address as a 7-bit ASCII character.
" means insert the ASCII text following the /
in the current open location terminating
the text with the second /.
Also, SYSDAT$7T/ 12-27 "/12-31/
PATSIZ/MOVEI T1,PATCH+1- MOVEI T1,PAT
This also completes the patching process. At
this point, the monitor is ready to run. It should not be
started, however, until a copy with the patches is saved on the
disk for future reloading.
^&SOME USEFUL MONITOR PATCHES\&
.subtitle USEFUL MONITOR PATCHES
Note that these examples are not specifications
and are subject to change without notice.
They are included here for
informational purposes only.
^&PART 1 - CHANGING YOUR CONFIGURATION\&
If you have created your monitor for more disk units
than you have at present, you can
eliminate the questions about them (RPAx OFFLINE), by
patching the core data blocks. Suppose you built your monitor for 5
disk packs, (RPA0,...,RPA4), but RPA3 and RPA4 are down or are not present.
Open the previous core block (e.g., RPA2CB) and terminate the
RBA2CB+UNISYS$H/ RPA3CB,,0 0<CR>
If you have five disk packs (e.g., RPA0,...,RPA4) and RPA2 and RPA3
are down, you can make RPA1CB point to RPA4 by typing:
RPA1CB+UNISYS$H/ RPA2CB,,0 RPA4CB,,0 <CR>
If you want to change the number (increase or
decrease) of multiple devices (TTY, PTY, DTA,
MTA) you can patch the table INTTAB in COMMON.
Consult the listing of COMMON to find the word
pair that corresponds to one of the multiple
devices. Change bits 1 through 8 to the
To change the number of DTAs from 10 to 5 (octal), type the
INTTAB+14$H/ 410004,,DTAINT 405004,,DTAINT
^&PART 2 - MONITOR DEBUGGING PATCHES\&
To change the amount of core checked for
being on-line, type the following:
PATNWC/CAIL U,XYZ CAIL U,NEW
where XYZ is the old amount of words, and NEW is
the new amount.
For rapid exec mode debugging, you can automatically
LOGIN under m,n without having to go through LOGIN. To do this,
patch the global location REFLAG to be the project-programmer number.
This procedure will log you in under [10,1] after typing date and
time. When REFLAG is nonzero,
INITIA is not run so this also reduces the
time to get a job initialized,
especially on the CTY.
To change the amount of core reserved for programs
under DEBUG mode, type the following:
DBGMNU/MOVEI T1,MINMAX MOVEI T1,NEW
where NEW is the minimum amount of core to save. Symbols are discarded
to guarantee this amount, if necessary.
To change the number of monitor buffers, patch location
MBFNUM to the
correct value, which must be at least 2.
The above changes the number of monitor buffers to six.
Note that KI10 and KL10 monitors have two segments. After
starting at EDDT, the high segment, which contains most of the
monitor's code, is not addressable (the mapping has not been
setup yet.) To examine the monitor with
EDDT, insert a breakpoint at the label HIGHIN. When
EDDT hits this breakpoint, the monitor can be examined. For example, load
the monitor with BOOTS by typing:
Then, specify EDDT's starting address and start EDDT by typing:
EDDT will type:
Then, you type the following:
Then, start the monitor for debugging or at its normal
start address by typing:
EDDT will type the following:
At this point, all of the monitor has been
made addressable and can be examined
To debug and avoid INITIA completely, perform the
following. After reaching the breakpoint at HIGHIN, type the
Set TTFCXI+TTFCOM (in SCNSER) to 0:
This is automatically done by DEBUG.
On KL10-based systems, it may, under certain circumstances, be desirable
to run the monitor with KLDCP rather than RSX20F as the front-end.
It starts up the so-called "primary communications protocol"
that KLDCP does not understand. To disable this, the
following patch should be made to the monitor:
PPCPAT/ PUSHJ P,STMPPC JFCL
Note that if the monitor is patched, in this
fashion, it will
still work with RSX20F; but, RSX will not automatically
try to cause the monitor
to reload itself when it detects that the
KL10 has stopped. Also, the front-end
device will not be available.