Re: A85: SBC HL, DE
[Prev][Next][Index][Thread]
Re: A85: SBC HL, DE
On Tue, 1 Sep 1998 DorkReMi@aol.com wrote:
>
> Will this subtract DE from HL? And if so, does it affect the c flag even if
> DE<HL?
> I'm confused.
>
> -Josh Morris
> DorkReMi@aol.com
>
The way the carry flag works with subtraction is the same as with
addition, sbc hl,de is hl-de-carry.
If carry is set then de+carry>hl (because to subtracted carry also.)
But it is always set afterwards.
This way you can do a bunch of SBCs to work with larger numbers (like my
32-bit math routines do.)
-Humberto Yeverino Jr.
"I kick ass for the Lord."
***********************************************************
Home Page:
http://www.engr.csufresno.edu/~humberto/Home.html
Ti Page:
http://www.engr.csufresno.edu/~humberto/tex.html
z80 Source Page:
http://www.engr.csufresno.edu/~humberto/z80source.html
Official Tyrant Home Page:
http://www.engr.csufresno.edu/~humberto/tyrant.html
E-mail:
humberto@engr.csufresno.edu
***********************************************************
References: