M (modify) [ System Debug Reference Manual ] MPE/iX 5.0 Documentation
System Debug Reference Manual
M (modify)
Debug only
Privileged Mode: MA, MD, MCS, MZ, MSEC
Modifies the contents of the specified number of words at the specified
address.
Syntax
MA offset [count] [base] [newvalue(s)] ABS relative
MD dst.off [count] [base] [newvalue(s)] Data segment
MDB offset [count] [base] [newvalue(s)] DB relative
MS offset [count] [base] [newvalue(s)] S relative
MQ offset [count] [base] [newvalue(s)] Q relative
MC logaddr [count] [base] [newvalue(s)] Program file (default)
MCG logaddr [count] [base] [newvalue(s)] Group library
MCP logaddr [count] [base] [newvalue(s)] Account library
MCLG logaddr [count] [base] [newvalue(s)] Logon group
MCLP logaddr [count] [base] [newvalue(s)] Logon account
MCS logaddr [count] [base] [newvalue(s)] System library
MCU fname logaddr [count] [base] [newvalue(s)] User library
MCA cmabsaddr [count] [base] [newvalue(s)] Absolute CST
MCAX cmabsaddr [count] [base] [newvalue(s)] Absolute CSTX
MV virtaddr [count] [base] [newvalue(s)] Virtual
MZ realaddr [count] [base] [newvalue(s)] Real memory
MSEC ldev.off [count] [base] [newvalue(s)] Secondary store
By default, the current value is displayed. The ENV variable
QUIET_MODIFY can be used to suppress the display of the current value.
Parameters
offset MA, MDB, MQ, MS only. The CM word offset that specifies
the relative starting location of the area to be
modified.
logaddr MC, MCG, MCP, MCLG, MCLP, MS, MCU only. A full logical
code address (LCPTR) specifies three necessary items:
* The logical code file (PROG, GRP, SYS, and so on.).
* NM: the virtual space ID number (SID).
CM: the logical segment number.
* NM: the virtual byte offset within the space.
CM: the word offset within the code segment.
Logical code addresses can be specified in various
levels of detail:
* As a full logical code pointer (LCPTR):
MC procname+20 Procedure name lookups return
LCPTRs.
MC pw+4 Predefined ENV variables of type
LCPTR.
MC SYS(2.200) Explicit coercion to a LCPTR
type.
* As a long pointer (LPTR):
MC 23.2644 sid.offset or seg.offset
The logical file is determined based upon the
command suffix. For example:
MC implies PROG
MCG implies GRP
MCS implies SYS, and so on
* As a short pointer (SPTR):
MC 1024 offset only
For NM, the short pointer offset is converted to a
long pointer using the function STOLOG, which looks
up the SID of the loaded logical file. This is
different from the standard short to long pointer
conversion, STOL, which is based on the current
space registers (SRs).
For CM, the current executing logical segment number
and the current executing logical file are used to
build a LCPTR.
The search path used for procedure name lookups is based
on the command suffix letter:
MC Full search path:
NM: PROG, GRP, PUB, USER(s), SYS
CM: PROG, GRP, PUB, LGRP, LPUB, SYS
MCG Search GRP, the group library.
MCP Search PUB, the account library.
MCLG Search LGRP, the logon group library.
MCLP Search LPUB, the logon account library.
MCS Search SYS, the system library.
MCU Search USER, the user library.
For a full description of logical code addresses, refer
to the section "Logical Code Addresses" in Chapter 2.
fname MCU only. The file name of the NM user library. Since
multiple NM libraries can be bound with the XL= option
on a RUN command,
:run nmprog; xl=lib1,lib2.testgrp,lib3
it is necessary to specify the desired NM user library.
For example:
MCU lib1 204c
MCU lib2.testgrp test20+1c0
If the file name is not fully qualified, the following
defaults are used:
Default account: the account of the program file.
Default group: the group of the program file.
cmabsaddr MCA, MCAX only. A full CM absolute code address
specifies three necessary items:
* Either the CST or the CSTX.
* The absolute code segment number.
* The CM word offset within the code segment.
Absolute code addresses can be specified in two ways:
* As a long pointer (LPTR):
MCA 23.2644 Implicit CST 23.2644
MCAX 5.3204 Implicit CSTX 5.3204
* As a full absolute code pointer (ACPTR):
MCA CST(2.200) Explicit CST
coercion
MCAX CSTX(2.200) Explicit CSTX
coercion
MCAX logtoabs(prog(1.20)) Explicit absolute
conversion
The search path used for procedure name lookups is based
on the command suffix letter:
MCA GRP, PUB, LGRP, LPUB, SYS
MCAX PROG
virtaddr MV only. The virtual address to be modified.
Virtaddrcan be a short pointer, a long pointer, or a
full logical code pointer.
realaddr MZ only. The real mode memory address to be modified.
ldev.off MSEC only. The logical device number (LDEV) and byte
offset of the data on disk to be displayed. This
address is entered in the form ldev.byteoffset.
count MA, MC, MD, MDB, MS, MQ: The number of CM 16-bit words
to be modified.
MC, MV, MZ: The number of NM 32-bit words to be
modified.
If omitted, a single line of values is modified.
base The desired representation mode for output values:
% or OCTAL Octal representation
# or DECIMAL Decimal representation
$ or HEXADECIMAL Hexadecimal representation
ASCII ASCII representation
This parameter can be abbreviated to as little as a
single character.
If omitted, the current output base is used.
newvalue(s) The new values for the specified locations. Specified
new values are automatically assigned to the locations
until the new values are exhausted. If the new values
are omitted, or if they run out, Debug prompts for the
remaining new values. To retain the original value,
simply press Return. The character dot "." can be
entered to abort the modification loop. All locations
modified before the dot is encountered are permanently
changed.
Examples
$nmdebug > mv sp-2c,,,4
$ Virt 21.40050780 = '....' $e7 := 4
Modify value at SP-2c, replacing it with $4.
%cmdebug > md 1.64,6,h
$ DST 1.34 = "v4" $7634 := %111
$ DST 1.35 = ".." $5 := (retain original value)
$ DST 1.36 = ".." $fffa := $c0
$ DST 1.37 = ".." $fff0 := 1234
$ DST 1.38 = ".." $0 := .
current/remaining modifications aborted at user request
Modify 6 words starting at DST 1.64. Display values (and addresses) in
hex.
DST 1.34 is assigned a new value of %111.
DST 1.35 retains its original value of %5.
DST 1.36 is assigned a new value of $c0.
DST 1.37 is assigned a new value of 1234.
Dot "." terminates modifications.
The modifications for DST 1.34 through 1.37 have been successfully
completed.
%cmdebug > mq-30,6
% Q-30 = ".P" %27120 := "AB"
% Q-27 = "UB" %52502 := 'CD'
% Q-26 = ".S" %27123 := u16("EF")
% Q-25 = "YS" %54523 :=
% Q-24 = ".." %177772 := [q-2]
% Q-23 = ".." %7 := !s + (1000-[db+22]/2)
Modify 6 words starting at Q-%30. The current values are displayed in
ASCII and octal (current output base).
Q-30 is assigned the (implicitly coerced) integer value of "AB".
Q-27 is assigned the implicitly coerced) integer value of 'CD'.
Q-26 is assigned the explicitly coerced unsigned 16-bit integer value
of "EF".
Q-25 is left unchanged.
Q-24 is assigned the contents of Q-2.
Q-23 is assigned the value of the S register + ( 1000 - the contents of
DB+22 divided by 2).
Limitations, Restrictions
When CM code has been translated, modification of the original object
code has no effect. The NM translated code must be modified.
CAUTION The output format of all System Debug commands is subject to
change without notice. Programs that are developed to
postprocess System Debug output should not depend on the exact
format (spacing, alignment, number of lines, uppercase or
lowercase, or spelling) of any System Debug command output.
MPE/iX 5.0 Documentation