home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / PRT_SCRN.ZIP / PRT_SCRN.DOC < prev    next >
Encoding:
Text File  |  1988-09-14  |  1.8 KB  |  53 lines

  1.  
  2. Here is an example of using the Clipper CALL command with an
  3. routine written in assembly language. the CALLed routine issues
  4. DOS Interrupt 5 which sends the contents of the current screen to
  5. your printer (same as pressing the SHIFT PrtSc keys). Use your
  6. favorite assembler to create the .OBJ file and then link with the
  7. second set of code for your Clipper .EXE file.
  8.  
  9. Address all questions on this program to the author care of NAN002.
  10.  
  11. *****************************************************************
  12.  
  13. ;Program.....PRT_SCRN.ASM
  14. ;Author......Ray Love
  15. ;Date........12/15/85
  16. ;Comments....Routine to call DOS Interrupt 5 (Print Screen)
  17.  
  18.           PUBLIC     prt_scrn     ;name routine to CALL
  19. _PROG     SEGMENT    byte         ;begin program segment
  20. ASSUME    CS:_PROG                ;and put code there
  21. ;
  22. prt_scrn  PROC       far          ;far process
  23.           push       BP           ;save registers
  24.           push       DS
  25.           push       ES
  26.           int        5            ;print screen
  27.           pop        ES           ;restore registers
  28.           pop        DS
  29.           pop        BP
  30.           ret                     ;return
  31. prt_scrn  endp                    ;end routine
  32. _PROG     ends                    ;end segment
  33.           end                     ;end program
  34. *****************************************************************
  35. * Program.: PRT_TEST.PRG
  36. * Author..: Ray Love
  37. * Date....: 12/15/85
  38. * Notes...: Test to CALL prt_scrn assembly language routine.
  39. *****************************************************************
  40.  
  41. CLEAR
  42. *paint the screen before CALL
  43. FOR X = 1 TO 23
  44.    ? REPLICATE("X X X X ",9)
  45. NEXT
  46. CALL PRT_SCRN
  47. RETURN
  48. * EOF Prt_test
  49.  SPACE(3)
  50.    ?? field_name
  51.    ?? SPACE(5)
  52.    ?? TYPENAME()
  53.    ?? SPACE(5)