Loading a const + offset

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I've got a question about adding a constant. I define a Constant like

#define P 0x0060

And the command

ldi xl,lo8(P)

works properly.

But when I try

ldi xl, lo8(P) + 0x11

the Assembler told me:

test.asm(2): garbage end of line

so i need an expression that works. Any hints available?

Ralf

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could try:

ldi xl, lo8(P+0x11)

or

ldi xl, (lo8(P) + 0x11)

Sean

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanx for the fast reply!

The first one works, but the other not. (assembler output: garbage end of line)

Ralf

admin's test signature