A83: Re: Problem with _dispop1a


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

A83: Re: Problem with _dispop1a




It might sound silly, but I think you need to load a new value in a, because
_dispop1a displays OP1 for A number of characters. So when you load a=0, it
will display '0' characters, which is impossible (that's the error). You
should do this:

ld a,value                ;load correct value in a
push af                    ;store a (and f)
call _setxxop1        ;set OP1 to A
ld de,19*256+68    ;load coordinates
ld (pencol),de         ;store coordinates
ld a,3                      ;reg a can contain up to '255' ($ff), so maximal
3 characters
call _dispop1a      ;display it
pop af                    ;restore value in a
ret

Hope this works. If it works, let me know. If it doesn't, let me know also
:-).

Greetz,
Frank
    -----Oorspronkelijk bericht-----
    Van: ti-83 <ti-83@libertysurf.fr>
    Aan: Assembly-83 <assembly-83@lists.ticalc.org>
    Datum: donderdag 7 september 2000 20:44
    Onderwerp: A83: Problem with _dispop1a


    I'm making a game, and I use the code wich is under. It displays the
register's value a on the screen at the position of penrow, pencol, but when
a is 0, the TI returns an UNDERFLOW error and breaks the program. Does
someone could say me why and how can I do to display the value of a on the
graphic screen with this routine or with another ?

    call _setxxop1
    ld de,19*256+68
    ld (pencol),de
    call _dispop1a
    ret

    Thanks

    Ti-83

    Le monde de la TI-83
    http://www.ti-83.fr.st
    ti-83@fr.st