; pktfind.asm .MODEL SMALL,C INCLUDE snoop.inc PUBLIC pktfind .DATA packet_str DB 'PKT DRVR' .CODE pktfind PROC USES bx,cx,dx,ds,es,di,si mov AX,0H mov bx,SWI_START ; move ISR offset ptr to bx continue: mov cx,INTVECT_SEG ; move ISR segment ptr to ds mov ds,cx ASSUME ds:INTVECT_SEG mov di,[ds:bx] ; move ISR offset to di add bx,2H mov cx,[ds:bx] ; move ISR segment to es add bx,2H mov es,cx mov dx,SEG packet_str mov ds,dx ASSUME ds:SEG packet_str mov si,OFFSET packet_str add di,SKIP_BYTES ; skip first 3 bytes mov cx,PACKET_STR_SZ ; length of string repe cmpsb jz found cmp bx,SWI_END je exit jmp continue found: mov ax,bx sub ax,4H mov cl,2H shr ax,cl exit: ret pktfind ENDP END