Re: A86: Video RAM problem
[Prev][Next][Index][Thread]
Re: A86: Video RAM problem
The problem is hl is a 2 byte register, so when you
ld hl,%11011111
h = %00000000, and l = %11011111. Then when you
ld ($FC3F),hl
($FC40) = h (%00000000), and ($FC3F) = l (%11011111).
I think that's right
To fix this, simply use the register a instead of hl.
So do this:
ld a,%11011111
ld ($FC3F),a
etc.,
etc.,
etc.
---KidFedX@aol.com wrote:
>
>
> okay, I have a problem with the video RAM; in my program (the intro)
I turn
> all the pixels on (for a night sky) and then I want to put some
stars in. I
> want these stars in specific locations so I decided to load the bits
into
> locations manu. but when I loaded say %11101111 into $FC33; $FC34
instead of
> being %11111111 would turn to %00000000. Why is it doing this? I
have a
> black screen with dots in the right places, but one address location
over it's
> all blank. Oh, and if you know an easier way to do this, could you
tell me
> please? Thanks a bunch!
>
> Here's the section of code:
>
> #include "ti86asm.inc"
>
> .org _asm_exec_ram
>
> call _runindicoff
>
> BLACK:
> ld hl,$fc00
> ld d,h
> ld e,$01
> ld bc,$03ff
> ld (hl),c
> ldir
>
> 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.
>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com