home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol6n05.zip / THREECOM.ZIP / NOREPEAT.ASM < prev    next >
Assembly Source File  |  1987-02-22  |  768b  |  45 lines

  1. ; NOREPEAT.ASM - disables typematic key repetitions
  2. ; PC Magazine Vol 6 No 5 March 10, 1987 User-to-User
  3.  
  4. cseg    segment
  5.     assume    cs:cseg
  6.     org    100h
  7. start:    jmp short initialize
  8. oldint9        dd ?
  9. last_key    db 0FFh
  10. newint9 proc    far
  11.     sti
  12.     push    ax
  13.     in    al,60h
  14.     cmp    al,cs:last_key
  15.     je    ignore
  16.     mov    cs:last_key,al
  17.     pop    ax
  18.     jmp    cs:[oldint9]
  19. ignore:    in    al,61h
  20.     mov    ah,al
  21.     or    al,80h
  22.     out    61h,al
  23.     xchg    al,ah
  24.     out    61h,al
  25.     mov    al,20h
  26.     out    20h,al
  27.     pop    ax
  28.     iret
  29. newint9 endp
  30.  
  31.     assume    ds:cseg
  32. initialize:
  33.     mov    ax,3509h
  34.     int    21h
  35.     mov    word ptr [oldint9],bx
  36.     mov    word ptr [oldint9+2],es
  37.     mov    dx,offset newint9
  38.     mov    ax,2509h
  39.     int    21h
  40.     mov    dx,offset initialize
  41.     int    27h
  42. cseg    ends
  43.     end    start
  44.  
  45.