[OT] [sdiy] IN your mind, what is ....
Neil Johnson
nej22 at hermes.cam.ac.uk
Wed Feb 4 19:02:59 CET 2004
Hi,
> LDA #a
> CPMA #0
> BNE x1
> ...a...
> BRA x3
> x1: CMPA #1
> BNE x2
> ...b...
> BRA x3
> x2:
> ...default...
> x3:
> As an assembly programmer I would prefer the first solution whereas
> compilers (to my knowledge) tend to like the second one which is a 1:1
> translation of a switch/case statement.
Some compilers do emit jump tables where the case labels are densely
packed, as in your example.
Neil
--
Neil Johnson :: Computer Laboratory :: University of Cambridge ::
http://www.njohnson.co.uk http://www.cl.cam.ac.uk/~nej22
---- IEE Cambridge Branch: http://www.iee-cambridge.org.uk ----
More information about the Synth-diy
mailing list