Thread: Lnk/Unlnk
View Single Post
Old 10 July 2008, 14:08   #7
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
musashi5150 is right! Use relative offsets whenever possible! Faster than using absolute 32 bit values.

Quote:
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)
You can still have readable code using that approach, just define a structure like:

Code:
        RSRESET
s_var1: rs.w 1
s_var2: rs.l 1
s_var3: rs.l 1
s_var4: rs.b 1
.... etc
then you can use: move.w var1,s_var1(a4), move.l var2,s_var2(a4) etc.
StingRay is offline  
 
Page generated in 0.04488 seconds with 11 queries