25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Home   Projects   Up   Sitemap   Search   Blog   Forum+Chat   About Us   Privacy   Terms of Use   Feedback   FAQ   Images   Services   Ads   Donate   Humor

DISPIC.BAS

If you enable the .PIC save features of AUTORAND and SHOWIFS, you'll wind up with
various .PIC files on disk. These files are binary-saved images of your video memory,
which can be quickly read and loaded directly back into video memory to display the images.
The DISPIC program allows you to select one image from your library and display it.
Before attempting to use this program, you should have studied AUTORAND (and modified it)
so that you understand the Microsoft Basic BSAVE and BLOAD commands.

10 'DISPIC.BAS 2/5/91 
11 'COPYRIGHT (C)1991 STEVEN WHITNEY.
12 'Published under GNU GPL (General Public License) Version 2, with ABSOLUTELY NO WARRANTY.
20 'RETRIEVES & DISPLAYS IFS PICTURE (.PIC) FILES
30 'THAT WERE SAVED WITH BSAVE BY SHOWIFS.BAS OR AUTORAND.BAS
40 '2-5-91 ORIGINAL CREATION
50 'REMEMBER TO ADD CAPABILITY FOR INPUT OF FILE NAMES FROM A "BATCH" FILE.
60 'IN ADDITION TO SIMPLIFYING DISPLAY OF MULTIPLE FILES, IT COULD BE USED
70 'TO DISPLAY SUBSEQUENT VERSIONS OF THE SAME FILE, FOR ANIMATION.
80 'GREEN VIDEO PLANE FOR H100/Z100.  BLUE=&HC000, RED=&HD000
90 DEF SEG=&HE000
100 LOCATE 25,1
110 INPUT "INPUT FILE (OMIT .PIC)";INFILE$
120 LOCATE 25,1
130 PRINT "DURING IMAGE DISPLAY, PRESS ANY KEY TO CONTINUE.  PRESS ANY KEY...";
140 PAUSE$=INPUT$(1)
150 CLS
160 'DEF SEG STATEMENT MUST APPEAR BEFORE BLOAD.  IF BLOAD IS GIVEN ONLY THE
170 'FILE NAME, THEN BLOAD USES THE SAME OFFSET AND NUMBER OF BYTES AS WERE
180 'ORIGINALLY USED BY BSAVE WHEN IT SAVED THE IMAGE.  FOR USE ON A SINGLE
190 'COMPUTER, THIS IS FINE, SINCE YOU'LL WANT TO LOAD THE IMAGE RIGHT BACK
200 'INTO WHERE IT CAME FROM.  HOWEVER, .PIC FILES MAY NOT BE TRANSPORTABLE
210 'BETWEEN COMPUTERS.  FOR YOUR COMPUTER, JUST MAKE SURE THAT THE DEF SEG
220 'STATEMENT ABOVE POINTS AT THE CORRECT MEMORY ADDRESS FOR YOUR
230 'VIDEO GREEN PLANE.  THEN THE SIMPLE BLOAD STATEMENT BELOW WILL WORK FINE.
240 BLOAD INFILE$+".PIC"
250 PAUSE$=INPUT$(1)
260 IF PAUSE$="E" THEN CLS:END
270 GOTO 100

 

AUDISPIC.BAS

The AUTORAND program numbers its .PIC files consecutively. After a long program run,
you can run AUDISPIC (AU is for "automatic") to display each of the .PIC images in order,
automatically.

10 'AUDISPIC.BAS 2-7-91 
11 'COPYRIGHT (C)1991 STEVEN WHITNEY
12 'Published under GNU GPL (General Public License) Version 2, with ABSOLUTELY NO WARRANTY.
20 'DISPLAYS CONSECUTIVELY NUMBERED .PIC FILES
30 'THAT WERE SAVED BY AUTORAND.BAS
40 '2-7-91 MODIFIED FROM DISPIC.BAS
50 CLS
60 'The strange file save options discussed in the following print statements
70 'are because I usually ran the program, and saved the temporary files,
80 'on a ramdisk.  Then I used this program's features to decide which IFS
90 'are interesting enough to save more permanently, and to save them.
100 'There's no automatic ability to save .PIC files elsewhere, because
110 '.PIC files were too big to make complete archived libraries of.
120 'If an image is interesting, it's better to print it out and file in a binder.
130 PRINT "This program automatically displays consecutively numbered .PIC files"
140 PRINT "that were saved by the AUTORAND.BAS program."
150 PRINT
160 PRINT "During image display, PRESS <SPACE BAR> TO DISPLAY NEXT IMAGE."
170 PRINT "During image display, PRESS 'S' to copy the matching .IFS file"
180 PRINT "     into a more permanent file with a more descriptive name."
190 PRINT
200 PRINT "(Drive designator below is for input files only.  When (S)aving"
210 PRINT "an IFS, you can specify a different drive designator in the name.)"
220 PRINT
230 PRINT "NOTE ==> <S> MEANS SAVE THE .IFS (DATA) FILE ONLY!"
240 PRINT "          IF DESIRED, YOU MUST SAVE THE .PIC FILE MANUALLY"
250 PRINT
260 PRINT "Drive containing .PIC files (OMIT colon): ";
270 INDRIVE$=INPUT$(1):PRINT INDRIVE$
280 PRINT
290 'BELOW IS THE GREEN VIDEO PLANE FOR H100/Z100.  BLUE=&HC000, RED=&HD000
300 'SEE COMMENTS IN DISPIC.BAS FOR FURTHER DISCUSSION.
310 'AS LONG AS DEF SEG POINTS AT THE CORRECT MEMORY SEGMENT, THEN THE
320 'SIMPLE FORM OF THE BLOAD STATEMENT USED BELOW WILL WORK CORRECTLY.
330 DEF SEG=&HE000
340 PICCOUNT=0
350 PICCOUNT=PICCOUNT+1
360 PICC$=STR$(PICCOUNT)+".PIC"
370 PICC$=INDRIVE$+":"+RIGHT$(PICC$,LEN(PICC$)-1)
380 CLS
390 BLOAD PICC$
400 LOCATE 25,1
410 PRINT PICC$
420 LOCATE 5,1
430 PAUSE$=INPUT$(1)
440 IF PAUSE$<>"S" AND PAUSE$<>"s" THEN 510
450 INPUT "OUTPUT FILE NAME (OMIT .IFS)";OUTFILE$
460 INFILE$=STR$(PICCOUNT)+".IFS"
470 INFILE$=INDRIVE$+":"+RIGHT$(INFILE$,LEN(INFILE$)-1)
480 OPEN "I",1,INFILE$  : OPEN "O",2,OUTFILE$+".IFS"
490 WHILE NOT EOF(1) : LINE INPUT #1,TEMP$ : PRINT #2,TEMP$ : WEND
500 CLOSE
510 GOTO 350

 

 

Valid HTML 4.01 Transitional Valid CSS
View content labeling at ICRA.
Copyright ©2007 Steven Whitney. Last modified 09/25/2007.