[Coco] Color Forth Help Request
Stephen Pereira
spereira1952 at comcast.net
Sat Feb 21 14:19:55 EST 2015
Hi Art,
You are absolutely right.
The problem I face with my Color Forth project is that Color Forth (fig-FORTH in general) wants to take over the entire machine. My Color Forth Nucleus resides in the high portion of the low 32K on the CoCo, $5800 and up. the rest of the Forth system resides above $2000, filling up from $2000 to $57FF. As you know, the display screen and DECB reside in lower memory from $0000 to $1FFF. So I face a real problem attempting to debug this code.
So far, the good folks here have been able to lend a hand as I get in over my head.
Thanks again, for all your patience and attention.
smp
--
Stephen M. Pereira
Bedford, NH 03110
KB1SXE
> On Feb 21, 2015, at 1:39 PM, Arthur Flexser <flexser at fiu.edu> wrote:
>
> 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