BLOAD/BSAVE Screen 12 
Author Message
 BLOAD/BSAVE Screen 12

'powerbasic Routines to Save/Load from disk are simple and left to the
'user to write.

screen 12'......................................make a screen of Graphics
color 12,0:CLS
for y=1 to 500:print "Test!";:next y

x1=320:y1=240:x2=320:y2=240
for i=1 to 30
line (x1,y1)-(x2,y2),14,b
x1=x1-5:y1=y1-5:x2=x2+5:y2=y2+5
next i

savescreen12 a$, b$, c$, d$, e$ '...............save it to 5 strings

' pause and wait for input.  Clear the screen and wait for input again
LOCATE 1,1:PRINT "PRESS A KEY <<<<<<<<<<<<<<<<<<<<<<"
DO:LOOP UNTIL INKEY$<>""
color 7,0:cls
PRINT "PRESS A KEY TO RESTORE THE SCREEN"
DO:LOOP UNTIL INKEY$<>""

' ..............................................restore the screen
restorescreen12 a$, b$, c$, d$, e$

'=============================[subs]===========================

' Savescreen 12 requires 4 color planes plus an extra string for "overflow"
' because each color plane exceeds 32K
SUB SaveScreen12(R$, G$, B$, I$, O$)
  DEF SEG = &HA000
  OUT &H3CE, 4: OUT &H3CF, 0:B$=PEEK$(0,32000):O$=PEEK$(32000,8000)
  OUT &H3CE, 4: OUT &H3CF, 1:G$=PEEK$(0,32000):O$=O$+PEEK$(32000,8000)
  OUT &H3CE, 4: OUT &H3CF, 2:R$=PEEK$(0,32000):O$=O$+PEEK$(32000,8000)
  OUT &H3CE, 4: OUT &H3CF, 3:I$=PEEK$(0,32000):O$=O$+PEEK$(32000,8000)
  OUT &H3CE, 4: OUT &H3CF, 0:
  DEF SEG
END SUB

'Restorescreen 12 requires 4 color planes plus an extra string for "overflow"
'because each color plane exceeds 32K
SUB RestoreScreen12(R$, G$, B$, I$, O$)
  DEF SEG = &HA000
  OUT &H3C4, 2: OUT &H3C5, 1: POKE$ 0,B$:POKE$ 32000,LEFT$(O$,8000)
  OUT &H3C4, 2: OUT &H3C5, 2: POKE$ 0,G$:POKE$ 32000,MID$(O$,8001,8000)
  OUT &H3C4, 2: OUT &H3C5, 4: POKE$ 0,R$:POKE$ 32000,MID$(O$,16001,8000)
  OUT &H3C4, 2: OUT &H3C5, 8: POKE$ 0,I$:POKE$ 32000,RIGHT$(O$,8000)
  OUT &H3C4, 2: OUT &H3C5, &HF: DEF SEG
END SUB
---
 t QMPro 1.53 t ... I'm spending a year dead for tax purposes.



Mon, 15 Dec 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Bload and bsave in screen 12

2. How to Bsave Screen 12 picture

3. GETTING Screen 12 and saving using BSAVE

4. faster PSET for SCREEN 12 / memory layout of SCREEN 12

5. BSAVE/BLOAD - (Screen 9)

6. save/load SCREEN 12 screens in QBasic?

7. bsave/bload help!

8. BLOAD BSAVE

9. BSAVE/BLOAD

10. Question: BLOAD and BSAVE

11. BSAVE and BLOAD - compilable??

12. VGA/EGA BLOAD/BSAVE?

 

 
Powered by phpBB® Forum Software