9월 16일 어셈블리 숙제 - 석주원
.386.MODEL FLAT PUBLIC_linux.CODE_linuxPROCNEAR32pushebp; Entry Codemovebp, esppushebx; 레지스터의 값을 보존해줘야 함.pushecxpushedxpushfd; efl값 보존 ; eax 위치movebx, esp; stack pointer 값을 보존movesp, [ebp+8]addesp, 40pusheax ; ecxmovebx, [ebp]pushebx ; edxmovecx, [ebp+4]pushecx ; ebxmovebx, [ebp+8]pushebx; espmoveax, [ebp+12]pusheax ; ebpmoveax, [ebp+4]pusheax ; esi, edipushesipushedi ; eipmoveax, [ebp+4]pusheax..
2013. 9. 17.
어셈블리 과제 0916 -임기준
.386.MODEL FLAT PUBLIC _LINUX .CODE_LINUX PROC NEAR32pushebpmovebp, esppushfd ; efl 를 스택에 미리 저장 movebx, esp ;ebx = espaddebx, 8;main의 old esp movesp, [ebp+8];contest 의 시작 주소addesp, 40;contest 의 끝 주소pushad; eax, ecx, edx, ebx, esp, ebp, esi, edimoveax, [ebp+4];eax = eip(return address)pusheax;eip값을 구조체 멤버 eip에 대입moveax, [ebp-4];eax = eflpusheax;efl값을 구조체 멤버 efl에 대입addesp, 24;구조체멤버 ebx에 점프 pushebx..
2013. 9. 16.