User talk:Daniel K.

From Rosetta Code
Revision as of 17:26, 6 October 2009 by rosettacode>Dkf

How simple and straightforward do you think a 6802 interpreter could be? It's been something I've been thinking about along the lines of RCBF and RCSNUSP. The 6802 is the simplest microcontroller I know anything about. (Though I'll admit I don't know anything at all about the Z80, apart from that it was what powered my old calculator.) --Michael Mol 02:43, 6 October 2009 (UTC)

It depends from the kind of interpreter you want to write. The simplest way is to write a general routine that reads the instruction, does search for it in a jump table, gets the instruction's routine address, and jumps to it, providing the offset for the parameters string. This is good for command line processing and simple batch files, but it does lack too much features for an "usual" programming language. For an esoteric programming language (although I admit that I don't know anything at all about an esoteric programming language...) it could be enough. --User:Daniel K. 19:14, 6 October 2009 (CET)
You definitely don't want to write a Z80 interpreter; it had a lot of complicated addressing modes and many many instructions. (I started on a Z80 system and I can remember being rather daunted by it all.) Something more RISC in nature is probably better. —Donal Fellows 17:26, 6 October 2009 (UTC)