系統會用到下面幾種寄存器: 1.EIP 2.ESP 3.EBP。三者的作用。
1.EIP寄存器里存儲的是CPU下次要執行的指令的地址。
2.EBP寄存器里存儲的是是棧的棧底指針,通常叫?;?,而這個地址是由ESP在函數調用前傳遞給EBP的。等到調用結束,EBP會把其地址再次傳回給ESP。所以ESP又一次指向了函數調用結束后,棧頂的地址。
3.ESP寄存器里存儲的是棧的棧頂。并且始終指向棧頂。
Eax – arithmetic, default location where division occurs (accumulator)是很多加法乘法指令的缺省寄存器。
Ebx – base index for arrays
Ecx – couner (used with the loop instruction)重復(REP)前綴指令和LOOP指令的內定計數器。
Edx – data/general 總是被用來放整數除法產生的余數。
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) 編輯 收藏 引用