Re: A86: Loading data from a "variable" address. . .
[Prev][Next][Index][Thread]
Re: A86: Loading data from a "variable" address. . .
> 1) When do I need to use "ret", and when don't I??? I've seen source code
> for some programs that jump, do a routine, and go back but don't use
> "ret" -- When does it know to return?
> 2) I've seen cases where "call" was used exactly like "jp" -- and NOT for
> ROM calls?!? Am I allowed to use it for anything else???
The JP or JR instruction simply updates the program counter (PC)
register to the address that you tell it to jump to. This makes your
program continue running from this location. When you jump, there is no
way to keep track of where you jumped from.
A CALL is like a jump. It, too, updates PC to where you tell it to CALL
to. But before it jumps, it PUSHes PC onto the stack. At the end of
the ROM CALL or subroutine, there must be a RET. The ret POPs the stack
into PC. It basically jumps back right after the location you called.
If you've ever programmed in BASIC (not TI-BASIC), jumps are like GOTO,
and calls are like GOSUB.
> 3) While I'm at it, is a TI-89 list going to open soon?
> 4) Since the 89 will use a Motorola 68000 like the TI-92, the assembly will
> be like Fargo, not the 82, 83, 85, 86, or any of the others that use a 6MHz
> Z80, right?
>From what we can tell at this early stage, programming the 89 will be
JUST like Fargo, since it can supposedly run 92 asm programs. If you
want a head start, just download some 92 asm source from ticalc. Be
assured that 68000 asm is very different from Z80, though.
--------------
David Phillips
electrum@tfs.net
References: