; Description:
; Unsigned Divide Of R2/3 By R4/5
;
; Entry Requirements:
; Divisor In R4/5
; Dividend In R2/3
;
; On Exit:
; Quotient In R2/3
; Remainder In R4/5
;
; Affected:
; PSW.CY, PSW.Z, PSW.P, Acc, B, R2, R3, R4, R5
;
; Stack:
; 4 Bytes, Not Including Space Used By Called Routines
;
; Comments:
; None
;
UTIL_UDIV:
push 0 ; Save R0
push 1 ; Save R1
call DIVIDE ; Divide
pop 1 ; Recover R1
pop 0 ; Recover R0
ret ; Return To Caller
Source: Assorted Utilities, John C. Wren 11/23/96
Related topics:
8051 Program - count ascii decimal in string | 8051 Program - unsigned mod | 8051 Program - signed divide | 8051 Program - signed mod | 8051 Program - sign fixup for divide | 8051 Program - divide | 8051 Program - memory subroutines | 8051 Program - math subroutines | 8051 Program - conversion subroutines
List of topics: 8051
No comments:
Post a Comment