Related articles |
---|
[3 earlier articles] |
Re: Language/Compiler for 8/16 bit processor? bazyar@netcom.com (1994-01-21) |
Re: Language/Compiler for 8/16 bit processor? amn@ubik.demon.co.uk (1994-01-22) |
Re: Language/Compiler for 8/16 bit processor? rehrauer@apollo.hp.com (1994-01-24) |
Re: Language/Compiler for 8/16 bit processor? davidm@questor.rational.com (1994-01-25) |
Re: Language/Compiler for 8/16 bit processor? prechelt@ira.uka.de (1994-01-27) |
Re: Language/Compiler for 8/16 bit processor? torbenm@diku.dk (1994-01-28) |
Re: Language/Compiler for 8/16 bit processor? strohm@mksol.dseg.ti.com (1994-01-31) |
Newsgroups: | comp.compilers |
From: | strohm@mksol.dseg.ti.com (john r strohm) |
Keywords: | architecture |
Organization: | Texas Instruments, Inc |
References: | 94-01-081 94-01-101 |
Date: | Mon, 31 Jan 1994 19:03:06 GMT |
bazyar@netcom.com (Jawaid Bazyar) writes:
> Most 8-bit high-level languages opted for a P-Code approach.
torbenm@diku.dk writes:
>The main difficulty with using the 6502 as a target language for a
>Pascal-like language was addressing. ...
Similar problems existed on the Intel 8080. Intel's PL/M-80 compiler
worked around them by defining a huge library of common code sequences,
then generating subroutine calls instead of in-line machine code. (This
is sometimes known as "subroutine-threaded code".) This added one
instruction (the RET, or subroutine return) to the code sequence (which
occasionally actually SAVED instructions: the Intel 8080 had no short
branch, but DID have conditional RETurns, i.e., RETZ would return if the
Zero flag was set, so you could actually save bytes if you could replace
conditional branches with conditional returns), and of course the
three-byte call at the site, but you were trading (let K be the number of
occurrences of the construct, N be the number of bytes in the original
construct, and N' the number of bytes in the subroutinified construct --
usually N+1) K*N bytes of inline code against K*3+N' code for the
subroutine-threaded version. K doesn't have to get very big before this
starts winning.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.