The Windows-specific portion of this task is better off explained by articles such as
this one.
A minimalistic approach specific to the x86 architecture would be to read the particular entry of the IVT/IDT, isolate the current address of the desired ISR, store that address as apart of your ISR that accounts for it, and replace that IVT/IDT entry with the address of your ISR.
Below is a simplistic (32-bit) example of a replacement ISR:
[section .data]
old_isr DD 0
count DB 0
[section .code]
new_isr:
inc BYTE[count]
cmp BYTE[count],9
jb .yield
mov BYTE[count],0
;... do my stuff...
.yield:
jmp DWORD[old_isr]
Again, the above example is simplistic and the aforementioned article would be infinitely more useful.