(轉(zhuǎn))利用函數(shù)將程序跳轉(zhuǎn)到固定地址執(zhí)行
---------------------------------------------
定義函數(shù)void (* my_function)(void);
在程序中賦值:
my_function = 0x00;
然后調(diào)用函數(shù):
my_function();
程序就會(huì)跳轉(zhuǎn)到0x00地址開始執(zhí)行,常用于BootLoader程序中.
類似的還有直接向某個(gè)地址寫入數(shù)據(jù):
int *my_address = 0x05555555;
*my_address = 0x22222222;
直接向0x05555555地址寫入數(shù)據(jù)0x22222222.
posted on 2007-08-10 15:28 井泉 閱讀(544) 評(píng)論(0) 編輯 收藏 引用 所屬分類: c code

