--- mon/README 2000/10/10 21:14:33 1.7 +++ mon/README 2000/10/15 15:07:09 1.8 @@ -1,5 +1,5 @@ - mon, Version 3.0 + cxmon, Version 3.0 A command-line file manipulation tool and disassembler Copyright (C) 1997-2000 Christian Bauer, Marc Hellwig @@ -10,18 +10,18 @@ License ------- -mon is available under the terms of the GNU General Public License. See the +cxmon is available under the terms of the GNU General Public License. See the file "COPYING" that is included in the distribution for details. Overview -------- -"mon" is an interactive command-driven file manipulation tool that is +cxmon is an interactive command-driven file manipulation tool that is inspired by the "Amiga Monitor" by Timo Rossi . It has commands and features similar to a machine code monitor/debugger, but it lacks any functions for running/tracing code. There are, however, built-in -PowerPC, 680x0, 80x86, 6502 and 8080 disassemblers. By default, mon operates +PowerPC, 680x0, 80x86, 6502 and Z80 disassemblers. By default, cxmon operates on a fixed-size (but adjustable) memory buffer with adresses starting at 0. @@ -34,22 +34,22 @@ Please consult the file "INSTALL" for in Usage ----- -mon can be started from the Shell or from the Tracker (BeOS), but command line -history doesn't work when started from the Tracker). +cxmon can be started from the Shell or from the Tracker (BeOS), but command +line history doesn't work when started from the Tracker. Options: -m enables symbolic MacOS A-Trap and low memory globals display in the 680x0 disassembler - -r makes mon operate in real (virtual) memory space instead of an allocated - buffer + -r makes cxmon operate in real (virtual) memory space instead of an + allocated buffer -If no additional command line arguments are given, mon enters interactive -mode. Otherwise, all remaining arguments are interpreted and executed as mon +If no additional command line arguments are given, cxmon enters interactive +mode. Otherwise, all remaining arguments are interpreted and executed as cxmon commands. The default buffer size is 1MB. -The mon command prompt looks like this: +The cxmon command prompt looks like this: [00000000]-> @@ -59,7 +59,7 @@ section on expressions). You can get a s Commands that create a longer output can be interrupted with Ctrl-C. -To quit mon, enter the command "x". +To quit cxmon, enter the command "x". Constants, variables and expressions @@ -75,9 +75,9 @@ values. A variable is referred to by its combinations of digits and letters (they may also start with a digit) that are not also valid hexadecimal numbers. Names are case-sensitive. -mon accepts expressions in all places where you have to specify a number. The -following operators are available and have the same meaning and precedence as -in the C programming language: +cxmon accepts expressions in all places where you have to specify a number. +The following operators are available and have the same meaning and +precedence as in the C programming language: ~ complement + unary plus @@ -117,13 +117,14 @@ values and ASCII strings separated by co The buffer ---------- -Those mon commands that operate on "memory" operate on a buffer allocated by -mon whose size is adjustable with the "@" command. The default buffer size is -1MB. The buffer is an array of bytes where each byte has a 32-bit integer -address. Addresses start at 0 and are taken modulo the buffer size (i.e. for -the default 1MB buffer, addresses 0 and 100000 refer to the same byte). +Those cxmon commands that operate on "memory" operate on a buffer allocated +by cxmon whose size is adjustable with the "@" command. The default buffer +size is 1MB. The buffer is an array of bytes where each byte has a 32-bit +integer address. Addresses start at 0 and are taken modulo the buffer size +(i.e. for the default 1MB buffer, addresses 0 and 100000 refer to the same +byte). -The buffer is the working area of mon where you load files into, manipulate +The buffer is the working area of cxmon where you load files into, manipulate them, and write files back from. Arbitraty portions of the buffer may be used as scratch space. @@ -131,13 +132,13 @@ as scratch space. Commands -------- -The following commands are available in mon ('[]' marks a parameter than can be -left out): +The following commands are available in cxmon ('[]' marks a parameter than +can be left out): - x Quit mon + x Quit cxmon -quits mon and returns to the shell. +quits cxmon and returns to the shell. h Show help text @@ -152,7 +153,7 @@ displays a short list of available comma ver Show version -shows the version number of mon. +shows the version number of cxmon. ? expression Calculate expression @@ -211,7 +212,7 @@ Entering "d68" without arguments is equi "." is set to the address after the last address displayed. - d80 [start [end]] Disassemble 8080 code + d80 [start [end]] Disassemble Z80 code disassembles the buffer contents from address "start" to address "end". Entering "d80" without arguments is equivalent to "d80 .". The value of @@ -350,7 +351,7 @@ clears all currently defined variables. Examples -------- -Here are some simple examples for what is possible with mon. +Here are some simple examples for what is possible with cxmon. Join "file1" and "file2" to "file3": @@ -363,18 +364,19 @@ Remove the first 24 bytes (e.g. an unnee [ 0 "file" ] 18 .-18 "file" -Load the mon executable and search for PowerPC "nop" commands: +Load the cxmon executable and search for PowerPC "nop" commands: - [ 0 "mon" + [ 0 "cxmon" h 0 . 60,00,00,00 -Create a modified version of mon so that the prompt has " $" instead of "->": +Create a modified version of cxmon so that the prompt has " $" instead of +"->": - [ 0 "mon" + [ 0 "cxmon" set size=. h 0 . "->" : . " $" - ] 0 size "mon1" + ] 0 size "cxmon1" Convert a binary file which contains 16-bit numbers in little-endian format to big-endian format (or vice-versa):