home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / MOUSE / COM3_4.ZIP / PORTS-4.ZIP / C1.ASM next >
Encoding:
Assembly Source File  |  1986-04-29  |  1001 b   |  65 lines

  1. ;
  2. comment !
  3.  Overlay interrupt vector for COM1 with 03F8
  4.   to reset address as COM1 for normal async.
  5.  (C)  Copywrite,1986 -    SoftWeir and Associates, Don Weir
  6.  
  7. endc    !
  8. com1    group    code,data,stack
  9. data    segment para
  10. data    ends
  11. ;
  12. stack    segment para
  13. stack    ends
  14. ;
  15. code    segment para
  16.     assume    cs:code,ds:data,ss:stack
  17. ;
  18.     pop    bp    ;return segment addr
  19.     pop    cx    ;return segment offset
  20. ;
  21. ;point the interrupt vector to segment 40
  22.     push    es
  23.     mov    ah,00h
  24.     mov    al,40h
  25.     mov    es,ax
  26. ;
  27. ;move F8 to offset 02
  28. ;
  29.     mov    byte ptr es:[02],0F8h
  30. ;
  31. ;move 03 to offset 03
  32. ;
  33.     mov    byte ptr es:[03],03h
  34. ;
  35. ;turn off com3
  36. ;
  37.     sub    al,al
  38.     mov    dx,03e9h
  39.     out    dx,al
  40.     mov    dx,03ech
  41.     out    dx,al
  42. ;
  43. ;turn on com1
  44. ;
  45.     mov    al,0bh
  46.     mov    dx,03f9h
  47.     out    dx,al
  48.     mov    dx,03fch
  49.     out    dx,al
  50. ;
  51. ;pop modified vector off stack
  52. ;
  53.     pop    es
  54.     push    cx    ;restore return offset
  55.     push    bp    ;restore return segment
  56.  
  57. ;
  58. return    proc    far
  59.     ret          ;return to caller
  60. return    endp
  61. code    ends
  62.     end
  63.     end    install_proc
  64.  
  65.