문제

say there is a call to a subroutine Multiply. while the main function has called the subroutine and we are in the middle of the sub routine's execution an external interrupt occurs which also calls the same subroutine multiply. what will happen in that case?

도움이 되었습니까?

해결책

When an interrupt occurs, the information about the running program is saved away and then the interrupt handler is started. This handler runs on a stack that is separate from the one that the interrupted program uses, so if the handler calls multiply it will have separate parameters, local variables, and return addresses from what the program had.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top