TI-H: asm
[Prev][Next][Index][Thread]
TI-H: asm
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
Follow-Ups:
- Re: TI-H: asm
- From: Bryan Rabeler <brabeler@isd.ingham.k12.mi.us>