Hi. I am trying to change an interrupt vector in assembly language to point to a new routine but can't quite figure out how to do it. I am trying to replace it as such:
InterruptRoutine:
mov ah,0x0
int 0x16
iret
InstallInterrupt:
mov ax,0x0
mov es,ax
mov di,Vector*4
push cs
pop ax
stosw
mov ax,InterruptRoutine
stosw
ret
Vector dw 80
This is just an example, I'm actually attempting to change interrupt vector 0x1c, the timer. I am writing this as standalone code as i am attempting to write a mini-os, and this code will run at system boot so i cant use dos to do this for me. is this the correct way of doing this? If so, why isn't the timer firing under my new code? I have no clue what is going on here. And is this the right way to find the segment for the routine or is there a better way?