[Coco] Relocatable ROM monitor

Dave Philipsen dave at davebiz.com
Wed Oct 3 04:26:40 EDT 2018


Just an FYI, this program was edited and assembled on a real CoCo 3 under NitrOS9.  The size of the program is around 768 bytes but it could be made smaller.  There are some unused routines that I haven’t had a chance to pull out. The program shares its space with a data area that relocates with the program.  All absolute references were replaced with relative ones to make the program relocatable.  No page zero memory is used.  It is not a highly verbose program as it was designed for embedded systems where memory is sometimes at a premium. The STDIN and STDOUT of this program was originally intended to work over a serial port since most embedded systems do not have a video display or keyboard. The original program had a routine to allow the uploading of Motorola S-record files however that isn’t really practical on a CoCo where you already have the means to get programs into memory via tape or disk.


Dave


> On Oct 3, 2018, at 3:01 AM, Dave Philipsen <dave at davebiz.com> wrote:
> 
> Ok, here's a test version for you. This monitor has been modified for 32 columns and it is relocatable but it still relies on ROM calls (POLCAT & CHROUT) for keyboard and display.  The default load address is $0000 so you will probably want to specify an offset or else it will overwrite BASIC stuff in page zero RAM. Just to test it you might try:  LOADM "RMON", &H4000.  This will load it to $4000.  Then EXEC the program and it will display "COCO RELOCATABLE MONITOR".
> 
> The commands are:
> 
> <L> List memory. Because of the narrow display memory will be dumped progressively in hex at 8 bytes per line.  A typical line might look like this:  4028:FF 1A 50 4F 86 7E A7 8C.  The first four digits are the hex start address.  The colon separates that from the data bytes.  There are eight data bytes that follow and are represented in hex with a space between each byte.  Therefore $4028 => $FF, $4029 => $1A, etc.  Memory will list indefinitely until a key on the keyboard is pressed.  You may specify the start address of the dump like this:   4000L    That will start the memory dump at $4000.
> 
> <V> Displays the version number (currently 0.1)
> 
> <W> Woof!  I'm alive.
> 
> <,> Display previous memory location.
> 
> <.> Display next memory location.
> 
> <X> Exit to BASIC
> 
> <G> Go. Execute program in memory at current address.
> 
> To display a specific memory location type:  XXXX/    where XXXX is the hex address of the location you wish to view. The monitor will respond by displaying XXXX/VV   where VV is the value in hex at that memory location.  You may immediately edit that location by typing:    ":VV"  (without the quotes) that will replace the data at the current memory location with the new value, VV (in hex).  You may also type as long of a string as you like this way:   ":VV VV VV VV VV" (without the quotes) and each successive memory address will receive the data successively that you have typed.  So if I wanted to store 01 02 03 04 05 at address $6000 I would type:   6000:01 02 03 04 05  and those numbers would be stored in memory successively starting at $6000.
> 
> If you have a program in memory at address $2000 you can type 2000G   to execute the program.
> 
> If you have questions just let me know.  If you like the program and feel comfortable with it then let me know and I will write the appropriate routines for scanning the keyboard and displaying to the screen so the program will be completely self-sufficient without needing to call the routines in ROM.
> 
> 
> Dave
> 
> Download disk image here: http://www.davebiz.com/files/RMON.DSK
> 
> 
> 
> 
>> On 10/2/2018 10:14 PM, tim lindner wrote:
>> Yes it is. Thanks you very much!
>>> On Tue, Oct 2, 2018 at 5:54 PM Dave Philipsen <dave at davebiz.com> wrote:
>>> I got the monitor working on the CoCo.  It’s not relocatable and it relies on POLCAT and CHROUT right now: https://youtu.be/dcT5mnyPtCw
>>> 
>>> It’ll take me a little time to write a keyboard scan routine, character out routine, re-format for 32 columns, and re-write a few sections for re-locatable code.  It allows you to view/edit memory locations, do a dump of memory from a specific address, and execute code at a specific address.  Is that kind of what you want?
>>> 
>>> Dave
>>> 
>>>> On Oct 2, 2018, at 1:35 PM, tim lindner <tlindner at macmess.org> wrote:
>>>> 
>>>> 32.
>>>> 
>>>>> On Tue, Oct 2, 2018 at 11:34 AM Dave Philipsen <dave at davebiz.com> wrote:
>>>>> 
>>>>> Yeah, that makes it a little more difficult since I'd have to write the
>>>>> keyboard scan and text display routines from scratch.  They are normally
>>>>> just a simply read/write to a UART.  What text mode do you plan on using
>>>>> for the monitor (32,40,80)?
>>>>> 
>>>>> Dave
>>>>> 
>>>>>> On 10/2/2018 1:19 PM, tim lindner wrote:
>>>>>> I love to see it. But it'll prolly also need adjusting to read the
>>>>>> CoCo keyboard and output to the CoCo video.
>>>>>> 
>>>>>> I'm looking for something that doesn't depend on POLCAT or CHROUT.
>>>>>> 
>>>>>>> On Tue, Oct 2, 2018 at 11:16 AM Dave Philipsen <dave at davebiz.com> wrote:
>>>>>>> I have a monitor that I’ve used for years on embedded systems. It probably wouldn’t be too tough to make sure it’s relocatable. It uses a few locations in direct page RAM though.
>>>>>>> 
>>>>>>> Dave
>>>>>>> 
>>>>>>>> On Oct 2, 2018, at 10:16 AM, tim lindner <tlindner at macmess.org> wrote:
>>>>>>>> 
>>>>>>>> Does anyone know of a relocatable ROM monitor program for the CoCo?
>>>>>>>> 
>>>>>>>> Something I can load in to RAM arbitrarily and start peeking and
>>>>>>>> poking RAM, ROM and peripherals?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> --
>>>>>>>> tim lindner
>>>>>>>> 
>>>>>>>> "Proper User Policy apparently means Simon Says."
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Coco mailing list
>>>>>>>> Coco at maltedmedia.com
>>>>>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>>>>>> --
>>>>>>> Coco mailing list
>>>>>>> Coco at maltedmedia.com
>>>>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>>>>> 
>>>>> 
>>>>> --
>>>>> Coco mailing list
>>>>> Coco at maltedmedia.com
>>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>>> 
>>>> 
>>>> --
>>>> --
>>>> tim lindner
>>>> 
>>>> "Proper User Policy apparently means Simon Says."
>>>> 
>>>> --
>>>> Coco mailing list
>>>> Coco at maltedmedia.com
>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>> --
>>> Coco mailing list
>>> Coco at maltedmedia.com
>>> https://pairlist5.pair.net/mailman/listinfo/coco
>> 
>> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list