IBM called function 12h "alternate select"; in practice it is a grab bag of subfunctions chosen by BL, not by AL as elsewhere. The EGA BIOS brought BL = 10h and 20h, and the VGA added a row of switches. Those return AL = 12h when they are supported.

BLWhat it does
10hreturn EGA information (below)
20hinstall the card's own print-screen routine
30htext scan lines for the next mode set: AL = 0: 200, 1: 350, 2: 400 (VGA)
31hAL = 0: load the default palette at mode sets, 1: keep the current one
32hAL = 0: enable access to the card, 1: disable it
33hAL = 0: grey-scale summing on, 1: off
34hAL = 0: cursor emulation on, 1: off
35hswitch between two displays (PS/2)
36hAL = 0: screen on, 1: screen off (memory stays usable)

Is there an EGA or VGA?

With BL = 10h the BIOS of an EGA or later card returns BH = 0 for a colour display or 1 for a monochrome one, BL = the memory on the card in units of 64K, minus one (3 means 256K or more, and VGAs say 3), CH the feature connector bits and CL the card's configuration switches. A CGA or MDA BIOS does not know the function and leaves BL = 10h, and that is the test. To tell a VGA from an EGA, use INT 10h AH=1Ah, which the EGA lacks.

Prints "colour display, memory code 3": DOSBox-X reports a colour VGA with 256K.
MOV AH, 12h ; alternate select
MOV BL, 10h ; get EGA information
INT 10h
CMP BL, 10h ; unchanged: no EGA or VGA BIOS
JE NONE1
MOV DX, OFFSET COL1 ; BH = 0: colour
OR BH, BH
JZ SHOW1
MOV DX, OFFSET MONO1 ; BH = 1: monochrome
SHOW1:
MOV AH, 09h
INT 21h ; BL survives the DOS call
MOV DL, BL
ADD DL, "0" ; the memory code, 0..3
MOV AH, 02h
INT 21h
MOV DX, OFFSET CRLF1
JMP LAST1
NONE1:
MOV DX, OFFSET NONE2
LAST1:
MOV AH, 09h
INT 21h
COL1 DB "colour display, memory code $"
MONO1 DB "mono display, memory code $"
NONE2 DB "no EGA or VGA", 13, 10, "$"
CRLF1 DB 13, 10, "$"

Pitfalls

BL = 30h only takes effect at the next mode set: for a 43-line screen on a VGA the sequence is BL = 30h with AL = 1 (350 lines), then mode 03h, then INT 10h AH=11h with AL = 12h for the 8×8 font. Turning the screen off with BL = 36h hides drawing until the picture is complete, but turn it on again before exiting, or the user sees nothing at all. The settings stay until changed or until the machine restarts, so restore what you change.