C - Compare Memory Blocks
   
   This command compares two sections of memory and reports any
   differences by printing the address of one member of the mismatched
   pair(s). The syntax is as follows:
   
      C 1111 2222 3333
   
   where 1111 is the start address of the first section, 2222 is the end
   address of the first section, and 3333 is the start address of the
   second section the one to be compared with the first sectton. This
   command may be stopped (in case a large number of addresses are
   printed) with the STOP key. For example, suppose you have two disk
   files containing (you thought) the same M.L. program residing at
   locations $1400 to $147F. However, when you used the BASIC command
   VERIFY, it said 'VERIFY ERROR'. Naturally, you wonder just where the
   difference is. VERIFY can only tell you they differ SOMEWHERE. Compare
   Memory Blocks may be used to find out: First use HESMON's Load command
   to load one of the files (See Load). Then move that program to $1500
   using the HESMON Transfer Memory Block command: T 1400 141F 1500. Next,
   Load the other file. Now compare the two files using Compare Memory
   Block:
   
      C 1400 147F 1500
   
   HESMON will print a list of all the memory locations which differ
   between the two programs.
   

   D - Disassemble Memory
   
   This command is the inverse of the Assemble command. It interprets
   memory contents as M.L. instructions and displays the assembly
   language equivalent. Disassemble is used in two distinct ways. First,
   it may be used to disassemble a section of memory by specifying an
   address range, such as:
   
      D 1111 2222
   
   where 1111 is the start address and 2222 is the end. This type of dis-
   assembly is convenient when used in conjunction with HESMON's Output
   Divert command to produce a hardcopy listing of a M.L. program.
   Second, the disassemble command may be started by entering a single
   parameter, the beginning address:
   
      D 1111
   
   This mode is handy for examining a M.L. program on the screen because,
   once the first line is displayed, preceding or subsequent lines of
   code may be disassembied by pressing the cursor-up or cursor-down key
   respectively.
   
   You may alter a program in RAM using the Disassemble command's output.
   If you move the cursor to the line you wish to alter, change the byte
   display (not the mnemonic), and press return, HESMON will alter the
   memory contents and retype the line showing the altered bytes and the
   corresponding disassembly. Then HESMON will prompt for the next line
   by printing the next address and leaving the input cursor on the same
   line. To exit this mode type RETURN, just as with the Simple Assembler
   command.
   

   E - External Relinker
   
   This command is rather difficult to understand, but the effort is
   worth it! Basically, this command facilitates the transport of M.L.
   programs from one 6502-based computer to another (PET, VIC, etc.) by
   translating the system calls of one computer to those of another. Of
   course the capabilities of these computers are different so one cannot
   always achieve a perfect translation, but at least a functioning
   version can be made without completely rewriting the program. The
   heart of this command is a table of corresponding addresses. This
   table contains four-byte entries consisting of pairs of addresses.
   These address pairs are the addresses in the respective computer
   operating systems that perform a given task. Typically these will be
   addresses in the ROM firmware of the computers. The correspondence
   table must be supplied by you. Lists of common ROM routine addresses
   in various 6502 computers have appeared in several places, most
   notably in COMPUTE! magazine (e.g., "VIC Memory Map Above Page Zero",
   COMPUTE! Vol.4, No.1, P. 181); "Butterfield on Commodore", Commodore
   Magazine, Oct., Nov., 1982, pp. 81 ff.; and, for the PET, in "PET/CBM
   Personal Computer Guide" by Osborne and Donahue.
   
   For example, suppose you have loaded into your C64 an M.L. program
   intended to run in a PET with BASIC 4.0 ROMs. We will assume it is in
   locations $1200 to $13FF. Many of its external subroutine calls are
   probably of the form JSR $FFxx. The subroutines at these addresses are
   all almost identical in function to those of the same address in the
   C64 because these entry points are in a 'jump table' set up for the
   purpose of standardizing System calls between the different Commodore
   ROM Sets. So what's the
   
            K.J. REVEALED TRILOGY    PAGE [164]    (C)1990 K.J.P.B.

<<previous page - next page>>