If anyone's feeling very lucky, try this weird one :-)
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 iorlw 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]. 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.
