Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #58608
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: typical actual time for implementing kernel in a new architecture? |
| Date | 2017-05-03 13:52 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <oed8o8$5rd$1@dont-email.me> (permalink) |
| References | (3 earlier) <fZKdnRO8BrafepXEnZ2dnUU7-SnNnZ2d@supernews.com> <oeaqj7$5l6$1@dont-email.me> <64267dbe-5934-433a-956a-8e554ef24f20@googlegroups.com> <oebs6c$ot5$1@dont-email.me> <93d04bfd-fb76-4f6d-b89f-30c1eb559972@googlegroups.com> |
On 5/3/2017 4:06 AM, minforth@arcor.de wrote: > Am Mittwoch, 3. Mai 2017 08:12:32 UTC+2 schrieb Cecil - k5nwa: >> On 5/3/2017 12:29 AM, minforth@arcor.de wrote: >>> Am Dienstag, 2. Mai 2017 22:39:08 UTC+2 schrieb Cecil - k5nwa: >> >>>> I have worked on text based optimizers in the past and was able to >>>> generate extremely good code but the optimizer was very complex and not >>>> very fast as I would have liked, but it was extremely flexible and quite >>>> capable. Using a template file to control the conversion of the >>>> generated code. It used a Balanced Tree + to store and manipulate the >>>> code. Being highly recursive is what made it slower but also gave it the >>>> capacity to generate code that looked like a decent programmer wrote it >>>> by hand. A negative was that once the final code was generated it was >>>> difficult to link it back to the original source as the final product >>>> often bore no resemblance to the original code. But all of that was >>>> controlled by the user and how many interacting rules one had. >>>> >>>> -- >>>> Cecil - k5nwa >>> >>> Non-interactive Forth code can be stored in a simple linear database of lists, names being the list headers, code the list body as sequence of symbols or literal parameters. Once you have the database of a Forth kernel, pattern recognistion, peephole optimization, target code reduction are rather easy jobs. F.ex. recursion from the entry word (e.g. MAIN) is perfect to minimize the optimized target database. >>> >>> Thereafter, to generate code from the target database, it is a more or less linear translation of the target database from top to bottom to assembler. Other backends could spill out direct machine code or whatever is needed. >>> >>> Prolog is an excellent language to do this efficiently and with very compact program code. Adding/changing new optimizer rules is easy. >>> >>> In the 80s I did all this with Turbo Prolog, but then had to move to other jobs. Perhaps I should revitalize it when I'm retired... >>> >> >> I like Turbo Prolog, Borland did not write that software but marketed >> it, the originators had their enhanced version called PDC Prolog, now >> they have Visual Prolog, I have a copy of all three versions but my >> Visual Prolog is rather an old version its V5.3 , I believe the current >> version is 7.6, PDC and Turbo Prolog are DOS based so the will not even >> run in Windows 10. >> >> Prolog is an interesting language that requires a different way of >> thinking but its very effective at certain kinds of problems, smart text >> processing being one of them. My funky translator/macro processor was >> written in C, unfortunately the code is lost, the original was written >> under CDOS an enhanced version of CPM for Z80 processors using my own >> homemade version of a C compiler, but with minor changes it was able to >> compile later under Turbo C. >> >> -- >> Cecil - k5nwa > > You might also like Holon Forth that holds its own sources in an internal database > http://www.holonforth.com/ > I do like the principle of Holon Forth, it makes it very easy to keep the source code organized. A long time ago I had high hopes for it but it was not to be. At one point I even started working on creating a version for another CPU but since at the time the full source was not available, one needed the help of the author to integrate my newly written assembler, but the author asked me to not bother as it was not worth the effort. This was a big disappointment after going through all the work to get the assembler working and tested. The result besides being disappointed was to give up using it altogether. I believe now the full source is available but I rather late in the day as the source is for a DOS Forth and Windows no longer supports DOS. On a side project that I have worked on an off for a while, mostly off, I started creating a Forth VM in 386 assembler and have a good deal of it finished but my heart is not in it. Still it could be useful in the future if I finish it as I already have 86 Forth Words in assembler. Instead I been writing a Forth VM in C with about 45 primitives and the rest will be in Forth, that is 80% done with all the primitives working but now I'm using them to build a full system in Forth. Every once in a while I check the status of the site since they had a version that did not have Forth in it but was just an editor which could be useful but the page on that product does not have a link to download it so the whole thing is a lost cause now. After a while the author converted the software to generate and use Tcl/Tk, a Forth compiler/interpreter written in an interpreter just doesn't work out with me as it would be too slow, even now I'm in the middle of a project to create an easy to modify Forth in C which is too slow for my taste but I did not have a lot of choice as I wanted to avoid having to learn assembler for a variety of CPUs. -- Cecil - k5nwa
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
typical actual time for implementing kernel in a new architecture? Joel Rees <joel.rees@gmail.com> - 2017-05-01 02:24 -0700
Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-01 17:40 +0200
Re: typical actual time for implementing kernel in a new architecture? Ron Aaron <rambamist@gmail.com> - 2017-05-01 19:35 +0300
Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-02 08:13 +0200
Re: typical actual time for implementing kernel in a new architecture? Joel Rees <joel.rees@gmail.com> - 2017-05-01 15:17 -0700
Re: typical actual time for implementing kernel in a new architecture? hughaguilar96@gmail.com - 2017-05-01 20:11 -0700
Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-02 09:07 +0200
Re: typical actual time for implementing kernel in a new architecture? Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-05-01 18:34 -0400
Re: typical actual time for implementing kernel in a new architecture? "Elizabeth D. Rather" <erather@forth.com> - 2017-05-01 12:41 -1000
Re: typical actual time for implementing kernel in a new architecture? hughaguilar96@gmail.com - 2017-05-01 19:33 -0700
Re: typical actual time for implementing kernel in a new architecture? Mark Wills <markwills1970@gmail.com> - 2017-05-02 01:51 -0700
Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-02 06:17 -0700
Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 12:59 -0500
Re: typical actual time for implementing kernel in a new architecture? "Elizabeth D. Rather" <erather@forth.com> - 2017-05-02 10:07 -1000
Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 15:39 -0500
Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-02 22:29 -0700
Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-03 01:12 -0500
Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-03 02:06 -0700
Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-03 13:52 -0500
Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-03 22:23 -0700
Re: typical actual time for implementing kernel in a new architecture? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-05-04 04:59 -0700
Re: typical actual time for implementing kernel in a new architecture? Rob Sciuk <rob@controlq.com> - 2017-05-08 15:38 -0400
Re: typical actual time for implementing kernel in a new architecture? stephen@mpeforth.com (Stephen Pelc) - 2017-05-02 19:41 +0000
Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 15:25 -0500
csiph-web