[A83] Re: Displaying Characters


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

[A83] Re: Displaying Characters




well why if I am dec 3, to 2 does it give me 255?? i dont get that (im new
to assembly)

> I am trying to display numbers on the graph screen that are stored in in a
> string 'A' and then decrement them. SOCCERK121 helped me with displaying
> them on the graph screen by:
>
> ld a,(a)
> ld h,0
> ld l,a
> bcall(_Setxxxxop2)
> bcall(_op2toop1)
> ld a,5 ;<--- number of digits, 5 is a safe number
> bcall(_dispop1a)
>
>
> But whenever I dec the A like this:
>
> ld hl,A
> dec (hl)
>
> A: .db 0h
>
> It messes up and from then on displays the number 255 whenever i reuse
> SOCCERK121's routine.
> I don't know wether its because A is a hex number or if I am
> doing something wrong.
>
0 - 1 = 255, i don't see the problem....




Follow-Ups: References: