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...