RE: A82: ASM code problem


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

RE: A82: ASM code problem



At 11:11 PM 7/7/97 -0400, you wrote:
>Here's your first problem:  the following line should be
ROM_CALL(CLEARLCD), becuase ROM_CALL is not just an ordinary call to an
address, it has an 'INDEX' value after it which the shell uses, so you
can't simply call it.

Nope, I discovered that you can call CLEARLCD and it will do the same thing
for all ROM versions (check the ti82.h file that comes with ASH v2.0).


>	It seems that you're trying to use the CALL (xxxx) opcode to call an
indirect address...  The only way to indirectly call something is with the
CALL (HL), CALL (IX) and CALL (IY) opcodes.  All other CALL instructions
use direct addressing (where the immediate data points directly to the
place to be called).

I can't use CALL (HL) or CALL(IY) (unless you can PUSH and POP IY) but CALL
(IX) seems to be the best way.  I just need to know if the following code
will work:

  CALL CLEARLCD               ; This works just fine
  LD HL,Text
  LD DE,(PROGRAM_ADDR)
  ADD HL,DE

  LD IX,D_ZT_STR
  CALL (IX)
(You know the rest of the code)

However, I thought you said earlier that CALL (xxxx) doesn't work.  Why
would CALL (IX) work?

TIA,
Thomas J. Hruska

|----------------------------------------------------|
|             Shining Light Productions              |
|      "Meeting the needs of fellow programmers"     |
|                                                    |
|   C/C++ programs                                   |
|   QBasic programs                                  |
|   JavaScript                                       |
|   TI-82 ASM                                        |
|   TI-Basic                                         |
|   HTML                                             |
|                                                    |
| Search for our web site at                         |
| www.geocities.com/SiliconValley/Heights/8504/      |
|                                                    |
| We use a dynamic web server for most of our        |
| documents!!!                                       |
| Soon to go to a full JavaScript 1.1 web site!      |
|----------------------------------------------------|


References: