Shop OBEX P1 Docs P2 Docs Learn Events
"Large" data arrays — Parallax Forums

"Large" data arrays

Toby SeckshundToby Seckshund Posts: 2,027
edited 2009-04-13 19:41 in Propeller 1
Stupid question I suspect but how can I lay out 2KB or 8KB data?

I want to load up monitor prog and will want to set out the running progs but I innocentle tried to put it in Dat sections and got a bunch of errors.
Do I really have to put every single line as a separate label??

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-04-13 19:17
    Hello Toby,

    no you don't need to set new labels just set a new LINE without a new label but again with
    the memorysize byte, word or long

    you can do this

      rx_buffer   long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
    
      tx_buffer   long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
                  long  0, 0, 0, 0, 0, 0, 0, 0      '32 bytes    
    
    
    



    and this can be done to what ever size you want to as long as memory is not exceeded

    best regards

    Stefan
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-04-13 19:20
    Thanks Stefan,

    I tried that but got errors, or at least I thought I did! something else to hunt for now.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-13 19:32
    You can also do:

    buffer  long    0[noparse][[/noparse]64]
    
    
    


    This reserves 64 longs in hub ram and sets them to zero.

    -Phil
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-04-13 19:41
    I just shut everything down, counted to ten fired up again and it all work as Stephan pointed out and I sort of expected anway. Windoze, Bless.
Sign In or Register to comment.