;	[]===========================================================[]
;
;	NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R)
;	        INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE 	
;	        DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED	
;	        WRITTEN AUTHORIZATION FROM THE OWNER.
;
; 	[]===========================================================[]
;

;----------------------------------------------------------------------------
;Rev	Date	 Name	Description
;----------------------------------------------------------------------------
;R03	02/17/98 RCH	Reserved 22 characters space for Zida specific usage
;R02	07/29/97 KVN	Fix QNX floppy boot hang if INT06_VECT locate address
;			0F000:8000-0F000:8004.So we remove INT06_VECT to 0F000:8
;R01	01/09/97 KVN	Cancel "No_Support_HiScan" parameter define for auto
;			support EMM386.EXE 'HIGHSCAN'
;Init	01/11/96 ATT	BIOS _16_ service dispacth file.  Currently only use
;			for Intel _16_ SMBA services.
;----------------------------------------------------------------------------
.XLIST
		INCLUDE BIOS.CFG
		INCLUDE COMMON.EQU
		INCLUDE CMOS.EQU
		INCLUDE COMMON.MAC
.LIST
;----------------------------------------------------------------------------
.386
FCODE	SEGMENT USE16 PARA PUBLIC 'CODE'
	ASSUME	CS:FCODE

		db	8 dup(90h)		;R02
;R01 start
		public	INT06_VECT
INT06_VECT:
		extrn	LOADALL:near
		jmp	LOADALL
;R01 end

;R03 - start
ifdef	ZIDA_SPECIFIC_STRING
		align	16
		db	'_ZIDA_'
		db	'1234567890123456'
endif;	ZIDA_SPECIFIC_STRING
;R03 - end

	ALIGN	16
ifdef SMBA_Support
	Public	Bios_16_Signature
Bios_16_Signature:
	db	'_16_'                          ;four bytes signature
	dw	offset BIOS_16_Directory	;32 bit function physical address
	dw	000Fh
	db	0				;revision level
	db	01h				;data structure length, in terms of PARA
	db	?				;will use modbin to fill in
	db	5 dup (0)			;5 bytes reserved (must be 0)

	Public	BIOS_16_Directory
BIOS_16_Directory:
;Compare EAX for type of service call and return address or error codes
;as PCI specs.
;Check for SMBA _16_ service call. 
	extrn	SMBA_Service:near		;SMBA _16_ functions in SMBA.ASM		
	extrn	SMBA_Service_end:near
	pushf
ifdef	SMBA_Support
	cmp	eax, "_FS_"			;is it _SF_ SMBA service
	jne	short Invalid_16_Id
	or	bl, bl
	jnz	short Invalid_Function
	mov	ebx, 0f0000h
	mov	edx, offset SMBA_Service
	mov	ecx, offset SMBA_Service_end
	sub	ecx, edx
	xor	al, al
	jmp	short @f
Invalid_16_Id:
	mov	al, 80h	
	jmp	short @f
Invalid_Function:
	mov	al, 81h	
@@:
endif; SMBA_Support
	popf
	retf
endif; SMBA_Suppport
FCODE		ENDS
		END

