I'll have to give this one a try.

I just wish whereis() would work with a variable. Then POSTINC or your ASM 
dst could be set to a variable's address.

Matt.

On Wednesday, March 20, 2013 2:07:25 PM UTC-4, Kiste wrote:
>
>
> Ouch! There's a difference between "OR" and "AND", isn't it?
>
>
> procedure _usb_copy_array_to_ram(word in dst, byte in data[], byte in 
> num_bytes , byte out dummy[]) is 
>     -- pragma inline
>     var byte index
>
>    -- dummy is accessed as a pointer, when calling this procedure give a 
> "var byte dummy_array[2]" to it, or any other byte array.
>    -- The content of "dummy"  will not be altered, just the pointer 
> generated by passing it is used.
>
>    assembler            -- move the "dummy" pointer to the destination 
> adress without telling the compiler
>       movfw    dst
>       movwf    dummy
>       movfw    dst +1
>       andlw    0b00111111    -- two highest bits must be 0 to indicate a 
> location in RAM
>       movwf    dummy +1
>    end assembler
>
>     for num_bytes using index loop
>         dummy[index] = data[index]
>     end loop
> end procedure
>
>
> Greets,
> Kiste
>   -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/jallib?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>   

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to