Monday, May 30, 2016

8051 Program - arithmetic shift right dptr

; Description:
; Arithmetic Shift DPTR 1 Bit To Right
;
; Entry Requirements:
; DPTR Has Value To Shift Right
;
; On Exit:
;
; Affected:
;
; Stack:
; X Bytes, Not Including Space Used By Called Routines
;
; Comments:
; None
UTIL_DPTRASR1:
push acc ; Save Acc
mov a,dph ; Get High Of DPTR
mov c,acc.7 ; Preserve Sign
rrc a ; Shift Left
mov dph,a ; Store Back To DPH
mov a,dpl ; Get Low Of DPTR
rrc a ; Shift Left
mov dpl,a ; Store Back To DPL
pop acc ; Recover Acc
ret ; Return To Caller


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



Related topics:
8051 Program - shift dptr right   |   8051 Program - rotate dptr left 4bits   |   8051 Program - shift dptr left   |   8051 Program - shift r3r4r5r6r7 4bits left   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment