; quick-and-dirty screen grabber DOSSEG .MODEL SMALL .STACK 4096 .DATA .CODE ; use only one segment to make life easier VideoSegment EQU 0B800h ; force program to use VGA mode screens VideoStore db 4000 dup (?) ; storage area for data Old9 label FAR ; define old interrupt 9 as far procedure int9 PROC ; start of ISR for 9h ; ... still to be written int9 ENDP EndofCode: ; end of resident part of code ProgramStart: mov ax,cs ; set data segment = code segment mov ds,ax mov ax,3509h ; get original interrupt vector 9h int 21h mov word ptr Startof9+1,bx ; patch old procedure address into code mov word ptr Startof9+3,es lea dx,int9 ; set interrupt vector 9h mov ax,2509h int 21h lea dx,EndOfCode ; get length of code to remain resident mov cl,4 ; divide by 4 to calculate paragraphs shr dx,cl add dx,11h ; add 1 for remainder and 10 for PSP mov ah,31h ; terminate and stay resident int 21h END ProgramStart