PDF version - ARM Information Center
PDF version - ARM Information Center
PDF version - ARM Information Center
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
프로세서 예외 처리int main ( void ){int result1, result2;struct four_results res_3;Install_Handler ( (unsigned) SVC_Handler, svc_vec ) ;printf ("result1 = multiply_two (2,4) = %d\n", result1 = multiply_two (2,4)) ;printf ("result2 = multiply_two (3,6) = %d\n", result2 = multiply_two (3,6)) ;printf ("add_two ( result1, result2 ) = %d\n", add_two ( result1, result2 )) ;printf ("add_multiply_two (2,4,3,6) = %d\n", add_multiply_two (2,4,3,6) ) ;res_3 = many_operations ( 12, 4, 3, 1 ) ;printf ("res_3.a = %d\n", res_3.a ) ;printf ("res_3.b = %d\n", res_3.b ) ;printf ("res_3.c = %d\n", res_3.c ) ;printf ("res_3.d = %d\n", res_3.d ) ;return 0;}예제 6-14 svc.h__svc (0) int multiply_two (int, int) ;__svc (1) int add_two (int, int) ;__svc (2) int add_multiply_two (int, int, int, int) ;struct four_results{int a;int b;int c;int d;};__svc (3) __value_in_regs struct four_resultsmany_operations (int, int, int, int) ;응용 프로그램에서 동적으로 SVC 호출경우에 따라 런타임까지 번호를 알 수 없는 SVC를 호출해야 할 수 있습니다. 예를 들어 한 객체에 대해 수행할 수 있는 관련 연산이 여러 개이고 각 연산에 고유한 SVC가 있을 때 이러한 경우가 발생할 수 있습니다. 이 경우 이전 단원에서 설명한 방법은 적합하지 않습니다.<strong>ARM</strong> DUI 0203IK Copyright © 2002-2008 <strong>ARM</strong> Limited. All rights reserved. 6-27Unrestricted AccessNon-Confidential