I found a subroutine for BLOADing and BSAVEing the video screen in
QuickBASIC. What I need to know is the values of TOTAL!, CYCLE, and DEF SEG
to make it work for screen mode 12 (it came programmed for screen mode 9),
and if any of the OUT commands need to be changed.
SUB SCREENIO (Filnam$, MODE, RW)
total! = 24000 'space to reserve
cycle = 3 'allows for four bit plane
DEF SEG = &HA000 'Set segment for EGA/VGA graphics.
FOR i = 0 TO cycle 'cycle through each bit plane of
EGA/VGA.
IF RW = 1 THEN 'BLOAD files.
OUT &H3C4, 2 'To index the map register.
'Load each file into its corresponding bit plane.
f$ = Filnam$ + CHR$(i + 48) + ".GRA"
BLOAD f$, 0 '0 is the offset to page 0.
ELSE 'BSAVE files.
OUT &H3CE, 4 'Select Read Map Select Register.
'Save each bit plane in its own file.
f$ = Filnam$ + CHR$(i + 48) + ".GRA"
BSAVE f$, 0, total! 'SAve the visual page, at offset 0.
END IF
NEXT i
DEF SEG 'restores segment.
END SUB