[A89] Re: Setting bit fields


[Next][Index][Thread]

[A89] Re: Setting bit fields





> If it is just a few bits you could just as well use the instructions bset
> and bclr.
> increases readability too.
> if you do a lea to an adress reg first and then one and and one or, you
> take 14 bytes. (16 without the lea)

I do actually this:
movea.l    #$600000,a0        ;i/o base adress
ori.b      #$avalue,$15(a0)
andi.b     #$avalue,$15(a0)
ori.b      #$avalue,$17(a0)
andi.b     #$avalue,$17(a0)
...

smart? or not?

Bye,
Gijs