Monday, May 30, 2016

8051 Program - multiply dptr by 100

; Description:
; Multiple DPTR By 100. Return CY == 1 If Overflow
;
; Entry Requirements:
; DPTR Has Value To Multiply By 100
;
; On Exit:
; DPTR = DPTR * 100
;
; Affected:
; PSW.CY, DPTR
;
; Stack:
; 2 Bytes, Not Including Space Used By Called Routines
;
; Comments:
; If DPTR Overflows On The First Multiply, The Second Call Will Not
; Reflect The Overflow. DPTR Should Be Checked Before Entry.
;
UTIL_DPTRX100:
call UTIL_DPTRX10 ; Multiply By 10
call UTIL_DPTRX10 ; Multiply By 100
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 1000   |   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