[A83] Re: number _vputs and black-out a piece of screen


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

[A83] Re: number _vputs and black-out a piece of screen




> How can I output a number stored in a with _vputs?
> It has to be a small font.
>
>         ld a,(8008h)  ;the place in RAM for the contrast

Since your dealing with the contrast here, it might be better to just
display a number from 0 to 9, so just divide the byte in 8008h by 4 and add
30h to it, then put it in a string and display it.

    ld    a,(8008h)
    rra          ; divide by 2
    rra          ; once again
    and   0Fh    ; not sure if this is necessary, but I think it is.
    add   30h    ; 30h is the character '0'
    ld    (contrast),a
    ld    hl,contrastTxt
    bcall(_vputs)
    ret
contrastTxt:
    .db   "Contrast is "
contrast:
    .db   0,0

Tijl Coosemans



Follow-Ups: References: