Monday, May 30, 2016

8051 Program - multiply dptr by 1000

; Description:
; Multiple DPTR By 1000. Return CY == 1 If Overflow
;
; Entry Requirements:
; DPTR Has Value To Multiply By 1000
;
; On Exit:
; DPTR = DPTR * 1000
;
; Affected:
; PSW.CY, DPTR
;
; Stack:
; 2 Bytes, Not Including Space Used By Called Routines
;
; Comments:
; If DPTR Overflows On The First Or Second Multiply, The Third Call
; Will Not Reflect The Overflow. DPTR Should Be Checked Before Entry.
;
UTIL_DPTRX1000:
call UTIL_DPTRX10 ; Multiply By 10
call UTIL_DPTRX10 ; Multiply By 100
call UTIL_DPTRX10 ; Multiply By 1000
ret ; Return To Caller


Source: Assorted Utilities, John C. Wren 11/23/96



Related topics:
8051 Program - multiply dptr by 10   |   8051 Program - multiply dptr by 100   |   8051 Program - call function dptr points to   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment