Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!pacbell.com!pacbell!osc!jgk From: jgk@osc.COM (Joe Keane) Newsgroups: comp.arch Subject: Re: It looks like he's at it again! Message-ID: <3060@osc.COM> Date: 13 Jul 90 23:08:10 GMT References: <2328@l.cc.purdue.edu> <1990Jul10.072443.4844@cs.UAlberta.CA> <9896@celit.fps.com> <2338@l.cc.purdue.edu> <9911@celit.fps.com> <24358@estelle.udel.EDU> Reply-To: jgk@osc.COM (Joe Keane) Organization: Object Sciences Corp., Menlo Park, CA Lines: 14 In article <24358@estelle.udel.EDU> new@ee.udel.edu (Darren New) writes: >Sure. Any inner-interpreter type of code is easiest in assembler. Things >like Forth threading are harder to do in C than assembler because Forth >assumes is really big on treating addresses as data and vica versa. In >addition, it is usually only 3-6 instructions to do an inner-interpreter step >and the more speed you can get, the better. -- Darren I don't see any problem with `treating addresses as data and vice versa'. That's what casts are for. Your C code may end up with expressions like `*(long**)((char*)a+*(short*)b)' but it works and is even somewhat portable. One real problem with using C for threaded interpreters is that there is no way to make an arbitrary jump instruction. If you could `goto' some address expression there would be no problem.