Shop OBEX P1 Docs P2 Docs Learn Events
Read long arrays spin to assembly — Parallax Forums

Read long arrays spin to assembly

PrincPrinc Posts: 12
edited 2014-02-10 07:51 in Propeller 1
Hi,

i have got a problem with reading from spin
I have got defined array in spin like this

long pixel[16200]

and i would like to read long in assembly one by one
old one should be replaced with new long but i don´t now how to do it without shifting in spin

thanks for help

Comments

  • JonnyMacJonnyMac Posts: 9,107
    edited 2014-02-10 07:51
    It's really not difficult. You need to pass the address of the array to the PASM code (using the par register). You can use rdlong to get a long from the hub, wrlong to write on back.

    BTW... there's only 32K (8K longs) of RAM in the hub, so you can't have an array that large.
Sign In or Register to comment.