mov esi,offset buffer mov edi,offset buffer2 rep movsw
mov dx,1f6h ;Drive and head port mov al,0a0h ;Drive 0, head 0 out dx,al mov dx,1f2h ;Sector count port mov al,1 ;Write one sector out dx,al mov dx,1f3h ;Sector number port mov al,1 ;Wrote to sector two out dx,al mov dx,1f4h ;Cylinder low port mov al,0 ;Cylinder 0 out dx,al mov dx,1f5h ;Cylinder high port mov al,0 ;The rest of the cylinder 0 out dx,al mov dx,1f7h ;Command port mov al,30h ;Write with retry. out dx,al oogle: in al,dx test al,8 ;Wait for sector buffer ready. jz oogle xor ecx,ecx mov cx,512/2 ;One sector /2 mov esi,offset buffer2 mov dx,1f0h ;Data port - data comes in and out of here. cli cld rep outsw ;Send it. sti iretd Ring0Code ENDP
ShowBuffer proc invoke MessageBoxA,NULL,offset ShowText,offset Caption,MB_OK ret ShowBuffer endp
ExceptCallBack PROC invoke MessageBoxA, 0, addr szExceptionCaused,addr szError, 0 invoke ExitProcess, -1 ret ExceptCallBack ENDP ToRing0Code proc Ring0:DWORD 上一篇:一种可以穿透还原卡和还原软件的代码 下一篇:扩展int13h调用详解(修正) |