While using asm("jmp 0x1000"); in Studio6, which address I have to use? Byte address or WORD address?
Confusion about using WORD or Byte address in asm("jmp&
Author
Message
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101067 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
Surely you can just check this:
int main(void) { asm("jmp 0x1234" ); }
If I build/run that in the AS6 simulator it arrives at word address 0x91A, byte address 0x91A * 2 = 0x1234.
So what you put in the JMP opcode is the BYTE destination of where you want to get to.
Or you could try to compile this
asm("jmp 0x321");
:twisted: