Example of subtraction with borrow?

From: Puzzled (uce_at_ftc.gov)
Date: 02/29/04


Date: Sun, 29 Feb 2004 07:16:11 -0800


Could someone post a snippet of assembly language code showing how
subtraction with borrow works? I am trying to do 12 bit math on a
4 bit processor, but any example such as doing 16 bit math on an 8
bit processor will do. I don't care which processor either; I am
just trying to find an example of someone using the carry bit as a
borrow bit so I can work things out in my mind. The addition with
carry makes perfect sense, but I don't "get it" when it comes down
to doing subtraction with borrowing. An example would help a lot.

Thanks!



Relevant Pages