Re: TI-H: asm
[Prev][Next][Index][Thread]
Re: TI-H: asm
S43R80 wrote:
> ok...i am trying my best to learn how to program in assembly using
> zshell...right now i am a little stuck though...will someone please explain to
> me how and why these routines (from the zshell school) actually work (word for
> word).
>
> PLOTTING PIXELS
>
> Here are four routines for putting a pixel, removing a pixel, changing a
> pixel, and checking to see if a pixel is lit.
>
> PutPixel: ; Puts a pixel at B,C
> ROM_CALL(FIND_PIXEL)
> ld de,$FC00
> add hl,de
> or (hl)
> ld (hl),a
> ret
>
> RemovePixel: ; Removes a pixel at B,C
> ROM_CALL(FIND_PIXEL)
> ld de,$FC00
> add hl,de
> cpl
> and (hl)
> ld (hl),a
> ret
>
> ChangePixel: ; Changes the pixel at B,C
> ROM_CALL(FIND_PIXEL)
> ld de,$FC00
> add hl,de
> xor (hl)
> ld (hl),a
> ret
>
> TestPixel: ; Tests the pixel at B,C. If the Z flag is set, no pixel, else
> a pixel is lit
> ROM_CALL(FIND_PIXEL)
> ld de,$FC00
> add hl,de
> and (hl)
> ret
You should ask that on the Assembly-85 mailing list, not this list.
--
Bryan Rabeler <brabeler@ticalc.org>
File Archives
the ticalc.org project - http://www.ticalc.org/
References: