Skip to main content
Visitor II
April 7, 2004
Question

16Bit addressing mode problem

  • April 7, 2004
  • 2 replies
  • 615 views
Posted on April 07, 2004 at 11:23

16Bit addressing mode problem

    This topic has been closed for replies.

    2 replies

    adibAuthor
    Visitor II
    April 2, 2004
    Posted on April 02, 2004 at 12:07

    Hi,

    I am working with the ST72F264G2 u-c (coding in asm).

    I would like to use a general routing to send messages via RS-232.

    my problem is the massage are located in the code area which is 16Bit addressing mode.

    Normally I would use a pointer to the message (i.e ld X,#message)

    and then start incrementing the address untill the message end. The problem is that X cannot get the message address.

    I have a lot of messages and using ''ld A,(message,X)'' for each message takes a lot of code.

    any ideas?

    Visitor II
    April 7, 2004
    Posted on April 07, 2004 at 11:23

    you can use 256-Byte Pages for the messages. With

    ld A,(M_BLOCK1,X)

    you can read the block with inc X

    I use the same technique for call of different programs pointed to by a PRGM_PNTR.

    I hope I could help you