Re: A86: Video RAM problem


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

Re: A86: Video RAM problem




>
>LITTLESTARS:   ;this will put stars in black sky
>  ld hl,%11011111
>  ld ($FC3F),hl
>  ld ($FCB9),hl
>  ld ($FEB5),hl
>  ld ($FF36),hl
>  ld ($FFB9),hl
>  ld hl,%01111111
>  ld ($FD1D),hl
>  ld ($FDA5),hl
>It goes on in the same fashion.

hl is two bytes (16 bits). So when you say
ld hl,%11011111,
what you're really saying is
ld hl,%0000000011011111

That's why you're getting the blank space.

And no, if you want them at specific random-looking locations like that,
there's no easier way. I mean, you'll have at least one instruction per
pixel.

--Joshua



References: