Re: 6800 fig-FORTH?

2018-06-26 Thread dwight via cctech
I found a fig-forth listing at:
http://www.forth.org/fig-forth/fig-forth_6800.pdf
I can see that it is waiting for a $0D. See the line after EXPEC3, label.
If you have a monitor running, you should be able to check the TIB for the 
return character ( I'n not positive it doesn't trap it out first ).
To help isolate the problem, when you hit enter does it continue to allow you 
to enter text and echo it or does it just die?
I defeat the optimization, you can place a DB #0 after each JMP in the code. 
That will pad it to the original length and make checking a lot easier.
I can help more as you progress. These original listings all were able to boot 
and execute an input line. They were known to have more hidden errors with 
operations like U> and such.
Dwight



From: cctech  on behalf of Stephen Pereira via 
cctech 
Sent: Saturday, June 23, 2018 12:16:34 PM
To: cctech@classiccmp.org
Subject: 6800 fig-FORTH?

Hi folks,

I know there's not much 6800 activity here, but I figure this would be worth a 
try.

Has anyone here ever seen or ever had fig-FORTH for the 6800 working?

I have a SWTPC replica system from Bob Applegate / Corsham Technologies, and I 
love it. It came with a complete 64K RAM, as well as the SWIBUG monitor, and 
the monitor code has been extended by Bob/Corsham to interface with an SD Card 
sub-system for floppy disk emulation. This provides the original terminal 
access to the machine with the simple system monitor, and also the FLEX OS for 
running programs. It is a blast to use.

Recently, I took a look around and found the fig-FORTH listing as originally 
published back in 1979, and also a Source Forge site that holds an electronic 
copy:

https://sourceforge.net/projects/asm...th_6800-stuff/ 


I've managed to get the source code to assemble with a cross-assembler supplied 
by Bob/Corsham. It does not produce an exact copy of the original code, because 
the code uses the JMP instruction pretty much exclusively, and the assembler 
substitutes a relative BRA instruction sometimes. So my code ends up being 
several bytes shorter because of saving one byte each time a JMP is replaced by 
a BRA. That said, it appears to me that the code matches up with the original 
listing otherwise.

So my problem is this: When I run the code on my system, fig-FORTH seems to 
sign on, and will accept input from the keyboard (double echos of each key 
typed) but it then does not proceed to interpret the command entered. The 
interesting thing I see by winding my way around in the code is that it has 
already properly performed a bunch of setup and produces the initial "Forth-68" 
sign on, and that has required it to already be using many of the Forth 
commands that were defined by machine language. This indicates to me that some 
of the command interpretation is working. The I/O from/to the terminal is by 
calls to the system monitor I/O routines, and that seems to be also working, 
despite the double echos of the typed characters. It just does not proceed to 
interpret what is typed in at all.

Of course, I have no idea if this code ever worked properly, or if I am 
encountering early buggy code. So I'm looking to see if anyone else has ever 
seen the fig-FORTH working on a 6800 system? Any pointers to good working code?

Thanks for listening!

smp
- - -
Stephen Pereira
Bedford, NH  03110
KB1SXE




Re: 6800 fig-FORTH?

2018-06-26 Thread dwight via cctech
The double characters is most likely how you set up you serial. Normally A 
Forth will echo your typing so you want to set it for duplex.

You might look at the locations it uses for things like TIB, return stack and 
data stack. I suspect at least the return and data stack may be working but it 
is also possible your memory isn't fully decoded and you are over writing your 
code.

It may not be seeing the right character for a end of line. Most expect a 0Dh 
and a 0Ah. check your serial setup for that as well.

Dwight



From: cctech  on behalf of Stephen Pereira via 
cctech 
Sent: Saturday, June 23, 2018 12:16:34 PM
To: cctech@classiccmp.org
Subject: 6800 fig-FORTH?

Hi folks,

I know there's not much 6800 activity here, but I figure this would be worth a 
try.

Has anyone here ever seen or ever had fig-FORTH for the 6800 working?

I have a SWTPC replica system from Bob Applegate / Corsham Technologies, and I 
love it. It came with a complete 64K RAM, as well as the SWIBUG monitor, and 
the monitor code has been extended by Bob/Corsham to interface with an SD Card 
sub-system for floppy disk emulation. This provides the original terminal 
access to the machine with the simple system monitor, and also the FLEX OS for 
running programs. It is a blast to use.

Recently, I took a look around and found the fig-FORTH listing as originally 
published back in 1979, and also a Source Forge site that holds an electronic 
copy:

https://sourceforge.net/projects/asm...th_6800-stuff/ 


I've managed to get the source code to assemble with a cross-assembler supplied 
by Bob/Corsham. It does not produce an exact copy of the original code, because 
the code uses the JMP instruction pretty much exclusively, and the assembler 
substitutes a relative BRA instruction sometimes. So my code ends up being 
several bytes shorter because of saving one byte each time a JMP is replaced by 
a BRA. That said, it appears to me that the code matches up with the original 
listing otherwise.

So my problem is this: When I run the code on my system, fig-FORTH seems to 
sign on, and will accept input from the keyboard (double echos of each key 
typed) but it then does not proceed to interpret the command entered. The 
interesting thing I see by winding my way around in the code is that it has 
already properly performed a bunch of setup and produces the initial "Forth-68" 
sign on, and that has required it to already be using many of the Forth 
commands that were defined by machine language. This indicates to me that some 
of the command interpretation is working. The I/O from/to the terminal is by 
calls to the system monitor I/O routines, and that seems to be also working, 
despite the double echos of the typed characters. It just does not proceed to 
interpret what is typed in at all.

Of course, I have no idea if this code ever worked properly, or if I am 
encountering early buggy code. So I'm looking to see if anyone else has ever 
seen the fig-FORTH working on a 6800 system? Any pointers to good working code?

Thanks for listening!

smp
- - -
Stephen Pereira
Bedford, NH  03110
KB1SXE




Re: 6800 fig-FORTH?

2018-06-26 Thread Eric Smith via cctech
On Sat, Jun 23, 2018 at 1:16 PM, Stephen Pereira via cctech <
cctech@classiccmp.org> wrote:

> Has anyone here ever seen or ever had fig-FORTH for the 6800 working?
>

In the mid-1980s I know someone with a WaveMate 6800 system. He had
fig-Forth running on FLEX.  At the time I was only interested in the Apple
II, DEC PDP-10, and BSD 4.x on VAX, so I didn't pay much attention to his
system.

I had problems similar to what you describe when I was bringing up the PACE
version of fig-Forth, and tracked down and fixed a serious bug in the
published listing. AFAICT, I am the only person other than the author who
ever ran the PACE version. I found it far easier to debug on a simulator
rather than the real hardware.

The 6800 version must surely have been far more popular than the PACE
version, so it seems somewhat unlikely that there would be a huge defect in
the published listing, but it's not impossible.

I wrote some 68HC11 assembly professionally in the late 1980s, but the only
actual 6800 code I've writen was a 6800 version of the Apple I monitor.
Writing 6800 code after being used to the 68HC11 and 6809 was a huge step
backward; I kept trying to use newer instructions and addressing modes that
the 6800 did not have.  I have a non-working Electronic Product Associates
Micro 68; maybe someday I'll fix it up.

Eric
N2ES


Re: 6800 fig-FORTH?

2018-06-24 Thread Stephen Pereira via cctech
Yes, after it signs on, I am in a state that anything I type is echoed.  When I 
type a CR, the cursor goes back all the way to the left, as it should.  If I 
type CTRL-J for LF, the cursor drops down 2 lines, as it should (because of the 
double echo).

Thanks for the tip about inserting DB #0 after the JMPs that the assembler 
changes to BRAs.  I’ll give that a try.

smp
- - -
Stephen Pereira
Bedford, NH  03110
KB1SXE


> On Jun 23, 2018, at 9:19 PM, dwight  wrote:
> 
> I found a fig-forth listing at:
> http://www.forth.org/fig-forth/fig-forth_6800.pdf 
> 
> I can see that it is waiting for a $0D. See the line after EXPEC3, label.
> If you have a monitor running, you should be able to check the TIB for the 
> return character ( I'n not positive it doesn't trap it out first ).
> To help isolate the problem, when you hit enter does it continue to allow you 
> to enter text and echo it or does it just die?
> I defeat the optimization, you can place a DB #0 after each JMP in the code. 
> That will pad it to the original length and make checking a lot easier.
> I can help more as you progress. These original listings all were able to 
> boot and execute an input line. They were known to have more hidden errors 
> with operations like U> and such.
> Dwight
>