home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 02a / pctj486.zip / PRRESET.ASM < prev    next >
Assembly Source File  |  1985-11-03  |  772b  |  30 lines

  1. ; Assembly language program to reset any parallel printer
  2. ;
  3. ; This can be assembed "as is" to make a .COM file, or
  4. ; the instructions can be incorporated into your program.
  5. ;
  6.  
  7. cseg     segment
  8.          assume    cs:cseg,ds:nothing
  9. prreset  proc      far
  10.  
  11.          mov       dx,0040h
  12.          mov       ds,dx
  13.          mov       dx,ds:[0008h]
  14.          add       dx,2      ; port address is now in DX
  15.  
  16.          mov       al,232
  17.          out       dx,al     ; INIT line goes low
  18.  
  19.          mov       cx,32767
  20. delay:   loop      delay     ; wait about 0.1 second
  21.  
  22.          mov       ax,236
  23.          out       dx,al     ; INIT line back to normal
  24.  
  25.          int       20h       ; return to DOS
  26.  
  27. prreset  endp
  28. cseg     ends
  29.          end       prreset
  30.