Shop OBEX P1 Docs P2 Docs Learn Events
But is SAYS nibble addressable... — Parallax Forums

But is SAYS nibble addressable...

ArchiverArchiver Posts: 46,084
edited 2001-11-10 02:05 in General Discussion
In addition to other replies, consider the fun you can have with:

'{$STAMP BS2}
nibble VAR B0.LOWNIB
index VAR BYTE

nibble( 1 ) = 15
nibble( index ) = 2

And so on. As Doc Allen pointed out many moons ago, all variables
are implicit array elements. So when you declare a nibble (or
bit/byte/word) variable, you are also defining the 0th element of an
array of nibbles (or bits/bytes/words). Automatic memory address
assignments in the BS2 and beyond can complicate the picture--think
everything through to avoid premature hair loss.

Regards,

Steve

On 9 Nov 01 at 10:59, Astro Fizzix wrote:

> Look at the NOTE at the bottom of Table 4.2 on page 47 of the basic
> stamp book. It says that ALL registers are word, byte, NIBBLE AND
> BIT addressable. So what are their names?...

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-09 16:59
    Look at the NOTE at the bottom of Table 4.2 on page 47 of the basic stamp book.
    It says that ALL registers are word, byte, NIBBLE AND BIT addressable. So what
    are their names? I've tried all I can think of (NIB4, N4, NIBBLE4) and I can't
    figure it out. The book doesn't say much on fixed variables, in fact, it acts
    like your an idiot if you don't use allocated variables. Now, I'm sure that
    those good people at Parallax spent a lot of time creating the hardware for
    allocated variables, but they act like that's the only way to go...but that's
    just my opinion, I could be wrong...

    So what's the deal? What is the syntax? Is this just a despicable lie?????


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-09 17:14
    At 10:59 AM 11/9/2001 -0600, you wrote:
    >Look at the NOTE at the bottom of Table 4.2 on page 47 of the basic stamp
    >book. It says that ALL registers are word, byte, NIBBLE AND BIT
    >addressable. So what are their names? I've tried all I can think of (NIB4,
    >N4, NIBBLE4) and I can't figure it out. The book doesn't say much on fixed
    >variables, in fact, it acts like your an idiot if you don't use allocated
    >variables. Now, I'm sure that those good people at Parallax spent a lot of
    >time creating the hardware for allocated variables, but they act like
    >that's the only way to go...but that's just my opinion, I could be wrong...
    >
    >So what's the deal? What is the syntax? Is this just a despicable lie?????
    To answer your question directly, the syntax is HIGNIB and LOWNIB.
    Check Table 4.3 on Page numbered 56 - just a few pages from where
    you were.

    Regards,

    Bruce Bates




    >[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 2001-11-10 02:05
    Hi,

    Reserved names for variables are b0-b25 for bytes and w0-w12 for words.
    Nibbles are addressed using a modifier like b10.highnib or b10.lownib or
    b10.nib0
    Bits are addressed using a modifier like b7.bit0 or w3.bit6 etc.
    IT IS all explained in the manual. Read carefully.

    Regards peter


    Oorspronkelijk bericht
    Van: Astro Fizzix [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=_liebVKn1yrEtdAHnUcMVOcjANrlh4hBfww32yuEEQiUGvfS5mOTzsG3cp8eS5Ail_OjYHQqOecG0qY4vqaR4A]astro_fizzix@y...[/url
    Verzonden: vrijdag 9 november 2001 8:59
    Aan: Post BS Message
    Onderwerp: [noparse][[/noparse]basicstamps] But is SAYS nibble addressable...

    Look at the NOTE at the bottom of Table 4.2 on page 47 of the basic stamp
    book. It says that ALL registers are word, byte, NIBBLE AND BIT
    addressable. So what are their names? I've tried all I can think of (NIB4,
    N4, NIBBLE4) and I can't figure it out. The book doesn't say much on fixed
    variables, in fact, it acts like your an idiot if you don't use allocated
    variables. Now, I'm sure that those good people at Parallax spent a lot of
    time creating the hardware for allocated variables, but they act like that's
    the only way to go...but that's just my opinion, I could be wrong...

    So what's the deal? What is the syntax? Is this just a despicable lie?????


    [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/
Sign In or Register to comment.