home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY2 / GRAPH3.ZIP / PBCOPY.BAS < prev    next >
BASIC Source File  |  1990-09-22  |  2KB  |  53 lines

  1. 'Program Name    : PBCopy.bas Screen 9, Background to Foreground copy program
  2. 'Author          : Spectra Publishing - Tech Support  Lloyd L. Smith
  3. 'Date            : 09-23-90
  4. 'Compuserve #    : GO PCVENB, Vendor #12/Spectra,  Tech Support ID 71530,2640
  5. 'Tech Support BBS: 813-625-1721, PC-Board, 8,N,1 USR HST 300 - 14.4, 24hrs
  6. 'Tech Support Fax: 813-625-1698  G2 & G3 compatible
  7. 'Tech Support Voc: 813-625-1172  Voice
  8. 'Notes           : This program runs faster in Power Basic than other basics.
  9.  
  10.  
  11. DIM Array1(5000)
  12.  
  13. SCREEN 9, , 0, 0
  14. Nam$ = "demo"
  15. CALL Mload(Path$,Nam$)
  16.  
  17.  
  18. locate 10,10:print"Press 'G' to start";
  19. locate 11,10:print"Press 'E' to Clear Screen";
  20. locate 13,10:print"Press ESC to exit to DOS";
  21.  
  22.  
  23. NLoop:
  24. k$ = UCASE$(INKEY$): IF k$ = CHR$(27) THEN SYSTEM
  25. IF k$ = "G" THEN GOSUB GetSCreen  'copy demo background screen to foreground
  26. if k$="E" then screen 9,,0,0:cls
  27. GOTO NLoop
  28.  
  29.  
  30. 'This routine copies the background screen to the foreground
  31. GetSCreen:
  32. cls
  33. FOR n = 1 TO 349
  34. SCREEN 9, , 1, 0
  35. GET (1, n)-(639, n), Array1
  36. SCREEN 9, , 0, 0
  37. PUT (1, n), Array1
  38. NEXT n
  39. RETURN
  40.  
  41.  
  42.  
  43. SUB Mload (Path$,Nam$) STATIC
  44. 'Subroutine loads example screen into background screen
  45. DEF SEG = &HA000
  46. OUT &H3C4, 2: OUT &H3C5, 1: BLOAD Path$ + Nam$ + ".BLU", &H8000  'load bit plane 0
  47. OUT &H3C4, 2: OUT &H3C5, 2: BLOAD Path$ + Nam$ + ".GRN", &H8000  'load bit plane 1
  48. OUT &H3C4, 2: OUT &H3C5, 4: BLOAD Path$ + Nam$ + ".RED", &H8000  'load bit plane 2
  49. OUT &H3C4, 2: OUT &H3C5, 8: BLOAD Path$ + Nam$ + ".INT", &H8000  'load bit plane 3
  50. OUT &H3C4, 2: OUT &H3C5, &HF: DEF SEG
  51. END SUB
  52.  
  53.