flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > Hook INT 13H

Author
Thread Post new topic Reply to topic
luish



Joined: 26 Jan 2018
Posts: 13

Hook INT 13H

I want to hook INT 13h to when this interrupt read sector(s) i intercept it and i read the sector(s) in sector 10H(16) but OS kant bootstrap with my code. here is my source:

Code:
code:
cli
cs
mov si,[4Ch]
cs
mov di,[4Eh]
cs
mov [180h],cx
cs
mov [182h],dx
mov si,0
mov di,2000h
cs
mov [4Ch],si
cs
mov [4Eh],di
sti
mov si,2000h
mov es,si
mov si,payload
mov di,0
mov cx,codelastbyte-payload
cld     
repz
movsb

mov ax,201h
push cs
pop es
mov bx,7c00h
mov cx,7
mov dx,80h
int 60h
jmp 0:7C00h

payload:           ;NEW INT13H
;pushaw
pushfw
push ds
push es
push ss
sti
cld
cmp ah,2h
jnz gogo

pusha
MOV AH,3
MOV AL,1
MOV CH,0
MOV CL,10H
MOV DH,0
MOV DL,80H
INT 60H         ;ORIGINAL INT 13H
popa

gogo:
INT 60H
pop ss
pop es
pop ds
popfw
iret

codelastbyte



what is wrong?
Post 09 Feb 2018, 05:27
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.