A83: Re: Many Pixels... Routine? =P


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

A83: Re: Many Pixels... Routine? =P




What exactly are you trying to do?  You can use or write your own FindPixel
function, which is a function that you pass the X,Y coords (usually in BC or
DE) that returns the address in the video buffer of the pixel and the
bitmask of the pixel in A.  It would look like this:

ld bc,(19<<8)+37    ; draw pixel at (19, 37)
call FindPixel
or (hl)             ; set the pixel in the video buffer
ld (hl),a           ; and save it, because "or (hl)" saves it in A

-----Original Message-----
From: Jkhum98@aol.com <Jkhum98@aol.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Monday, November 02, 1998 8:49 PM
Subject: A83: Many Pixels... Routine? =P


>
>What's the best way to plot many pixels to the display...?   Could somebody
>write me a routine that would read the values for the coordinates in an
array
>of databytes somewhere in the program, and write them to the graph
buffer...?
>I was thinking something like this...
>
>Input:    de = Location to point to, for beginning of data for X
Coordinates
>             hl = Location to point to, for beginning of data for Y
>Coordinates.
>             b = Number of Pixels to plot (I figured, use 'b' to use with
>'djnz'.)
>             c = Color for all of the Pixels to plot...
>Output:  All of the Pixels are written to the Buffer with the specified
Color.
>
>I tried something simple already that would just read the current location
of
>'de' and 'hl' so they are used together and put into 'bc' for use with
>'_IPoint', plotting each point, and then increasing the pointer location,
but
>I just got all confused with the push/pops 'n stuff, because '_Ipoint' uses
>different registers... =P
>
>Can somebody write out this routine for me, or is there a much better way
to
>do this by using Bit manipulation 'n stuff...? Thanks for your help,
anyone...
>=)
>
> --Jason K.