|Mixing virtual and real machine code in an interpreter email@example.com (1994-03-16)|
|Re: Mixing virtual and real machine code in an interpreter firstname.lastname@example.org (1994-03-21)|
|Re: Mixing virtual and real machine code in an interpreter email@example.com (1994-03-22)|
|Re: Mixing virtual and real machine code in an interpreter firstname.lastname@example.org (1994-03-22)|
|Re: Mixing virtual and real machine code in an interpreter email@example.com (Steven D. Majewski) (1994-03-23)|
|Re: Mixing virtual and real machine code in an interpreter firstname.lastname@example.org (1994-03-30)|
|From:||email@example.com (Thomas David Rivers)|
|Organization:||SAS Institute Inc.|
|Date:||Mon, 21 Mar 1994 14:38:57 GMT|
firstname.lastname@example.org (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 -
Return to the
Search the comp.compilers archives again.