Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/02/01 15:51
Read: times


 
#9684 - RE: 8052 subroutines
A subroutine will ALWAYS (if no programming error) return to the instruction following the call

main: mov p1,#0
call level2
; here 4 port pins will be set

level2: push acc
setb p1.0
call level1
setb p1.1
pop acc
ret

level1: push acc
setb p1.2
call level1
setb p1.3
pop acc
ret

just look out for stack use
Have fun
Erik






List of 6 messages in thread
TopicAuthorDate
8052 subroutines            01/01/70 00:00      
RE: 8052 subroutines            01/01/70 00:00      
RE: 8052 subroutines            01/01/70 00:00      
RE: 8052 subroutines            01/01/70 00:00      
RE: 8052 subroutines            01/01/70 00:00      
RE: 8052 subroutines            01/01/70 00:00      

Back to Subject List