User manual

Table Of Contents
DEBUG MONITOR COMMANDS
M68CPU32BUG/D REV 1 3-10
BS Block of Memory Search BS
3.6 BLOCK OF MEMORY SEARCH
BS <range><del><text> [;B|W|L] or
BS <range><del><data>[<del><mask>] [;B|W|L|N|V]
The BS command searches the specified range of memory for a match with a user-entered data
pattern. This command has three modes:
Mode 1 LITERAL STRING SEARCH — executes a search for the ASCII equivalent of
the literal string entered by the user. Mode 1 is indicated if <RANGE> is followed
by a <text> field. The size as specified in the option field defines whether the
count field in <range> refers to bytes, words, or longwords. The option field is
available only if <range> is specified using a count. If a match is found then the
address of the first byte of the match is output.
Mode 2 DATA SEARCH a data pattern is entered by the user as part of the command
line. The data field size is entered by the user in the option field; the default is
word (W). The size entered in the option field also dictates whether the count field
in <RANGE> refers to bytes, words, or longwords. The following occurs during a
data search:
1. The user-entered data pattern is right-justified. Leading bits are truncated
or leading zeros are added as necessary to make the data pattern the
specified size.
2. Successive bytes, words, or longwords, within the specified range, are
compared to the user-entered data. Comparison is made only on those bits
at bit positions corresponding to a 1 in the mask. If no mask is specified
then a default mask of all one's is used (all bits are compared). The size of
the mask is the same size as the data.
3. If the ''N'' (non-aligned) option has been selected then the data is searched
on a byte-by-byte basis, rather than by words or longwords regardless of
the size of <data>. This is useful if a word (or longword) pattern is being
sought, but is not expected to lie on a word (or longword) boundary.
4. If a match is found, the address of the first byte of the match is output
along with the memory contents. If a mask was in use, then the actual data
at the memory location is displayed, rather than the masked data.
Mode 3 DATA VERIFICATION If the ''V'' (verify) option is selected and the memory
contents do not match the user-specified pattern, then addresses and data are
displayed. Otherwise this mode is identical to Mode 2.
DEBUG MONITOR COMMANDS
M68CPU32BUG/D REV 1 3-7
BM Block of Memory Move BM
3.4 BLOCK OF MEMORY MOVE
BM <range><del><addr> [;B|W|L]
options:
B – Byte
W – Word
L – Longword
The BM command copies the contents of the memory addresses, defined by <range>, to another
place in memory, beginning at <addr>. The option field is only allowed when <range> is
specified using a count. In this case the B, W, or L defines the size of data to which the count is
referring. For example, a count of four with an option of L would mean to move four longwords
(or 16 bytes) to the new location. An error results if an option field is specified without a count in
the range.
EXAMPLES Assume memory from $4000 to $402F is clear.
CPU32Bug>MD 4100:20;B<CR>
00004100 544B 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
00004110 0000 0000 0000 0000 0000 0000 0000 0000 ................
CPU32Bug>BM 4100 410F 4000<CR>
Effective address: 00004100
Effective address: 0000410F
Effective address: 00004000
CPU32Bug>MD 4000:20;B<CR>
00004000 5448 4953 2049 5320 4120 5445 5354 2121 THIS IS A TEST!!
00004010 0000 0000 0000 0000 0000 0000 0000 0000 ................
This utility is useful for patching assembly code in memory. Suppose the user had a short
program in memory at address $6000.
CPU32Bug>MD 6000 600A;DI<CR>
00004000 D480 ADD.L D0,D2
00004002 E2A2 ASR.L D1,D2
00004004 2602 MOVE.L D2,D3
00004006 4E4F0021 SYSCALL .OUTSTR
0000400A 4E71 NOP
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...