Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #30010 > unrolled thread
| Started by | David Hume <David.Hume@example.com> |
|---|---|
| First post | 2014-04-30 18:28 +0100 |
| Last post | 2014-05-01 15:29 +0000 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.lang.forth
gforth on 64bit David Hume <David.Hume@example.com> - 2014-04-30 18:28 +0100
Re: gforth on 64bit anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-04-30 18:19 +0000
Re: gforth on 64bit David Hume <David.Hume@example.com> - 2014-04-30 20:35 +0100
Re: gforth on 64bit albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-04-30 20:22 +0000
Re: gforth on 64bit Bernd Paysan <bernd.paysan@gmx.de> - 2014-04-30 23:46 +0200
Re: gforth on 64bit anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-05-01 15:29 +0000
| From | David Hume <David.Hume@example.com> |
|---|---|
| Date | 2014-04-30 18:28 +0100 |
| Subject | gforth on 64bit |
| Message-ID | <7zlhumd8wd.fsf@example.com> |
I have a program wot I wrote in Forth, it works fine with gforth on 32 bit linux. When I tried it on 64 bit linux it didn't work properly. The same program worked fine with SwiftForth on either platform. Maybe I need to do something differently when compiling gforth on the 64 bit architecture?
[toc] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2014-04-30 18:19 +0000 |
| Message-ID | <2014Apr30.201921@mips.complang.tuwien.ac.at> |
| In reply to | #30010 |
David Hume <David.Hume@example.com> writes:
>I have a program wot I wrote in Forth, it works fine with gforth on 32
>bit linux. When I tried it on 64 bit linux it didn't work properly.
Your program may have some 32-bit dependency, like "4 +" instead of
"cell+". You could fix that.
>The same program worked fine with SwiftForth on either platform.
SwiftForth is 32 bits on either platform.
>Maybe I need to do something differently when compiling gforth on the 64
>bit architecture?
You could compile a 32-bit version of Gforth even on a 64-bit
platform. IIRC you need to configure with
./configure CC="gcc -m32"
#and then
make
You may need to install 32-bit libraries for that to work.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2014: http://www.euroforth.org/ef14/
[toc] | [prev] | [next] | [standalone]
| From | David Hume <David.Hume@example.com> |
|---|---|
| Date | 2014-04-30 20:35 +0100 |
| Message-ID | <7zha5ad30g.fsf@example.com> |
| In reply to | #30014 |
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: > > Your program may have some 32-bit dependency, like "4 +" instead of > "cell+". You could fix that. > Thanks. I couldn't get the -m32 to work, so fixed the program. I had an ARRAY of 4*n, and then GET and PUT 4*index, so I changed these to a constant WORD-SIZE of 8. This works with swiftforth or gforth now, although gforth is rather slow.
[toc] | [prev] | [next] | [standalone]
| From | albert@spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| Date | 2014-04-30 20:22 +0000 |
| Message-ID | <53615b6a$0$25036$e4fe514c@dreader37.news.xs4all.nl> |
| In reply to | #30015 |
In article <7zha5ad30g.fsf@example.com>, David Hume <David.Hume@example.com> wrote: >anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: > >> >> Your program may have some 32-bit dependency, like "4 +" instead of >> "cell+". You could fix that. >> > >Thanks. I couldn't get the -m32 to work, so fixed the program. I had an >ARRAY of 4*n, and then GET and PUT 4*index, so I changed these to a >constant WORD-SIZE of 8. This works with swiftforth or gforth now, >although gforth is rather slow. 8 CONSTANT WORD-SIZE ? Dont' go there. Replace `` WORD-SIZE * '' by `` CELLS '' That way the program still runs unadulterated on a 32 bits gforth. 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 | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Date | 2014-04-30 23:46 +0200 |
| Message-ID | <ljrr03$rjm$1@online.de> |
| In reply to | #30015 |
David Hume wrote: > anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: > >> >> Your program may have some 32-bit dependency, like "4 +" instead of >> "cell+". You could fix that. >> > > Thanks. I couldn't get the -m32 to work, so fixed the program. I had an > ARRAY of 4*n, and then GET and PUT 4*index, so I changed these to a > constant WORD-SIZE of 8. This works with swiftforth or gforth now, > although gforth is rather slow. Use gforth-fast for speed. And please use CELLS for the word-size, not a constant word-size... -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2014-05-01 15:29 +0000 |
| Message-ID | <2014May1.172953@mips.complang.tuwien.ac.at> |
| In reply to | #30015 |
David Hume <David.Hume@example.com> writes:
>I had an
>ARRAY of 4*n, and then GET and PUT 4*index, so I changed these to a
>constant WORD-SIZE of 8.
As others have mentioned, the standard way to deal with cell size
differences is CELLS and CELL+.
> This works with swiftforth or gforth now,
>although gforth is rather slow.
Swiftforth should be somewhat faster than Gforth due to the way it is
implemented. However, some Linux distributions disable various
performance features of Gforth. You can try
gforth-fast --dynamic
and see if it helps. Or you can build it from source.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2014: http://www.euroforth.org/ef14/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web