Shop OBEX P1 Docs P2 Docs Learn Events
LONGMOVE vs. Repeat for RAM to DAT — Parallax Forums

LONGMOVE vs. Repeat for RAM to DAT

UltraLazerUltraLazer Posts: 30
edited 2009-11-25 22:07 in Propeller 1
I seem to be having an issue when trying to use LONGMOVE. A dedicated repeat seems to have no problem writing a buffer_array[noparse][[/noparse]96] from RAM to some predefined long space in DAT which is later accessed by a PASM cog.

When I try to employ LOMGMOVE for this same purpose it writes 96 * $0000_0000 at SEQ. This distilled code may help clarify. Either/Or - LONGMOVE/repeat, not both as below.

    VAR
    long SEQ_buffer[noparse][[/noparse]96]
    
    PUB 
    
    
    repeat i from 0 to 95            <----------- This stuff works
             SEQ[i] := SEQ_buff       <------------- this too...


    LONGMOVE(@SEQ_buffer,@SEQ,96) ' <------ This is not ok... 
  


    COGINIT (SEQ_cog,@Step000,@SEQ)

    DAT

    SEQ long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[/i]



LONGMOVE may be a dead end in this application, but it is far more likely that I am missing something. Any ideads?

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-25 20:22
    First comes the destination adress, then the source. So, if you want the longmove to do the same as the repeat loop you should write:
    LONGMOVE( @SEQ, @SEQ_buffer, 96)
  • UltraLazerUltraLazer Posts: 30
    edited 2009-11-25 22:07
    zang... my bad, thanks MagI02
Sign In or Register to comment.