home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_01 / 1n01040a < prev    next >
Text File  |  1990-05-17  |  1KB  |  45 lines

  1.         PAGE ,132
  2.  
  3. ;  Figure 3
  4. ;
  5. ;  Access the BIOS screen printing functions
  6.  
  7.  
  8. %       .MODEL  memodel,lang            ;Add model and language support via
  9.                                         ;command line macros, e.g.
  10.                                         ;MASM /Dmemodel=LARGE /Dlang=C
  11.  
  12.         .CODE
  13.  
  14. ;
  15. ;  Function to return the status of of PrintScreen operations
  16. ;
  17.  
  18. PrScrStat       PROC    USES ES
  19.         mov     AX,50h                  ;Byte at 0050:0000 has status
  20.         mov     ES,AX                   ;0 = OK
  21.         mov     AL,ES:0                 ;1 = Screen printing in process
  22.         xor     AH,AH                   ;2 = Error occured
  23.         ret
  24.  
  25. PrScrStat       ENDP
  26.  
  27. ;
  28. ;  Function to dump the current screen to the printer
  29. ;
  30.  
  31. PrScr   PROC
  32.         call    PrScrStat               ;Are we dumping a screen right now?
  33.         cmp     AL,1
  34.         jne     prscr1                  ;No, continue
  35.         mov     AX,-1                   ;Yes, abort with an error code
  36.         ret
  37. prscr1:
  38.         int     5                       ;Call Int 05h to print the screen
  39.         xor     AX,AX                   ;Return zero for success
  40.         ret
  41.  
  42. PrScr   ENDP
  43.  
  44.         end
  45.