I've got a question about this. If I setup some variables (for want of a better word) like this:
var1: dc.w $1234
var2: dc.l $12345678
var3: dc.l $12345678
var4: dc.b $12
var5: dc.b $34
var6: dc.l $12345678
var7: dc.l $12345678
then link some space:
link a4,#-20
and move the variables into the linked space like this:
move.w var1,(a4)
move.l var2,2(a4)
move.l var3,6(a4)
move.b var4,10(a4)
move.b var5,11(a4)
move.l var6,12(a4)
move.l var7,16(a4)
is it then faster (although, admittedly, less readable) later on in my code to do things like this:
move.l $9abcdef0,2(a4)
instead of things like this:
move.l $9abcdef0,var2
Just curios - I'm trying to work out ways to make code quicker. While I'm on the subject of optimsation, is there a list of optimisations anywhere, such as "instead of clr.l d0, do a moveq.l #0,d0 cos it's faster..."?
|