Re: A86: Graphics


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

Re: A86: Graphics



In a message dated 97-10-16 21:06:50 EDT, you write:

> 
>  I asked before, but maybe it didnt get through.  Is it at all possible for
>  someone to give a simple description of how to dipsplay anything
(preferably
>  graphics) other than strings of text in an asm program?  i have absolutely
>  no clue, so anything will be helpful.  thanx in advance.
>  

Ok, you can either use the ROM calls (takes longer, but is a little easier),
or you can write directly to the video mem.  I'm not sure what registers the
_ILine, _IPoint, and _CLine calls use, but there's some documentation on that
somewhere (If not on the 86, then on the 83, just change all the 96's that
refer to the xmax to 128's)

For writing directly to video mem (1024 bytes, starting at $FC00, unless you
move it - each byte is 8 pixels), you need (usually) a findpixel routine,
which you can find earlier on this list, or probably in ticalc.org's source
archive.  Basically, tho, you might try something like this:

ld d,<y_coord>
ld e,<x_coord>   ;i think this is right
call FindPixel     ;points hl to pixel, with mask in a.
or (hl)                 ;is this a valid opcode?  if not, improvise...
ld (hl),a              ;put it back in (hl)

If you already know the (x,y), you might just want to do something like this:

ld hl, $FC00+16*y+[x DIV 8]
set 7-[x MOD 8],(hl)

You probably should precalculate the #'s, tho...

~Steve