Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #26364 > unrolled thread
| Started by | albert@spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| First post | 2013-10-09 10:47 +0000 |
| Last post | 2013-10-10 22:24 -0400 |
| Articles | 6 — 2 participants |
Back to article view | Back to comp.lang.forth
problems with jonesforth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-10-09 10:47 +0000
Re: problems with jonesforth "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-10-09 13:34 -0400
Re: problems with jonesforth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-10-09 20:28 +0000
Re: problems with jonesforth "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-10-10 17:54 -0400
Re: problems with jonesforth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-10-10 23:42 +0000
Re: problems with jonesforth "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-10-10 22:24 -0400
| From | albert@spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| Date | 2013-10-09 10:47 +0000 |
| Subject | problems with jonesforth |
| Message-ID | <5255345b$0$603$e4fe514c@dreader34.news.xs4all.nl> |
On a 64 bit Debian linux system:
A straightforward build using the prescribed
gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o jonesforth jonesforth.S
results in an unusable system:
albert@cherry:~/PROJECT/albertjones$ jonesforth
killed
An improvement is to leave out the requirement to start the text segment at address 0:
gcc -m32 -nostdlib -static -Wl,--build-id=none -o jonesforth jonesforth.S
A startup using
cat jonesforth.f - | jonesforth
now works, but there is a message
-1 CELLS available
which is disturbing, and
3 .
prints -1, but al least WORDS work.
The problem may be related to the break system call that is used (it is no
longer supported on kernels since 2.6.22) and whose return code is not
checked.
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] | [next] | [standalone]
| From | "Rod Pemberton" <dont_use_email@nohavenotit.com> |
|---|---|
| Date | 2013-10-09 13:34 -0400 |
| Message-ID | <op.w4o63rn30e5s1z@localhost> |
| In reply to | #26364 |
On Wed, 09 Oct 2013 06:47:55 -0400, Albert van der Horst <albert@spenarnc.xs4all.nl> wrote: > On a 64 bit Debian linux system: > > A straightforward build using the prescribed > gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o > jonesforth jonesforth.S > results in an unusable system: > "On a 64 bit ..." "gcc -m32 ..." Do you want -m64? gcc -v --help | less ... "-m32 Generate 32bit i386 code" ... "-m64 Generate 64bit x86-64 code" ... If not, do you want a 32 bit Debian Linux? If not, try removing more compiler options... If those don't work, port it to 64-bit assembly. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | albert@spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| Date | 2013-10-09 20:28 +0000 |
| Message-ID | <5255bc77$0$592$e4fe514c@dreader34.news.xs4all.nl> |
| In reply to | #26369 |
In article <op.w4o63rn30e5s1z@localhost>,
Rod Pemberton <dont_use_email@nohavenotit.com> wrote:
>On Wed, 09 Oct 2013 06:47:55 -0400, Albert van der Horst
><albert@spenarnc.xs4all.nl> wrote:
>
>> On a 64 bit Debian linux system:
>>
>> A straightforward build using the prescribed
>> gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o
>> jonesforth jonesforth.S
>> results in an unusable system:
>>
>
>"On a 64 bit ..."
>"gcc -m32 ..."
>
>Do you want -m64?
Of course not. Compiling a 32-bit assembler source with a 64 bit
option? You must be kidding.
>
>
>gcc -v --help | less
>...
>"-m32 Generate 32bit i386 code"
>...
>"-m64 Generate 64bit x86-64 code"
>...
>
>
>If not, do you want a 32 bit Debian Linux?
>
>If not, try removing more compiler options...
>
>If those don't work, port it to 64-bit assembly.
Why? A 32 bit assembler Forth should work on 64 bit Debian.
My yourforth has no problems.
fasm has no problem assembling yourforth correctly
without options.
use32
in the source is enough, as it should.
>
>
>Rod Pemberton
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 | "Rod Pemberton" <dont_use_email@nohavenotit.com> |
|---|---|
| Date | 2013-10-10 17:54 -0400 |
| Message-ID | <op.w4rdtatc0e5s1z@localhost> |
| In reply to | #26364 |
On Wed, 09 Oct 2013 06:47:55 -0400, Albert van der Horst <albert@spenarnc.xs4all.nl> wrote: > On a 64 bit Debian linux system: > A straightforward build using the prescribed > gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o > jonesforth jonesforth.S > results in an unusable system: > > albert@cherry:~/PROJECT/albertjones$ jonesforth > killed > > An improvement is to leave out the requirement to start the text segment > at address 0: > gcc -m32 -nostdlib -static -Wl,--build-id=none -o jonesforth > jonesforth.S > > A startup using > > cat jonesforth.f - | jonesforth > Well, since you said it's not a processor size mismatch, I decided to give it a try. I downloaded version 1.47 of jonesforth.s and jonesforth.f. I used the exact gcc line you posted above to compile. I had to use a slight variation of your 'cat' line: cat jonesforth.f - | ./jonesforth It works. '3 .' prints 3 . There is no -1 CELLS message. WORDS works. QUIT had to be used to exit instead of BYE ... Lowercase 'bye' works to exit also, although uppercase 'BYE' is listed by WORDS. Uppercase 'BYE' doesn't exit. This was on a 64-bit Vector Linux (VLocity) in Xfce's Terminal Emulator. Version 1.47 is available at Richard Jones' GIT repository: http://rwmj.wordpress.com/2010/08/07/jonesforth-git-repository/ I followed the first link in the blog to git.annexia.org, then "version 47", then "tree", then "raw" options to get code for jonesforth.s and jonesforth.f. Unless your version is out of date, I doubt that was of much help. I know there were some patches and fixes for Jonesforth posted to c.l.f and elsewhere. Could one of those be the problem? Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | albert@spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| Date | 2013-10-10 23:42 +0000 |
| Message-ID | <52573b6a$0$26902$e4fe514c@dreader37.news.xs4all.nl> |
| In reply to | #26381 |
In article <op.w4rdtatc0e5s1z@localhost>, Rod Pemberton <dont_use_email@nohavenotit.com> wrote: >On Wed, 09 Oct 2013 06:47:55 -0400, Albert van der Horst ><albert@spenarnc.xs4all.nl> wrote: >> On a 64 bit Debian linux system: > >> A straightforward build using the prescribed >> gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o >> jonesforth jonesforth.S >> results in an unusable system: >> >> albert@cherry:~/PROJECT/albertjones$ jonesforth >> killed >> >> An improvement is to leave out the requirement to start the text segment >> at address 0: >> gcc -m32 -nostdlib -static -Wl,--build-id=none -o jonesforth >> jonesforth.S >> >> A startup using >> >> cat jonesforth.f - | jonesforth >> > >Well, since you said it's not a processor size mismatch, I decided >to give it a try. > >I downloaded version 1.47 of jonesforth.s and jonesforth.f. >I used the exact gcc line you posted above to compile. I assume you mean the line with the -Ttext,0 omitted. >I had to use a slight variation of your 'cat' line: > > cat jonesforth.f - | ./jonesforth > >It works. '3 .' prints 3 . There is no -1 CELLS message. WORDS >works. QUIT had to be used to exit instead of BYE ... Lowercase >'bye' works to exit also, although uppercase 'BYE' is listed by >WORDS. Uppercase 'BYE' doesn't exit. > >This was on a 64-bit Vector Linux (VLocity) in Xfce's Terminal >Emulator. > >Version 1.47 is available at Richard Jones' GIT repository: >http://rwmj.wordpress.com/2010/08/07/jonesforth-git-repository/ I reloaded the latest snapshot version and confirm your findings that it has no "-1 CELLS remaining" problems. It says "14449 cells remaining". That is 60 K. Where the break system call asked for a segment of 64 K, it means that it worked. My findings with bye are different. bye is not known and BYE works. What is confusing is that the program not actually terminates until you type another newline. QUIT doesn't terminate jonesforth and behaves as normal as far as I can see. > >I followed the first link in the blog to git.annexia.org, >then "version 47", then "tree", then "raw" options to get code >for jonesforth.s and jonesforth.f. > >Unless your version is out of date, I doubt that was of much help. > >I know there were some patches and fixes for Jonesforth posted >to c.l.f and elsewhere. Could one of those be the problem? That and sloppy versioning. What I tested before is called 1.47, but the accompanying jonesforth.f is old and contains bugs. Thanks for helping to clear that up. > > >Rod Pemberton -- 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 | "Rod Pemberton" <dont_use_email@nohavenotit.com> |
|---|---|
| Date | 2013-10-10 22:24 -0400 |
| Message-ID | <op.w4rqblzw0e5s1z@localhost> |
| In reply to | #26384 |
On Thu, 10 Oct 2013 19:42:34 -0400, Albert van der Horst <albert@spenarnc.xs4all.nl> wrote: > In article <op.w4rdtatc0e5s1z@localhost>, > Rod Pemberton <dont_use_email@nohavenotit.com> wrote: >> On Wed, 09 Oct 2013 06:47:55 -0400, Albert van der Horst >> <albert@spenarnc.xs4all.nl> wrote: >>> On a 64 bit Debian linux system: >>> A straightforward build using the prescribed >>> gcc -m32 -nostdlib -static -Wl,-Ttext,0 -Wl,--build-id=none -o >>> jonesforth jonesforth.S >>> results in an unusable system: >>> >>> albert@cherry:~/PROJECT/albertjones$ jonesforth >>> killed >>> >>> An improvement is to leave out the requirement to start the text >>> segment >>> at address 0: >>> gcc -m32 -nostdlib -static -Wl,--build-id=none -o jonesforth >>> jonesforth.S >>> >> >> Well, since you said it's not a processor size mismatch, I decided >> to give it a try. >> >> I downloaded version 1.47 of jonesforth.s and jonesforth.f. >> I used the exact gcc line you posted above to compile. > > I assume you mean the line with the -Ttext,0 omitted. > Uh, let me check. .bash_history shows, I used the line with Ttext in it: gcc -m32 -nostdlib -static -Wl,-Text,0 -Wl,--build-id=none -o jonesforth jonesforth.S Works here... It works without the -Wl,-Text,0 also. Both report 14499 CELLS. The one with the Ttext is 18115 bytes and without is 13171 bytes. >> QUIT had to be used to exit instead of BYE ... Lowercase >> 'bye' works to exit also, although uppercase 'BYE' is listed by >> WORDS. Uppercase 'BYE' doesn't exit. > > My findings with bye are different. bye is not known and BYE works. That exits also. Two returns after BYE... > What is confusing is that the program not actually terminates > until you type another newline. QUIT doesn't terminate jonesforth > and behaves as normal as far as I can see. Ah, yes, it is picking up the second return from another word after BYE which was QUIT in my case... Odd. Rod Pemberton
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.forth
csiph-web