Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #57613 > unrolled thread

High level language for writing Forth

Started byCecil Bayona <cbayona@cbayona.com>
First post2017-04-19 18:32 -0500
Last post2017-05-15 12:05 -0500
Articles 20 on this page of 122 — 21 participants

Back to article view | Back to comp.lang.forth


Contents

  High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 18:32 -0500
    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-20 00:24 +0000
      Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-19 14:42 -1000
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 20:33 -0500
          Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-19 16:21 -1000
          Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 19:41 -0700
            Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 23:28 -0500
        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-20 17:02 +0000
          Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-20 09:48 -1000
            Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 09:42 +0000
              Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 09:07 -0500
                Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 17:04 +0100
                  Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 11:17 -0500
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 17:36 +0100
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:32 +0000
                      Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 15:35 -0500
                        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:39 +0000
                      Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 22:47 +0100
                  Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:29 +0000
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 22:45 +0100
                      Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:49 +0000
                        Re: High level language for writing Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 10:54 +0100
                          Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 03:04 -0700
                            Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-22 05:12 -0500
                              Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-22 04:30 -0700
                                Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 05:00 -0700
                                  Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-22 05:40 -0700
                                    Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 16:51 +0100
                                      Re: High level language for writing [unum] Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-22 13:36 -0700
                                        Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 22:59 +0100
                                          Re: High level language for writing [unum] Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-22 18:43 -0700
                                            Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-23 09:33 +0100
                                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:23 -0500
                              Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 04:59 -0700
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:05 +0000
                            Re: High level language for writing Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-29 09:35 +0100
                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 12:56 +0100
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:08 +0000
                            Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 09:46 +0100
                              Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-29 02:45 -0700
                                Re: High level language for writing Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-29 13:44 +0000
                                  Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-29 07:00 -0700
                                  Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-29 07:31 -0700
                                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 16:38 +0100
                            Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-29 04:10 -0700
                              Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 11:35 +0000
                                Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 16:33 +0100
                                  Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-05 15:24 +0000
                                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 20:16 +0100
                                      Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-05 22:06 +0200
                                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 21:45 +0100
                                          Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 21:54 +0100
                                      Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-06 10:06 +0000
                                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-06 13:09 +0100
                                      Re: High level language for writing Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-06 11:04 +0000
                Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:28 +0000
                  Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-21 12:27 -1000
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:55 +0000
                  Re: High level language for writing Forth Coos Haak <htrofhc@gmail.com> - 2017-04-22 02:01 +0200
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:58 +0000
                      Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-21 23:41 -0700
                        Re: High level language for writing Forth Coos Haak <htrofhc@gmail.com> - 2017-04-22 22:15 +0200
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-06 13:28 +0000
                      Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-27 02:51 -0700
                        Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-04-27 12:09 +0200
                          Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-29 02:48 -0700
                        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:09 +0000
      Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 20:11 -0500
    Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 19:34 -0700
      Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 23:22 -0500
        Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 21:35 -0700
          Re: High level language for writing Forth Melzzzzz <Melzzzzz@zzzzz.com> - 2017-04-20 05:12 +0000
          Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-20 01:15 -0500
            Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 23:25 -0700
            Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-21 23:12 -0500
              Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-21 21:53 -0700
                Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 00:42 -0500
                  Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-21 23:44 -0700
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 03:08 -0500
                  Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-22 04:39 -0500
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 12:37 +0100
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:33 -0500
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 14:10 -0500
                  Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 15:01 -0700
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 23:38 +0100
                      Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 16:30 -0700
                        Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 18:01 -0700
                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-23 09:25 +0100
                          Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-23 06:32 -0700
                            Re: High level language for writing Forth Julian Fondren <julian.fondren@gmail.com> - 2017-04-23 07:36 -0700
                            Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-24 14:32 +0100
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 18:19 -0500
                      Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 18:05 -0700
                        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 21:51 -0500
                    Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-23 06:54 +0300
                      Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-23 09:16 +0100
                        Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-23 18:41 +0300
                          Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-24 14:35 +0100
                      Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-23 06:15 -0700
                Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 08:04 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:44 -0500
                    Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 12:16 -0700
                Re: High level language for writing Forth Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-04-22 22:52 -0400
        Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-20 07:49 +0300
      Re: High level language for writing Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-20 19:47 +0200
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-20 15:19 -0500
    Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-04-20 08:06 +0200
    Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-20 04:35 -0700
    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-25 17:03 -0500
      Re: High level language for writing Forth minforth@arcor.de - 2017-04-26 01:58 -0700
    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-13 17:36 -0500
      Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-13 18:37 -0700
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-13 20:52 -0500
          Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-13 19:25 -0700
            Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-15 12:44 -0700
              Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 17:27 -0500
                Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-15 19:43 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 23:55 -0500
                    Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-05-16 01:59 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 23:58 -0500
      Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-05-15 07:00 -0700
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 12:05 -0500

Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7  Next page →


#58352

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2017-04-29 13:44 +0000
Message-ID<2017Apr29.154410@mips.complang.tuwien.ac.at>
In reply to#58341
lehs <skydda.barnen@gmail.com> writes:
>Den l=C3=B6rdag 29 april 2017 kl. 10:46:04 UTC+2 skrev Alex:
>> http://www.complang.tuwien.ac.at/anton/euroforth/ef13/papers/ertl-paf.pdf
>>=20
>> --=20
>> Alex
>
>Can Paf be downloaded? Does it works well?

No.  It has not been implemented yet.

- 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 2017: http://www.euroforth.org/ef17/

[toc] | [prev] | [next] | [standalone]


#58353

Fromlehs <skydda.barnen@gmail.com>
Date2017-04-29 07:00 -0700
Message-ID<f4389fe8-5d4d-4ed6-b8c4-6d6f87fb1dfc@googlegroups.com>
In reply to#58352
I think the idea is good. It must be simpler to translate Pof to some processors machine code than Forth to machin code. FOS could be built upon Pof.

[toc] | [prev] | [next] | [standalone]


#58357

Fromhughaguilar96@gmail.com
Date2017-04-29 07:31 -0700
Message-ID<797b9e80-cce3-4bcb-83f4-3ac764b14939@googlegroups.com>
In reply to#58352
On Saturday, April 29, 2017 at 6:44:44 AM UTC-7, Anton Ertl wrote:
> lehs <skydda.barnen@gmail.com> writes:
> >Can Paf be downloaded? Does it works well?
> 
> No.  It has not been implemented yet.

Anton Ertl has his PAF (Portable Assembler for Forth) and I have my Hugh-niversal Assembler, which has also not been implemented yet.

Anton Ertl's PAF is for 32-bit processors, but this is a mistake because ARM assembly-language already is the universal assembly-language for 32-bit processors. Mine is for 16-bit processors where we still have some variety (PIC-24, MSP-430, plus a variety of FPGA-based processors).

Anton Ertl's PAF abstractifies the number of registers, but this is a mistake because the number of registers is the one thing that has to be standardized. Mine sets the number of registers at 8 --- they correspond to the i80186 registers --- the i80186 is obsolete now, and it wasn't very good in its day either, but everybody is familiar with the assembly-language so they can learn mine easily as it is pretty similar (I don't have segment registers, or other features not needed in a micro-controller). If a processor has fewer registers (the 6812, for example), then some of my registers will have to be in memory; this will slow down execution speed a lot, but at least you get portability. If a processor has more registers (the MSP-430, for example), then some of its registers will not be exposed to the user. If a processor has a lot of registers (the PIC-24, for example), then it could have ISRs written in Forth, and not require swapping registers with memory upon entering and leaving the ISRs --- from the user's perspective, the programs only have 8 registers, so the source-code is portable to other systems --- in register-starved processors, the registers will have to be swapped with memory upon entering and leaving the ISRs, but this is not exposed to the user.

My goal with the Hugh-niversal assembly-language is that a Forth system can be written, and if it needs to be targeted to a new processor, only the assembler needs to be rewritten to generate machine-code for this processor --- all of the Forth code, and all of the Forth code-libraries, will move over without modification.

[toc] | [prev] | [next] | [standalone]


#58363

FromAlex <alex@rivadpm.com>
Date2017-04-29 16:38 +0100
Message-ID<oe2bqt$v0b$1@dont-email.me>
In reply to#58357
On 4/29/2017 15:31, hughaguilar96@gmail.com wrote:
> On Saturday, April 29, 2017 at 6:44:44 AM UTC-7, Anton Ertl wrote:
>> lehs<skydda.barnen@gmail.com>  writes:
>>> Can Paf be downloaded? Does it works well?
>> No.  It has not been implemented yet.
> Anton Ertl has his PAF (Portable Assembler for Forth) and I have my
> Hugh-niversal Assembler, which has also not been implemented yet.

Does a document describing your Huge Ass Embler exist, or is this yet 
another attempt to claim everyone else is stupid etc. etc.?

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58345

FromJoel Rees <joel.rees@gmail.com>
Date2017-04-29 04:10 -0700
Message-ID<f63765dc-c440-4708-b80e-0de2c2614e5c@googlegroups.com>
In reply to#58324
On Saturday, April 29, 2017 at 12:08:20 PM UTC+9, Rudy Velthuis wrote:
> Alex wrote:
> 
> > Yes, I was serious. Semantic arguments about where the assembler ends
> > and where Forth starts are pretty pointless
> 
> Not at all. The Forth *assemblers* (note the name) are still
> assemblers, i.e. they turn assembler mnemonics into machine code.

Pointed it out elsewhere, but I'll repeat it here.

There are historical assemblers that use algebra symbols ("+", "-", "=", etc.) for mnemonics and take their statements in infix.

> Proper assemblers may be more comfortable,

Clearly, you and I have different ideas about what is comfortable.

Although I will admit that assemblers that try too much to help you follow the vendor's idea of run-time architecture get really tiring really quickly.

> but the Forth ones remain assemblers.

I've seen assemblers that can actually handle loops and conditionals 
without labels, and macros can spit out optimized object code equivalent 
to multiple lines of source.

But Forth assemblers allow you to go several levels of symbolic 
expression beyond that.

--
Joel Rees

Chocolate?
Nothing beats pure cacao mass.

[toc] | [prev] | [next] | [standalone]


#58346

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-29 11:35 +0000
Message-ID<xn0kpb2wk3158n400d@nntp.aioe.org>
In reply to#58345
Joel Rees wrote:

> But Forth assemblers allow you to go several levels of symbolic 
> expression beyond that.

Fact remains that *some* low level words in *any* Forth are written in
assembler or in a language that can go pretty low level, like C. But
then the primitives of that language are again partly written in
assembler. There is no way around that.

If I say "assembler", it doesn't matter if the assembler code is
written in Forth and has certain neat features for a Forth system or if
it is a dedicated general purpose assembler like MASM, NASM, TASM, GAS
or even a built-in assembler of languages like BBC Basic or Delphi. etc.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"That's not a lie, it's a terminological inexactitude."
 -- Alexander Haig

[toc] | [prev] | [next] | [standalone]


#58362

FromAlex <alex@rivadpm.com>
Date2017-04-29 16:33 +0100
Message-ID<oe2bhs$sa5$1@dont-email.me>
In reply to#58346
On 4/29/2017 12:35, Rudy Velthuis wrote:
> Joel Rees wrote:
> 
>> But Forth assemblers allow you to go several levels of symbolic
>> expression beyond that.
> 
> Fact remains that *some* low level words in *any* Forth are written in
> assembler or in a language that can go pretty low level, like C. But
> then the primitives of that language are again partly written in
> assembler. There is no way around that.
> 
> If I say "assembler", it doesn't matter if the assembler code is
> written in Forth and has certain neat features for a Forth system or if
> it is a dedicated general purpose assembler like MASM, NASM, TASM, GAS
> or even a built-in assembler of languages like BBC Basic or Delphi. etc.
> 

Is Forth a BASIC? Not really. But then here's a BASIC in Forth; 
http://home.vianetworks.nl/users/mhx/basic.html. Scheme? Why not. 
http://forums.parallax.com/discussion/160027/lisp-technically-scheme-written-in-forth. 


Or perhaps you want a webserver; https://bernd-paysan.de/httpd-en.html. 
This one is very illustrative of the Forth way; this is an HTTP 
*language*. It understands HTTP directly. "... a few hundred lines of 
code... has delivered an 'almost' complete Apache clone."

Classifying stuff the way you are doing is not useful; languages, and 
especially Forth, don't fall into neat categories. Forth can (and has 
been) all those assemblery/BASICy/Schemey/HTTPee things while still 
being Forthish. Rigid boundaries and thinking will make your Forth rigid 
too; your code will be stiff & unnatural.

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58702

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-05-05 15:24 +0000
Message-ID<xn0kpmhhk1hmt59000@nntp.aioe.org>
In reply to#58362
Alex wrote:

> On 4/29/2017 12:35, Rudy Velthuis wrote:
> > Joel Rees wrote:
> > 
> > > But Forth assemblers allow you to go several levels of symbolic
> > > expression beyond that.
> > 
> > Fact remains that some low level words in any Forth are written in
> > assembler or in a language that can go pretty low level, like C. But
> > then the primitives of that language are again partly written in
> > assembler. There is no way around that.
> > 
> > If I say "assembler", it doesn't matter if the assembler code is
> > written in Forth and has certain neat features for a Forth system
> > or if it is a dedicated general purpose assembler like MASM, NASM,
> > TASM, GAS or even a built-in assembler of languages like BBC Basic
> > or Delphi. etc.
> 
> Is Forth a BASIC? Not really. 

I never said so, so I don't quite understand what you are trying to say.

There is a Forth implemented in BBC Basic, which uses BBC Basic's
inline assebmler to implement most of the primitives. Many other Forths
use some kind of assembler to implement the primitives, and some use C
or some other language to implement them.

And there may be a BASIC implemented in Forth. There are many languages
or compilers implemented in other languages. Fact is that Forth, like
most other languages, needs primitives implemented in some kind of
assembler.
-- 
Rudy Velthuis        http://www.rvelthuis.de

"We don't make mistakes, we just have happy little accidents."
-- Bob Ross, "The Joy of Painting"

[toc] | [prev] | [next] | [standalone]


#58711

FromAlex <alex@rivadpm.com>
Date2017-05-05 20:16 +0100
Message-ID<oeiisb$spt$1@dont-email.me>
In reply to#58702
On 5/5/2017 16:24, Rudy Velthuis wrote:
> Fact is that Forth, like
> most other languages, needs primitives implemented in some kind of
> assembler.

Gforth is written entirely in C.

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58717

FromLars Brinkhoff <lars.spam@nocrew.org>
Date2017-05-05 22:06 +0200
Message-ID<864lwzf4r2.fsf@molnjunk.nocrew.org>
In reply to#58711
Alex wrote:
> Gforth is written entirely in C.

And Forth.  You need Gforth to build it.

[toc] | [prev] | [next] | [standalone]


#58719

FromAlex <alex@rivadpm.com>
Date2017-05-05 21:45 +0100
Message-ID<oeio2a$eod$1@dont-email.me>
In reply to#58717
On 5/5/2017 21:06, Lars Brinkhoff wrote:
> Alex wrote:
>> Gforth is written entirely in C.
> 
> And Forth.  You need Gforth to build it.
> 

The same is true of many others that metacompile. Win32Forth needs 
Win32Forth to build it, WF32 needs WF32 and so on.

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58720

FromAlex <alex@rivadpm.com>
Date2017-05-05 21:54 +0100
Message-ID<oeiojc$h4g$1@dont-email.me>
In reply to#58719
On 5/5/2017 21:45, Alex wrote:
> On 5/5/2017 21:06, Lars Brinkhoff wrote:
>> Alex wrote:
>>> Gforth is written entirely in C.
>>
>> And Forth.  You need Gforth to build it.
>>
> 
> The same is true of many others that metacompile. Win32Forth needs 
> Win32Forth to build it, WF32 needs WF32 and so on.
> 

Which made me think of the (heavily) modified version of WF32 I 
developed, but didn't take further. Once you've defined DUP in version 
n, then you can define DUP in version n+1 and metacompile it from

: DUP DUP ;

It's a one way street though; there's no way back.

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58729

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-05-06 10:06 +0000
Message-ID<xn0kpnnpe1q8rfi000@nntp.aioe.org>
In reply to#58711
Alex wrote:

> On 5/5/2017 16:24, Rudy Velthuis wrote:
> > Fact is that Forth, like
> > most other languages, needs primitives implemented in some kind of
> > assembler.
> 
> Gforth is written entirely in C.

And C has its own primitives written in assembler. So indirectly, the
primitives are in assembler.
-- 
Rudy Velthuis        http://www.rvelthuis.de

"I am ready to meet my Maker. Whether my Maker is prepared for 
 the great ordeal of meeting me is another matter." 
 -- Winston Churchill.

[toc] | [prev] | [next] | [standalone]


#58732

FromAlex <alex@rivadpm.com>
Date2017-05-06 13:09 +0100
Message-ID<oeke71$omr$1@dont-email.me>
In reply to#58729
On 5/6/2017 11:06, Rudy Velthuis wrote:
> Alex wrote:
> 
>> On 5/5/2017 16:24, Rudy Velthuis wrote:
>>> Fact is that Forth, like
>>> most other languages, needs primitives implemented in some kind of
>>> assembler.
>>
>> Gforth is written entirely in C.
> 
> And C has its own primitives written in assembler. So indirectly, the
> primitives are in assembler.
> 

Hmm. The code generation stages of a C compiler are written in high 
level languages (like C). There aren't any C primitives that can be 
directly expressed in assembler in the Forth sense of the word.

That aside, perhaps inspecting some extremes might help.

LLVM provides a state-of-the-art set of components for writing 
compilers. Here is LLVM's code generator; 
http://llvm.org/docs/CodeGenerator.html. Eventually it generates 
"assembler", but there's no one to one correspondence between elements 
of the source language and the output.

There was an HLA (high level assembler) created by a guy called Randall 
Hyde. It was almost like C; almost, but not quite, since you could point 
to the source and the generated machine code, and say -- these 
correspond. He used to get regular verbal beatings from purists on 
comp.lang.asm that it wasn't an assembler, and he should take his 
non-assembler abomination somewhere else.

Or for Forth; it's possible to write a metacompiler (in Forth) that 
understands

: DUP DUP ;

At some dim and distant point in the past, this Forth may have been 
bootstrapped out of the primeval swamp by using an assembler; many saw 
first life that way (as did early C Fortran etc compilers). But that 
doesn't mean that it now needs or even has an assembler (for some 
definition of that word), written in Forth or otherwise.

Shorter version; there's no such thing as a hole, but you can make a 
tunnel out of one.

-- 
Alex

[toc] | [prev] | [next] | [standalone]


#58731

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2017-05-06 11:04 +0000
Message-ID<2017May6.130430@mips.complang.tuwien.ac.at>
In reply to#58711
Alex <alex@rivadpm.com> writes:
>On 5/5/2017 16:24, Rudy Velthuis wrote:
>> Fact is that Forth, like
>> most other languages, needs primitives implemented in some kind of
>> assembler.
>
>Gforth is written entirely in C.

As <https://www.openhub.net/p/gforth> used to tell me (it's currently
down), Gforth is written mostly in F# and in C.

<https://github.com/forthy42/gforth> tells me:

Forth      63.4%
C          17.3%
C++         8.5%
Makefile    1.7%
Shell       1.7%
Emacs Lisp  1.6%
Other       5.8% 

And, counting files:

420 Forth
148 C
 53 Shell
 17 Filterscript
 17 Makefile
 11 C++
 10 GLSL
  6 TeX
  5 Unix Assembly
  5 Text

C++ seems to be a misattribution of C code in .h files; Filterscript
and GLSL are misattributions of Forth code.

- 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 2017: http://www.euroforth.org/ef17/

[toc] | [prev] | [next] | [standalone]


#57744

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-21 20:28 +0000
Message-ID<xn0kp08et8ncmul004@nntp.aioe.org>
In reply to#57719
Andrew Haley wrote:

> > But it is still an assembler core with the rest in Forth. What you
> > consider "core" may be different. Fact is that there is "a core" of
> > assembler words on which the rest builds.
> 
> It's never felt that way to me.  Code written in Forth's assembler is
> still Forth: it's low-level Forth

Assembler is assembler, no matter how you look at it, and it doesn't
matter if that assembler was written in Forth or any other way.
-- 
Rudy Velthuis        http://www.rvelthuis.de

"You will kill ten of our men, and we will kill one of yours,
 and in the end it will be you who tire of it."
 -- Ho Chi Minh

[toc] | [prev] | [next] | [standalone]


#57755

From"Elizabeth D. Rather" <erather@forth.com>
Date2017-04-21 12:27 -1000
Message-ID<z5udnZEn-orVGmfFnZ2dnUU7-bnNnZ2d@supernews.com>
In reply to#57744
On 4/21/17 10:28 AM, Rudy Velthuis wrote:
> Andrew Haley wrote:
>
>>> But it is still an assembler core with the rest in Forth. What you
>>> consider "core" may be different. Fact is that there is "a core" of
>>> assembler words on which the rest builds.
>>
>> It's never felt that way to me.  Code written in Forth's assembler is
>> still Forth: it's low-level Forth
>
> Assembler is assembler, no matter how you look at it, and it doesn't
> matter if that assembler was written in Forth or any other way.
>

What we're really trying to get at is that in a "Forth written in Forth" 
implementation there's no big ball of code generated by assembler and 
another bigger ball of code compiled by high-level Forth. They're all 
intermingled. In such a system, the word "kernel" denotes the code that 
was pre-compiled and booted before more code starts being compiled from 
source. That kernel was built by a cross- or metacompiler out of both 
(and intermingled) assembler and high-level Forth definitions, as will 
be the additional code that's compiled in the second stage of booting. 
So, to say, "the kernel is written in assembler and the rest in 
high-level Forth" is meaningless.

Cheers,
Elizabeth

-- 
Elizabeth D. Rather
FORTH, Inc.
6080 Center Drive, Suite 600
Los Angeles, CA  90045
USA

[toc] | [prev] | [next] | [standalone]


#57776

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-22 04:55 +0000
Message-ID<xn0kp0ycw95geso00g@nntp.aioe.org>
In reply to#57755
Elizabeth D. Rather wrote:

> > Assembler is assembler, no matter how you look at it, and it doesn't
> > matter if that assembler was written in Forth or any other way.
> > 
> 
> What we're really trying to get at is that in a "Forth written in
> Forth" implementation there's no big ball of code generated by
> assembler and another bigger ball of code compiled by high-level
> Forth.

I get that. But whatever you do, there must be a (little, if you wish)
machine code core for the specific processor. That is unavoidable.

Now, I see that some Forths use C instead of assembler. That has its
advantages (much easier to implement things like allocation, file
handling, keyboard handling, output, etc.). Heck, I have even seen one
that is based on BBC Basic (which has a built-in assembler, BTW).

I orginally wanted to write one that is based on Delphi, but that would
make the executables pretty big. So now I use assembler and, well,
Forth and do all the hard stuff using my own code or the Windows API.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Rarely is the question asked: Is our children learning?"
 -- George W. Bush

[toc] | [prev] | [next] | [standalone]


#57757

FromCoos Haak <htrofhc@gmail.com>
Date2017-04-22 02:01 +0200
Message-ID<zh8ygixpj5d7$.1m9k9bkcfedfk$.dlg@40tude.net>
In reply to#57744
Op Fri, 21 Apr 2017 20:28:40 +0000 (UTC) schreef Rudy Velthuis:

> Andrew Haley wrote:
> 
>>> But it is still an assembler core with the rest in Forth. What you
>>> consider "core" may be different. Fact is that there is "a core" of
>>> assembler words on which the rest builds.
>> 
>> It's never felt that way to me.  Code written in Forth's assembler is
>> still Forth: it's low-level Forth
> 
> Assembler is assembler, no matter how you look at it, and it doesn't
> matter if that assembler was written in Forth or any other way.

My Forth is completely written in Forth.
A lot of definitions are in assembly code that is
compiled (assembled) within Forth and its integrated Assembler.
No assembler like MASM TASM NASM or FASM has ever touched it.

groet Coos

[toc] | [prev] | [next] | [standalone]


#57779

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-22 04:58 +0000
Message-ID<xn0kp0yfj95k8pe00h@nntp.aioe.org>
In reply to#57757
Coos Haak wrote:

> Op Fri, 21 Apr 2017 20:28:40 +0000 (UTC) schreef Rudy Velthuis:
> 
> > Andrew Haley wrote:
> > 
> >>> But it is still an assembler core with the rest in Forth. What you
> >>> consider "core" may be different. Fact is that there is "a core"
> of >>> assembler words on which the rest builds.
> >> 
> >> It's never felt that way to me.  Code written in Forth's assembler
> is >> still Forth: it's low-level Forth
> > 
> > Assembler is assembler, no matter how you look at it, and it doesn't
> > matter if that assembler was written in Forth or any other way.
> 
> My Forth is completely written in Forth.
> A lot of definitions are in assembly code that is
> compiled (assembled) within Forth and its integrated Assembler.
> No assembler like MASM TASM NASM or FASM has ever touched it.

The assembler is written in Forth. You can't deny it is still assembly
language. And I assume you (or someone else) had to start with
assembler or C or whatever for the very low level stuff, unless you
manually assembled the byte codes, or used another Forth to assemble
yours.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"Computer /nm./: a device designed to speed and automate errors."
 -- From the Jargon File.

[toc] | [prev] | [next] | [standalone]


Page 3 of 7 — ← Prev page 1 2 [3] 4 5 6 7  Next page →

Back to top | Article view | comp.lang.forth


csiph-web