home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / scrpri / printscr.asm next >
Assembly Source File  |  1993-07-09  |  2KB  |  71 lines

  1.  
  2.     ; PRINTSCR.ASM    --- Tony Doimeadios - 12/19/92
  3.     ; this will invoke the alternate print screen on the video card
  4.     ; this enables 43-line displays to correctly print on the printer
  5.     ; (instead of just the top 25 lines) when the PRINT SCREEN key is pressed
  6.     
  7.     DOSSEG
  8.     .MODEL SMALL
  9.     .STACK 100h
  10.     .DATA
  11. Message DB  'PRINTSCR 1.0',13,10
  12.         DB  '(C) 1992 Tony "Sandy" Doimeadios',13,10
  13.         DB  'Tony Doimeadios',13,10
  14.         DB  'Post Office Box 1345',13,10
  15.         DB  'Fernandina Beach, FL  32035-1345',13,10
  16.         DB  13,10
  17.         DB  'Released to the Public Domain',13,10
  18.         DB  13,10
  19.         DB  13,10
  20.         DB  'PrintScr has been installed.',13,10
  21.         DB  'This program will "fix" the PRINTSCREEN key',13,10
  22.         DB  'to print either 25, 43 or 50 lines instead of',13,10
  23.         DB  'the hardcoded 25 lines regardless of video mode.',13,10
  24.         DB  'This is *NOT* a TSR.',13,10,'$'
  25.  
  26.     .CODE
  27.     mov ax, @Data           ;set data segment pointer
  28.     mov ds,ax               ;move it into dx
  29.  
  30.     mov ax,0                ;zero out register
  31.     mov ah,12h              ;function # to select alt print screen
  32.     mov bl,20h              ;ditto
  33.     int 10h                 ;call BIOS to do it
  34.  
  35.     mov bx,OFFSET Message   ;point to string to print
  36.     call PrintString        ;print it
  37.  
  38.     jmp short Done
  39.  
  40.  
  41.  
  42. ;---------------------------------------------------------------------
  43. ; Subroutine to print a string on the display.
  44. ;
  45. ; Input:
  46. ;       DS:BX = pointer to string to print
  47. ;
  48. ; Output: None
  49. ;
  50. ; Registers destroyed: None
  51. ;
  52. PrintString     PROC
  53.         push    ax
  54.         push    dx                         ;preserve registers in this sub
  55.         mov     ah,9                       ;DOS print string function #
  56.         mov     dx,bx                      ;point DS:DX to the string to print
  57.         int     21h                        ;invoke DOS to print the string
  58.         pop     dx                         ;restore registers we changed
  59.         pop     ax
  60.         ret
  61. PrintString     ENDP
  62. ;---------------------------------------------------------------------
  63.  
  64.  
  65. Done:    
  66.     mov ax,0                ;terminate program
  67.     mov ah,4Ch
  68.     int 21h
  69.  
  70.     END
  71.