[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] assembly questions

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] assembly questions
Date: Wed, 10 May 2006 10:54:47 +0200 (MET DST)

maha <address@hidden> wrote:

>      So, my question is, since it's the absolut code address, why
> it's 0e94 b807, but not 0e94 0f70 ?

Two things: all JUMP and CALL target addresses are based on 16-bit
word addresses, so you need to shift your 0xf70 by one to the right,
and will yield 0x07b8.  Second, the byte order display for both words
(0x0e94 *and* 0xb807) is opposite from what you are expecting, so the
0x940e opcode becomes 0x0e 0x94, and the 0x07b8 jump target becomes
0xb8 0x07.  That forms your full 0x0e 0x94 0xb8 0x07 instruction

>      By the way, how do I modify my makefile for force assembler to
> replace all call instruction by icall instructioin?

I won't say it cannot be done, as the Makefile can basically wrap any
kind of external command, like a stream editor (sed) that could do
just this.  But what kind of sense would that make?  An ICALL
instruction would need to be set up through the appropriate registers,
so it would take a lot more than just replacing each CALL by an ICALL.


J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]