


	; call savegfx
	; set up 80 x 25 text,
	mov ax,03h
	int 10h
start:
	; es:di points to VbeSignature
	mov bx,seg VbeSignature
	mov es,bx		; es
	lea bx,VbeSignature
	mov di,bx		; di
	
	; VBE function 00 
	mov ax,4f00h	
	int 10h
	
	; echo 4 chars of VbeSignature
	mov cx,4	
	lea bx,VbeSignature
	mov ah,2h

redo:	mov dl,[bx]
	add bx,1
	int 21h
	loop redo

	; echo BCD VbeVersion
	add bx,1	;jump to major number
	mov dl,[bx]
	add dl,'0'	
	int 21h

	sub bx,1	;jump to minor number
	mov dl,[bx]
	add dl,'0'	
	int 21h

	; call restoregfx
	call exitter

exitter:
	mov ax,4c00h
	int 21h
	ret	; pointless

restoregfx:
	mov al,byte startgfx
	mov ah,0
	int 10h
	ret

savegfx:	; get current video mode so can restore it,
	mov ah,0fh
	int 10h
	mov byte startgfx,al
	ret

startgfx	db	4 dup 0 ; keep aligned
VbeSignature	db	'VBE2' 	; set by app, reset to VESA by VBE
VbeVersion	dw	0300h ;
OemStringPtr	dd	?
Capabilities	dd	4 dup(?)
VideoModePtr	dd	?
further		db	512 dup 0
