[Coco] Color Forth Help Request

Stephen H. Fischer SFischer1 at Mindspring.com
Sat Feb 21 17:00:01 EST 2015


Hi,

Jeff's and John's MSDOS CoCo3 emulators both allow breakpoints and other commands in addition to saving your state.

Here is the text from Jeff's CoCo3 6809 Emulator.

Jeff appears to had added some things to his CoCo3 6809 Emulator.
John placed his 6309 version on RTSI and left.

-----------------------------------------------

8. THE DEBUGGER
---------------

The debugger halts the emulator, displaying the current state of all the
registers in the "6809" CPU, and also includes a 128-byte memory map and
a disassembly of current instructions.  In the lower-left corner, the first
few entries on the U and S stacks are shown.  Several commands are available
to you, as summarised in the box on the lower-right:  (These commands are
probably best understood through experimentation.  [ESC] will cancel any
option except [E]DIT, which is immediate.)

[B] Sets a BREAKPOINT address.  The emulator will resume normal execution
    until the breakpoint is hit, at which time the debugger reappears.  Only
    one breakpoint can be set at a time.  The breakpoint is cleared the next
    the the debugger or another menu is displayed.

[C] CONTINUE emulation.  The breakpoint is cleared and the program returns
    to normal emulation.

[D] Change the start address of DISASSEMBLY.  A register or hexidecimal
    address can be specified.  If a register is given, the start address of
    the disassembly will always follow whatever is in that register.  The
    default for this prompt is the next byte after the last instruction
    displayed on the current disassembly.

[E] EDIT memory.  Places a cursor on the memory map with which you can
    directly modify memory.  Arrows, PG UP and PG DN work.  ROM and memory-
    mapped device addresses behave as in the genuine machine.  ESC or ENTER
    when done.

[F] Change the 6809 FLAG registers.  Press the letter of the flag to toggle
    its true (1) or false (0) value.  ESC to abort, ENTER to keep changes
    and return to main debugger options.

[L] LOCATE WORD.  Enter a 16-bit word and the debugger will search the
    current 6809 address space (i.e. only memory banks currently switched
    in by the MMU) for that word.  The search starts at the current memory
    address in the memory dump window.
    
[H] HEXIDECIMAL CALCULATOR.  Enter a hex number or register to start.  You
    then enter one of the following operations:

    [+], [-], [*], [/], [A]nd, [O]r, [X]or, [N]eg, [S]hift, [R]ot, [D]ecimal

    The first seven of these will prompt for a second number or register to
    operate with.  [N] will NEGate the current result.  [S] or [R] followed
    by the left or right arrows will shift or rotate the bit positions of
    the result as appropriate ([ESC] to return to calculator options).  [D]
    will display the decimal equivalent and/or allow you to enter a decimal
    value.  [ESC] will return to the main debugger options.

[M] Change the MEMORY DUMP start address.  Enter either a hex address or a
    register.  If a register is used, the start address of the memory dump
    will always follow that register's contents.

[O] STEP OVER.  Same as "SINGLE STEP" below, except if a JSR or BSR is
    encountered, the emulator will instead run until it reaches the return
    address (i.e. the address immediately following the JSR or BSR
    instruction).
    
[Q] QUIT EMULATOR.  Exits back to MS-DOS.  You must confirm this choice with
    a "Y".  An other reply will return to the main debugger options.

[R] Change REGISTER contents.  Select a register using the arrow keys
    followed by [ENTER], or by pressing its letter.  Then type a new hex
    value for its contents, or the name of another register to copy that
    register's contents to the currently selected register.

[S] SINGLE STEP.  Execute one 6809 instruction and return to the debugger.

[V] VIEW VIDEO.  Display the current CoCo screen and wait for a key to be
    pressed.  Pressing any key will return you to the debugger's main
    options.

Register names are just there 6809 names, without brackets, except for the
D register.  D is entered as "A/B" to distinguish it from the hex numbers
000D, 000A, 000B, and 00AB.

-----------------------------------------------

I have never MESSed around so I cannot speak for that Emulator. 

If you are running W7 Professional or higher I recommend using the free XP Virtual Machine adding Windows 98 SE as it allows Windows type operations and a true MSDOS environment.

VCC offers nothing AFAIK.

SHF


----- Original Message ----- 
From: "Arthur Flexser" <flexser at fiu.edu>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Saturday, February 21, 2015 10:39 AM
Subject: Re: [Coco] Color Forth Help Request


> I'd suggest acquiring a programming tool that allows you to set breakpoints
> and single step, which would have quickly turned up the location of the
> error.  Perhaps VCC allows this as an option?
> 
> Art
> 
> On Sat, Feb 21, 2015 at 12:20 PM, Stephen Pereira <spereira1952 at comcast.net>
> wrote:
> 
>> Art & Darren:
>>
>> Thank you both so very much for your attention and assistance with my
>> problem!
>>
>> As I said in a previous note, I am a good 8080 assembly language
>> programmer, but I’m a rank beginner with the 6809.  I am not surprised that
>> I made this error, but I am surprised that the assembler did not catch it.
>>
>> I am using the EDTASM6309 that I purchased from Robert Gault.  I’ll bet
>> he’ll be interested to hear about this.
>>
>> This would have taken me quite a bit of time to figure out on my own, to
>> say the least.  I probably would have gone ahead and plugged in a 6809 back
>> into my computer in order to be using one machine for all my projects,
>> rather than splitting between two different machines.
>>
>> Thanka a million, guys!  I greatly appreciate your help with this!
>>
>> smp
>> --
>> Stephen M. Pereira
>> Bedford, NH  03110
>> KB1SXE
>>
>>
>> > On Feb 20, 2015, at 8:16 PM, Darren A <mechacoco at gmail.com> wrote:
>> >
>> > On Fri, Feb 20, 2015 at 4:20 PM, Stephen Pereira <
>> spereira1952 at comcast.net>
>> > wrote:
>> >
>> >> Here is my code:
>> >>
>> >> *
>> >> * BRUTE FORCE ROUTINE TO LOAD SCREENS 1 THRU 8
>> >> * USING THE DECB LOADM ROUTINE
>> >> * JAN 2015, SMP
>> >> * ERROR CHECK & ADVICE FROM BRETT GORDON
>> >> *
>> >>        FCB     $84,'L,'S,'C,'R+$80
>> >>        FDB     SSCR-7
>> >> LSCR    FDB     *+2
>> >>        PSHS    CC,A,B,DP,X,Y,U SAVE ALL JUST IN CASE
>> >>        LDX     #$094C  CLEAR FILE NAME LOCATION
>> >>        LDA     #32
>> >> L3      STA     ,X+
>> >>        CMPX    #$0954
>> >>        BNE     L3
>> >>        LDX     #$094C  FILE NAME LOCATION
>> >> L4      JSR     $A1B1   GET KEY IN A
>> >>        TFR     A,B     SAVE KEY IN B
>> >>        PSHS    B,X,Y
>> >>        JSR     [$A002] ECHO KEY
>> >>        PULS    Y,X,B
>> >>        TFR     B,A     GET KEY IN A
>> >>        CMPA    #13     CR?
>> >>        BEQ     NXT2    CR ENDS LOOP
>> >>        STA     ,X+     STORE KEY IN FILE NAME
>> >>        CMPX    #$0954  DONE IF 8 KEYS
>> >>        BNE     L4
>> >> NXT2    LDX     #$0954  FILE EXTENSION LOCATION
>> >>        LDA     #$42    B
>> >>        STA     ,X+
>> >>        LDA     #$49    I
>> >>        STA     ,X+
>> >>        LDA     #$4E    N
>> >>        STA     ,X
>> >>        LDD     #$0200  FILE TYPE = 2, ASCII FLAG = 0
>> >>        STD     $0957
>> >>        LDX     #$0000
>> >>        STX     #$00D3  OFFSET = 0
>> >>        JSR     $CA07   OPEN NEXT AVAIL FILE FOR INPUT
>> >>        LDD     #RET2   RETURN ADDR FOR LOADM RTS
>> >>        PSHS    D
>> >>        JMP     $CFE3   LOADM
>> >> RET2    PULS    U,Y,X,DP,B,A,CC RESTORE ALL
>> >>        JMP     NEXT    RETURN TO FORTH
>> >>
>> >> This code works fine on a stock CoCo 3, as well as in VCC with a 6809
>> >> CPU.  It is not elegant, and I don’t think I tried any fancy stuff.
>> Don’t
>> >> worry about the first few lines of code - they are for linking into
>> Color
>> >> Forth, and that seem to be fine.
>> >>
>> >> As far as I can tell, this code does not initiate any disk activity when
>> >> the CPU is a 6309, the machine simply goes off into never-never-land.
>> >>
>> >> Thanks, in advance, for whatever observations or advice you may have to
>> >> offer.
>> >>
>> >
>> >
>> > The code listing above contains an illegal instruction. In particular:
>> >
>> >        STX     #$00D3  OFFSET = 0
>> >
>> > You can't use an immediate operand with STX. If that is how it actually
>> > appears in your source code then it should be fixed.  I would be
>> surprised
>> > that an assembler accepts that without an error or warning.
>> >
>> > - Darren
>> >
>> > --
>> > 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