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

  1. ;
  2. comment !
  3.    Overlay interrupt vector for COM2 with 02E8
  4.    to address any firmware addressable 232 or 422 card as COM4
  5.  (C)  Copywrite,1986 -    SoftWeir and Associates, Don Weir
  6.  
  7. endc    !
  8. com4    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 E8 to offset 02
  28. ;
  29.     mov    byte ptr es:[02],0E8h
  30. ;
  31. ;move 02 to offset 03
  32. ;
  33.     mov    byte ptr es:[03],02h
  34. ;
  35. ;turn off com2
  36. ;
  37.     sub    al,al
  38.     mov    dx,02f9h
  39.     out    dx,al
  40.     mov    dx,02fch
  41.     out    dx,al
  42. ;
  43. ;turn on com4
  44. ;
  45.     mov    al,0bh
  46.     mov    dx,02e9h
  47.     out    dx,al
  48.     mov    dx,02ech
  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.