home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / 1COM03.ZIP / COMINIT.ASM < prev    next >
Assembly Source File  |  1987-12-13  |  877b  |  52 lines

  1.  
  2. ; COMINIT.ASM - Device driver to Iinit low memory for COM3 serial interface
  3. ;
  4. ; CAVEAT EMPTOR - this driver is trash!  Do not use it as an example of
  5. ;    how to write OS/2 device drivers - it is strictly a hack to solve
  6. ;    a very simple problem as is documented in the accompanying text.
  7.  
  8.       .286c   
  9.  
  10. data segment word public 'data'
  11.  
  12. header          equ  $
  13. ptr_to_nxt_hdr      dw   0ffffh
  14.           dw   -1
  15. device_attr      dw   88h
  16. offst          dw   dcode:strat
  17. reserved      dw   -1
  18. named          db   'com_init'
  19. reserved_words      dw   4 dup (0)
  20.  
  21. data ENDS
  22.  
  23.  
  24. dcode      segment  word public 'code'
  25.       assume cs:dcode,ds:data
  26.  
  27. strat    proc far 
  28.  
  29.     push ax
  30.     push es
  31.     push di
  32.  
  33.     cld
  34.     mov  ax, 40h
  35.     mov  es, ax
  36.     mov  di, 2
  37.  
  38.     mov  ax, 1f8h
  39.     stosw
  40.  
  41.     pop  di
  42.     pop  es
  43.     pop  ax
  44.  
  45.     mov      word ptr es:[bx]+14,0
  46.     mov      word ptr es:[bx]+16,0
  47.     ret
  48.  
  49. strat    endp
  50. dcode     ends
  51.     end
  52.