'**************************************************************************** ' ' schnelles Sichern/Restaurieren des VideoRams in PowerBASIC 3.0/3.2 ' ' entwickelt von / developed by : Thomas Gohel ' Fido : Thomas Gohel@2:2410/301.12 ' InterNet: author@pbsound.snafu.de ' Homepage: http://www.snafu.de/~pbsound/ ' '**************************************************************************** $COMPILE EXE "FENSTER.EXE" DIM BILD$(5000) ' fuer maximale Fenster sichern Bildindex% = 1 ' Zeiger auf PUBLIC VideoRam&, BildIndex%, BILD$() PUBLIC Zeile%, Spalte% COLOR 15,4: CLS CALL VideoTyp: PRINT "Videoadresse ist: ";HEX$(VideoRam&);":0" Demo: MTIMER FOR Zeile% = 1 TO 100 Spalte% = 20 COLOR 14, 11 CALL DemoFenster NEXT Zeile% LOCATE 13,15: PRINT "Taste fuer Fenster wieder restaurieren ..."; A$=INPUT$(1) FOR i% = 100 TO 1 STEP -1 CALL BildLoad NEXT i% PRINT PRINT "Zeit wurde ben”tigt: ";MTIMER END SUB DemoFenster public CALL BildSave FOR i% = 1 TO 20 LOCATE i%+3%,10: PRINT STRING$(60,32) NEXT i% LOCATE 4, 12 : PRINT "Fenster: ";Bildindex%-1 END SUB SUB VideoTyp public DEF SEG = &H40 'Segmentadresse des BIOS-Variabelen-Registers IF PEEK(&H63) + PEEK(&H64) * 256 = &H3B4 THEN 'monochromer Adapter angeschl. VideoRam& = &HB000 'Video-RAM bei B000:0000 ELSE 'Color-Adapter angeschlossen VideoRam& = &HB800 'Video-RAM bei B800:0000 END IF END SUB SUB BildLoad public BildIndex% = BildIndex% - 1 DEF SEG = VideoRam& POKE$ &h0,BILD$(Bildindex%) DEF SEG END SUB SUB BildSave public DEF SEG = VideoRam& BILD$(Bildindex%) = PEEK$(&H0, 4000) DEF SEG BildIndex% = BildIndex% + 1 END SUB