
;THIS ROUTINE PERFORMS 16 BIT UNSIGNED BINARY SUBTRACTION.
;Y-Z=Z .ARGUMENT Y IS LOCATED IN M(3,2) AND Z IS IN M(1,0).
;
;
; EDITTED MAY 11, 1994 - REVISED FOR NEW ASSEMBLER (ASMCOP v4.2) 
;

	.TITLE  BSUB
	.CHIP	ANYCOP
        .SECT   MAIN,ROM,INPAGE

	LD	X,#002
	LD	B,#000
	SC
LOOP:	LD	A,[X+]  ;Y-Z=Z  
	SUBC	A,[B]
	X	A,[B+]	
	IFBNE   #002
	JP	LOOP
	IFNC
	JP	NEGRSLT	;NEG.RESULT IF NO C
			;NO C=BORROW
NEGRSLT:

	.END

