MONITOR V1.1, 25 June 1996, Ivan Mackintosh (ivan@rcp.co.uk) INTRODUCTION: ------------- Have you ever been designing that utility or emulator to hack around with an Atari program? Has the Atari program ever done anything unexpected? If so, you'll need to look into the 6502 code to find out what is happening. You need Monitor! Monitor is a 6502 disassembler for the PC running MSDOS. FEATURES: --------- * Multiple panes. allows a disassembly of subroutines etc. to be viewed at the same time as the code containing their jump; * Atari mode. Equates are used instead of memory addresses; * Hex Dump; * Offset. Modifies the offset of the loaded file so that jumps etc. can be resolved easier; * Analyses the header of AtariDOS/MyDOS files providing load address, run address and a suggested offset; * Modify memory; * Search memory; * Load / Write file. (Current max file size is 48Kbytes); * Converts Dec<->Hex; CHANGES IN V1.1 ------------------ * Disassemble now takes up to 3 parameters this allows the end address and a filename to also be entered. * Hex Dump now takes up to 3 parameters this allows the end address and a filename to also be entered. * The command line allows the file to be disassembled to be passed. * The V parameter to the Offset function allows the offset to commence from the first address visible on the screen. USER GUIDE: ----------- The following syntax is used to describe the parameters to the commands: < > parameters enclosed in angle brackets are compulsory. [ ] parameters enclosed in square brackets are optional. | specifies options for a single parameter. Commands and parameters can be separated by either a space, a comma or a semicolon. The commands are as follows and are case insensitive: L Loads the specified file. W [Y] Saves the specified file. If the file already exists then the write will fail. use the Y parameter to overwrite an existing file. O [hex address] [V] Modifies the address offset so that jumps can be resolved easier. If no address is given then the offset of zero is used. All files are loaded into Monitor's 48k buffer at address zero. This command allows the file to be effectively relocated so that it seems to start at the given address. * NEW to V1.1 * If the V parameter is specified then the offset is calculated from the first address visible on screen. For example to change the offset of an instruction within the middle of a file to $7B00 first disassemble from that address making it the first visible address on the screen and then use the offset V command as follow: 7AB0 LDA #$00 7AB2 STA $4000 7AB5 LDX #$05 Using the disassemble commands "D 7AB2" would show: 7AB2 STA $4000 7AB5 LDX #$05 And after the command "O 7B00 V" 7B00 STA $4000 7B03 LDX #$05 P [pane numbers] Tells Monitor which panes to use and in what order. There are 3 panes numbered 1, 2, and 3. The top right hand side of the screen displays which panes settings. The default pane setting is 123 which means that all three panes will be used in accending order. This option is set if P is entered with no parameters. Any disassembly or hex dump will use all of the panes specified in the order specified. For example if the command 'P 23' was issued then subsequent disassemblies/hex dumps would only fill panes 2 and 3 leaving pane 1 intact. This function allow both the calling code and subroutines to be visible at the same time. A Atari Mode. This is on by default. The current state of the Atari mode can be seen at the top, centre of the screen. In Atari mode any current or subsequent disassembly will display equates instead of memory address where appropriate. For example, Atari mode off may display: 0000 8DC502 STA $02C5 Whereas Atari mode on will display 0000 8DC502 STA COLOR1 If a file is loaded whilst in Atari mode and it happens to be an AtariDOS/MyDOS binary file then the load address, run address and a suggested offset (see the command 'O'). This info can be redisplayed using the 'I' command. I Redisplays any file header information from when the last file was loaded. D [start hex address] [end hex address] [filename] Disassemble at the given address. The command will disassemble until it either runs out of pane space (as specified by the 'P' command) or it reaches the end of the file. If no address is specified then the file is disassembled from the start. *NEW to V1.1* An end address can now be specified for disassembly If no end address is specified then the disassembly is as V1.0. *NEW to V1.1* A filename to disassemble to can be specified. X [start hex address] [end hex address] [filename] Perform a hex dump starting at the given address. The command will dump until it either runs out of pane space (as specified by the 'P' command) or it reaches the end of the file. If no address is specified then the file is disassembled from the start. *NEW to V1.1* An end address can now be specified for the hex dump. If no end address is specified then the hex dump is as V1.0. *NEW to V1.1* A filename to hex dump to can be specified. M Modifies the file at the address given. For example, M A000 8DC502 overwrites the 3 addresses at $A000 with the hex $8D, $C5 and $02 S Searches from the specified address for the specified hex string For example, S A000 8DC502 display the memory location (if any) where the 3 bytes can be located. # Converts the given decimal number to hexidecimal. $ Converts the given hexidecimal number to decimal. ? [1|2|3] Displays (in the first available specified by the 'P' command) the specified help page (1 or 2 or 3). If no help page is specified then page 1 is displayed. Q Quits Monitor and returns to MSDOS. CREDITS: -------- The idea for Monitor came whilst browsing though the code for Atari800 by David Firth. A Linux freeware Atari Emulator including source. This source contains the basis of the disassembler. The equates for Atari mode were extracted from the Atari System Reference Manual by Bob DuHamel. If anyone has any comments, suggestions, ideas, bug reports or just likes using Monitor then please send me an email: ivan@rcp.co.uk