Re: A86: How to use Video Mem?
[Prev][Next][Index][Thread]
Re: A86: How to use Video Mem?
At 03:46 PM 9/29/97 +0000, you wrote:
>How do I display a picture on the screen that is written in binary
>like
>%11111111
>%10000001
>%11111111
>
>Please help me.
>
>from,
>
>Dann
>
>
It might help to be a bit more specific, but at the simplest, just load hl
with the address you want to load it to, like so:
ld hl,$FC10 ;this is the second line
then de pointed to the bitmap in your code, like so:
ld de,Bitmap1 ;or whatever
to display it, assuming the three bytes are vertically defined:
ld bc,$0010
ld a,(de)
ld (hl),a
add hl,bc
inc de
ld a,(de)
ld (hl),a
add hl,bc
inc de
ld a,(de)
ld (hl),a ;p.s. - i know this can be optimized
that's the simplest form, but it's harder if you want non-aligned stuff or
grayscale, more than one byte, etc...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Alan Bailey mailto:bailela@charlie.cns.iit.edu
IRC:Abalone Web:http://www.iit.edu/~bailela/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
References: