cancel
Showing results for 
Search instead for 
Did you mean: 

16Bit addressing mode problem

adib
Associate II
Posted on April 07, 2004 at 11:23

16Bit addressing mode problem

2 REPLIES 2
adib
Associate II
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?

hkurt
Associate II
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