Shop OBEX P1 Docs P2 Docs Learn Events
Store Command? — Parallax Forums

Store Command?

ArchiverArchiver Posts: 46,084
edited 2002-11-07 19:51 in General Discussion
I am looking into the Store Command but its usage isn't clear to
me. The BS2p has accessible EEPROM from 0 - 2047 when using
Read/Write, but when using Store it can make the available memory be
14 kbytes. I am just wondering if in each program slot specified by
Store are there 2048 spaces of accesible memory and will the memory
of each program slot be preserved, or does the data in one program
slot get overwritten by the data in another program slot

Thank You

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-11-07 19:51
    The Store command allows you to READ and WRITE data from/to banks
    other than the one that is currently being RUN.

    RUN 1

    ' in bank 1
    x var by;te
    read 0,x ' reads from location zero in bank 1
    store 7
    write 0,x ' stores that same value in bank 7

    Programs work down in eeprom from the highest address in the bank
    (2047), whereas DATA usually starts from 0 and works up. Usually
    there is no conflict, unless you reach a point where the two collide
    in the middle. Some banks you can allocate for data only.

    If you want to be tricky, you can on purpose READ program tokens from
    one bank or from some other source (a modem say), and WRITE them into
    another bank, and then RUN that bank.

    -- Tracy



    > I am looking into the Store Command but its usage isn't clear to
    >me. The BS2p has accessible EEPROM from 0 - 2047 when using
    >Read/Write, but when using Store it can make the available memory be
    >14 kbytes. I am just wondering if in each program slot specified by
    >Store are there 2048 spaces of accesible memory and will the memory
    >of each program slot be preserved, or does the data in one program
    >slot get overwritten by the data in another program slot
    >
    > Thank You
Sign In or Register to comment.