6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 6:22 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Simple 6502 monitor
PostPosted: Mon Aug 03, 2015 3:30 pm 
Offline

Joined: Sun Nov 23, 2008 2:33 pm
Posts: 12
Hi all,

Is there a simple 6502 monitor available (as source code) that has the following features....

Must be 4K or less.
Must be able to examine and dump memory, not interested in being able to assemble / disassemble.

The target system (Acorn System 5 clone), will be able to supply routines for input and output of characters, but I dare say I can adapt something that already does this via say a serial port.

Cheers.

Phill.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Mon Aug 03, 2015 3:53 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
For sheer minimalism, try Bruce's Compact MONitor. His site's down, and the page isn't archived, so here's my copy, back-ported to the 6502:
https://github.com/BigEd/a6502/blob/mas ... s/cmon.a65
(Some of his site is archived at http://web.archive.org/web/201305041937 ... .comuf.com)
It's a companion to the One Page Assembler.

It might be worth looking up the original Apple 1 monitor by Woz:
http://www.sbprojects.net/projects/apple1/wozmon.php

Edit: there's another archive of Bruce's site lowkey.comuf.com here.


Last edited by BigEd on Mon Nov 02, 2015 4:56 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Mon Aug 03, 2015 4:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1746
Location: Sacramento, CA
I trimmed down my SBC2OS for Enso's CHOCHI board. You can give it a try also. It's similar to the Apple II monitor and uses 2k. I can help with command syntax and IO interfacing if you need it.

viewtopic.php?f=2&t=2566&p=26996#p26996

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Mon Aug 03, 2015 4:36 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
My current implementation of SyMon 5.0 r2 will fit in just under 4K with the assembler/disassembler removed. It does require a simple BIOS for the I/O, which uses a serial port for a console and a 65C22 for timer services and two 8-bit ports. It's quite full function however and includes the following commands:

A = {ACCUMULATOR} Examine/Edit the ACCUMULATOR preset/result register's contents
C = {COMPARE} Compare source to target address for a desired length, shows addresses that don't compare
D = {DUMP} Examine (in hex/ASCII) the contents of 256 consecutive memory locations
E = {EXAMINE} Examine/Edit a memory location's contents
F = {FILL} Fill consecutive memory locations with a specified value
G = {GO} Begin program execution at a specified memory location
H = {HEX TO DECIMAL} Convert an entered hex value (up to 8 digits) to a decimal value
J = {DECIMAL TO HEX} Convert a decimal value (max value = 4,294,967,295 ) to a hex value
K = {LOCATE BYTE STRING} Search memory for a specified byte string (16 bytes max)
L = {LOCATE TEXT STRING} Search memory for a specified text string (16 characters max)
M = {MOVE} Copy a specified memory range to another memory location
P = {PROCESSOR} Examine/Edit the PROCESSOR STATUS preset/result register's contents
R = {REGISTERS} Examine the contents of ALL preset/result registers and Program Counter
S = {STACK POINTER} Examine/Edit the STACK POINTER preset/result register's contents
X = {X REGISTER} Examine/Edit the X REGISTER preset/result register's contents
Y = {Y REGISTER} Examine/Edit the Y REGISTER preset/result register's contents
Z = {TEXT EDITOR} Enter text directly into a specified memory area ([BACKSPACE] erases, [ESC] exits)
[BREAK] = {BREAK} Interrupt any current task then return control to SyMon 5.0 monitor
[,] = {COMMA} Sets the Delay variables: MSDELAY and DELLO/DELHI (8-bit/16bit)
[.] = {PERIOD} Performs a 1 millisecond delay times variable MSDELAY (1-256ms)
[/] = {SLASH} Performs the above delay the number of times in DELLO/DELHI (1-65536 times)
[\] = {BACKSLASH] Performas the above delay by 1-256 times
[(] = {NEW MACRO} Start new keystroke macro - limited to 127 bytes
[)] = {RUN MACRO} Run keystroke macro (last byte of 128 byte input buffer)
[ESC] = {ESCAPE} Terminate/Exit command function
remove - [CNTL-A] = {ASSEMBLER} Run the S/O/S sub-assembler utility
remove - [CNTL-D] = Disassemble instructions from specified address
[CNTL-L] = Xmodem Loader - Uses Xmodem-CRC for download from termimal to memory at $0800 or user specified
[CNTL-P] = Program EEPROM (Atmel 28C256) - note: source/target addresses not checked - be careful!
[CNTL-Q] = {QUERY} Show the list of useful system subroutine addresses
[CNTL-R] = {RESET} Restart S/O/S SyMon 5.0
[CNTL-T] = Display System Uptime since Boot/Reset (requires 65C22 and BIOS)
[CNTL-V] = Display SyMon/BIOS Version
[CNTL-Z] = {Zero RAM MEMORY} Fill RAM ($0000 - $7FFF) with $00 then restart S/O/S SyMon 5.0

Note that the requires a 65C02 processor. My current BIOS fits in less than 768 bytes and includes a 40-entry JMP table.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Mon Aug 03, 2015 9:21 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
You can look at the F8 ROM of the original Apple II. This monitor is only 2k and has an integrated 6502 disassembler and all other features you need. This monitor has the advantage that the first 100bytes are only used by the lo-res functions of the Integer Basic and can be used for your own input and output routines. I normally use a modified version of it with 6551 support in the first bytes at $F800 and the input / output redirected to the 6551 routines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Tue Aug 04, 2015 8:33 am 
Offline

Joined: Sun Nov 23, 2008 2:33 pm
Posts: 12
Hi all,

Thanks for the replies, in the end I went with Daryl's cut down SBCOS files, as they where easy to re-target and did what I needed.

Cheers.

Phill.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Tue Aug 04, 2015 3:55 pm 
Offline

Joined: Wed May 20, 2009 1:06 pm
Posts: 491
Are any of those monitors in the public domain?


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Tue Aug 04, 2015 5:12 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Bruce's is freely licensed, in effect - he didn't want to license it formally but said words to the appropriate effect, so I added appropriate words to my port.

Apple's just might be free of copyright ("Prior to 1978 [in USA], works had to be published or registered to receive copyright protection.")

Daryl, it would be great if you'd add an appropriately permissive license to your sources, if it suits your needs.

Same for you, floobydust, if and when you make a release... except I see your work is derived from Brian Phelps', and he hasn't provided any license information, so perhaps you can't...


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Tue Aug 04, 2015 7:35 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Hi Ed, et al,

Current status is:

- The 65C02 BIOS is 100% written by me, and based on code I had done back in the late 80's.
- The monitor has been completely rewritten and is unlikely to contain any specific code from the original SyMon-III.
- The S/O/S assembler/disassembler is mostly his code, but many changes for code reduction (268 bytes smaller) and will only run on a 65C02.

There are several new commands which did not exist in the original code: Memory Compare, EEPROM programming, Xmodem/CRC loader, all written by me and several others removed/replaced.
I'd have to do another scan to ensure nothing specific of his remains in the core monitor, but feel fairly confident.

I've not given any real thought on the licensing for any of it, but have posted a few versions here, including sending Brian an updated copy last year.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Tue Aug 04, 2015 9:50 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
It would of course be great to see you continue to publish versions! And it is good to hear that Brian is in the loop. For me (for the way I think) it would be preferable for Brian to license his code and then for you to license yours in some compatible way. Then, if something happens and one or other of you goes quiet, there'll be no doubt for future adventurers - they can take what they find, in accordance with the license, and incorporate it into their own projects with whatever improvements they see fit.

For these purposes it doesn't much matter which open source style of license you pick. A homebrewed license might be better than nothing, but it might not be - staying with tried and tested is better.

(The above only matters if we care about copyright. If we don't care, then we can take anything and modify it freely, until someone chooses to stop us.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Wed Aug 05, 2015 2:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1746
Location: Sacramento, CA
BigEd wrote:
Daryl, it would be great if you'd add an appropriately permissive license to your sources, if it suits your needs.


I thought at one time I had a general "free for personal use and contact me for permission to use it commercially... no warranty given" statement, but it must have fallen out along the way.

All of my work is free for personal use - feel free to modify any of it to your needs. If you want to give credit back to me, that's great but not required. It just doesn't seem right for someone to use it commercially without my permission, and perhaps a little monetary incentive :wink: .

just my two cents...

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Wed Aug 05, 2015 8:34 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Thanks for clarifying!


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Wed Apr 04, 2018 9:28 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
I see hoglet has recently received and republished a copy of Program Power Machine Code Monitor ROM for the Atom. It's a 4k ROM.

(He links back to the stardot thread which Phill came from - a few findings in there too, for future reference. A circular reference, in fact...)

Edit: and another recent thread by hoglet on the Program Power Programmer's Toolbox ROM


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple 6502 monitor
PostPosted: Sat Mar 20, 2021 12:58 pm 
Offline
User avatar

Joined: Wed Nov 11, 2020 3:33 am
Posts: 22
Location: Sydney
There's a full two pass assembler, dissembler, debugger/tracer, memory dump, etc under 4K.

https://github.com/jdimeglio/SYSMON65

However its for the 65C02 :-)

_________________
_________________________________________________________________________
Checkout my 2pass assembler/monitor https://github.com/jdimeglio/6502-Monitor


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: