Newbe & porting ;) please help

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

Can someone help a newbi at gcc ;)

I have this code example & i want to port it to gcc asm:

ldi ZH,HIGH(TEST2<<1)
ldi ZL,loW(TEST1<<1)

EMMM41:
.DB 0xDB,0x54,0x6B,0x52,0xD6,0x38,0x8F,0x1C

This is what i have tryed but it gives me error:

ldi ZH,hi8(TEST2<<1)
ldi ZL,lo8(TEST1<<1)

EMMM41:
.byte 0xDB,0x54,0x6B,0x52,0xD6,0x38,0x8F,0x1C

Error:
1 Constant value required
1 Register number above 15 required

2 Constant value required
2 Register number above 15 required

Thanks for your help ;)

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

ldi ZH, high(EMMM41*2)
ldi ZL, low(EMMM41*2)

EMMM41:
.byte 0xDB,0x54,0x6B,0x52,0xD6,0x38,0x8F,0x1C

Does this work ?

admin's test signature
 

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

ldi ZH, high(EMMM41*2)
ldi ZL, low(EMMM41*2)

EMMM41:
.db 0xDB,0x54,0x6B,0x52,0xD6,0x38,0x8F,0x1C

Does this work !!!!!!!!

admin's test signature
 

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

Nope ! same result + error: garbage at end of line becuse of the Low / high insted og the hi8 / lo8 ??

Thanks anyway Turbooooooooo !

Morten