A85: Re: Assembly-85 Digest V1 #531


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

A85: Re: Assembly-85 Digest V1 #531




<<In a message dated 3/27/99 9:36:49 PM MST, MalcolmJ1@email.msn.com writes:

> here's another routine that i have never tested and wrote just for this
>  email:
>  jimi
>
>  start:
>      ld hl,VIDEO_MEM+3    ;where to begin  (you put this in your email)
>      ld b,<however many pixels high the screen is...68 i think or
something
>  like that>
>  s_1:
>      ld a,%0000 0001        ; the 1 is the bit you want set....you can
move
>  that
>                                              ;  you can make it look cool
>  with "ld a,%0000 0101"
>                                          ; that way you'd have two lines
>      or (hl)            ; you want don't want to erase anything that's
>  already on the screen i guess
>      ld (hl),a        ; load the final product onto the screen, lighting
up
>  the new pixel (line)
>      add hl,16    ; add 16 to get the next row down!
>      djnz s_1    ; go and do it all over again!

Unfortunately, this won't work unless that byte offset where you're drawing
the line is totally reset...if there are set bits around where you're
drawing
the line, each ' or (hl)' will put those bits in A and keep them in there,
so
you'll most likely have a "streaking" effect...cool nonetheless ;)  Btw, the
screen is 64 bits high by 128 bits (16 bytes) wide.

JL
*****but at the start of each loop, i reset a with %0000 0001...then the
loop begins******

P.S.:  You also can't do an ' add hl,16', because you can't add constants to
HL; you'll have to do ' add hl,de', with DE = $10 = 16.>>
*******sorry, i forgot about that********
**jimi**