Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to read the file in <<System Guide to figForth>> ?

103 views
Skip to first unread message

flash

unread,
Oct 2, 2009, 9:27:20 PM10/2/09
to
I found the book <<System Guide to figForth>> here:
http://www.forth.org/library/eforth_SOC/eforth_SOC_source/figforth/
guide.ZIP


but what's the type of file? I cant find a fit editor to view it.

Paul E Bennett

unread,
Oct 3, 2009, 5:10:49 AM10/3/09
to
flash wrote:

It is mostly a text file with some binary at the beginning. I tried reading
it with a plain text editor and with Open Office but the binary portions
look like they could be one of those page-setting editors like Framemaker or
Frontpage. If all you need is the text and don't mind the hard work of re-
formatting the text then any decent editor will probably do the job.

--
********************************************************************
Paul E. Bennett...............<email://Paul_E....@topmail.co.uk>
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************

Ed

unread,
Oct 3, 2009, 5:57:10 AM10/3/09
to

The files headers begin with FE 34. Googling revealed:
http://www.macdisk.com/msworden.php3

so the format possibly is MS WORD for DOS or MAC.

flash

unread,
Oct 3, 2009, 6:24:00 AM10/3/09
to
于 Sat, 03 Oct 2009 10:10:49 +0100,Paul E Bennett写到:


I just want to print it out .

flash

unread,
Oct 3, 2009, 6:24:56 AM10/3/09
to
于 Sat, 03 Oct 2009 19:57:10 +1000,Ed写到:


> The files headers begin with FE 34. Googling revealed:
> http://www.macdisk.com/msworden.php3
>
> so the format possibly is MS WORD for DOS or MAC.

It's hard for me to find such a soft... But thank you !

Richard Owlett

unread,
Oct 3, 2009, 8:56:17 AM10/3/09
to

OK, so we turn the problem around ;)

When you found that reference, what were you looking for?
What is your OS?

With that information somebody can probably point you in the
right direction.

Coos Haak

unread,
Oct 3, 2009, 10:38:10 AM10/3/09
to
Op Sat, 3 Oct 2009 01:27:20 +0000 (UTC) schreef flash:

You could remove the first 256 bytes of every file. The following is
plain ASCII with CR/LF line breaks.
You might also remove the end of the files, these contain NUL
characters. Presumably they're pointers for the editor.

--
Coos

CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html

flash

unread,
Oct 3, 2009, 1:18:29 PM10/3/09
to
于 Sat, 03 Oct 2009 07:56:17 -0500,Richard Owlett写到:

sorry for lacking of information, I add here:

I am trying to print this out. I've got a Debian system ,and another XP
system.

thx

flash

unread,
Oct 3, 2009, 1:20:20 PM10/3/09
to
于 Sat, 03 Oct 2009 16:38:10 +0200,Coos Haak写到:

>
> You could remove the first 256 bytes of every file. The following is
> plain ASCII with CR/LF line breaks.
> You might also remove the end of the files, these contain NUL
> characters. Presumably they're pointers for the editor.

I dont know how to remove 256 bytes, but thank you .

Coos Haak

unread,
Oct 3, 2009, 4:11:30 PM10/3/09
to
Op Sat, 3 Oct 2009 17:20:20 +0000 (UTC) schreef flash:

With an ISO/ANS Forth, it's simple:
<<--
variable input
variable output

: process ( "name1" "name2" -- )
bl word count r/o open-file throw input !
bl word count w/o create-file throw output !
256 s>d input @ reposition-file throw
begin pad 256 input @ read-file throw ?dup
while pad swap output @ write-file throw
repeat
input @ close-file throw
output @ close-file throw
;
-->>
To convert one of the files, type:
process chap1 chap1.txt

Coos Haak

unread,
Oct 3, 2009, 4:12:39 PM10/3/09
to
Op Sat, 3 Oct 2009 17:20:20 +0000 (UTC) schreef flash:

By the way, the line endings are \r only (hex 0D).
So it seems the editor was meant for a Macintosh.

flash

unread,
Oct 3, 2009, 8:49:32 PM10/3/09
to
于 Sat, 03 Oct 2009 22:11:30 +0200,Coos Haak写到:


> With an ISO/ANS Forth, it's simple:
> <<--
> variable input
> variable output
>
> : process ( "name1" "name2" -- )
> bl word count r/o open-file throw input ! bl word count w/o
> create-file throw output ! 256 s>d input @ reposition-file throw
> begin pad 256 input @ read-file throw ?dup while pad swap output
> @ write-file throw repeat
> input @ close-file throw
> output @ close-file throw
> ;
> -->>
> To convert one of the files, type:
> process chap1 chap1.txt

you are so cool! I never try use Forth like this, and your process give a
a very good reference( tut ). I will learn much from it .
Thank you very much!

flash

unread,
Oct 3, 2009, 8:54:49 PM10/3/09
to
于 Sat, 03 Oct 2009 22:11:30 +0200,Coos Haak写到:

> Op Sat, 3 Oct 2009 17:20:20 +0000 (UTC) schreef flash:


>
>> 于 Sat, 03 Oct 2009 16:38:10 +0200,Coos Haak写到:
>>
>

> : process ( "name1" "name2" -- )
> >

> ;
> -->>
> To convert one of the files, type:
> process chap1 chap1.txt

I tried this process with Gforth.
I returned some errors.

>>>
gforth pro.fs chap1 chap1.txt

in file included from *OS command line*:-1
chap1:1: Undefined word
>>>�4~E�X�X�X�X�X�f|��������(�▒��ȧ�<<<
�ԧ�}==�/
Р�p�R�dchap2CHAPTER 1. LANGUAGE DEFINITION OF FORTH
Backtrace:
$7FA0ADAE5A68 throw
$7FA0ADAFBCE0 no.extensions
$7FA0ADAE5D28 interpreter-notfound1
>>>

It seems looking for a word to excute.

Coos Haak

unread,
Oct 3, 2009, 9:16:28 PM10/3/09
to
Op Sun, 4 Oct 2009 00:54:49 +0000 (UTC) schreef flash:

Two possible solutions:
1) type 'gforth pro.fs' (without single quotes) at the OS prompt.
type 'process chap1 chap1.txt' (without single quotes) at the Gforth
prompt.
2) type 'gforth pro.fs -e "process chap1 chap1.txt bye"' at the OS
prompt (without the single, but with the double quotes).

It has just been PI hours, I'm closing down now ;-)

deepend

unread,
Oct 3, 2009, 10:21:05 PM10/3/09
to

"flash" <idisbl...@gmail.com> wrote in message
news:ha699o$o2u$1...@news.albasani.net...

you have XP, try using wordpad.
set the left and right margins to .1, trim the cruft
from top and bottom and you have printable files.

deepend


Albert van der Horst

unread,
Oct 4, 2009, 10:16:54 AM10/4/09
to
In article <18mqtj8r0jtzz$.1klx4fciczxgm$.d...@40tude.net>,

Coos Haak <chf...@hccnet.nl> wrote:
>Op Sat, 3 Oct 2009 17:20:20 +0000 (UTC) schreef flash:
>
>> xxx Sat, 03 Oct 2009 16:38:10 +0200xxxCoos Haak xxxxxxxx

>>
>>>
>>> You could remove the first 256 bytes of every file. The following is
>>> plain ASCII with CR/LF line breaks.
>>> You might also remove the end of the files, these contain NUL
>>> characters. Presumably they're pointers for the editor.
>>
>> I dont know how to remove 256 bytes, but thank you .
>
>With an ISO/ANS Forth, it's simple:
><<--
>variable input
>variable output
>
>: process ( "name1" "name2" -- )
> bl word count r/o open-file throw input !
> bl word count w/o create-file throw output !
> 256 s>d input @ reposition-file throw
> begin pad 256 input @ read-file throw ?dup
> while pad swap output @ write-file throw
> repeat
> input @ close-file throw
> output @ close-file throw
> ;
>-->>
>To convert one of the files, type:
>process chap1 chap1.txt

"AAP" GET-FILE 256 /STRING "AAP" PUT-FILE

cpio would do the job too, but it is not easy to use.

>
>--
>Coos
>
>CHForth, 16 bit DOS applications
>http://home.hccnet.nl/j.j.haak/forth.html
>


--
--
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

flash

unread,
Oct 4, 2009, 10:03:06 AM10/4/09
to
于 Sat, 03 Oct 2009 01:27:20 +0000,flash写到:

finanlly i found a web page about this article:

http://www.eforth.com.tw/academy-n/library/System%20Guide.htm

thank you every one who helped me :)

Coos Haak

unread,
Oct 4, 2009, 4:53:11 PM10/4/09
to
Op 04 Oct 2009 14:16:54 GMT schreef Albert van der Horst:

> In article <18mqtj8r0jtzz$.1klx4fciczxgm$.d...@40tude.net>,
> Coos Haak <chf...@hccnet.nl> wrote:

<snip>


>>With an ISO/ANS Forth, it's simple:
>><<--
>>variable input
>>variable output
>>
>>: process ( "name1" "name2" -- )
>> bl word count r/o open-file throw input !
>> bl word count w/o create-file throw output !
>> 256 s>d input @ reposition-file throw
>> begin pad 256 input @ read-file throw ?dup
>> while pad swap output @ write-file throw
>> repeat
>> input @ close-file throw
>> output @ close-file throw
>> ;
>>-->>
>>To convert one of the files, type:
>>process chap1 chap1.txt
>
> "AAP" GET-FILE 256 /STRING "AAP" PUT-FILE
>
> cpio would do the job too, but it is not easy to use.
>

dd if=chap1 of=chap1.txt ibs=256 skip=1

Ed

unread,
Oct 4, 2009, 10:54:54 PM10/4/09
to
flash wrote:
> ? Sat, 03 Oct 2009 01:27:20 +0000?flash???

>
> > I found the book <<System Guide to figForth>> here:
> > http://www.forth.org/library/eforth_SOC/eforth_SOC_source/figforth/
> > guide.ZIP
> >
> >
> > but what's the type of file? I cant find a fit editor to view it.
>
> finanlly i found a web page about this article:
>
> http://www.eforth.com.tw/academy-n/library/System%20Guide.htm
>
> thank you every one who helped me :)

Assuming you can find it, also try:

'Forth Encyclopedia: The Complete Forth Programmers Manual'

It's perhaps the most comprehensive study of Fig-Forth written.
It goes through each word with descriptions and flow charts.
While it uses Fig-Forth 8080 as the reference, it's also applicable
to the other models.

0 new messages