icall limitation?

Hi!

I use an attiny85 as a USB device, that can program itself via USB... :-) that seems to work fine... it shows the correct machine code after a power cycle...

But: When I jump (ijmp/icall) to an address below 5760 (0x1680) it hangs (the LED doesnt blink and the usb driver code doesnt react anymore)... and i dont know why... the usb driver code ends before 3392 (0xd40). and the icall is at 0x890.

Can somebody tell me, what is going wrong?

Is pushing Z to the stack and returning a good idea? If yes: do they push the low byte of the return address before the high byte?

Thx.

Bye Arne

attiny85 and assemble language are not core parts of the standard Arduino platform. If you don't get response here you might try AVRfreaks forum: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=index

Lefty

@Lefty: thx for holding my hand... :)

i just found the cause of the problem: the program counter contains the word (2 byte) number... i thought it would be the byte number...

-arne