Vesa BIOS Example. Page 1: Detect VESA BIOS

VESA BIOS Example

Page 1: Detect VESA BIOS


For this I am going to need some pseudo-assembler for calling interrupts. It should be fairly self explanitary to anyone familiar with interrupts.

1: set up the data buffer

First thing to do is call function 00h, and let it fill up the data buffer.
   AX = 4F00h				;function 00h return SVGA information
   ES = SegmentOf (DataBuffer)		;
   DI = OffsetOf (DataBuffer)		;es:[di] points to DataBuffer

   call interrupt 10h

2: check it was sucessful

Now we have to make sure the function call was sucessful by checking the values of AH and AL.

   if AL = 4Fh then
      print "Function call 00h supported"
      if AH = 4Fh then
         print "Function call 00h sucessful"
      else
         print "Function call 00h failed"
         exit to DOS
      end if 
	
      continue onto section 3

   else
      print "Function call 00h unsupported"
      exit to DOS
   end if 

3: interpret the data

Right assuming all that was sucessful, our DataBuffer will now be full of useful information:
    if DataBuffer.Signature = "VESA" then
	print "VESA BIOS found. Version ", DataBuffer.VersionH, ".", DataBuffer.VersionL
	
	continue to next page
    else
	print "VESA BIOS not found"
	exit to DOS
    end if