Re: 6809 Monitor
At 12:24 PM 2/10/2018 -0700, you wrote: >Does anyone have source to a 6809 monitor program? > >I'm looking for something I can make work in a CoCo. > >Functionality I'm looking for is something that will let me read and >write to memory. Attached is the zipped C source code for a 6809 monitor I wrote in the early 1990s. Compiler used was HiTech C. Build files included. It worked, but of course 'there may be bugs.' :) It's fairly generic, so not many changes needed for other CPUs. I also did an 80C196 ver. If the zip file attachment fails, it's online here: http://everist.org/texts/6809_Mon_V2.zip Doco from the MONITOR.C file: /* File: MONITOR.C For machine: Dual 6809 game board. Compiler:Hitech 6809 C. Written: Guy Dunphy, 4/9/94, derived from an earlier version. (by me) This file contains all code for a versatile serial monitor. It is event driven, and time sliced, so it can operate in the background with other CPU tasks. All data is stored big-endian. All serial I/O is via the functions aux_get_ch(), aux_put_ch(). Serial Tx is polled, while Rx can be either polled, or buffered interrupt driven with hardware handshaking (via RTS). See monitor_init(). This monitor can be used in multi CPU systems, where only one CPU has a serial comms interface, and each has different IO/mem maps and codespaces. If there is a means for passing strings between the CPUs, then the one with serial IO is used to run a 'master' copy of the monitor, and the other CPU(s) runs a 'slave' monitor version. The master CPU does all command line entry/edit operations, and can be set to pass complete command lines on to other CPU(s). It also will echo text returned from the slave CPU(s) to the serial interface. To use this file:- * For single CPU operation, just compile it as is. * As a 'master' (talks to a slave), predefine symbol MON_MASTER. * As a 'slave', predefine symbol MON_SLAVE. Monitor commands (See also mon_help_text[] ) Multiple cmds allowed on a line, use ';' to separate. Upper/lower case of commands and parameters is not significant. A 'range' may be:- start start end start length(Shorthand form: if length is small and < start.) start L length space (as 1st char) Repeat last command.Execute or re-edit. tab (as 1st char) Repeat 'saved' command. Execute or re-edit. tab (not 1st char) Copy cmd to 'save' buffer. esc (as 1st char) Allow re-edit of following 'repeat' cmd. (... twice ) Kill 'pass cmds to slave' mode. D range Dump mem. D(no other chars) Dump another 64 bytes F[W][I] range data Fill memory. W=word, I=increment. G addr Go (call) to addr M start [data]... Modify mem. data ::= hex_byte | string | char string ::= "text" char ::= 'c R [reg_name = value]Optionally modify register(s), then display all regs. reg_name ::= cc a b d dp x y u pc Z [flag_val]Zot! Set operation mode. Bit flags set are:- b0 Halt system (no return from monitor). b1 Inhibit serial echo. b2 Inhibit serial prompt output. b3 Inhibit all monitor output (incl help). b4 Pass all cmds to slave CPU. ESC,ESC to exit. Examples:- Z Re-initialize monitor. Lose trailing cmds. Z 0 Restore normal operation, continue. Z F Just accept commands, no system, echo, etc. Z 2 Normal, but no echo (ie half duplex). S1ccddddss Motorola data record. Load to memory. Each hex line is treated as a command, so there is no special 'load' cmd. Before sending hex, best to do a Z6 or Z7 to stop all other time consuming tasks. When finished, do a Z 0 to restore normal ops. An ASCII ACK ($06) is sent when line processing is complete and no error found. This can be used as an acknowledge. If an error is found, a '?' is returned. See s19_decode(). S0 and S9 Header and end records: ignored.
Re: 6809 Monitor
I found this page two days ago - it is a Motorola document for MIKBUG and MINIBUG:includes instructions and source code for both. MINIBUG uses a Motorola ACIA for serial. MIKBUG does bit banged serial through a PIA. http://www.swtpc.com/mholley/MP_A/MIKBUG_Index.htm I am porting MINIBUG to Tektronix 4052A/4054A assembly code (assembler program found on a Tekniques library tape). Here is the link to my thread on vcfed about that Assembler: http://www.vcfed.org/forum/showthread.php?65857-Tektronix-4052A-4054A-Assembler-program-and-TECO-text-editor On Tue, Oct 2, 2018 at 6:18 PM Torfinn Ingolfsen via cctalk < cctalk@classiccmp.org> wrote: > Also, there is this: > https://github.com/electronalan/Colormon > and a monitor in here too: https://github.com/6809/sbc09 > HTH > On Tue, Oct 2, 2018 at 10:39 PM Dennis Boone via cctalk > wrote: > > > > > Does anyone have source to a 6809 monitor program? > > > > > I'm looking for something I can make work in a CoCo. > > > > > Functionality I'm looking for is something that will let me read and > > > write to memory. > > > > Sources to the BUFFALO, ASSIST09 and MONDEB09 monitors are included in > > the Alan Baldwin's AS package. > > > > De > > > > -- > mvh > Torfinn >
Re: 6809 Monitor
Also, there is this: https://github.com/electronalan/Colormon and a monitor in here too: https://github.com/6809/sbc09 HTH On Tue, Oct 2, 2018 at 10:39 PM Dennis Boone via cctalk wrote: > > > Does anyone have source to a 6809 monitor program? > > > I'm looking for something I can make work in a CoCo. > > > Functionality I'm looking for is something that will let me read and > > write to memory. > > Sources to the BUFFALO, ASSIST09 and MONDEB09 monitors are included in > the Alan Baldwin's AS package. > > De -- mvh Torfinn
Re: 6809 Monitor
> Does anyone have source to a 6809 monitor program? > I'm looking for something I can make work in a CoCo. > Functionality I'm looking for is something that will let me read and > write to memory. Sources to the BUFFALO, ASSIST09 and MONDEB09 monitors are included in the Alan Baldwin's AS package. De
Re: 6809 Monitor
On 10/2/2018 12:51 PM, Lawrence Wilkinson via cctalk wrote: On 02/10/18 21:24, tim lindner via cctalk wrote: Does anyone have source to a 6809 monitor program? I'm looking for something I can make work in a CoCo. Functionality I'm looking for is something that will let me read and write to memory. There is a listing of ASSIST09 in this Motorola book: http://geneslinuxbox.net:6309/gene/Genes-os9-stf/MC6809-MC6809E%208-Bit%20Microprocessor%20Programming%20Manual%20(Motorola%20Inc.)%201981.pdf This might be overkill, as it has single-step, breakpoints etc. If you type it in, note that the listing omits the second and subsequent hex bytes for constants (FCB) ! LJW If you look at page B-65 (pdf 189) where it mentions "Start NMI Timeout", there is a bit of hardware you have to add to the design, and set up and control the NMI. The hardware counts cycles and applies the NMI right after you go to the opcode to be traced, and sends you back into the monitor via NMI. I did a quick scan and didn't see what board they assume for a reference design which may have the NMI trace part of the board. We had an option board which would kill the main firmware and add a debugger, this hardware, and a serial port to a controller we had, which turned any board into a debugging system. There was another slight mod and a diagnostic firmware we also had on an addon board to allow testing the peripheral we were controlling, and run diagnostics on other hardware. I had a lot of fun getting this monitor going, and a friend implemented a Forth for the diagnostic system for scripting. Thanks Jim
Re: 6809 Monitor
On Tue, 2 Oct 2018, tim lindner via cctalk wrote: Does anyone have source to a 6809 monitor program? I'm looking for something I can make work in a CoCo. Functionality I'm looking for is something that will let me read and write to memory. If you're up for a disassembly challage, there's a BIN file in Don Maslin's archive for CBUG. Not sure if it's a ROM image or an executable. https://amaus.org/static/S100/people/don%20maslin/AARDVARK_Tape_Backups/maslin_c_d_10apr97/ddrive/sydex/tandy/ Mike Loewen mloe...@cpumagic.scol.pa.us Old Technology http://q7.neurotica.com/Oldtech/
Re: 6809 Monitor
On 02/10/18 21:24, tim lindner via cctalk wrote: Does anyone have source to a 6809 monitor program? I'm looking for something I can make work in a CoCo. Functionality I'm looking for is something that will let me read and write to memory. There is a listing of ASSIST09 in this Motorola book: http://geneslinuxbox.net:6309/gene/Genes-os9-stf/MC6809-MC6809E%208-Bit%20Microprocessor%20Programming%20Manual%20(Motorola%20Inc.)%201981.pdf This might be overkill, as it has single-step, breakpoints etc. If you type it in, note that the listing omits the second and subsequent hex bytes for constants (FCB) ! LJW -- Lawrence Wilkinson lawre...@ljw.me.uk Ph +41(0)79 926 1036 http://www.ljw.me.uk
Re: 6809 Monitor
On Tue, Oct 02, 2018 at 12:24:47PM -0700, tim lindner via cctalk wrote: > Does anyone have source to a 6809 monitor program? > > I'm looking for something I can make work in a CoCo. > > Functionality I'm looking for is something that will let me read and > write to memory. I have a copy of psymon.s if you want it. > > -- > -- > tim lindner > > "Proper User Policy apparently means Simon Says." -- - d...@freebsd.org d...@db.net http://artemis.db.net/~db * * psymon version 1.00 * * copyright (c) 1979 percom data company, inc. * percom data company, inc. grants unrestricted * royalty-free license for the use of this * program provided the user clearly acknowledges * its origin. * * while this monitor is very simple, its true * power lies in its extensibility and in the * tools that it provides for other software * to use. This operating system is dedicated * to harold mauch and his legendary 512 byte * operating system. * * psymon Much modified version 4.00 * * commands: * m - memory examine/change * o - memory change (output to I/O port no read) * g - go to address * r - register examine/change * l - load program from tape, optional load address * s - save program to tape * b - set/list breakpoints * u - unset breakpoints * e start end dest - Burn EEPROM at dest with data from start, end * * other comments to be added here later * * Extensive modifications for GPE * - acia changed to 68681 DUART, I know strange to use a 68k part on 6809 * - removed 'z' command * - moved I/O,ram,rom addresses as needed * - removed special code for special dcb's for punch since * debug port will be used for all uploads/downloads and need the bytes. * (There is lots of ROM on target system, but I am unwilling to attempt * relocating monitor since that would entail working out padding, * see my next note) * - Original programmer did not make use of 'lbra' and 'lbsr' instructions * for reaching code ie. used 'stepping stone' technique, makes me wonder * if this was originally a 6800 monitor? * - Added 'o' command * - DCB is obviously "Device Control Block" but no reference to that * in "FLEX" or "OS9" so I have no idea where this came from. * * DB. Feb 19 1990 * DB. Feb 25 1990 * * system address constants (GPE version) RUNSYS equ 1 ; if bottom bit is set on INPORT, Run 2nd ROM rom1 equ 0F800H ; base add of psymon rom rom2 equ 0C000H ; base add of extension rom ram equ ; base add of ram termnl equ 8000H ; system terminal acia * ascii character constants cr equ 0dH ; carriage return lf equ 0AH ; line feed sp equ 20H ; space * acia control configurations MREG equ 0 ; Mode register (MR1,MR2) SREG equ 1 ; Status register CSREG equ 1 ; Clock select register CREG equ 2 ; Command register RHR equ 3 ; Receiver holding register THR equ 3 ; Transmitter holding register OPCR equ 0DH ; Output port conf reg. INPORT equ 0DH ; Same as above, read input port SETOP equ 0EH RESETOP equ 0FH * yes, THR is the same as RHR * * Bit masks for SREG (status register) * RXRDY equ 01H ; RXRDY equ %0001 TXRDY equ 04H ; TXRDY equ %0100 RXBRK equ 80H ; RXBRK equ %1000 FRAME equ 40H ; FRAME equ %0100 PARER equ 20H ; PARER equ %0010 OVRUN equ 10H ; OVRUN equ %0001 * * Commands for CREG * RESETRX equ 20H ; RESETRX equ %0010 RESETTX equ 30H ; RESETTX equ %0011 RESETMR equ 10H ; RESETMR equ %0001 ENBTX equ 04H ; ENBTX equ %0100 Enable Transmitter ENBRX equ 01H ; ENBRX equ %0001 Enable Receiver DISTX equ 08H ; DISTX equ %1000 Disable Transmitter DISRX equ 02H ; DISRX equ %0010 Disable Receiver ENABLE equ 05H ; ENABLE equ %0101 Enable both RX and TX * * Commands for MR * Whenever MR is pointing to MR1 and then is written to, MR flips to MR2. * RXRTSNO equ 0 RXRTSYES equ 80H ; RXRTSYES equ %1000 RXINTRDY equ 0 RXINTFUL equ 40H ; RXINTFUL equ %0100 * * MR1 equ RXRTSNO|RXINTRDY|ERRORCHAR|NOPARITY|BITS8 MR1 equ 13H ; MR1 equ %00010011 *MR2 equ NORMAL|TXRTSNO|CTSCTLNO|STOP1 MR2 equ 07H ; MR2 equ %0111 * * Commands for CSREG * B9600 equ 0BBH ; B9600 equ %10111011 * BURNRAM equ 1400H ; where EEPROM routine goes * * psymon dcb offsets dcblnk equ 0 ; ptr to next dcb in chain dcbdid equ 2 ; ascii 2 char device id dcbdvr equ 4 ; device driver address dcbioa equ 6 ; device io address dcberr equ 8 ; error status code dcbext equ 9 ; dcb extension byte count dcbapp equ 10 ; driver dcb appendage * psymon dcb function codes readfn equ 01H ; read writfn equ 02H ; write statfn equ 04H ; read status initfn equ 08H ; init the 68681 baudfn equ 10H ; set baud rate (for 68681 only) * psymon ram definitions (mp-a2 version) org ram * psymon in
6809 Monitor
Does anyone have source to a 6809 monitor program? I'm looking for something I can make work in a CoCo. Functionality I'm looking for is something that will let me read and write to memory. -- -- tim lindner "Proper User Policy apparently means Simon Says."