home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / BINMODE.ZIP / BINMODE.ASM next >
Encoding:
Assembly Source File  |  1989-05-05  |  2.7 KB  |  82 lines

  1. page    60,132
  2. ;
  3. ;******************************************************************************
  4. ;       09/02/89
  5. ;******************************************************************************
  6. ;
  7. title   BINMODE.ASM              Clipper printer functions
  8. ; Notice:
  9. ;   Released to the public domain
  10. ;   on  5/04/89 11:50 pm
  11. ;   by Accfin Software, Inc
  12. ; Author:
  13. ;   Jud Cole  2/13/89 10:56 am
  14. ; Updates/enhancements/suggestions:
  15. ;   Brad H. Codd CIS 73427,1172
  16. ;
  17. .radix 16d
  18. ;
  19. ;*****************************************************************************
  20. ;
  21. include extenda.inc
  22. ;
  23. CODESEG BINMODE
  24. ;
  25. WORKFUNCS
  26. ;
  27. assume cs:binmode_text,ds:binmode_text,es:binmode_text
  28. ;
  29. .sall
  30. ;
  31. ;*****************************************************************************
  32. ;                               Public functions
  33. ;*****************************************************************************
  34. ;
  35. CLpublic        <binmode>
  36. ;
  37. ;*****************************************************************************
  38. ;               BINMODE          Set printer to binary mode
  39. ;*****************************************************************************
  40. ;
  41. ;       Usage
  42. ;               binmode (outmod)
  43. ;       Parameters
  44. ;               outmod = 0 if normal mode (check for 1A)
  45. ;                        any other if binary mode
  46. ;       Returns
  47. ;               none
  48. ;
  49. ;       Example
  50. ;               OFF = 0
  51. ;               ON = 1
  52. ;               SET PRINT ON
  53. ;               BINMODE(ON)
  54. ;               ?? <binary data>
  55. ;               BINMODE(OFF)
  56. ;               SET PRINT OFF
  57. ;
  58. ;*****************************************************************************
  59.         CLfunc  void    binmode <int outmod>
  60.         CLcode
  61.         mov     ax,4400                         ; IOCTL get status
  62.         mov     bx,4                            ; Printer handle
  63.         int     21                              ; Get it
  64.         cmp     outmod,0                        ; Is it set to normal?
  65.         jne     setbin                          ; No - set to binary
  66.         and     dl,0dfh                         ; Clear binary bit
  67.         jmp     short setmod
  68. setbin:
  69.         or      dl,20                           ; Set binary bit
  70. setmod:
  71.         mov     ax,4401                         ; IOCTL set status
  72.         mov     bx,4                            ; Printer handle
  73.         mov     dh,0                            ; Not allowed to use these
  74.         int     21                              ; Set the mode
  75.         CLret                                   ; Return
  76. ;
  77. ;*****************************************************************************
  78. ;
  79. ;*****************************************************************************
  80. ;
  81.         end
  82.