Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED!nerds-end From: hu47121@usenet.kitty.sub.org (Hannah) Newsgroups: comp.compilers Subject: Re: Best tools for writing an assembler? Date: Tue, 25 Feb 2014 00:43:13 +0000 (UTC) Organization: The Pond Lines: 19 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-02-038@comp.compilers> References: <14-02-018@comp.compilers> <14-02-025@comp.compilers> <14-02-027@comp.compilers> <14-02-033@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1393298290 42901 64.57.183.58 (25 Feb 2014 03:18:10 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Tue, 25 Feb 2014 03:18:10 +0000 (UTC) Keywords: assembler, tools, comment Posted-Date: 24 Feb 2014 22:18:10 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1117 Hi! glen herrmannsfeldt wrote: Actually, our moderator wrote: >-- glen >[Variable length instructions aren't that hard. You start by assuming >everything will be the long form, then iterate over the code a few >times shrinking what you can. That isn't always perfectly optimal >(which is known to be NP complete), but it's pretty close. -John] Can't one also go the other way round: Start in the short(est) form and lengthen as long as needed? Hannah. [Shrinking long versions has the advantage that the code is always valid, even if you miss a few. -John]