A89: Re: what can possibly be wrong?


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

A89: Re: what can possibly be wrong?




My guess is that it's messed up somewhere in the branching (I'm not sure).

But I'm probably wrong, so don't listen to me anyway. =P

-Miles Raymond      EML: m_rayman@bigfoot.com
ICQ: 13217756       IRC: Killer2        AIM: KilIer2 (kilier2)
http://www.bigfoot.com/~m_rayman/

----- Original Message -----
From: <TurboSoft@aol.com>
To: <assembly-89@lists.ticalc.org>; <assembly-92@lists.ticalc.org>
Sent: Sunday, October 17, 1999 1:31 PM
Subject: A89: what can possibly be wrong?


> This is my keylib.asm library:
>
>     include "doorsos.h"
>     xdef    _ti89
>     xdef    _ti92plus
>     xdef    _library
>     xdef    keylib@0000
> keylib@0000:
>     tst.w   (doorsos::kb_vars+$1C)      ; has a key been pressed?
>     beq \put_zero           ; if not, go to put_zero
>     move.w  (doorsos::MaxHandles+$1E),d0    ; puts the value of the
keypress
> into d0
>     clr.w   (doorsos::kb_vars+$1C)      ; clear key buffer
>     bra \done               ; exits out
> \put_zero
>         move.w  #0,d0
> \done
>     rts
>     end
>
> However, when l try to call this library from an program, l either get the
> message "function did not return a value" or "Illegal instruction" appears
on
> the status line and the program exits.  lt seems to me that whether or not
a
> key is pressed that a value is moved into d0, but yet the messages say no.
> What is happening?
> The C program is calling the library, and in doing so it stores whatever
> keylib@0000 returns in d0 into another variable.
>
> --TurboSoft
>
> Visit the TURBOSOFT HOMEPAGE:  The most current Basic and C programs
created
> by TurboSoft for the 89, and the most 89 web links.
> <A HREF="http://turbosoft.ticalc.org/">http://turbosoft.ticalc.org/</A>



References: