Re: A83: Question


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

Re: A83: Question




Alright, here's your lesson on how the z80 handles 16bit stuff.  HL is a
16-bit register and (pencol) only needs an 8-bit number so when you load
HL into (pencol), HL overflows into the next byte of data which is
(penrow).  In the hl register, the 'L' byte actually comes before the 'H'
byte.  So when you load HL into (pencol), L goes into (pencol) and H goes
into (penrow).

Now to add a blackline under your text (if your talking about small
text), do a 'res 1,(iy+5)'.  That should handle it.  But just to tell
you, if you want to increment or decrement (pencol) or (penrow), do this:

	ld	a,(pencol)	; Or (penrow)
	dec	a		; Or inc a
	ld	(pencol),a	; Or (penrow)

This works because A is only a 8-bit register so there's no overflow. 
Hope this helps


<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>
       See ya,
       Mastermind

       http://www.bigfoot.com/~mastermind5


>
>This question is kind of about byte order, and reverse byte loading 
>or
>something, and here's the situation im doing... Im writing text to the 
>screen
>in Inverse Video, and you know how it Wont draw a black line below the 
>word to
>make it like a border of black all around, So I was thinking of 
>writing the
>text one pixel lower, and then writing it in the the normal spot and 
>this
>should do it... How to accomplish that though, is where Im confused... 
>I dont
>understand (penrow) and (pencol), like which is X and which is Y, and 
>which
>value of 'hl' goes into each when you do "ld (pencol), hl"...?  
>Someone
>clarify that for me... Ok, so in the routine that I want to draw the 
>text one
>line lower first, do I increase 'h' or increase 'l' temporarily (in 
>use with
>'_vputs') so that I can increase the Y coordinate...? Thanks anybody 
>for some
>help here... =)
>															--Jason 
>K.
>

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]