can anyone tell me what does this snipet of code means it came from a motorola source program file for verifying and reprogramming the configuration register of a hc11. this is only a partial listing.<p>this part i understand:<p>eelat equ $02
eepgm equ $01
byte equ $10
erase equ $04<p>this part of the code i dont understand its from 3 different lines in the code:<p>line 1: ldaa #(byte + erase +eelat
line 2: ldaa #(byte + erase +eelat +eepgm)
line 3: ldaa #(eelat + eepgm)
microcontoller ? made easy
Re: microcontoller ? made easy
The + symbol is another way of binary or'ing.<p>In other words consider you have a binary byte such as 10100001, you then + 100 the byte will then equal 10100101.<p>Take the original byte of 10100001 and | 00000100 to it and you will have the same result.<p>So what your code is saying is Idaa= the value of byte Or'd with the value of Erase and Or'd with the value of Eelat.<p>After you have +/ or'd all those values Idaa line 1 will look like - 0x16 = 00010110 <p>Try it with the Windows calculator in scientific mode and you will see how plussing and Or'ing works.<p>Colin<p>[ February 22, 2003: Message edited by: bodgy ]</p>
On a clear disk you can seek forever.
Re: microcontoller ? made easy
eelat equ $02
eepgm equ $01
byte equ $10
erase equ $04<p>These lines are setting constants. The assembeler sees eelat as $02. the $ tells what kind of number it is, hex dec and so forth but i don't know what the symbols are or if they are standardized in different assembelers.
eepgm equ $01
byte equ $10
erase equ $04<p>These lines are setting constants. The assembeler sees eelat as $02. the $ tells what kind of number it is, hex dec and so forth but i don't know what the symbols are or if they are standardized in different assembelers.
Re: microcontoller ? made easy
The $ sign preceding the number indicates that the number is to be interpreted as hex.
-Jus
-Jus
2+2=5 for extremely large values of 2
Who is online
Users browsing this forum: Google [Bot] and 169 guests