Home     Projects     Micro     Tools     Delphi     Developer     Site map
HOME  
 
 
       
Compare DPTR To AB

DOWNLOAD    MAIN
;******************************************
;  Description:
;	Compare DPTR To AB.  
;	Return CY == 1 If DPTR > BA, Else CY == 0 If 
;	DPTR <= BA.  The Operation Is BA - DPTR.
;
;  Entry Requirements:
;	B/Acc With Value To Be Compared Against
;	DPTR Containing Value To Compare
;
;  On Exit:
;	CY Set Accordingly
;
;  Affected:
;	PSW.CY, PSW.Z, PSW.P, Acc
;
;  Stack:
;	0 Bytes
;
;  Comments:
;	Might Be A Good Idea To Save The Accumulator
;
UTIL_UCMPDPTRBA	
		clr	c
		subb	a,dpl
		mov	a,b
		subb	a,dph
		ret

Copyright(c) 2005-2008 sixca.com, All right reserved.
Best view @ 800X600, IE 6.0 up   
Terms of Use  Privacy Policy