Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #9373 > unrolled thread
| Started by | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| First post | 2012-02-06 23:07 +0100 |
| Last post | 2012-02-10 01:45 +0100 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.forth
Gforth-EC, the underappreciated embedded Forth David Kuehling <dvdkhlng@gmx.de> - 2012-02-06 23:07 +0100
Re: Gforth-EC, the underappreciated embedded Forth Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-02-07 16:07 +0000
Re: Gforth-EC, the underappreciated embedded Forth BruceMcF <agila61@netscape.net> - 2012-02-07 07:51 -0800
Re: Gforth-EC, the underappreciated embedded Forth David Kuehling <dvdkhlng@gmx.de> - 2012-02-07 16:55 +0100
Re: Gforth-EC, the underappreciated embedded Forth Coos Haak <chforth@hccnet.nl> - 2012-02-08 01:30 +0100
Re: Gforth-EC, the underappreciated embedded Forth David Kuehling <dvdkhlng@gmx.de> - 2012-02-08 09:52 +0100
Re: Gforth-EC, the underappreciated embedded Forth David Kuehling <dvdkhlng@gmx.de> - 2012-02-10 01:45 +0100
| From | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| Date | 2012-02-06 23:07 +0100 |
| Subject | Gforth-EC, the underappreciated embedded Forth |
| Message-ID | <87fwen62fr.fsf@snail.Pool> |
Hi, I've been having a look at Gforth-EC lately, that's the embedded cross-compiled Forth support that has been included with Gforth all the time, but as it's well hidden and pretty undocumented, I guess most people wouldn't have noticed it. Now it turns out it only takes a few commands to generate a usable 8086 gforth-ec executable, running in dosbox (i.e. emulated under Linux): From the Gforth source directory, run: ./build-ec 8086 mv kernl-8086.fi gforthec.com # need to rename for dosbox to execute it dosbox gforthec.com And voila, it prints the standard Gforth welcome message. Some testing: here . 14334 ok unused u. 47162 ok words [..] dup lit branch >r r> c! c@ (emit) (key) lastkey and xor + rp! rp@ sp! sp@ ! @ ?branch execute ;s ok More Forth-code to cross-compile can be added in arch/8086/prims.fs. Now 8086 code isn't really very interesting to most modern computer users, but 8086 isn't the only architecture supported by gforth-ec. I can successfully run build-ec for 8086, r8c and misc. Other targets that seem to have been supported at some time are m68k, shboom, 6502, c165 and 4stack, but with current Gforth-CVS compilation fails for those. Adding support for new target is not too difficult. Currently I'm trying to make it work for the LatticeMico32 CPU (the Milkymist SoC). cheers, David -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
[toc] | [next] | [standalone]
| From | Albert van der Horst <albert@spenarnc.xs4all.nl> |
|---|---|
| Date | 2012-02-07 16:07 +0000 |
| Message-ID | <lz164z.9v@spenarnc.xs4all.nl> |
| In reply to | #9373 |
In article <87fwen62fr.fsf@snail.Pool>, David Kuehling <dvdkhlng@gmx.de> wrote: >Hi, > >I've been having a look at Gforth-EC lately, that's the embedded >cross-compiled Forth support that has been included with Gforth all the >time, but as it's well hidden and pretty undocumented, I guess most >people wouldn't have noticed it. > >Now it turns out it only takes a few commands to generate a usable 8086 >gforth-ec executable, running in dosbox (i.e. emulated under Linux): > >From the Gforth source directory, run: > >./build-ec 8086 >mv kernl-8086.fi gforthec.com # need to rename for dosbox to execute it >dosbox gforthec.com Slightly surprising. I expect a Forth only to run on a dosbox if it does INT 21 io. I expect an embedded Forth to work independant from MSDOS INT 21 stuff. > >And voila, it prints the standard Gforth welcome message. Some testing: > >here . 14334 ok >unused u. 47162 ok >words >[..] <SNIP> >David Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
[toc] | [prev] | [next] | [standalone]
| From | BruceMcF <agila61@netscape.net> |
|---|---|
| Date | 2012-02-07 07:51 -0800 |
| Message-ID | <37852ae4-bafd-484d-8116-6f0bbacf78b6@18g2000yqe.googlegroups.com> |
| In reply to | #9426 |
On Feb 7, 11:07 am, Albert van der Horst <alb...@spenarnc.xs4all.nl> wrote: > Slightly surprising. I expect a Forth only to run on a dosbox if > it does INT 21 io. I expect an embedded Forth to work independant > from MSDOS INT 21 stuff. But there is no single standard way for an embedded '86 system to do IO. Embedded msdos compatible boards are certainly not unknown, and a dosbox is convenient as a sandbox for testing on a Linux system, so its not surprising that an embedded '86 Forth would have msdos IO as the shipping system. Certainly whoever is using it on a board other than an embedded msdos board would replace that with IO appropriate to their board.
[toc] | [prev] | [next] | [standalone]
| From | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| Date | 2012-02-07 16:55 +0100 |
| Message-ID | <8762fibptf.fsf@mosquito.pool> |
| In reply to | #9426 |
>>>>> "Albert" == Albert van der Horst <albert@spenarnc.xs4all.nl> writes: > In article <87fwen62fr.fsf@snail.Pool>, > David Kuehling <dvdkhlng@gmx.de> wrote: >> Hi, >> >> I've been having a look at Gforth-EC lately, that's the embedded >> cross-compiled Forth support that has been included with Gforth all >> the time, but as it's well hidden and pretty undocumented, I guess >> most people wouldn't have noticed it. >> >> Now it turns out it only takes a few commands to generate a usable >> 8086 gforth-ec executable, running in dosbox (i.e. emulated under >> Linux): >> >> From the Gforth source directory, run: >> >> ./build-ec 8086 mv kernl-8086.fi gforthec.com # need to rename for >> dosbox to execute it dosbox gforthec.com > Slightly surprising. I expect a Forth only to run on a dosbox if it > does INT 21 io. I expect an embedded Forth to work independant from > MSDOS INT 21 stuff. It does use int 21 io, see definition of (emit) &friends in [1]. The nice thing is that this is really completely compiled&assembled from forth. No binutils, GCC etc. involved. cheers, David [1] http://www.complang.tuwien.ac.at/cvsweb/cgi-bin/cvsweb/gforth/arch/8086/prim.fs?rev=1.6;content-type=text%2Fplain -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
[toc] | [prev] | [next] | [standalone]
| From | Coos Haak <chforth@hccnet.nl> |
|---|---|
| Date | 2012-02-08 01:30 +0100 |
| Message-ID | <32b3uvajja05$.1c9m4po55si37.dlg@40tude.net> |
| In reply to | #9373 |
Op Mon, 06 Feb 2012 23:07:36 +0100 schreef David Kuehling: > Hi, > > I've been having a look at Gforth-EC lately, that's the embedded > cross-compiled Forth support that has been included with Gforth all the > time, but as it's well hidden and pretty undocumented, I guess most > people wouldn't have noticed it. > > Now it turns out it only takes a few commands to generate a usable 8086 > gforth-ec executable, running in dosbox (i.e. emulated under Linux): > > From the Gforth source directory, run: > > ./build-ec 8086 > mv kernl-8086.fi gforthec.com # need to rename for dosbox to execute it > dosbox gforthec.com > > And voila, it prints the standard Gforth welcome message. Some testing: > What version of Gforth are you using, I get: coos@donald:~/work/forth/gforth-0.7.0$ ./build-ec 8086 in file included from *OS command line*:-1 in file included from kernel/main.fs:43 cross.fs:1156: No such file or directory [IF] >>>included<<< hex Backtrace: $9C5D6C throw cp: kan status van ‘kernl-8086.fi-’ niet opvragen: Bestand of map bestaat niet -- Coos CHForth, 16 bit DOS applications http://home.hccnet.nl/j.j.haak/forth.html
[toc] | [prev] | [next] | [standalone]
| From | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| Date | 2012-02-08 09:52 +0100 |
| Message-ID | <87bop9emgv.fsf@mosquito.pool> |
| In reply to | #9449 |
>>>>> "Coos" == Coos Haak <chforth@hccnet.nl> writes: > Op Mon, 06 Feb 2012 23:07:36 +0100 schreef David Kuehling: >> Hi, >> >> I've been having a look at Gforth-EC lately, that's the embedded >> cross-compiled Forth support that has been included with Gforth all >> the time, but as it's well hidden and pretty undocumented, I guess >> most people wouldn't have noticed it. >> >> Now it turns out it only takes a few commands to generate a usable >> 8086 gforth-ec executable, running in dosbox (i.e. emulated under >> Linux): >> >> From the Gforth source directory, run: >> >> ./build-ec 8086 mv kernl-8086.fi gforthec.com # need to rename for >> dosbox to execute it dosbox gforthec.com >> >> And voila, it prints the standard Gforth welcome message. Some >> testing: >> > What version of Gforth are you using, I get: > coos@donald:~/work/forth/gforth-0.7.0$ ./build-ec 8086 > in file included from *OS command line*:-1 in file included from > kernel/main.fs:43 cross.fs:1156: No such file or directory [IF] > >>>included<<< hex Backtrace: $9C5D6C throw cp: kan status van > ‘kernl-8086.fi-’ niet opvragen: Bestand of map bestaat niet Ah, this could be caused by missing installation step. Try 'sudo make install' first. BTW I'm using the latest GForth from CVS. Try cvs -d :pserver:anonymous@c1.complang.tuwien.ac.at:/nfs/unsafe/cvs-repository/src-master co gforth cd gforth ./BUILD-FROM-SCRATCH sudo make install ./build-ec 8086 cheers, David -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
[toc] | [prev] | [next] | [standalone]
| From | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| Date | 2012-02-10 01:45 +0100 |
| Message-ID | <87wr7vo6s4.fsf@snail.Pool> |
| In reply to | #9449 |
>>>>> "Coos" == Coos Haak <chforth@hccnet.nl> writes: > Op Mon, 06 Feb 2012 23:07:36 +0100 schreef David Kuehling: [..] >> From the Gforth source directory, run: >> >> ./build-ec 8086 mv kernl-8086.fi gforthec.com # need to rename for >> dosbox to execute it dosbox gforthec.com >> >> And voila, it prints the standard Gforth welcome message. Some >> testing: >> > What version of Gforth are you using, I get: > coos@donald:~/work/forth/gforth-0.7.0$ ./build-ec 8086 > in file included from *OS command line*:-1 in file included from > kernel/main.fs:43 cross.fs:1156: No such file or directory [IF] > >>>included<<< hex Backtrace: $9C5D6C throw cp: kan status van > ‘kernl-8086.fi-’ niet opvragen: Bestand of map bestaat niet Right, the arch/8086 directory is not included in Gforth's distribution tarballs. Here's a current snapshot tarball that has it: http://downloads.qi-hardware.com/people/dvdkhlng/gforth-0.7.9-20120210.tar.gz (this also fixes building of the c165 gforth-ec target, btw) cheers, David -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web