Samstag, 11. Oktober 2008

I like to code in assembler for sure

The new vm will get along without operating system. The bootstrap code is finished and I`m working now on smp detection and initialisation whereupon a small, retroforth compatible,  forth kernel will be the basis for the vm compiler and other nice things. This have one big avantage: The engine can be implementated in forth ! I think it would no problem to port the assembler source code to other architectures like PowerPC based systems in one or two days because the kernel is small so it doesn't need to be really written in C (and you doesn't get crazy about compiler and "syntax" realated pitfalls of this great "language").

Die neue VM wird kein Betriebsystem mehr benötigen.  Der Bootlader ist fertig und ich habe begonnen am Code für die SMP Erkennung und Initialisierung zu arbeiten. Dieser wird dann die Basis für einen kleinen, Retroforth kompatiblen, Forthkernel bilden welcher es wiederum zulässt den VM Kompiler komplett in Forth zu implementieren. Ich denke die Assembler Sourcen sind recht einfach auf andere Prozessorarchitekturen zu übertragen, der Kernelcode ist simpel und vor allem nicht derart umfangreich, das eine Implementierung in C sinnvoll wäre (endlich kein Herumärgern mehr mit syntaktischen und kompilerabhängigen Feinheiten dieser tollen "Programmiersprache").

5 Kommentare:

joshua.grams hat gesagt…

I haven't looked in on RetroForth since the 9.x days, but unless the model has changed, it has some things that are a bit of a nuisance on PPC (e.g. definitions that drop through to each other).

--Josh

Mat hat gesagt…

the forth kernel isn't a threading interpreter. Words are compiled to native code so I hope to go around of some shortcomings like that you notice.

--Mat

Charles Childers hat gesagt…

The current Retro is a complete rewrite. It's cleaner, less quirky, but still provides most of the functionality from the 9.x days.

Among the odd bits that I dropped was the support for multiple entry points into words.

Mat hat gesagt…

qfor the compiler, it make no difference if there are multible entry points to a word because the code following would be just reused as a prototype code fragment for the optimiser.

A similar behavior for a interpretative system is to split a word into multible parts, marked though the entry points, and inline them at demand in a new definition I think....

joshua.grams hat gesagt…

Ah, I see. I wasn't sure how sophisticated of a compiler you were talking about.