Related articles |
---|
Mixing virtual and real machine code in an interpreter graham@pact.srf.ac.uk (1994-03-16) |
Re: Mixing virtual and real machine code in an interpreter sastdr@unx.sas.com (1994-03-21) |
Re: Mixing virtual and real machine code in an interpreter pardo@cs.washington.edu (1994-03-22) |
Re: Mixing virtual and real machine code in an interpreter nickh@harlequin.co.uk (1994-03-22) |
Re: Mixing virtual and real machine code in an interpreter sdm7g@elvis.med.virginia.edu (Steven D. Majewski) (1994-03-23) |
Re: Mixing virtual and real machine code in an interpreter sosic@kurango.cit.gu.edu.au (1994-03-30) |
Newsgroups: | comp.compilers |
From: | sastdr@unx.sas.com (Thomas David Rivers) |
Keywords: | interpreter |
Organization: | SAS Institute Inc. |
References: | 94-03-039 |
Date: | Mon, 21 Mar 1994 14:38:57 GMT |
graham@pact.srf.ac.uk (Graham Matthews) writes:
>I am interested in the problem of mixing sections of real and virtual
>machine code. I have an interpreter for a language L that compiles L into
>a virtual machine code and executes this. For certain critical sections, I
>would like to compile into native assembler. I envisage having some sort
>of virtual machine instruction that jumps to a section of real machine
>instructions, and similarly a jump back ...
Just as a point of reference, or humor as the case may be. There was a
compiler company which created C and Pascal compilers for the TRS-80
(model I no less) which did exactly that.
Most of the code the compiler generated was a P-code derivative, being
interpreted by an interpreted embedded in the program. However, with
certain compiler directives you could cause the P-code for certain
functions to be "compiled" into native Z-80 code.
This worked with a simple P-code instruction indicating that the next
instruction was hardware. Similarly, they used some sort of
USER-interrupt-like mechanism to trap back into the interpreter when the
Z-80 instructions were complete.
- Dave Rivers -
(sastdr@unx.sas.com)
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.