Prev: ADBA Up: Map Next: ADE1
ADC7: BCD Subtract (hl,4) from (de,4).
Used by the routines at Offer_Handle and BCD_SubDE.
Input
HL Points to 4 byte BCD number.
DE Points to 4 byte BCD number to subtract.
Output
Sets carry flag if difference is greater than value.
BCD_Subtract ADC7 PUSH HL
ADC8 PUSH DE
ADC9 EX DE,HL
ADCA LD B,$04
ADCC AND A
BCD_Subtract_0 ADCD LD A,(DE)
ADCE SBC A,(HL)
ADCF DAA
ADD0 LD (DE),A
ADD1 INC HL
ADD2 INC DE
ADD3 DJNZ BCD_Subtract_0
ADD5 POP DE
ADD6 POP HL
ADD7 RET NC
ADD8 CALL ValueAddAsBCD
ADDB SCF
ADDC RET
BCD_diff. ADDD DEFB $00,$00,$00,$00 Temp store for BCD number.
Prev: ADBA Up: Map Next: ADE1