Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 7c00h ;start first sector
- use16
- mov ax,0
- mov es,ax
- mov bx,[start]
- mov al,14h
- out 8,al
- mov al,56h
- out 0bh,al
- mov ax,es
- add ax,bx
- mov bx,ax
- mov al,0
- out 0ch,al
- mov ax,bx
- out 4,al
- mov al,ah
- out 4,al
- mov al,0
- out 81h,al
- mov al,0
- out 0ch,al
- mov al,0ffh
- out 5,al
- mov al,1
- out 5,al
- mov al,2
- out 0ah,al
- mov al,10h
- out 8,al
- mov dx,3f2h
- mov al,1ch
- out dx,al
- call readmsr
- mov dx,3f5h
- mov al,0c6h
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,0
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,0
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,0
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,2
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,2
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,18
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,27
- out dx,al
- push dx
- call readmsr
- pop dx
- mov al,0
- out dx,al
- call start ;MOV_EwSw: using of nonexisting segment register 7 :( Why?
- jmp $
- org 7c00h ;start first sector
- readmsr:
- mov dx,3f4h
- in al,dx
- and al,0c0h
- cmp al,80h
- jne readmsr
- ret
- times 510-($-$$) db 0
- dw 0aa55h ;end first sector
- start: ;start second sector
- mov ax,0
- int 16h
- int 19h
- times 510-($-start) db 0 ;end second sector
Advertisement
Add Comment
Please, Sign In to add comment