;       SCCSID = @(#)modesw.inc	6.1 90/11/17
;      SCCSID = @(#)modesw.inc	13.2 89/03/04
; Used During Initialization of the Advanced System Services

SysServ_DevID		 equ 09H   ; Device ID for System Services
SysServ_RelID		 equ 00H   ; Relative LID that is being requested
SysServ_State		 equ 00H   ; Reserved
SysServ_Entry		 equ 00H   ; ABIOS start entry point
SysServ_LIDParms	 equ 01H   ; Get LID parameters request
Get_LID_length		 equ 71H   ; Length of request block (fixed size)


SysServ_Init_RB STRUC		 ; structure for Request Block to get RB size

  SysServ_Init_RBLength	   dw ?  ; Request Block Length
  SysServ_Init_LogicalID   dw ?  ; Logical ID
  SysServ_Init_Unit	   dw ?  ; Unit
  SysServ_Init_Function	   dw ?  ; Desired Function
  SysServ_Init_RBFlags	   dw ?  ; Request Block Flags
			   dw ?  ; not used
  SysServ_Init_ReturnCode  dw ?  ; Return Code from function
  SysServ_Init_Timeout	   dw ?  ; Not used for Initialization
			   db 8 dup(?) ; Not used, return information
  SysServ_Init_Length	   dw ?  ; Length of System Services Request Block

SysServ_Init_RB ENDS		 ; End Structure for Request Block


; Return conditions

GOOD		  equ 0		 ; Return Code is good
Present		  equ 1		 ; ABIOS is present


SysServ_MsMg_RB STRUC		 ; struct for Mode Switch Manager Reqest Blk

  SysServ_MsMg_RBLength	   dw ?  ; Request Block Length
  SysServ_MsMg_LogicalID   dw ?  ; Logical ID
  SysServ_MsMg_Unit	   dw ?  ; Unit
  SysServ_MsMg_Function	   dw ?  ; Desired Function
  SysServ_MsMg_RBFlags	   dw ?  ; Reserved
  SysServ_MsMg_ELAoffset   dw ?  ; Reserved
  SysServ_MsMg_ReturnCode  dw ?  ; Return Code from function
  SysServ_MsMg_Timeout	   dw ?  ; Not used for Mode Switch Manager
  SysServ_MsMg_Dummy	   dq ?  ; Start of GDT
  SysServ_MsMg_GDT	   dq ?  ; GDT Descriptor
  SysServ_MsMg_IDT	   dq ?  ; IDT Descriptor
  SysServ_MsMg_SS	   dq ?  ; SS Segment Descriptor
  SysServ_MsMg_CS	   dq ?  ; CS Segment Descriptor
  SysServ_MsMg_DS	   dq ?  ; DS Segment Descriptor
  SysServ_MsMg_ES	   dq ?  ; ES Segment Descriptor
  SysServ_MsMg_FS	   dq ?  ; FS Segment Descriptor
  SysServ_MsMg_GS	   dq ?  ; GS Segment Descriptor
  SysServ_MsMg_Temp	   dq ?  ; Temp Descriptor
  SysServ_MsMg_ResumeOff   dw ?  ; Shut down resume offset
  SysServ_MsMg_ResumeSeg   dw ?  ; Shut down resume segment
  SysServ_MsMg_Selector	   dw ?  ; Selector for ABIOS to Switch to Real

SysServ_MsMg_RB ENDS		 ; End Structure for Mode Switch Manager

; Initialize flags record for mode switch and NMI managers

Initialize_Flags_Rec  RECORD Mode_Man_Present:1,NMI_Initialized:1

; Function Codes For Advanced BIOS

GoToReal_Function	   equ	0Bh   ; Switch to real mode
GoToProt_Function	   equ	0Ch   ; Switch to protect mode

EnableA20_Function	   equ	0Dh   ; Enable the A20 Address line
DisableA20_Function	   equ	0Eh   ; Disable the A20 Address line
