View Single Post
Old 19 January 2007, 16:46   #19
musashi5150
move.w #$4489,$dff07e
 
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
Quote:
Originally Posted by pbareges
but in the above code, it says dc.l 1 reserves 1 long variable...it is not consistent with your explanation right? or to be more precise what is the difference between constant and static vars ?
EQU is used for contants that never change
DS.x is used to Define Storage (uninitialised) - you can change this when running
DC.x is used for Define Constant (initialised) - you can change this when running

Example:
Code:
        ds.b    4    ;Reserves 4 bytes storage (contains random trash data)
        dc.b    4    ;Reserves 1 byte storage and puts the value '4' into it
beefy   equ     4    ;Reserves NO storage, but you can use the word 'beefy' to mean 4 in your program code...
musashi5150 is offline  
 
Page generated in 0.04448 seconds with 11 queries