[A89] Re: A89: when i say JUMP, you say WHEN?


[A89] Re: A89: when i say JUMP, you say WHEN?

--- Greg <newstome2001@yahoo.com> wrote:
> I'm not sure that i was real clear, I need to know
> how the op-code is put
> together for a jmp to  address x...
> I've tried using vti, but I don't know how to
> decipher what it gives...
> something like  code 03FEC2  is equal to JMP $40002
> first off there isn't enough bytes in $0CFEC2 to
> even represent $40002!

This is because it is a relative jump.  (if you know
Z80 asm, jr is a relative jump and jp is an absolute
jump.)  compilers sometimes interchange relative jumps
and absolute jumps when they can.
> Basically, I know that on an TI-86 one could fill up
> part of a program with
> NOP's and later copy code into that area of the prog
> and execute it...
> and the format was something like opcode for jp;
> next byte(s) address to
> jump to...

The opcode for a strait up jump is this:
$4EF9  then the address in big endian. (takes four
bytes, not three like one might think)

so to jump to adrr $400000 one would exec:

Hope that helps.

- Jeff Flanigan

Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/

Follow-Ups: References: