Question on assembly code

Status
Not open for further replies.

yzou_ua

Member level 5
Joined
Nov 5, 2008
Messages
92
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,869
Would someone pls let me know the meaning of following code?? Is it just for distribution of values to variables?? Buz obviously 'Estim_a' to 'f' are variables used in main code. Then why the numbers are 0, 2,4,6, etc.

.......

.equ Estim_a, 0 ;
.equ Estim_b, 2 ;
.equ Estim_c, 4 ;
.equ Estim_d, 6 ;
.equ Estim_e, 8 ;
.equ Estim_f, 10 ;

.......

I know too little about assembly code, so thx for patient explanation.
 

.equ Estim_a, 0 ;

means whereever the symbol 'Estim_a' appears in the code
replace by '0'.

Estim_b by 2 etc...

it is a short form for writing constants in assembly codes.

srizbf
26thjune2010
 

Thx.
Then, why the numbers are 0,2,4,6,8 etc. ?? I mean why they are just even number series?? Maybe this is not a good question, but I thought look like addr. or sth...

srizbf said:
.equ Estim_a, 0 ;

means whereever the symbol 'Estim_a' appears in the code
replace by '0'.

Estim_b by 2 etc...

it is a short form for writing constants in assembly codes.

srizbf
26thjune2010
 

why it is even numbers only ?
well that depends on what the code is written for .

no other reason .

srizbf
26thjune2010
 

You can share your code to help you understand it.
--
Amr
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…