Program Power Machine Code Monitor ROM

discussion of games, software, hardware & emulators relating to the Acorn Atom
Post Reply
User avatar
hoglet
Posts: 7491
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Program Power Machine Code Monitor ROM

Post by hoglet » Wed Apr 04, 2018 8:43 am

I think this recently re-discovered Program Power Machine Code Monitor ROM is worthy of it's own thread. (It was in this thread). Thanks to John Ferguson for finding this in one of his recent Atom acquisitions, and taking the trouble to help archive it.

It's actually a very capable monitor ROM, including a full disassembler and a single stepper that uses 6522 interrupts.

Here's the ROM image (in ATM format):
program_power_mc_monitor.zip
(2.92 KiB) Downloaded 30 times
Here's the original advert:
au_83_03_page_36.png
Program Power - Machine Code Monitor / Disassembler

Features:
  • SINGLE STEP with REGISTER DISPLAY
  • BREAKPOINT handling routines
  • Tabulation Memory Dump with 'on-screen' Editing (printer option)
  • Memory Display - Hex, ASCII, Screen Code, Decimal & Binary
  • SEARCH - Hex or ASCII string
  • INTELLIGENT COPY
  • COMPARISON of two memory blocks
  • DISASSEMBLER (full feature)
  • INCREDIBLE PRICE - ONLY £14.95
To enter:

Code: Select all

LINK #A000
Commands:

Code: Select all

Commands:

    "ESC" - exit to basic

      ":" - set low or high baud rate (H/L)
      "P" - printer on
      "O" - printer off
      
      "R" - set current address
      "M" - disassemble instruction at current address and increment
      "N" - display contents of current address and increment
      "-" - display contents of current address and increment

   "COPY" - copy memory (to, from, end at)
      "V" - verify memory (from, with)
      "S" - search memory (from, to, for)

      "H" - hex dump (from)
      "T" - hex editor (cursor keys to move around, hex digits to edit, Q to quit)

      "J" - jump to subroutine, allows screen swapping, single stepping, etc.
      "I" - install a BRK handler and exit to Basic. Next BRK will be single stepped

"shift ^" - re-enter monitor (shift ^, next to BREAK)

When single stepping the registers can be modified with A, X, Y and P keys. And Q will stop single stepping.
The only other dedicated Monitor ROM I'm aware of for the Atom is the AEK Monitor ROM. This one is very good as well (I knew the author Alan Knowles), but it needs 1K of extra RAM from #9C00-#9FFF. If you know of any more Monitor ROMs, please let me know.

Dave

User avatar
hoglet
Posts: 7491
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Program Power Machine Code Monitor ROM

Post by hoglet » Wed Apr 04, 2018 8:47 am

Here's a quick disassembly:
MCMON.zip
(15.66 KiB) Downloaded 27 times
(made using Phill's BeebDis disassembler)
Last edited by hoglet on Thu Apr 05, 2018 9:00 am, edited 1 time in total.

User avatar
hoglet
Posts: 7491
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Program Power Machine Code Monitor ROM

Post by hoglet » Wed Apr 04, 2018 8:52 am

Does anyone regularly use an Atom machine code monitor? (or disassembler or single stepper)

If so, which one?

I notice this topic has come up before: Simple 6502 Monitor

User avatar
roland
Posts: 2935
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Program Power Machine Code Monitor ROM

Post by roland » Wed Apr 04, 2018 9:55 pm

I use the DISAS and STEP ( or TRACE ) statements regularly. They are in several expansion roms.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 7491
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Program Power Machine Code Monitor ROM

Post by hoglet » Thu Apr 05, 2018 7:06 am

roland wrote:I use the DISAS and STEP ( or TRACE ) statements regularly. They are in several expansion roms.
Which ROM in particular do you use?

User avatar
oss003
Posts: 2779
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: Program Power Machine Code Monitor ROM

Post by oss003 » Thu Apr 05, 2018 7:29 am

I do most of the debugging in Atomulator but sometimes use the DISAS (Josbox) and HEX (PCharme) commands.
There was also a good monitor program in the 80's written by Roel Heuvel, it's not a rom but many people used it.
You can find a description of the commands here: http://www.acornatom.nl/atom_nieuws/198 ... 821032.htm

Greetings
Kees
Attachments
monrh.zip
(2.65 KiB) Downloaded 17 times

Prime
Posts: 2552
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: Program Power Machine Code Monitor ROM

Post by Prime » Thu Apr 05, 2018 8:41 am

hoglet wrote:Here's a quick disassembly:
MCMON.zip
(made using Phill's BeebDis disassembler)
Glad to know someone is using it :) Must put it in github actually.

Do you have the control file you used to do the disassembly?

Cheers.

Phill.

User avatar
hoglet
Posts: 7491
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Program Power Machine Code Monitor ROM

Post by hoglet » Thu Apr 05, 2018 9:09 am

Prime wrote:
hoglet wrote: (made using Phill's BeebDis disassembler)
Glad to know someone is using it :) Must put it in github actually.
Oooh yes, please do.

The most time consuming part is dealing with embedded strings.

I was wondering about an "auto" string command that could be used to recognise:

Code: Select all

JSR #F7D1
<string>
LDA #&00
This type of pattern arises a lot, in both the Beeb and Atom world.

The command would need lots of flexibility:
- the JSR "trigger" address
- the legal range of string characters
- the offset from the terminating character to resume execution from (negative might indicate the JSR never returns)

A couple of other ideas:
- An extended version of the string command that allows the legal range of characters to be specified
- A command to process a jump table (string, address, string, address, ...)

This would make it amazingly more powerful.
Prime wrote: Do you have the control file you used to do the disassembly?
I've updated the earlier zip file to include this:
viewtopic.php?p=199776#p199776

Edit: Doh! It seems I somehow missed that a version 0.91 had been released with quite a few more capabilities (stringscan, stringz, stringterm, stringhi, wordentry, and the PC directive). These will make like much easier. But the autostring idea I think still makes sense.

Dave

Prime
Posts: 2552
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: Program Power Machine Code Monitor ROM

Post by Prime » Mon Apr 09, 2018 10:33 am

Just pushed version 1.1 to github.

Hilights for this version :

Fixed extra space between oprands in control file bug (more than one spec caused oprands not to be seen).
Added newpc / repeat / endrepeat control file keywords, to allow easy definition of blocks of repeating data e.g. the opcode / byte table from this rom :

Code: Select all

newpc $A009
repeat 36
  string pc 3
  byte pc
endrepeat
Still thinking on the string detection / decoding.

Update : have added

inlinescan addr
stringhiz addr

Inline scan with the address of the inline print routine will scan the loaded area for occurrences of JSR addr if found it will output a stringhiz + entry pc in the output file, this can then be used to paste back into the control file, as can located strings.

Cheers.

Phill.

Post Reply