Re: A85: sample...


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

Re: A85: sample...



> i started programming asm and i'm really confused with the routines to put
> pixels on the screen.  i know how to compile and everything, i can put text
> anywhere on the screen, but i can't put a pixel on there.  i've tried but
> failed.  is it possible that someone can write a complete code (in usgard .15
> format)to just put one pixel on the screen and then wait for a key press?  i
> would really appreciate it.  just a sample, but enough that i can compile it
> and try it.  from there i should get the idea.  thanks a ton.

I will assume you are using Jimmy Mardell (aka Yarin)'s tutorial.  Everyone seems
to get stuck here.  I think he needs to redo this section.  Anyway, the reason
why you can't get it to work is because you are not specifying WHERE you are
drawing the pixel.  To specify the VIDEO MEM, which in this case is where you
want to plot the pixel, type in these two lines:

 ld hl,VIDEO_MEM        ;Load video mem into hl.
 ld (DEST_ADDR),hl      ;Loads the video memory as the active memory.

Try adding them before the routine.  Remember that before the routine you must
also set b as the x coordinate and c as the y coordinate.  I have also attached a
sample program (sorry guys who had to wait 30 secs to check their mail).

Scott Konash
Warning
Could not process part with given Content-Type: application/x-unknown-content-type-asm_auto_file; name="PutPixel.asm"

References: