a space. So you don't have to keep track of what the next address is,
   just type in the assembly language instructions. When you've finished
   the program, just press RETURN and HESMON will exit this mode. By the
   way, $FFD2 is one of the 'Kernal' routines in the C64's ROMs. It prints
   the contents of the accumulator to the current output file the screen
   in this case. For further information on this and other useful ROM
   routines, consult the "Commodore 64 Programmers' Reterence Guide"
   published by Commodore.
   
   Now type 'G' and hit RETURN. You should see:
   
      G
      
      HI.
      B*
        PC   IRQ SR AC XR YR SP
      ;120C EA31 30 2E 49 2E FA
   
   Notice after the 'HI' is another register display, the break entry
   display identified by 'B*'. This means we've reentered HESMON by ex-
   ecuting a BRK instruction, the one at the end of our short program.
   Now examine the register contents. The PC points one address higher
   than the BRK instruction. The X and Y registers and stack pointer are
   unchanged. The accumulator now has the $2E transferred into it by the
   TYA instructional $1201. Let's play with this a bit. Type 'D 1200 120B'
   This command instructs HESMON to 'disassemble' the program you just
   entered.
   
   Now, move the cursor to the last line, at address $1208, and type the
   following, with the 'A' replacing the ',' (also be sure to blank out
   any characters left on the screen after the '8')
   
      A 1208 LDA #48
      JMP 1200
   
   We now have a M.L. program that will print 'HI.' forever - or until we
   stop it. Type 'G1200'. When you tire of watching the stream of
   'HI.HI.HI.'s, press - no, not the STOP key - the RESTORE key by
   itself. The RESTORE key is HESMON's super-STOP key. It will halt just
   about any M.L. program (except HESMON itself when HESMON is plugged
   in. (Exception: if you attempt to use RS232 files all bets are off.
   Also, correct operation of RS232 files is not guaranteed with HESMON
   installed.) To get back to our example: after pressing RESTORE you
   should see a clear screen with the following:
   
      S*
        PC    IRQ SR AC XR YR SP
      ;XXXX  EA31 XX XX XX XX XX
   
   This is the RESTORE entry display, identified by the 'S*'. The X's are
   not actually what you will see. The register contents will depend upon
   exactly when you pressed RESTORE.
   
   If you want to enters series of bytes into memory, use the Memory
   Modify command (:). For example, to enter the sequence $01, $02, $03,
   $04, $05, $08, $07... starting at $1234, you  type:
   
      :12340102030405060708
   
   HESMON will respond by reprinting the line and will prompt for another
   line by printing the next available address. As with the Assemble
   command, you may exit by typing RETURN. Besides entering programs and
   data into memory, one of the functions of a M.L. monitor is to examine
   programs and data already in memory. HESMON has several commands for
   this purpose, including Disassembly (D), Memory Display (M), and
   Interpret Memory (I). These three commands are special in that the
   cursor-up and cursor-down key may be used to 'scroll' their displays
   forward and backward through memory. The action of this scrolling is
   easier to use than to describe. Think of the text on the screen as
   being on a drum which may be rolled up or down using the cursor
   up/down key. The scrollable display type found closest to the edge of
   the screen where new lines will appear is continued in the scroll
   direction. I said it was hard to describe. Try it. Just type 'D AAD7'
   and hit RETURN. Then press and hold the cursor-down key. To scroll up,
   go to the top of the screen and then hold down the cursor-up key.
   
   Other commands allow you to hunt for a particular Sequence of bytes in
   memory (H), compare two blocks of memory for differences (C), or
   transfer a block of memory to a different location (1). There are also
   two advanced functions: N - relocate absolute memory references in a
   program, and E - change the external references in a program. Finally,
   there are number base conversion and hexadecimal arithmetic functions.
   
            K.J. REVEALED TRILOGY    PAGE [162]    (C)1990 K.J.P.B.

<<previous page - next page>>