home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / sysutl / ctlenabl.arc / CTLENABL.ASM next >
Assembly Source File  |  1987-03-25  |  1KB  |  74 lines

  1.     page    60,75
  2.     title    'Program to enable cntl-U and cntl-W for DOS 3.x'
  3. ;
  4. ;================================================================
  5. ; Copyright (c) 1987 Bill Davidsen
  6. ;
  7. ; This program may be freely used and distributed, providing it is
  8. ; not included in any commercial package, and this notice remains
  9. ; intact.
  10. ;================================================================
  11. ;
  12. BEL    equ    7        ; ASCII bell
  13.  
  14. xxx    segment    byte public 'text'
  15.     assume    cs:xxx
  16.  
  17.     org    0100h
  18. entry    proc    near
  19. ;
  20. ; Set DS on DOS
  21.     mov    ax,40h
  22.     mov    ds,ax
  23. ;
  24. ; find the compare statement
  25.     mov    ax,173cH    ; CMP AL,17H
  26.     mov    si,0        ; search location
  27.     mov    cx,30000    ; Count for search length
  28. Part1:
  29.     cmp    ax,[si]
  30.     jz    Part2
  31. TryAgain:
  32.     inc    si
  33.     loop    Part1
  34. ;
  35. ; Didn't find it, error message
  36.     push    cs        ; CS -> DS
  37.     pop    ds
  38.     mov    ah,9
  39.     mov    dx,(Offset emsg)
  40.     int    21h
  41. AllDone:
  42.     ret
  43.  
  44. ; finish the compare
  45. Part2:
  46.     mov    bx,[si+2]    ; S.B. nops
  47.     cmp    bx,9090H
  48.     jnz    TryAgain
  49.  
  50. ; Set the jumps in place
  51.     mov    ax,5e74H
  52.     mov    [si+2],ax
  53.     mov    ax,5574h
  54.     mov    [si+6],ax
  55.  
  56. ; Reassure the user that it worked
  57.     push    cs        ; CS -> DS
  58.     pop    ds
  59.     mov    ah,9
  60.     mov    dx,(Offset okmsg)
  61.     int    21h
  62.  
  63.     jmp    short AllDone
  64.  
  65. ; Error message
  66. emsg    db    'Can''t enable Cntl-U',BEL,15Q,12Q,'$'
  67. okmsg    db    'Cntl-U and Cntl-W enabled.',15Q,12Q,'$'
  68.  
  69. entry    endp
  70. xxx    ends
  71.  
  72.     end    entry
  73.  
  74.