Propeller SPIN language question on FullDuplexSerial Object
nasayu
Posts: 3
Hi everyone, I am a newbie with the propeller, just having done a few things with the Basic Stamp and learned that those were not powerful enough for what I want to do.
I am trying to understand what this part of the FullDuplexSerial object code does.
In the object, the variables declared at the begining are longs, and the memory addresses in the propeller are in 32 bit long as well. So, when I came across the following 2 lines, I got confused, hope someone can get me out of my mental jam here (I am stuck).
(in the DAT section for the assembly serial driver)
entry mov t1, par 'this line I get
add t1, #4 << 2 'skip pass heads and tails, this is the part I don't get,
'this line is supposed to skip pass the next 4 long variables and get
'to the rx_pin variable, so why the extra "<< 2"?
rdlong t2, t1
I am trying to understand what this part of the FullDuplexSerial object code does.
In the object, the variables declared at the begining are longs, and the memory addresses in the propeller are in 32 bit long as well. So, when I came across the following 2 lines, I got confused, hope someone can get me out of my mental jam here (I am stuck).
(in the DAT section for the assembly serial driver)
entry mov t1, par 'this line I get
add t1, #4 << 2 'skip pass heads and tails, this is the part I don't get,
'this line is supposed to skip pass the next 4 long variables and get
'to the rx_pin variable, so why the extra "<< 2"?
rdlong t2, t1
Comments