Forth sur Tandy MC10 / Alice Matra 4 K

Cette catégorie traite de développements récents destinés à nos vieilles machines, applications, jeux ou démos... Amis programmeurs, c'est ici que vous pourrez enfin devenir célèbres!

Modérateurs : Papy.G, fneck, Carl

Avatar de l’utilisateur
Carl
Modérateur
Messages : 13296
Inscription : 08 avr. 2007 13:21
Localisation : http://www.doledujura.fr
Contact :

Forth sur Tandy MC10 / Alice Matra 4 K

Message par Carl »

Forth sur Tandy MC10 / Alice Matra 4 K
Dominique, on parle Forth ici : TRS80MC10Club@yahoogroups.com


On Wed, 30 Jun 2010, Ed wrote:

> One of the things that I don't particularly like about RPL or Forth is
> all the jumps required while the code executes. Those get CPU cycle
> expensive after a while. Programming directly in assembly is going to
> be the most efficient, but then you don't get the ease of programming
> that you get with a higher level language.


Especially on a CPU with so few registers! It's been a while since I
considered Forth on the 6803, so I just took a quick peek at the
instruction set again. Yeah, one is pretty much forced to use subroutine
threading. OTOH, STC means you get inlining for free, so I'd probably
keep TOS in D, IP=PC, R=SP, P=X, and inline the code for the lighter
weight stuff: LIT, DUP, DROP, +, -, +n, -n, *2, /2, @, comparisons,
boolean ops, NEG -- pretty much anything within 2-3 times the overhead of
a jsr/ret. I bet it would be pretty close to well-factored hand-written
assember when done -- especially if 'VARIABLE x' were to automagically add
x@ and x! words to the dictionary that inline to direct-page ops.

__._,_.___

Harry,

My RPL compiler that I've been working on is a lot like Forth although it deviates from being Forth in that it is much more like the RPL language on the HP series of calculators.

I say go for it. :) A Forth compiler could be fun. I have a bunch of projects on my list right now for the MC-10. What language is the fig-FORTH source code written in?

Thanks,
Ed


--- In TRS80MC10Club@yahoogroups.com, "wd9fyf" <wd9fyf@...> wrote:
>
> Has anyone attempted to write or edit a source code file for a 6800 FORTH compiler to function on the MC-10? I have the source for fig-FORTH and have often thought about porting it to the MC-10. It would be very compact and very fast and powerful.
>
> For those unfamiliar with FORTH, think of an HP calculator on steroids!
>
> Harry Seyfert
>
Répondre