Video memory holds several screens at once. Function 05h tells the card to show page AL: it sets the CRT controller's start address to that page's offset, stores the page number at 40h:62h and its offset at 40h:4Eh, and moves the hardware cursor to that page's own cursor position. Nothing is copied, so the switch is instant; programs use it to build a screen out of sight and flip to it, or to keep a help screen ready.

ModePagesPage n starts at
00h, 01h (40×25)8B800h:n × 800h
02h, 03h (80×25)8 (4 on a CGA)B800h:n × 1000h
07h1 on an MDA, 8 on an EGA or VGAB000h:n × 1000h
0Dh, 0Eh, 10h8, 4, 2 (with 256K)A000h + page size
04h–06h, 12h, 13h1—

The services that write characters at a position (02h, 03h, 08h, 09h, 0Ah, 13h) take a page in BH and work on any page, shown or not. Teletype (0Eh) and DOS output go to the active page; many BIOSes, DOSBox-X's included, ignore BH for teletype. Writing directly needs the page's address: page 1 of mode 03h starts at B800h:1000h, which is the same place as B900h:0000h. Here page 1 is filled, shown for two seconds, and page 0 comes back unharmed:

Prints "Back on page 0"; on the screen a blue page with "This is page 1" in the middle shows for 2 seconds, then the normal screen returns as it was.
MOV AX, 0B900h ; page 1 of mode 03h: B800h:1000h = B900h:0
MOV ES, AX
XOR DI, DI
MOV AX, 1F20h ; blanks, white on blue
MOV CX, 80 * 25
CLD
REP STOSW ; fill page 1
MOV DI, (12 * 80 + 33) * 2 ; row 12, column 33
MOV SI, OFFSET TXT1
MOV CX, 14 ; its length
MOV AH, 1Fh ; white on blue
NEXT1:
LODSB
STOSW ; character and attribute
LOOP NEXT1
MOV AX, 0501h ; show page 1
INT 10h
MOV CX, 001Eh ; wait 2 s: CX:DX = 1E8480h microseconds
MOV DX, 8480h
MOV AH, 86h ; BIOS: wait
INT 15h
MOV AX, 0500h ; and page 0 again
INT 10h
MOV AH, 09h
MOV DX, OFFSET MSG1
INT 21h
TXT1 DB "This is page 1"
MSG1 DB "Back on page 0", 13, 10, "$"

Pitfalls

Return to page 0 before exiting: DOS and most programs assume it, and DOS output would otherwise go on to the page that happens to be showing. A page nobody wrote to may hold leftovers from an earlier program, so clear it before showing it, as the example does with REP STOSW. A mode set selects page 0 again. In graphics modes the number of pages depends on the card's memory, and the VGA modes 12h and 13h have only one.