i need help

Software questions and issues with the FV-1

Moderator: frank

Post Reply
mohandes
Posts: 10
Joined: Thu May 22, 2014 2:40 am

i need help

Post by mohandes »

Code: Select all

equ   ping_len   16383      ;Max ping delay length (left) 
clr                                   ; Clear the ACC 
or    ping_len*256      ; Put delay length into ACC alligned to ACC[22:8] 



it's a part of ping pong code by frank .
what is it in the third line? and what did mean (ACC[22:8]) ?
is the symbol(*) meaning the multiply?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Yes, * means multiply, it is to align the address in the accumulator. For more detail see the SpinAsm manual at http://spinsemi.com/Products/datasheets ... Manual.pdf
Frank Thomson
Experimental Noize
mohandes
Posts: 10
Joined: Thu May 22, 2014 2:40 am

Post by mohandes »

first tank you frank
so , there's 0x3fff00 in acc, but why?
why the delay length multiply by 256?
i dont figure out the [22:8]. the result have 22 bits it's true.
but what about the 8?
mohandes
Posts: 10
Joined: Thu May 22, 2014 2:40 am

Post by mohandes »

first tank you frank
so , there's 0x3fff00 in acc, but why?
why the delay length multiply by 256?
i dont figure out the [22:8]. the result have 22 bits it's true.
but what about the 8?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

For the RMPA later in the code the address needs to be in acc[22:8] to write to addr_ptr
Frank Thomson
Experimental Noize
mohandes
Posts: 10
Joined: Thu May 22, 2014 2:40 am

Post by mohandes »

but frank
what does the [22:8] meaning?
mohandes
Posts: 10
Joined: Thu May 22, 2014 2:40 am

Post by mohandes »

but frank
what does the [22:8] meaning?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

No offense, but if you don't understand what the acc[22:8] means you need to pick up a basic book on microprocessor programming. It indicates the used bit range of a register/memory/value.
Frank Thomson
Experimental Noize
Post Reply