[A83] Re: ports


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

[A83] Re: ports




There is a better way for that code...Haven't tested this but it should
work.

    in a,(2)
    and 80h
    jr nz,TI83PlusSE
    in a,(0)
    and 3
    cp 3
    jr chkReceive
TI83PlusSE:
    in a,(9)
    bit 4,a
chkReceive:
    ret z
    ...call MirageOS receive routine...

Michael Vincent
Detached Solutions - www.detacheds.com
Radical Software - www.radicalsoft.org

----- Original Message -----
From: "Tijl Coosemans" <tijl.coosemans@mail.be>
To: <assembly-83@lists.ticalc.org>
Sent: Thursday, August 30, 2001 1:34 AM
Subject: [A83] Re: ports


>
> > ----------------------------------------
> > From: Michael Vincent <hookman@worldnet.att.net>
> >
> > Port 9 This is the status port for the link assist. Read this port and
AND
> > 38h. If nonzero flag, then the link assist has a byte in its buffer or
is in
> > the process of receving a byte.
>
> So this is what happens in the _getkey routine? It checks for activity
with port 9 and if there is activity it calls a receive-byte routine. Should
be, but Dan told me ones that bit 4 indicates wether there's a byte ready to
be received or not. So this would mean you have to AND with 10h (or just BIT
4,a) and not with 38h. So now I was wondering what the TIOS does before
calling _recAByte.
>
> Also, when making a program that should work on both the TI83+ and
TI83+SE, one should implement some code like this or is there a better way?
>
> linkReceive:
>    bcall(_getBaseVer)
>    dec   a
>    jr    nz,above112
>    ld    a,b
>    cp    13
>    jr    c,TI83Plus
> above112:
>    bcall(_nzIf83Plus)
>    jr    nz,TI83Plus
> TI83PlusSE:
>    in    a,(9)
>    and   38h
>    jr    chkReceive
> TI83Plus:
>    in    a,(0)
>    and   03h
>    cp    03h
> chkReceive:
>    ret   z
>    ..call MirageOS receive routine..
>
> -----------------------------------------------------
> Mail.be, Free WebMail and Virtual Office
> http://www.mail.be
>
>
>
>





References: