Path: utzoo!yunexus!geac!geaclib!daveb From: daveb@geaclib.UUCP (David Collier-Brown) Newsgroups: comp.arch Subject: Re: Common Compilers for benchmarks (was: Re: benchmarking) Message-ID: <3390@geaclib.UUCP> Date: 8 Nov 88 02:05:59 GMT Article-I.D.: geaclib.3390 References: <238@taux02.UUCP> Organization: GEAC Computers, Toronto, CANADA Lines: 24 | In article <626@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: | with no multiplies at all, so a COBOL compiler should be able to hack | text->binary by generating a little special-purpose subroutine for | each different PICTURE. (Though I have yet to see a RISC manual which | bothers to explain how.) Or you could use a mini-interpreter: generate a vector of codes for each character in the picture (8 bits is enough, 6 used to be sufficient), and let them reference the entry points to the corresponding routines. (A technique also used to build some of the CISC's edit-via-tally instructions). Say, pic (999v.9) becomes { 'v4', '%d', '%d', '%d', '.', '%d' }, or whatever applies, and the convert-to-decimal subroutine uses it as a pattern for producing character output. (the leading v4 is an indicator about where to put the logical decimal-point). A friend once did this kind of thing in ratfor, as a fast, fixed-format replacement for printf/format statements. --dave -- David Collier-Brown. | yunexus!lethe!dave Interleaf Canada Inc. | 1550 Enterprise Rd. | HE's so smart he's dumb. Mississauga, Ontario | --Joyce C-B