[A83] Re: Ambivalent Ion programs


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

[A83] Re: Ambivalent Ion programs




The problem is that such code will only work on the 83, and probably only on
certain versions of Ion.  I haven't tested this code, but I think it should
work better:
    pop    hl
    push    hl
    bit    7,h
    jr    z,_TIOS_start

-Dan Englender

----- Original Message -----
>
> But you had a good point.
> This should work  (TI-83 only):
>
>       .nolist
>       #include "ion.inc"
>       .list
>
> #ifdef TI83P
>       .org progstart-2
>       .db $BB,$6D
> #else
>       .org progstart
> #endif
>       xor a
>       jr nc,start
>       .db "ION vs. TI-OS",0
> start:
> pop hl ; HL = return-ion-point
> push hl
> ld de,915Ah
> or a
> sbc hl,de
> jp nz,_TIOS_start
>
>       bcall(_clrlcdf)
>       bcall(_homeup)
>       ld hl,txt
>       bcall(_puts)
>       bcall(_getkey)
>       ret
>
> _TIOS_start:
>       bcall(_clrlcdf)
>       bcall(_homeup)
>       ld hl,txt2
>       bcall(_puts)
>       bcall(_newline)
>       ret
> txt:
>       .db "OK..Ion is cool!",0
> txt2:
>       .db "I hate TI-OS!",0
>
> .end
> END
>
>
>
> >From: "Henk Poley" <HPoley@DDS.nl>
> >Reply-To: assembly-83@lists.ticalc.org
> >To: <assembly-83@lists.ticalc.org>
> >Subject: [A83] Re: Ambivalent Ion programs
> >Date: Wed, 14 Mar 2001 12:41:34 +0100
> >
> >
> > > would it be possible to let an Ion program do one thing if ran from
Ion
> > > and another thing when ran from TIOS??
> >
> >Whouch...
> > Did a BIG mistake about that... :(
> >
> >The adress you call to isn't pushed to the stack...
> >The adress you should RETURN to is...
> >
> >Maybe you could look if the return-adress is pointing to the ROM or not?
> >
> > Sorry...
> > Henk Poley
> >
> >
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>





References: