'=========================================================================== ' Subject: VIDEO MEMORY SEGMENT Date: 05-18-92 (21:02:00) ' Author: Matt Hart Code: QB, QBasic ' Keys: VIDEO,MEMORY,SEGMENT Packet: GRAPHICS.ABC '=========================================================================== ' JG> Is there a way that I can determine wether to use &HB000 or ' JG> &HB800 when doing stuff with the screen? 'A word (2 bytes) at 0000:0463h tells the port address of the CRT 'controller index register. It will be 03B4h for monochrome and 03D4h 'for color, MSB last. DEF SEG = 0 MonType$ = HEX$(PEEK(&H0464))+HEX$(PEEK(&H0463)) DEF SEG SELECT CASE MonType$ CASE "3D4" ' Color StartSeg = &HB800 NumBytes = 80*25*2 CASE "3B4" ' Monochrome StartSeg = &HB000 NumBytes = 80*25*2 END SELECT ' JG> And also, how do I save ' JG> and load screens with BSAVE and BLOAD? 'For any screen, you save the number of bytes of the screen beginning at 'the segment and offset of the screen. For text screens, this is: DEF SEG = StartSeg BSAVE "SCR.BIN",0,NumBytes DEF SEG 'Bload is the same: DEF SEG = StartSeg BLOAD "SCR.BIN",0 DEF SEG