; Description:
; Call Function Pointed To By DPTR. Called Function Returns To
; Calling Function.
;
; Entry Requirements:
; DPTR Contains Address Of Function To Call
;
; On Exit:
; None
;
; Affected:
; None
;
; Stack:
; 2 Bytes, Not Including Space Used By Called Routines
;
; Comments:
; This Is Useful For Making The Routines Look Clean, Instead Of Having
; To Setup The Return Address In Calling Function. Handy For When
; Tables Of Address For Functions Are Used (Indexed Operations, Etc)
;
UTIL_CALLFUNC:
push dpl ; Push Low Of Address
push dph ; Push High Of Address
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 - multiply dptr by 1000 | 8051 Program - memory subroutines | 8051 Program - math subroutines | 8051 Program - conversion subroutines
List of topics: 8051
No comments:
Post a Comment