home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol6n05.zip / THREECOM.ZIP / FFEED.ASM < prev    next >
Assembly Source File  |  1987-02-22  |  1KB  |  53 lines

  1. ; FFEED.ASM - resident printer support utility adds a form feed
  2. ; to the end of a print screen if right shift key was used.  If
  3. ; left shift was used, no form feed is sent.  Also checks printer
  4. ; status before beginning print screen and aborts if not ready.
  5. ; PC Magazine Vol 6 No 5 Mar 10, 1987 User-to-User
  6.  
  7. cseg        segment
  8.         assume    cs:cseg
  9.         org    100h
  10.  
  11. start:        jmp short initialize
  12.  
  13. oldint5        dd    ?
  14.  
  15. newint5        proc    far
  16.         sti
  17.         push ax
  18.         push dx
  19.         mov ah,02
  20.         mov dx,0
  21.         int 17h
  22.         test ah,80h
  23.         jz ret
  24.         mov ah,02h
  25.         int 16h
  26.         and al,01h
  27.         mov dl,al
  28.         pushf
  29.         call cs:oldint5
  30.         cmp dl,0
  31.         je ret
  32.         mov ax,000Ch
  33.         xor dx,dx
  34.         int 17h
  35. ret:        pop dx
  36.         pop ax
  37.         iret
  38. newint5        endp
  39.  
  40.         assume    ds:cseg
  41. initialize:    mov ax,3505h
  42.         int 21h
  43.         mov word ptr [oldint5], bx
  44.         mov word ptr [oldint5+2],es
  45.         mov dx,offset newint5
  46.         mov ax,2505h
  47.         int 21h
  48.         mov dx,offset initialize
  49.         int 27h
  50. cseg    ends
  51.     end    start
  52.  
  53.