系統(tǒng)會用到下面幾種寄存器: 1.EIP 2.ESP 3.EBP。三者的作用。
1.EIP寄存器里存儲的是CPU下次要執(zhí)行的指令的地址。
2.EBP寄存器里存儲的是是棧的棧底指針,通常叫棧基址,而這個地址是由ESP在函數(shù)調(diào)用前傳遞給EBP的。等到調(diào)用結(jié)束,EBP會把其地址再次傳回給ESP。所以ESP又一次指向了函數(shù)調(diào)用結(jié)束后,棧頂?shù)牡刂贰?br />3.ESP寄存器里存儲的是棧的棧頂。并且始終指向棧頂。
Eax – arithmetic, default location where division occurs (accumulator)是很多加法乘法指令的缺省寄存器。
Ebx – base index for arrays
Ecx – couner (used with the loop instruction)重復(fù)(REP)前綴指令和LOOP指令的內(nèi)定計數(shù)器。
Edx – data/general 總是被用來放整數(shù)除法產(chǎn)生的余數(shù)。
Edi, esi – used as indices in string operations
Ebp – positive offsets are the arguments, negative offsets are the local variables
posted on 2011-11-27 23:15
鷹擊長空 閱讀(152)
評論(0) 編輯 收藏 引用