Shop OBEX P1 Docs P2 Docs Learn Events
Multi-bank programming — Parallax Forums

Multi-bank programming

ArchiverArchiver Posts: 46,084
edited 2004-04-12 05:39 in General Discussion
Hi All,

I have read the N&V cloumn # 87 on multi-bank programming, but it is still
not clear how I download programs to different slots. The passing of vars
back and forth via the scratchpad makes sense, and so does the run command,
but I can't seem to find where it talks about downloading to different
slots.

Another question, must all slots be downloaded to at the same time, or can
just the contents of one slot be changed?

Thanks,

Jonathan

www.madlabs.info

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 15:38
    In a message dated 9/8/2003 10:30:59 AM Eastern Standard Time,
    jpeakall@m... writes:


    > I have read the N&V cloumn # 87 on multi-bank programming, but it is still
    > not clear how I download programs to different slots. The passing of vars
    > back and forth via the scratchpad makes sense, and so does the run command,
    > but I can't seem to find where it talks about downloading to different
    > slots.
    >
    > Another question, must all slots be downloaded to at the same time, or can
    > just the contents of one slot be changed?
    >

    Jonathan, if you have downloaded your program with the various slots, and
    then make a change to one of the slots, you will see that only the changed slot
    downloads. Watch the slot bars when you download. The exception is when you
    download after the Stamp has been turned off, then back on. In this case all
    slots will download again. Am I msaking it clear?

    Sid


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 15:40
    In a message dated 9/8/2003 10:30:59 AM Eastern Standard Time,
    jpeakall@m... writes:


    > I have read the N&V cloumn # 87 on multi-bank programming, but it is still
    > not clear how I download programs to different slots. The passing of vars
    > back and forth via the scratchpad makes sense, and so does the run command,
    > but I can't seem to find where it talks about downloading to different
    > slots.
    >
    > Another question, must all slots be downloaded to at the same time, or can
    > just the contents of one slot be changed?
    >

    One other thing, Jonathan. You don't "download to the slots". You write
    your program in each slot then download that slot to the Stamp.

    Sid


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 15:51
    Sid,

    Yup, that makes sense. What I still don't get is how to download into the
    different slots.

    Jonathan

    www.madlabs.info

    Original Message
    From: <Newzed@a...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, September 08, 2003 7:38 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Multi-bank programming


    > In a message dated 9/8/2003 10:30:59 AM Eastern Standard Time,
    > jpeakall@m... writes:
    >
    >
    > > I have read the N&V cloumn # 87 on multi-bank programming, but it is
    still
    > > not clear how I download programs to different slots. The passing of
    vars
    > > back and forth via the scratchpad makes sense, and so does the run
    command,
    > > but I can't seem to find where it talks about downloading to different
    > > slots.
    > >
    > > Another question, must all slots be downloaded to at the same time, or
    can
    > > just the contents of one slot be changed?
    > >
    >
    > Jonathan, if you have downloaded your program with the various slots, and
    > then make a change to one of the slots, you will see that only the changed
    slot
    > downloads. Watch the slot bars when you download. The exception is when
    you
    > download after the Stamp has been turned off, then back on. In this case
    all
    > slots will download again. Am I msaking it clear?
    >
    > Sid
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 15:58
    Jonathan,

    This is quoted from the PBASIC manual...hope it helps:

    ' {$STAMP BS2e, file2, file3, ..., file8}

    Use this form of the STAMP directive if a project, consisting of
    multiple files, is desired. This directive must be entered into the
    first program (to be downloaded into program slot 0) and not in any
    of the other files in the project. The file2, file3, etc. items
    should be the actual name (and optionally the path) of the other
    files in the project. File2 refers to the program that should be
    downloaded into program slot 1, file3 is the program that should be
    downloaded into program slot 2, etc. If no path is given, the path of
    program 0 (the program in which the $STAMP directive is entered) is
    used.



    --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    <jpeakall@m...> wrote:
    > Sid,
    >
    > Yup, that makes sense. What I still don't get is how to download
    into the
    > different slots.
    >
    > Jonathan
    >
    fZww.madlabs.info
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 17:31
    Scooby,

    Thanks! What page is that on? I looked through the manual and couldn't find
    it.

    Jonathan

    www.madlabs.info

    Original Message
    From: "ScoobyTW" <scoobytw@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, September 08, 2003 7:58 AM
    Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming


    > Jonathan,
    >
    > This is quoted from the PBASIC manual...hope it helps:
    >
    > ' {$STAMP BS2e, file2, file3, ..., file8}
    >
    > Use this form of the STAMP directive if a project, consisting of
    > multiple files, is desired. This directive must be entered into the
    > first program (to be downloaded into program slot 0) and not in any
    > of the other files in the project. The file2, file3, etc. items
    > should be the actual name (and optionally the path) of the other
    > files in the project. File2 refers to the program that should be
    > downloaded into program slot 1, file3 is the program that should be
    > downloaded into program slot 2, etc. If no path is given, the path of
    > program 0 (the program in which the $STAMP directive is entered) is
    > used.
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    > <jpeakall@m...> wrote:
    > > Sid,
    > >
    > > Yup, that makes sense. What I still don't get is how to download
    > into the
    > > different slots.
    > >
    > > Jonathan
    > >
    > fZww.madlabs.info
    > >
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 17:55
    Example:
    1. Make a BS2pe file called 'hi'. Save it to disk
    2. Make a BS2pe file called 'hi2'. Save it to disk
    3. Make a BS2pe file called 'hello'. On the first line,
    make it:
    '{$STAMP BS2pe, Hi,Hi2}

    Save as 'hello'. Click the 'check Syntax' button.
    What you'll have now is three tabs marked 0:hello.bpe,
    1:hi.bpe, and 2:hi2.bpe.
    What's in 0: goes to the first slot. What's in 1 goes
    to the next slot and so forth. It's that magic
    '$STAMP' directive that does this.

    --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    <jpeakall@m...> wrote:
    > Sid,
    >
    > Yup, that makes sense. What I still don't get is how to download
    into the
    > different slots.
    >
    > Jonathan
    >
    > www.madlabs.info
    >
    >
    Original Message
    > From: <Newzed@a...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Monday, September 08, 2003 7:38 AM
    > Subject: Re: [noparse][[/noparse]basicstamps] Multi-bank programming
    >
    >
    > > In a message dated 9/8/2003 10:30:59 AM Eastern Standard Time,
    > > jpeakall@m... writes:
    > >
    > >
    > > > I have read the N&V cloumn # 87 on multi-bank programming, but
    it is
    > still
    > > > not clear how I download programs to different slots. The
    passing of
    > vars
    > > > back and forth via the scratchpad makes sense, and so does the
    run
    > command,
    > > > but I can't seem to find where it talks about downloading to
    different
    > > > slots.
    > > >
    > > > Another question, must all slots be downloaded to at the same
    time, or
    > can
    > > > just the contents of one slot be changed?
    > > >
    > >
    > > Jonathan, if you have downloaded your program with the various
    slots, and
    > > then make a change to one of the slots, you will see that only
    the changed
    > slot
    > > downloads. Watch the slot bars when you download. The exception
    is when
    > you
    > > download after the Stamp has been turned off, then back on. In
    this case
    > all
    > > slots will download again. Am I msaking it clear?
    > >
    > > Sid
    > >
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-08 23:14
    I've been following this thread, and have a question. If a program is
    larger than a bank, will it automatically overflow to the next bank (or
    banks)?

    On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:

    > Scooby,
    >
    > Thanks! What page is that on? I looked through the manual and couldn't
    > find
    > it.
    >
    > Jonathan
    >
    > www.madlabs.info
    >
    >
    Original Message
    > From: "ScoobyTW" <scoobytw@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Monday, September 08, 2003 7:58 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >
    >
    >> Jonathan,
    >>
    >> This is quoted from the PBASIC manual...hope it helps:
    >>
    >> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>
    >> Use this form of the STAMP directive if a project, consisting of
    >> multiple files, is desired. This directive must be entered into the
    >> first program (to be downloaded into program slot 0) and not in any
    >> of the other files in the project. The file2, file3, etc. items
    >> should be the actual name (and optionally the path) of the other
    >> files in the project. File2 refers to the program that should be
    >> downloaded into program slot 1, file3 is the program that should be
    >> downloaded into program slot 2, etc. If no path is given, the path of
    >> program 0 (the program in which the $STAMP directive is entered) is
    >> used.
    >>
    >>
    >>
    >> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >> <jpeakall@m...> wrote:
    >>> Sid,
    >>>
    >>> Yup, that makes sense. What I still don't get is how to download
    >> into the
    >>> different slots.
    >>>
    >>> Jonathan
    >>>
    >> fZww.madlabs.info
    >>>
    >>
    >>
    >>
    >>
    >> To UNSUBSCRIBE, just send mail to:
    >> basicstamps-unsubscribe@yahoogroups.com
    >> from the same email address that you subscribed. Text in the Subject
    >> and
    > Body of the message will be ignored.
    >>
    >>
    >> Your use of Yahoo! Groups is subject to
    >> http://docs.yahoo.com/info/terms/
    >>
    >>
    >>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-09 08:01
    I took that from the help file that comes up under the new version 2
    editor from Parallax. It's in the section under Compiler
    Directives. Did you get it to work?

    --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    <jpeakall@m...> wrote:
    > Scooby,
    >
    > Thanks! What page is that on? I looked through the manual and
    couldn't find
    > it.
    >
    > Jonathan
    >
    > www.madlabs.info
    >
    >
    Original Message
    > From: "ScoobyTW" <scoobytw@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Monday, September 08, 2003 7:58 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >
    >
    > > Jonathan,
    > >
    > > This is quoted from the PBASIC manual...hope it helps:
    > >
    > > ' {$STAMP BS2e, file2, file3, ..., file8}
    > >
    > > Use this form of the STAMP directive if a project, consisting of
    > > multiple files, is desired. This directive must be entered into
    the
    > > first program (to be downloaded into program slot 0) and not in
    any
    > > of the other files in the project. The file2, file3, etc. items
    > > should be the actual name (and optionally the path) of the other
    > > files in the project. File2 refers to the program that should be
    > > downloaded into program slot 1, file3 is the program that should
    be
    > > downloaded into program slot 2, etc. If no path is given, the
    path of
    > > program 0 (the program in which the $STAMP directive is entered)
    is
    > > used.
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    > > <jpeakall@m...> wrote:
    > > > Sid,
    > > >
    > > > Yup, that makes sense. What I still don't get is how to download
    > > into the
    > > > different slots.
    > > >
    > > > Jonathan
    > > >
    > > fZww.madlabs.info
    > > >
    > >
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-11 22:03
    In a message dated 9/11/2003 4:37:50 PM Eastern Standard Time,
    marpetm@s... writes:


    > I've been following this thread, and have a question. If a program is
    > larger than a bank, will it automatically overflow to the next bank (or
    > banks)?
    >
    >

    Negative - you will get an "EEPROM FULL" error and the program will not
    tokenize.

    Sid


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-11 22:03
    No, it will not. If you run out of space in a bank the compiler will
    tell you. At that point, you either trim your code or move portions to
    another bank. I wrote an article about multi-bank programming that
    details the strategy I use when a second bank is required in one of my
    projects. You can find it on our we site under Downloads/Nuts & Volts
    Columns.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Mark Marpet [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=z8vyScJnx6O28YUDCI8J_rM9PftSx8CXGLB9cF4xhXIjrEzsyjbM-eq5ffb0OvQW4ILvkkinUl2QXk3gt98]marpetm@s...[/url
    Sent: Monday, September 08, 2003 5:15 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: Multi-bank programming


    I've been following this thread, and have a question. If a program is
    larger than a bank, will it automatically overflow to the next bank (or
    banks)?

    On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:

    > Scooby,
    >
    > Thanks! What page is that on? I looked through the manual and couldn't
    > find
    > it.
    >
    > Jonathan
    >
    > www.madlabs.info
    >
    >
    Original Message
    > From: "ScoobyTW" <scoobytw@y...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Monday, September 08, 2003 7:58 AM
    > Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >
    >
    >> Jonathan,
    >>
    >> This is quoted from the PBASIC manual...hope it helps:
    >>
    >> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>
    >> Use this form of the STAMP directive if a project, consisting of
    >> multiple files, is desired. This directive must be entered into the
    >> first program (to be downloaded into program slot 0) and not in any
    >> of the other files in the project. The file2, file3, etc. items
    >> should be the actual name (and optionally the path) of the other
    >> files in the project. File2 refers to the program that should be
    >> downloaded into program slot 1, file3 is the program that should be
    >> downloaded into program slot 2, etc. If no path is given, the path of

    >> program 0 (the program in which the $STAMP directive is entered) is
    >> used.
    >>
    >>
    >>
    >> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >> <jpeakall@m...> wrote:
    >>> Sid,
    >>>
    >>> Yup, that makes sense. What I still don't get is how to download
    >> into the
    >>> different slots.
    >>>
    >>> Jonathan
    >>>
    >> fZww.madlabs.info
    >>>
    >>
    >>
    >>
    >>
    >> To UNSUBSCRIBE, just send mail to:
    >> basicstamps-unsubscribe@yahoogroups.com
    >> from the same email address that you subscribed. Text in the Subject
    >> and
    > Body of the message will be ignored.
    >>
    >>
    >> Your use of Yahoo! Groups is subject to
    >> http://docs.yahoo.com/info/terms/
    >>
    >>
    >>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 15:35
    No, the Stamp 'program memory' is partitioned
    into 2k 'chunks'. To use another partition,
    you must 'run' a program in that partition
    from your first partition.

    There are methods which you can apply to
    implement 'subroutine' like functionality in
    other partitions, but it certainly is NOT
    'automatic'.

    --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    > I've been following this thread, and have a question. If a program
    is
    > larger than a bank, will it automatically overflow to the next bank
    (or
    > banks)?
    >
    > On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:
    >
    > > Scooby,
    > >
    > > Thanks! What page is that on? I looked through the manual and
    couldn't
    > > find
    > > it.
    > >
    > > Jonathan
    > >
    > > www.madlabs.info
    > >
    > >
    Original Message
    > > From: "ScoobyTW" <scoobytw@y...>
    > > To: <basicstamps@yahoogroups.com>
    > > Sent: Monday, September 08, 2003 7:58 AM
    > > Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    > >
    > >
    > >> Jonathan,
    > >>
    > >> This is quoted from the PBASIC manual...hope it helps:
    > >>
    > >> ' {$STAMP BS2e, file2, file3, ..., file8}
    > >>
    > >> Use this form of the STAMP directive if a project, consisting of
    > >> multiple files, is desired. This directive must be entered into
    the
    > >> first program (to be downloaded into program slot 0) and not in
    any
    > >> of the other files in the project. The file2, file3, etc. items
    > >> should be the actual name (and optionally the path) of the other
    > >> files in the project. File2 refers to the program that should be
    > >> downloaded into program slot 1, file3 is the program that should
    be
    > >> downloaded into program slot 2, etc. If no path is given, the
    path of
    > >> program 0 (the program in which the $STAMP directive is entered)
    is
    > >> used.
    > >>
    > >>
    > >>
    > >> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    > >> <jpeakall@m...> wrote:
    > >>> Sid,
    > >>>
    > >>> Yup, that makes sense. What I still don't get is how to download
    > >> into the
    > >>> different slots.
    > >>>
    > >>> Jonathan
    > >>>
    > >> fZww.madlabs.info
    > >>>
    > >>
    > >>
    > >>
    > >>
    > >> To UNSUBSCRIBE, just send mail to:
    > >> basicstamps-unsubscribe@yahoogroups.com
    > >> from the same email address that you subscribed. Text in the
    Subject
    > >> and
    > > Body of the message will be ignored.
    > >>
    > >>
    > >> Your use of Yahoo! Groups is subject to
    > >> http://docs.yahoo.com/info/terms/
    > >>
    > >>
    > >>
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject
    > > and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 22:20
    Okay, okay.... I wrote a program, it ran out of room, and I spent HOURS
    trimming it to fit into what I thought was the WHOLE memory. I guess I
    wasted those hours.


    On Friday, September 12, 2003, at 10:35 AM, Allan Lane wrote:

    > No, the Stamp 'program memory' is partitioned
    > into 2k 'chunks'. To use another partition,
    > you must 'run' a program in that partition
    > from your first partition.
    >
    > There are methods which you can apply to
    > implement 'subroutine' like functionality in
    > other partitions, but it certainly is NOT
    > 'automatic'.
    >
    > --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    >> I've been following this thread, and have a question. If a program
    > is
    >> larger than a bank, will it automatically overflow to the next bank
    > (or
    >> banks)?
    >>
    >> On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:
    >>
    >>> Scooby,
    >>>
    >>> Thanks! What page is that on? I looked through the manual and
    > couldn't
    >>> find
    >>> it.
    >>>
    >>> Jonathan
    >>>
    >>> www.madlabs.info
    >>>
    >>>
    Original Message
    >>> From: "ScoobyTW" <scoobytw@y...>
    >>> To: <basicstamps@yahoogroups.com>
    >>> Sent: Monday, September 08, 2003 7:58 AM
    >>> Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >>>
    >>>
    >>>> Jonathan,
    >>>>
    >>>> This is quoted from the PBASIC manual...hope it helps:
    >>>>
    >>>> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>>>
    >>>> Use this form of the STAMP directive if a project, consisting of
    >>>> multiple files, is desired. This directive must be entered into
    > the
    >>>> first program (to be downloaded into program slot 0) and not in
    > any
    >>>> of the other files in the project. The file2, file3, etc. items
    >>>> should be the actual name (and optionally the path) of the other
    >>>> files in the project. File2 refers to the program that should be
    >>>> downloaded into program slot 1, file3 is the program that should
    > be
    >>>> downloaded into program slot 2, etc. If no path is given, the
    > path of
    >>>> program 0 (the program in which the $STAMP directive is entered)
    > is
    >>>> used.
    >>>>
    >>>>
    >>>>
    >>>> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >>>> <jpeakall@m...> wrote:
    >>>>> Sid,
    >>>>>
    >>>>> Yup, that makes sense. What I still don't get is how to download
    >>>> into the
    >>>>> different slots.
    >>>>>
    >>>>> Jonathan
    >>>>>
    >>>> fZww.madlabs.info
    >>>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> To UNSUBSCRIBE, just send mail to:
    >>>> basicstamps-unsubscribe@yahoogroups.com
    >>>> from the same email address that you subscribed. Text in the
    > Subject
    >>>> and
    >>> Body of the message will be ignored.
    >>>>
    >>>>
    >>>> Your use of Yahoo! Groups is subject to
    >>>> http://docs.yahoo.com/info/terms/
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>> To UNSUBSCRIBE, just send mail to:
    >>> basicstamps-unsubscribe@yahoogroups.com
    >>> from the same email address that you subscribed. Text in the
    > Subject
    >>> and Body of the message will be ignored.
    >>>
    >>>
    >>> Your use of Yahoo! Groups is subject to
    >>> http://docs.yahoo.com/info/terms/
    >>>
    >>>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 22:30
    Absolutely not. You learned how to trip code bloat [noparse][[/noparse]happens to all of
    us] our of your program.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Mark Marpet [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=G7d4uo9wlu6YT5hjSJ2tVaM8TKffYVUGc0MT81PwTq-A3EOcyi7GtuiZm1W8ObEUz4hrLwHF8mvIY_vxa7k]marpetm@s...[/url
    Sent: Friday, September 12, 2003 4:20 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: Multi-bank programming


    Okay, okay.... I wrote a program, it ran out of room, and I spent HOURS
    trimming it to fit into what I thought was the WHOLE memory. I guess I
    wasted those hours.


    On Friday, September 12, 2003, at 10:35 AM, Allan Lane wrote:

    > No, the Stamp 'program memory' is partitioned
    > into 2k 'chunks'. To use another partition,
    > you must 'run' a program in that partition
    > from your first partition.
    >
    > There are methods which you can apply to
    > implement 'subroutine' like functionality in
    > other partitions, but it certainly is NOT
    > 'automatic'.
    >
    > --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    >> I've been following this thread, and have a question. If a program
    > is
    >> larger than a bank, will it automatically overflow to the next bank
    > (or
    >> banks)?
    >>
    >> On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:
    >>
    >>> Scooby,
    >>>
    >>> Thanks! What page is that on? I looked through the manual and
    > couldn't
    >>> find
    >>> it.
    >>>
    >>> Jonathan
    >>>
    >>> www.madlabs.info
    >>>
    >>>
    Original Message
    >>> From: "ScoobyTW" <scoobytw@y...>
    >>> To: <basicstamps@yahoogroups.com>
    >>> Sent: Monday, September 08, 2003 7:58 AM
    >>> Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >>>
    >>>
    >>>> Jonathan,
    >>>>
    >>>> This is quoted from the PBASIC manual...hope it helps:
    >>>>
    >>>> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>>>
    >>>> Use this form of the STAMP directive if a project, consisting of
    >>>> multiple files, is desired. This directive must be entered into
    > the
    >>>> first program (to be downloaded into program slot 0) and not in
    > any
    >>>> of the other files in the project. The file2, file3, etc. items
    >>>> should be the actual name (and optionally the path) of the other
    >>>> files in the project. File2 refers to the program that should be
    >>>> downloaded into program slot 1, file3 is the program that should
    > be
    >>>> downloaded into program slot 2, etc. If no path is given, the
    > path of
    >>>> program 0 (the program in which the $STAMP directive is entered)
    > is
    >>>> used.
    >>>>
    >>>>
    >>>>
    >>>> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >>>> <jpeakall@m...> wrote:
    >>>>> Sid,
    >>>>>
    >>>>> Yup, that makes sense. What I still don't get is how to download
    >>>> into the
    >>>>> different slots.
    >>>>>
    >>>>> Jonathan
    >>>>>
    >>>> fZww.madlabs.info
    >>>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> To UNSUBSCRIBE, just send mail to:
    >>>> basicstamps-unsubscribe@yahoogroups.com
    >>>> from the same email address that you subscribed. Text in the
    > Subject
    >>>> and
    >>> Body of the message will be ignored.
    >>>>
    >>>>
    >>>> Your use of Yahoo! Groups is subject to
    >>>> http://docs.yahoo.com/info/terms/
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>> To UNSUBSCRIBE, just send mail to:
    >>> basicstamps-unsubscribe@yahoogroups.com
    >>> from the same email address that you subscribed. Text in the
    > Subject
    >>> and Body of the message will be ignored.
    >>>
    >>>
    >>> Your use of Yahoo! Groups is subject to
    >>> http://docs.yahoo.com/info/terms/
    >>>
    >>>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 22:34
    Oops ... that should have been "trim code bloat"


    Original Message
    From: Jon Williams
    Sent: Friday, September 12, 2003 4:30 PM
    To: basicstamps@yahoogroups.com
    Subject: RE: [noparse][[/noparse]basicstamps] Re: Multi-bank programming


    Absolutely not. You learned how to trip code bloat [noparse][[/noparse]happens to all of
    us] our of your program.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Mark Marpet [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=898KCnoboqNuhRGfWlLuOzCer7zsZuvuxfyKmeE36fUuAp1DuOH9iD0X0NtH7r0f6q5GvF6dFpRo]marpetm@s...[/url
    Sent: Friday, September 12, 2003 4:20 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: Multi-bank programming


    Okay, okay.... I wrote a program, it ran out of room, and I spent HOURS
    trimming it to fit into what I thought was the WHOLE memory. I guess I
    wasted those hours.


    On Friday, September 12, 2003, at 10:35 AM, Allan Lane wrote:

    > No, the Stamp 'program memory' is partitioned
    > into 2k 'chunks'. To use another partition,
    > you must 'run' a program in that partition
    > from your first partition.
    >
    > There are methods which you can apply to
    > implement 'subroutine' like functionality in
    > other partitions, but it certainly is NOT
    > 'automatic'.
    >
    > --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    >> I've been following this thread, and have a question. If a program
    > is
    >> larger than a bank, will it automatically overflow to the next bank
    > (or
    >> banks)?
    >>
    >> On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall wrote:
    >>
    >>> Scooby,
    >>>
    >>> Thanks! What page is that on? I looked through the manual and
    > couldn't
    >>> find
    >>> it.
    >>>
    >>> Jonathan
    >>>
    >>> www.madlabs.info
    >>>
    >>>
    Original Message
    >>> From: "ScoobyTW" <scoobytw@y...>
    >>> To: <basicstamps@yahoogroups.com>
    >>> Sent: Monday, September 08, 2003 7:58 AM
    >>> Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >>>
    >>>
    >>>> Jonathan,
    >>>>
    >>>> This is quoted from the PBASIC manual...hope it helps:
    >>>>
    >>>> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>>>
    >>>> Use this form of the STAMP directive if a project, consisting of
    >>>> multiple files, is desired. This directive must be entered into
    > the
    >>>> first program (to be downloaded into program slot 0) and not in
    > any
    >>>> of the other files in the project. The file2, file3, etc. items
    >>>> should be the actual name (and optionally the path) of the other
    >>>> files in the project. File2 refers to the program that should be
    >>>> downloaded into program slot 1, file3 is the program that should
    > be
    >>>> downloaded into program slot 2, etc. If no path is given, the
    > path of
    >>>> program 0 (the program in which the $STAMP directive is entered)
    > is
    >>>> used.
    >>>>
    >>>>
    >>>>
    >>>> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >>>> <jpeakall@m...> wrote:
    >>>>> Sid,
    >>>>>
    >>>>> Yup, that makes sense. What I still don't get is how to download
    >>>> into the
    >>>>> different slots.
    >>>>>
    >>>>> Jonathan
    >>>>>
    >>>> fZww.madlabs.info
    >>>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> To UNSUBSCRIBE, just send mail to:
    >>>> basicstamps-unsubscribe@yahoogroups.com
    >>>> from the same email address that you subscribed. Text in the
    > Subject
    >>>> and
    >>> Body of the message will be ignored.
    >>>>
    >>>>
    >>>> Your use of Yahoo! Groups is subject to
    >>>> http://docs.yahoo.com/info/terms/
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>> To UNSUBSCRIBE, just send mail to:
    >>> basicstamps-unsubscribe@yahoogroups.com
    >>> from the same email address that you subscribed. Text in the
    > Subject
    >>> and Body of the message will be ignored.
    >>>
    >>>
    >>> Your use of Yahoo! Groups is subject to
    >>> http://docs.yahoo.com/info/terms/
    >>>
    >>>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 22:56
    Well on the BS2, 2K IS all the program memory
    you have. The BS2p et all have more.

    --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    > Okay, okay.... I wrote a program, it ran out of room, and I spent
    HOURS
    > trimming it to fit into what I thought was the WHOLE memory. I
    guess I
    > wasted those hours.
    >
    >
    > On Friday, September 12, 2003, at 10:35 AM, Allan Lane wrote:
    >
    > > No, the Stamp 'program memory' is partitioned
    > > into 2k 'chunks'. To use another partition,
    > > you must 'run' a program in that partition
    > > from your first partition.
    > >
    > > There are methods which you can apply to
    > > implement 'subroutine' like functionality in
    > > other partitions, but it certainly is NOT
    > > 'automatic'.
    > >
    > > --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...>
    wrote:
    > >> I've been following this thread, and have a question. If a
    program
    > > is
    > >> larger than a bank, will it automatically overflow to the next
    bank
    > > (or
    > >> banks)?
    > >>
    > >> On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall
    wrote:
    > >>
    > >>> Scooby,
    > >>>
    > >>> Thanks! What page is that on? I looked through the manual and
    > > couldn't
    > >>> find
    > >>> it.
    > >>>
    > >>> Jonathan
    > >>>
    > >>> www.madlabs.info
    > >>>
    > >>>
    Original Message
    > >>> From: "ScoobyTW" <scoobytw@y...>
    > >>> To: <basicstamps@yahoogroups.com>
    > >>> Sent: Monday, September 08, 2003 7:58 AM
    > >>> Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    > >>>
    > >>>
    > >>>> Jonathan,
    > >>>>
    > >>>> This is quoted from the PBASIC manual...hope it helps:
    > >>>>
    > >>>> ' {$STAMP BS2e, file2, file3, ..., file8}
    > >>>>
    > >>>> Use this form of the STAMP directive if a project, consisting
    of
    > >>>> multiple files, is desired. This directive must be entered into
    > > the
    > >>>> first program (to be downloaded into program slot 0) and not in
    > > any
    > >>>> of the other files in the project. The file2, file3, etc. items
    > >>>> should be the actual name (and optionally the path) of the
    other
    > >>>> files in the project. File2 refers to the program that should
    be
    > >>>> downloaded into program slot 1, file3 is the program that
    should
    > > be
    > >>>> downloaded into program slot 2, etc. If no path is given, the
    > > path of
    > >>>> program 0 (the program in which the $STAMP directive is
    entered)
    > > is
    > >>>> used.
    > >>>>
    > >>>>
    > >>>>
    > >>>> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    > >>>> <jpeakall@m...> wrote:
    > >>>>> Sid,
    > >>>>>
    > >>>>> Yup, that makes sense. What I still don't get is how to
    download
    > >>>> into the
    > >>>>> different slots.
    > >>>>>
    > >>>>> Jonathan
    > >>>>>
    > >>>> fZww.madlabs.info
    > >>>>>
    > >>>>
    > >>>>
    > >>>>
    > >>>>
    > >>>> To UNSUBSCRIBE, just send mail to:
    > >>>> basicstamps-unsubscribe@yahoogroups.com
    > >>>> from the same email address that you subscribed. Text in the
    > > Subject
    > >>>> and
    > >>> Body of the message will be ignored.
    > >>>>
    > >>>>
    > >>>> Your use of Yahoo! Groups is subject to
    > >>>> http://docs.yahoo.com/info/terms/
    > >>>>
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>> To UNSUBSCRIBE, just send mail to:
    > >>> basicstamps-unsubscribe@yahoogroups.com
    > >>> from the same email address that you subscribed. Text in the
    > > Subject
    > >>> and Body of the message will be ignored.
    > >>>
    > >>>
    > >>> Your use of Yahoo! Groups is subject to
    > >>> http://docs.yahoo.com/info/terms/
    > >>>
    > >>>
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject
    > > and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-12 23:06
    It would be worthwhile to study the Nuts & Volts articles to learn how
    Jon can cram so much code into such a small space. There are tips and
    tricks not widely known that will cut your program size quite a bit.

    > Well on the BS2, 2K IS all the program memory
    > you have. The BS2p et all have more.

    > > Okay, okay.... I wrote a program, it ran out of room, and I spent
    > HOURS
    > > trimming it to fit into what I thought was the WHOLE memory. I
    > guess I
    > > wasted those hours.
  • ArchiverArchiver Posts: 46,084
    edited 2003-09-13 01:36
    I was using a 2p. What I was doing reminded me of how I had to progeam
    decades ago, when there was NEVER enough memory to do what you needed
    to do.

    On Friday, September 12, 2003, at 05:56 PM, Allan Lane wrote:

    > Well on the BS2, 2K IS all the program memory
    > you have. The BS2p et all have more.
    >
    > --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...> wrote:
    >> Okay, okay.... I wrote a program, it ran out of room, and I spent
    > HOURS
    >> trimming it to fit into what I thought was the WHOLE memory. I
    > guess I
    >> wasted those hours.
    >>
    >>
    >> On Friday, September 12, 2003, at 10:35 AM, Allan Lane wrote:
    >>
    >>> No, the Stamp 'program memory' is partitioned
    >>> into 2k 'chunks'. To use another partition,
    >>> you must 'run' a program in that partition
    >>> from your first partition.
    >>>
    >>> There are methods which you can apply to
    >>> implement 'subroutine' like functionality in
    >>> other partitions, but it certainly is NOT
    >>> 'automatic'.
    >>>
    >>> --- In basicstamps@yahoogroups.com, Mark Marpet <marpetm@s...>
    > wrote:
    >>>> I've been following this thread, and have a question. If a
    > program
    >>> is
    >>>> larger than a bank, will it automatically overflow to the next
    > bank
    >>> (or
    >>>> banks)?
    >>>>
    >>>> On Monday, September 8, 2003, at 12:31 PM, Jonathan Peakall
    > wrote:
    >>>>
    >>>>> Scooby,
    >>>>>
    >>>>> Thanks! What page is that on? I looked through the manual and
    >>> couldn't
    >>>>> find
    >>>>> it.
    >>>>>
    >>>>> Jonathan
    >>>>>
    >>>>> www.madlabs.info
    >>>>>
    >>>>>
    Original Message
    >>>>> From: "ScoobyTW" <scoobytw@y...>
    >>>>> To: <basicstamps@yahoogroups.com>
    >>>>> Sent: Monday, September 08, 2003 7:58 AM
    >>>>> Subject: [noparse][[/noparse]basicstamps] Re: Multi-bank programming
    >>>>>
    >>>>>
    >>>>>> Jonathan,
    >>>>>>
    >>>>>> This is quoted from the PBASIC manual...hope it helps:
    >>>>>>
    >>>>>> ' {$STAMP BS2e, file2, file3, ..., file8}
    >>>>>>
    >>>>>> Use this form of the STAMP directive if a project, consisting
    > of
    >>>>>> multiple files, is desired. This directive must be entered into
    >>> the
    >>>>>> first program (to be downloaded into program slot 0) and not in
    >>> any
    >>>>>> of the other files in the project. The file2, file3, etc. items
    >>>>>> should be the actual name (and optionally the path) of the
    > other
    >>>>>> files in the project. File2 refers to the program that should
    > be
    >>>>>> downloaded into program slot 1, file3 is the program that
    > should
    >>> be
    >>>>>> downloaded into program slot 2, etc. If no path is given, the
    >>> path of
    >>>>>> program 0 (the program in which the $STAMP directive is
    > entered)
    >>> is
    >>>>>> used.
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
    >>>>>> <jpeakall@m...> wrote:
    >>>>>>> Sid,
    >>>>>>>
    >>>>>>> Yup, that makes sense. What I still don't get is how to
    > download
    >>>>>> into the
    >>>>>>> different slots.
    >>>>>>>
    >>>>>>> Jonathan
    >>>>>>>
    >>>>>> fZww.madlabs.info
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> To UNSUBSCRIBE, just send mail to:
    >>>>>> basicstamps-unsubscribe@yahoogroups.com
    >>>>>> from the same email address that you subscribed. Text in the
    >>> Subject
    >>>>>> and
    >>>>> Body of the message will be ignored.
    >>>>>>
    >>>>>>
    >>>>>> Your use of Yahoo! Groups is subject to
    >>>>>> http://docs.yahoo.com/info/terms/
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>> To UNSUBSCRIBE, just send mail to:
    >>>>> basicstamps-unsubscribe@yahoogroups.com
    >>>>> from the same email address that you subscribed. Text in the
    >>> Subject
    >>>>> and Body of the message will be ignored.
    >>>>>
    >>>>>
    >>>>> Your use of Yahoo! Groups is subject to
    >>>>> http://docs.yahoo.com/info/terms/
    >>>>>
    >>>>>
    >>>
    >>>
    >>> To UNSUBSCRIBE, just send mail to:
    >>> basicstamps-unsubscribe@yahoogroups.com
    >>> from the same email address that you subscribed. Text in the
    > Subject
    >>> and Body of the message will be ignored.
    >>>
    >>>
    >>> Your use of Yahoo! Groups is subject to
    >>> http://docs.yahoo.com/info/terms/
    >>>
    >>>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-10 17:54
    How many of you do or want to do multi-bank programming?

    I wished I had learned of Tracy Allens Stack program example much
    earlier in my code development process.

    I am re-writing my code based on Tracy's example. My code is now way
    easier to read and it is much smaller.

    My code is smaller because it now uses the same function to display a
    prompt on the LCD no matter which bank I am currently running. I
    also use a function repeatedly for getting my input from the keyboard.

    Tracy's example can select one of sixteen target functions per bank.
    Sixteen target functions just wasn't enough in one of my banks so I
    added up to 256 subtargets per target function.

    Just let you imagination go and it is amazing what you can do with a
    Stamp.

    Take care,
    Frank
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-10 18:12
    Tracy is a first-rate programmer, no doubt (and a very cool dude for a
    PhD too!). I don't find myself requiring multi-bank programming very
    frequently, but when I do I use a strategy explained in this N&V
    article:

    http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv87.pdf

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: franksmith512 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=SkSACNZNk0-aoBFpHpY0ii_stpIIM8f1j_0xSaH2uixH-LofFR4UxvakoXlX_C3nv-AeXp2sZv9loJMbo2Np]franksmith512@y...[/url
    Sent: Saturday, April 10, 2004 11:54 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Multi-Bank Programming


    How many of you do or want to do multi-bank programming?

    I wished I had learned of Tracy Allens Stack program example much
    earlier in my code development process.

    I am re-writing my code based on Tracy's example. My code is now way
    easier to read and it is much smaller.

    My code is smaller because it now uses the same function to display a
    prompt on the LCD no matter which bank I am currently running. I
    also use a function repeatedly for getting my input from the keyboard.

    Tracy's example can select one of sixteen target functions per bank.
    Sixteen target functions just wasn't enough in one of my banks so I
    added up to 256 subtargets per target function.

    Just let you imagination go and it is amazing what you can do with a
    Stamp.

    Take care,
    Frank
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-10 23:03
    Thanks for the kind words, Frank and Jon. I agree that there are
    many ways to structure and implement a program. And I know we agree
    that it is important to follow a structure as a program grows.

    Most of my programs are multi-bank now. The routines for the AT45
    memory chip take up almost an entire bank all by themselves. The
    initial menu and command parser are bank zero, and the user interface
    for changing parameters, setting the real time clock etc is in
    another bank, and the main loop is in another bank, sometimes
    spilling over for fancy sensors or processing. For example, the
    Intersema barometer takes a bank all its own. I like to leave empty
    space in a lot of the banks, in case those tasks need to expand
    within the existing structure.

    Another bank stores sunrise and sunset times as an interpolation
    table. The STORE command in the BS2p and BS2pe are a huge asset for
    crossbank programming, well worth the price. The STORE command
    allows you to read and write data stored in any bank, not just the
    current bank.

    I use the approach I outlined on my web site at
    http://www.emesystems.com/BS2sx.htm, which is essentially a single
    level stack. I call the bank-switching variable lola (after the part
    played by Franka Potente in the 1999 German film, Run Lola Run, "Lola
    Rennt").

    The the jump from one bank to the next is,
    RUN lolaRun ' the upper nibble of lola is the bank to run.
    and in that next bank,
    ON lolaGo GOTO task0,task1,..... ' the lower nibble specifies a routine
    and to return to the first bank
    GET back, lola ' previously PUT the return vector, back, in scratchpad
    and in the first bank,
    ON lolaGo GOTO task0,tack1,..... ' the return vector.

    So, the structure is symmetrical and passes through that one
    variable, which is always the first variable in the Stamp memory. At
    the same URL, there is a description of a deeper Stack technique that
    allows nested interbank calls, but I hardly ever find that necessary.
    As the Stamp must manage the stack pointer, it is slower and prone to
    weird bugs if not managed correctly.

    -- Tracy

    >Tracy is a first-rate programmer, no doubt (and a very cool dude for a
    >PhD too!). I don't find myself requiring multi-bank programming very
    >frequently, but when I do I use a strategy explained in this N&V
    >article:
    >
    >http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv87.pdf
    >
    >-- Jon Williams
    >-- Applications Engineer, Parallax
    >-- Dallas Office
    >
    >
    >
    Original Message
    >From: franksmith512 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=cYPnIjlzajA1n1NcSCO8lmQuZkwfgKfwINmf_er1vQRhD7vS7FDvqcib1Ooma2Oz43eeivFH-hCo6xu954rw1vM]franksmith512@y...[/url
    >Sent: Saturday, April 10, 2004 11:54 AM
    >To: basicstamps@yahoogroups.com
    >Subject: [noparse][[/noparse]basicstamps] Multi-Bank Programming
    >
    >
    >How many of you do or want to do multi-bank programming?
    >
    >I wished I had learned of Tracy Allens Stack program example much
    >earlier in my code development process.
    >
    >I am re-writing my code based on Tracy's example. My code is now way
    >easier to read and it is much smaller.
    >
    >My code is smaller because it now uses the same function to display a
    >prompt on the LCD no matter which bank I am currently running. I
    >also use a function repeatedly for getting my input from the keyboard.
    >
    >Tracy's example can select one of sixteen target functions per bank.
    >Sixteen target functions just wasn't enough in one of my banks so I
    >added up to 256 subtargets per target function.
    >
    >Just let you imagination go and it is amazing what you can do with a
    >Stamp.
    >
    >Take care,
    >Frank
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-11 07:28

    Original Message
    From: "Tracy Allen" <tracy@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, April 11, 2004 12:03 AM
    Subject: RE: [noparse][[/noparse]basicstamps] Multi-Bank Programming


    > I use the approach I outlined on my web site at
    > http://www.emesystems.com/BS2sx.htm, which is essentially a single
    > level stack. I call the bank-switching variable lola (after the part
    > played by Franka Potente in the 1999 German film, Run Lola Run, "Lola
    > Rennt").

    Tracy
    Help please, link broken.
    Thanks
    ECO
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-11 08:39
    At 08:28 AM 4/11/04 +0200, ECO wrote:

    >
    Original Message
    >From: "Tracy Allen" <tracy@e...>
    >To: <basicstamps@yahoogroups.com>
    >Sent: Sunday, April 11, 2004 12:03 AM
    >Subject: RE: [noparse][[/noparse]basicstamps] Multi-Bank Programming
    >
    >
    >> I use the approach I outlined on my web site at
    >> http://www.emesystems.com/BS2sx.htm, which is essentially a single
    >> level stack. I call the bank-switching variable lola (after the part
    >> played by Franka Potente in the 1999 German film, Run Lola Run, "Lola
    >> Rennt").
    >
    >Tracy
    >Help please, link broken.
    >Thanks
    >ECO
    http://www.emesystems.com/BS2SX.htm



    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >Yahoo! Groups Links
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-11 15:29
    Bruce
    Many Thanks
    ECO
    Original Message
    From: "Bruce Bates" <bvbates@u...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, April 11, 2004 9:39 AM
    Subject: Re: [noparse][[/noparse]basicstamps] Multi-Bank Programming


    > http://www.emesystems.com/BS2SX.htm
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-12 05:39
    Sorry about the bad link, which as Bruce pointed out, SX should be caps
    http://www.emesystems.com/BS2SX.htm#Crossbank

    My hosting service runs Redhat Linux on an Apache server. I have
    asked them if there is an easy way to make URL requests case
    insensitive, but they tell me, no, case sensitivity is a deeply
    embedded in Linux. If anyone here knows a way around that (not too
    complicated!) I would sure like to hear about it.

    -- Tracy


    > > http://www.emesystems.com/BS2sx.htm, which is essentially a single
    >
    >Tracy
    >Help please, link broken.
    >Thanks
    >ECO
Sign In or Register to comment.