Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-1


					PAGE	,132
					TITLE	VDISK - Virtual Disk Device Driver, Version 4.00
				
				;VDISK simulates a disk drive, using Random Access Memory as the storage medium.
				
				;(C) Copyright Microsoft Corporation, 1984 - 1988
				;Licensed Material - Program Property of Microsoft Corp.
				
				;Add the following statement to CONFIG.SYS
				;	DEVICE=[d:][path]VDISK.SYS bbb sss ddd [/E:m]
				
				;   where:  bbb is the desired buffer size (in kilobytes)
				;		minimum 1KB, maximum is size of available memory,
				;		default is 64KB.
				
				;		VDISK will leave at least 64KB of available memory,
				;		although subsequent device drivers (other than VDISK)
				;		other programs that make themselves resident, and
				;		COMMAND.COM will result in less than 64KB as shown
				;		by CHKDSK.
				
				;		Must be large enough for 1 boot sector + FAT sectors
				;		+ 1 directory sector + at least 1 data cluster,
				;		or the device driver won't be installed.
				
				;	    sss is the desired sector size (in bytes)
				;		128, 256, or 512, default is 128.
				;		Will be adjusted if number of FAT entries > 0FE0H
				
				;	    ddd is the desired number of directory entries
				;		Minimum 2, maximum 512, default 64.
				;		Will be rounded upward to sector size boundary.
				
				;	    /E may only be used if extended memory above 1 megabyte
				;	    is to be used.  INT 15H functions 87H and 88H are used
				;	    to read and write this extended memory.
				;	    The m parameter in the /E option specifies the maximum
				;	    number of sectors that the VDISK will transfer at a time.
				;	    Optional values are 1,2,3,4,5,6,7 or 8 sectors, the default
				;	    is 8 sectors.
				
				;	    Brackets indicate optional operands.
				
				
				; Samples:
				;	DEVICE=\path\VDISK.SYS 160 512 64
				;	results in a 160KB VDISK, with 512 byte sectors, 64 directory entries
				
				;	DEVICE=VDISK.SYS Buffersize 60 Sectorsize 128 Directory entries 32
				;	(since only numbers are interpreted, you may comment the line with
				;	non-numeric characters)
				;
				;=========================================================================
				; Change List
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-2


				;
				;	AN000	- ver 4.0 specified changes
				;	AN001	- DCR 377 Modify VDISK Extended Memory allocation technique
				;			  The allocation technique have been modified to
				;			  allocate EM from the top down.  To notify other
				;			  users that EM has been used by VDISK, VDISK
				;			  hooks function 88h, INT 15h.
				;
				;	AN002	- PTM3214 EMS VDISK needed to be modified for two errors.
				;	AC002		  The first related to VDISK returning the
				;			  "Insufficient Memory" message when in fact
				;			  there was enough EMS memory to support the
				;			  requested VDISK.
				;			  The second related to an EMS VDISK hanging when
				;			  a program was invoked from an EMS VDISK with a
				;			  non-standard sector size, i.e.; 128 bytes/sector,
				;			  etc.	This error was caused by the incorrect
				;			  calculation of sectors per EMS page.
				;
				;	AN003	- PTM3276 EMS VDISK causes a "Divide Overflow" message.
				;	AC003		  This is caused by a byte divide that should
				;			  be performed as a word divide.
				;
				;	AN004	- PTM3301 EMS VDISK does not properly adjust the buffer
				;			  size when too much EMS memory is requested.
				;			  The code in UPDATE_AVAIL pertaining to EMS
				;			  space allocation has been modified.
				;
				;	AN005	- DCR474  Convert VDISK to support /E for extended memory
				;			  and /X for expanded memory.
				;
				;	AN006	- PTM4729 Enable VDISK for the INT 2F call to determine
				;			  the reserved EMS page for VDISK and FASTOPEN
				;
				;=========================================================================
				
				;Message text for VDISK is in module VDISKMSG.
				.list
					SUBTTL	Structure Definitions
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-3
Structure Definitions                                       

					PAGE
				;-----------------------------------------------------------------------;
				;	Request Header (Common portion) 				;
				;-----------------------------------------------------------------------;
 = DS:[BX]			RH	EQU	DS:[BX] 		;addressability to Request Header structure
				
				RHC	STRUC				;fields common to all request types
 0000  00				DB	?			;length of Request Header (including data)
 0001  00				DB	?			;unit code (subunit)
 0002  00			RHC_CMD DB	?			;command code
 0003  0000			RHC_STA DW	?			;status
 0005  0000000000000000			DQ	?			;reserved for DOS
				;;;;;	DW	?			;reserved for BIOS message flag 	;an006; dms;
 000D				RHC	ENDS				;end of common portion
				
 = 0004				CMD_INPUT EQU	4			;RHC_CMD is INPUT request
				
				;status values for RHC_STA
				
 = 0001				STAT_DONE EQU	01H			;function complete status (high order byte)
 = 8003				STAT_CMDERR EQU 8003H			;invalid command code error
 = 8004				STAT_CRC EQU	8004H			;CRC error
 = 8008				STAT_SNF EQU	8008H			;sector not found error
 = 0200				STAT_BUSY EQU	0200H			;busy bit (9) for Removable Media call
				;-----------------------------------------------------------------------;
				;	Request Header for INIT command 				;
				;-----------------------------------------------------------------------;
				RH0	STRUC
 0000  000D[				DB	(TYPE RHC) DUP (?)	;common portion
	   ??			
			 ]	
				
 000D  00			RH0_NUN DB	?			;number of units
									;set to 1 if installation succeeds,
									;set to 0 to cause installation failure
 000E  0000			RH0_ENDO DW	?			;offset  of ending address
 0010  0000			RH0_ENDS DW	?			;segment of ending address
 0012  0000			RH0_BPBO DW	?			;offset  of BPB array address
 0014  0000			RH0_BPBS DW	?			;segment of BPB array address
 0016  00			RH0_DRIV DB	?			;drive code (DOS 3 only)
 0017  0000			RH0_FLAG DW	0			;initialized to no error		;an000; dms;
 0019				RH0	ENDS
				
 = 0012				RH0_BPBA EQU	DWORD PTR RH0_BPBO	;offset/segment of BPB array address
				;Note: RH0_BPBA at entry to INIT points to all after DEVICE= on CONFIG.SYS stmt
				
				;-----------------------------------------------------------------------;
				;	Request Header for MEDIA CHECK Command				;
				;-----------------------------------------------------------------------;
				RH1	STRUC
 0000  000D[				DB	(TYPE RHC) DUP (?)	;common portion
	   ??			
			 ]	
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-4
Structure Definitions                                       

 000D  00				DB	?			;media descriptor
 000E  00			RH1_RET DB	?			;return information
 000F				RH1	ENDS
				;-----------------------------------------------------------------------;
				;	Request Header for BUILD BPB Command				;
				;-----------------------------------------------------------------------;
				RH2	STRUC
 0000  000D[				DB	(TYPE RHC) DUP(?)	;common portion
	   ??			
			 ]	
				
 000D  00				DB	?			;media descriptor
 000E  0000				DW	?			;offset  of transfer address
 0010  0000				DW	?			;segment of transfer address
 0012  0000			RH2_BPBO DW	?			;offset  of BPB table address
 0014  0000			RH2_BPBS DW	?			;segment of BPB table address
 0016				RH2	ENDS
				;-----------------------------------------------------------------------;
				;	Request Header for INPUT, OUTPUT, and OUTPUT with verify	;
				;-----------------------------------------------------------------------;
				RH4	STRUC
 0000  000D[				DB	(TYPE RHC) DUP (?)	;common portion
	   ??			
			 ]	
				
 000D  00				DB	?			;media descriptor
 000E  0000			RH4_DTAO DW	?			;offset  of transfer address
 0010  0000			RH4_DTAS DW	?			;segment of transfer address
 0012  0000			RH4_CNT DW	?			;sector count
 0014  0000			RH4_SSN DW	?			;starting sector number
 0016				RH4	ENDS
				
 = 000E				RH4_DTAA EQU	DWORD PTR RH4_DTAO	;offset/segment of transfer address
				
				;-----------------------------------------------------------------------;
				;	Segment Descriptor (part of Global Descriptor Table)		;
				;-----------------------------------------------------------------------;
				DESC	STRUC				;data segment descriptor
 0000  0000			DESC_LMT DW	0			;segment limit (length)
 0002  0000			DESC_BASEL DW	0			;bits 15-0 of physical address
 0004  00			DESC_BASEH DB	0			;bits 23-16 of physical address
 0005  00				DB	0			;access rights byte
 0006  0000				DW	0			;reserved
 0008				DESC	ENDS
				
					SUBTTL	Equates and Macro Definitions
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-5
Equates and Macro Definitions                               

					PAGE
				
 = 0012				MEM_SIZE EQU	12H			;BIOS memory size determination INT
									;returns system size in KB in AX
				
 = 0015				EM_INT	EQU	15H			;extended memory BIOS interrupt INT
 = 0087				EM_BLKMOVE EQU	87H			;block move function
 = 8800				EM_MEMSIZE EQU	8800H			;memory size determination in KB
				
 = 0021				DOS	EQU	21H			;DOS request INT
 = 0002				DOS_PCHR EQU	02H			;print character function
 = 0009				DOS_PSTR EQU	09H			;print string function
 = 0030				DOS_VERS EQU	30H			;get DOS version
				
 = 0009				TAB	EQU	09H			;ASCII tab
 = 000A				LF	EQU	0AH			;ASCII line feed
 = 000D				CR	EQU	0DH			;ASCII carriage return
				
 = 0010				PARA_SIZE EQU	16			;number of bytes in one 8088 paragraph
 = 0020				DIR_ENTRY_SIZE EQU 32			;number of bytes per directory entry
 = 0FE0				MAX_FATE EQU	0FE0H			;largest number of FAT entries allowed
				
				;default values used if parameters are omitted
				
 = 0040				DFLT_BSIZE EQU	64			;default VDISK buffer size (KB)
 = 0080				DFLT_SSZ EQU	128			;default sector size
 = 0040				DFLT_DIRN EQU	64			;default number of directory entries
 = 0008				DFLT_ESS EQU	8			;default maximum sectors to transfer
				
 = 0002				MIN_DIRN EQU	2			;minimum number of directory entries
 = 0200				MAX_DIRN EQU	512			;maximum number of directory entries
				
 = 0200				STACK_SIZE EQU	512			;length of stack during initialization
				
					SUBTTL	Resident Data Area
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-6
Resident Data Area                                          

					PAGE
				
				;-----------------------------------------------------------------------;
				;	Map INT 15H vector in low storage				;
				;-----------------------------------------------------------------------;
 0000				INT_VEC SEGMENT AT 00H
 0054					ORG	4*EM_INT
 0054				EM_VEC	LABEL	DWORD
 0054  0000			EM_VECO DW	?			;offset
 0056  0000			EM_VECS DW	?			;segment
 0058				INT_VEC ENDS
				
				
				
 0000				CSEG	SEGMENT PARA PUBLIC 'CODE'
					ASSUME	CS:CSEG
				;-----------------------------------------------------------------------;
				;	Resident data area.						;
				;									;
				;	All variables and constants required after initialization	;
				;	part one are defined here.					;
				;-----------------------------------------------------------------------;
				
 = 0000				START	EQU	$			;begin resident VDISK data & code
				
				;DEVICE HEADER - must be at offset zero within device driver
 0000  FFFFFFFF				DD	-1			;becomes pointer to next device header
 0004  0800				DW	0800H			;attribute (IBM format block device)
									;supports OPEN/CLOSE/RM calls
 0006  013A R				DW	OFFSET STRATEGY 	;pointer to device "strategy" routine
 0008  0165 R				DW	OFFSET IRPT		;pointer to device "interrupt handler"
 000A  01				DB	1			;number of block devices
 000B  0007[				DB	7 DUP (?)		;7 byte filler (remainder of 8-byte name)
	   ??			
			 ]	
				
				;END OF DEVICE HEADER
				
				;This volume label is placed into the directory of the new VDISK
				;This constant is also used to determine if a previous extended memory VDISK
				;has been installed.
				
 0012  56 44 49 53 4B 20	VOL_LABEL DB	'VDISK  V4.0'		;00-10 volume name (shows program level)
       20 56 34 2E 30		
 001D  28				DB	28H			;11-11 attribute (volume label)
 001E  000000000000000000		DT	0			;12-21 reserved
       00			
 0028  6000				DW	6000H			;22-23 time=12:00 noon
 002A  0986				DW	0986H			;24-25 date=12/06/84
 = 001A				VOL_LABEL_LEN EQU $-VOL_LABEL		;length of volume label
				
				;The following field, in the first extended memory VDISK device driver,
				;is the 24-bit address of the first free byte of extended memory.
				;This address is not in the common offset/segment format.
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-7
Resident Data Area                                          

				;The initial value, 10 0000H, is 1 megabyte.
				
 002C  0000			AVAIL_LO DW	0			;address of first free byte of
 002E  10			AVAIL_HI DB	10H			;extended memory
				
 002F				INTV15	LABEL	DWORD
 002F  0000			INTV15O DW	?			;offset
 0031  0000			INTV15S DW	?			;segment
				
				
 0033  0000			PARAS_PER_SECTOR DW ?			;number of 16-byte paragraphs in one sector
				
 0035  0000			START_BUFFER_PARA DW ?			;segment address of start of VDISK buffer
				
 0037  0000			EM_New_Size dw	?			;an001; dms;new size for EM
 0039  0000			EM_KSize dw	?			;an001; dms;size of EM currently.
				
 003B  00			EM_SW	DB	0			;NON-ZERO IF EXTENDED MEMORY
				
 003C  0000			EM_STAT DW	0			;AX from last unsuccessful extended memory I/O
				
 003E  0000			START_EM_LO DW	?			;24-bit address of start of VDISK buffer
 0040  00			START_EM_HI DB	?			;(extended memory only)
				
 0041  0010			WPARA_SIZE DW	PARA_SIZE		;number of bytes in one paragraph
				
 0043  0000			MAX_CNT DW	?			;(0FFFFH/BPB_SSZ) truncated, the maximum
									;number of sectors that can be transferred
									;without worrying about 64KB wrap
				
 0045  0000			SECT_LEFT DW	?			;sectors left to transfer
				
 0047				IO_SRCA LABEL	DWORD			;offset/segment of source
 0047  0000			IO_SRCO DW	?			;offset
 0049  0000			IO_SRCS DW	?			;segment
				
 004B				IO_TGTA LABEL	DWORD			;offset/segment of target
 004B  0000			IO_TGTO DW	?			;offset
 004D  0000			IO_TGTS DW	?			;segment
				
				;-----------------------------------------------------------------------;
				;	EMS Support							;
				;-----------------------------------------------------------------------;
				
 004F  FF			EM_SW2	DB	not EMS_Installed_Flag	;ac006;Default if EMS not installed
 0050  0000			EMS_HANDLE DW	?			;AN000; EMS handle for reference
 0052  0000			EMS_FRAME_ADDR DW ?			;AN000; EMS handle for reference
 0054  0000			EMS_CURR_SECT DW ?			;an000; Current EMS sector being addressed
 0056  0000			CURR_EMS_PAGE DW ?			;ac002; Current EMS page number
 0058  0000			SECT_LEFT_IN_FRAME DW ? 		;AN000; Sectors left to transfer in this frame
 005A  0000			SECT_PER_PAGE DW ?			;AN000; Sectors per page
 005C  0000			DOS_Page	dw	?		;an006; EMS physical page for VDISK
				
 005E  0080[			EMS_SAVE_ARRAY DB 80h	  dup(0)	;an000; save current state of ems
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-8
Resident Data Area                                          

	   00			
			 ]	
				
 00DE  00000000			EMS_SEG_ARRAY DD ?			;an000; save segment array
				
 00E2  0000			CURR_DTA_OFF DW ?			;AN000; DMS;CURRENT OFFSET OF DTA
				
 00E4  00			PC_386	DB	false			;AN000; DMS;386 machine flag
				
				SUBLIST STRUC				;AN000;SUBLIST STRUCTURE
				
 0000  00			SL_SIZE DB	?			;AN000;SUBLIST SIZE
 0001  00			SL_RES	DB	?			;AN000;RESERVED
 0002  0000			SL_OFFSET DW	?			;AN000;PARM OFFSET
 0004  0000			SL_SEGMENT DW	?			;AN000;PARM SEGMENT
 0006  00			SL_ID	DB	?			;AN000;NUMBER OF PARM
 0007  00			SL_FLAG DB	?			;AN000;DISPLAY TYPE
 0008  00			SL_MAXW DB	?			;AN000;MAXIMUM FIELD WIDTH
 0009  00			SL_MINW DB	?			;AN000;MINIMUM FIELD WIDTH
 000A  00			SL_PAD	DB	?			;AN000;PAD CHARACTER
				
 000B				SUBLIST ENDS				;AN000;END SUBLIST STRUCTURE
				
				
				BIOS_SYSTEM_DESCRIPTOR struc		;AN000;SYSTEM TYPE STRUC
				
 0000  0000			bios_SD_leng dw ?			;AN000;VECTOR LENGTH
 0002  00			bios_SD_modelbyte db ?			;AN000;SYSTEM MODEL TYPE
 0003  00			bios_SD_scnd_modelbyte db ?		;AN000;
 0004  00				db	?			;AN000;
 0005  00			bios_SD_featurebyte1 db ?		;AN000;
 0006  0004[				db	4 dup (?)		;AN000;
	   ??			
			 ]	
				
				
 000A				BIOS_SYSTEM_DESCRIPTOR ends		;AN000;END OF STRUC
				
				;-----------------------------------------------------------------------;
				;	BIOS Parameter Block (BPB)					;
				;-----------------------------------------------------------------------;
				;This is where the characteristics of the virtual disk are established.
				;A copy of this block is moved into the boot record of the virtual disk.
				;DEBUG can be used to read sector zero of the virtual disk to examine the
				;boot record copy of this block.
				
 00E5				BPB	LABEL	BYTE			;BIOS Parameter Block (BPB)
 00E5  0000			BPB_SSZ DW	0			;number of bytes per disk sector
 00E7  01			BPB_AUSZ DB	1			;sectors per allocation unit
 00E8  0001			BPB_RES DW	1			;number of reserved sectors (for boot record)
 00EA  01			BPB_FATN DB	1			;number of File Allocation Table (FAT) copies
 00EB  0000			BPB_DIRN DW	0			;number of root directory entries
 00ED  0001			BPB_SECN DW	1			;total number of sectors
									;computed from buffer size and sector size
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-9
Resident Data Area                                          

									;(this includes reserved, FAT, directory,
									;and data sectors)
 00EF  FE			BPB_MCB DB	0FEH			;media descriptor byte
 00F0  0001			BPB_FATSZ DW	1			;number of sectors occupied by a single FAT
									;computed from BPBSSZ and BPBSECN
 = 000D				BPB_LEN EQU	$-BPB			;length of BIOS parameter block
				
 00F2  00E5 R			BPB_PTR DW	BPB			;BIOS Parameter Block pointer array (1 entry)
				;-----------------------------------------------------------------------;
				;	Request Header (RH) address, saved here by "strategy" routine	;
				;-----------------------------------------------------------------------;
 00F4				RH_PTRA LABEL	DWORD
 00F4  0000			RH_PTRO DW	?			;offset
 00F6  0000			RH_PTRS DW	?			;segment
				;-----------------------------------------------------------------------;
				;	Global Descriptor Table (GDT), used for extended memory moves	;
				;-----------------------------------------------------------------------;
				;Access Rights Byte (93H) is
				;	P=1	(segment is mapped into physical memory)
				;	E=0	(data segment descriptor)
				;	D=0	(grow up segment, offsets must be <= limit)
				;	W=1	(data segment may be written into)
				;	DPL=0	(privilege level 0)
				
 00F8				GDT	LABEL	BYTE			;begin global descriptor table
 00F8  0000				DESC	<>			;dummy descriptor
 00FA  0000			
 00FC  00			
 00FD  00			
 00FE  0000			
				
 0100  0000				DESC	<>			;descriptor for GDT itself
 0102  0000			
 0104  00			
 0105  00			
 0106  0000			
				
 0108  0000			SRC	DESC	<,,,93H,>		;source descriptor
 010A  0000			
 010C  00			
 010D  93			
 010E  0000			
				
 0110  0000			TGT	DESC	<,,,93H,>		;target descriptor
 0112  0000			
 0114  00			
 0115  93			
 0116  0000			
				
 0118  0000				DESC	<>			;BIOS CS descriptor
 011A  0000			
 011C  00			
 011D  00			
 011E  0000			
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-10
Resident Data Area                                          

				
 0120  0000				DESC	<>			;stack segment descriptor
 0122  0000			
 0124  00			
 0125  00			
 0126  0000			
				
				
					SUBTTL	INT 15H (size) interrupt handler
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-11
INT 15H (size) interrupt handler                            

					PAGE
				;-----------------------------------------------------------------------;
				;	INT 15H Interrupt Handler routine				;
				;-----------------------------------------------------------------------;
				
				;=========================================================================
				; VDISK_INT15	: This routine traps the INT 15h requests to perform its
				;		  own unique services.	This routine provides 1 INT 15h
				;		  service; function 8800h.
				;
				;	Service - Function 8800h: Obtains the size of EM from the word
				;				  value EM_KSize
				;			Call With: AX - 8800h
				;			Returns  : AX - Kbyte size of EM
				;
				;=========================================================================
 0128				VDISK_INT15 PROC			;an001; dms;
				
 0128  80 FC 88				cmp	ah,EM_Size_Get		;an001; dms;function 88h
				;	$if	e			;an001; dms;get size
 012B  75 07				JNE $$IF1
 012D  2E: A1 0039 R			    mov     ax,cs:EM_KSize	;an001; dms;return size
 0131  F8				    clc 			;an001; dms;clear CY
				;	$else				;an001; dms;
 0132  EB 05				JMP SHORT $$EN1
 0134				$$IF1:
 0134  2E: FF 2E 002F R			    jmp     cs:INTV15		;an001; dms;jump to org. vector
				;	$endif				;an001; dms;
 0139				$$EN1:
				
 0139  CF				iret				;an001; dms;
				
 013A				VDISK_INT15 ENDP			;an001; dms;
				
				
					ASSUME	DS:NOTHING
				
					SUBTTL	Device Strategy & interrupt entry points
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-12
Device Strategy & interrupt entry points                    

					PAGE
				;-----------------------------------------------------------------------;
				;	Device "strategy" entry point					;
				;									;
				;	Retain the Request Header address for use by Interrupt routine	;
				;-----------------------------------------------------------------------;
 013A				STRATEGY PROC	FAR
 013A  2E: 89 1E 00F4 R			MOV	CS:RH_PTRO,BX		;offset
 013F  2E: 8C 06 00F6 R			MOV	CS:RH_PTRS,ES		;segment
 0144  CB				RET
 0145				STRATEGY ENDP
				;-----------------------------------------------------------------------;
				;	Table of command processing routine entry points		;
				;-----------------------------------------------------------------------;
 0145				CMD_TABLE LABEL WORD
 0145  05DD R				DW	OFFSET INIT_P1		; 0 - Initialization
 0147  01A2 R				DW	OFFSET MEDIA_CHECK	; 1 - Media check
 0149  01A7 R				DW	OFFSET BLD_BPB		; 2 - Build BPB
 014B  018A R				DW	OFFSET INPUT_IOCTL	; 3 - IOCTL input
 014D  01B4 R				DW	OFFSET INPUT		; 4 - Input
 014F  018A R				DW	OFFSET INPUT_NOWAIT	; 5 - Non destructive input no wait
 0151  018A R				DW	OFFSET INPUT_STATUS	; 6 - Input status
 0153  018A R				DW	OFFSET INPUT_FLUSH	; 7 - Input flush
 0155  01B4 R				DW	OFFSET OUTPUT		; 8 - Output
 0157  01B4 R				DW	OFFSET OUTPUT_VERIFY	; 9 - Output with verify
 0159  018A R				DW	OFFSET OUTPUT_STATUS	;10 - Output status
 015B  018A R				DW	OFFSET OUTPUT_FLUSH	;11 - Output flush
 015D  018A R				DW	OFFSET OUTPUT_IOCTL	;12 - IOCTL output
 015F  01B3 R				DW	OFFSET DEVICE_OPEN	;13 - Device OPEN
 0161  01B3 R				DW	OFFSET DEVICE_CLOSE	;14 - Device CLOSE
 = 000F				MAX_CMD EQU	($-CMD_TABLE)/2 	;highest valid command follows
 0163  01B0 R				DW	OFFSET REMOVABLE_MEDIA	;15 - Removable media
				
				;-----------------------------------------------------------------------;
				;	Device "interrupt" entry point					;
				;-----------------------------------------------------------------------;
 0165				IRPT	PROC	FAR			;device interrupt entry point
 0165  1E				PUSH	DS			;save all registers modified
 0166  06				PUSH	ES
 0167  50				PUSH	AX
 0168  53				PUSH	BX
 0169  51				PUSH	CX
 016A  52				PUSH	DX
 016B  57				PUSH	DI
 016C  56				PUSH	SI
									;BP isn't used, so it isn't saved
 016D  FC				CLD				;all moves forward
				
 016E  2E: C5 1E 00F4 R			LDS	BX,CS:RH_PTRA		;get RH address passed to "strategy" into DS:BX
				
 0173  8A 47 02				MOV	AL,RH.RHC_CMD		;command code from Request Header
 0176  98				CBW				;zero AH (if AL > 7FH, next compare will
									;catch that error)
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-13
Device Strategy & interrupt entry points                    

 0177  3C 0F				CMP	AL,MAX_CMD		;if command code is too high
 0179  77 10				JA	IRPT_CMD_HIGH		;jump to error routine
				
 017B  BF 018E R			MOV	DI,OFFSET IRPT_CMD_EXIT ;return addr from command processor
 017E  57				PUSH	DI			;push return address onto stack
									;command routine issues "RET"
				
 017F  03 C0				ADD	AX,AX			;double command code for table offset
 0181  8B F8				MOV	DI,AX			;put into index register for JMP
				
 0183  33 C0				XOR	AX,AX			;initialize return to "no error"
				
				;At entry to command processing routine:
				
				;	DS:BX	= Request Header address
				;	CS	= VDISK code segment address
				;	AX	= 0
				
				;	top of stack is return address, IRPT_CMD_EXIT
				
 0185  2E: FF A5 0145 R			JMP	CS:CMD_TABLE[DI]	;call routine to handle the command
				
				
 018A				IRPT_CMD_ERROR: 			;CALLed for unsupported character mode commands
				
 018A				INPUT_IOCTL:				;IOCTL input
 018A				INPUT_NOWAIT:				;Non-destructive input no wait
 018A				INPUT_STATUS:				;Input status
 018A				INPUT_FLUSH:				;Input flush
				
 018A				OUTPUT_IOCTL:				;IOCTL output
 018A				OUTPUT_STATUS:				;Output status
 018A				OUTPUT_FLUSH:				;Output flush
				
 018A  58				POP	AX			;pop return address off stack
				
 018B				IRPT_CMD_HIGH:				;JMPed to if RHC_CMD > MAX_CMD
 018B  B8 8003				MOV	AX,STAT_CMDERR		;"invalid command" and error
				
 018E				IRPT_CMD_EXIT:				;return from command routine
									;AX = value to OR into status word
 018E  2E: C5 1E 00F4 R			LDS	BX,CS:RH_PTRA		;restore DS:BX as Request Header pointer
 0193  80 CC 01				OR	AH,STAT_DONE		;add "done" bit to status word
 0196  89 47 03				MOV	RH.RHC_STA,AX		;store status into request header
 0199  5E				POP	SI			;restore registers
 019A  5F				POP	DI
 019B  5A				POP	DX
 019C  59				POP	CX
 019D  5B				POP	BX
 019E  58				POP	AX
 019F  07				POP	ES
 01A0  1F				POP	DS
 01A1  CB				RET
 01A2				IRPT	ENDP
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-14
Device Strategy & interrupt entry points                    

				
					SUBTTL	Command Processing routines
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-15
Command Processing routines                                 

					PAGE
				;-----------------------------------------------------------------------;
				;	Command Code 1 - Media Check					;
				;	At entry, DS:BX point to request header, AX = 0 		;
				;-----------------------------------------------------------------------;
 01A2				MEDIA_CHECK PROC
 01A2  C6 47 0E 01			MOV	RH.RH1_RET,1		;indicate media not changed
 01A6  C3				RET				;AX = zero, no error
 01A7				MEDIA_CHECK ENDP
				;-----------------------------------------------------------------------;
				;	Command Code 2 - Build BPB					;
				;	At entry, DS:BX point to request header, AX = 0 		;
				;-----------------------------------------------------------------------;
 01A7				BLD_BPB PROC
 01A7  C7 47 12 00E5 R			MOV	RH.RH2_BPBO,OFFSET BPB	;return pointer to our BPB
 01AC  8C 4F 14				MOV	RH.RH2_BPBS,CS
 01AF  C3				RET				;AX = zero, no error
 01B0				BLD_BPB ENDP
				;-----------------------------------------------------------------------;
				;	Command Code 13 - Device Open					;
				;	Command Code 14 - Device Close					;
				;	Command Code 15 - Removable media				;
				;	At entry, DS:BX point to request header, AX = 0 		;
				;-----------------------------------------------------------------------;
 01B0				REMOVABLE_MEDIA PROC
 01B0  B8 0200				MOV	AX,STAT_BUSY		;set status bit 9 (busy)
									;indicating non-removable media
 01B3				DEVICE_OPEN:				;NOP for device open
 01B3				DEVICE_CLOSE:				;NOP for device close
 01B3  C3				RET
 01B4				REMOVABLE_MEDIA ENDP			;fall thru to return
				;-----------------------------------------------------------------------;
				;	Command Code 4 - Input						;
				;	Command Code 8 - Output 					;
				;	Command Code 9 - Output with verify				;
				;	At entry, DS:BX point to request header, AX = 0 		;
				;-----------------------------------------------------------------------;
 01B4				INOUT	PROC
 01B4				INPUT:
 01B4				OUTPUT:
 01B4				OUTPUT_VERIFY:
				;;;;;	PUSH	DS			;ICE
				;;;;;	push	bx			;ICE
				;;;;;	push	ax			;ICE
				
				;;;;;	mov	bx,0140H		;ICE
				;;;;;	xor	ax,ax			;ICE
				;;;;;	mov	ds,ax			;ICE
				;;;;;	mov	ax,word ptr ds:[bx]	;ICE
				;;;;;	mov	word ptr ds:[bx],ax	;ICE
				
				;;;;;	pop	ax			;ICE
				;;;;;	pop	bx			;ICE
				;;;;;	POP	DS			;ICE
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-16
Command Processing routines                                 

				
				;Make sure I/O is entirely within the VDISK sector boundaries
				
 01B4  2E: 8B 0E 00ED R			MOV	CX,CS:BPB_SECN		;get total sector count
 01B9  8B 47 14				MOV	AX,RH.RH4_SSN		;starting sector number
 01BC  3B C1				CMP	AX,CX			;can't exceed total count
 01BE  77 07				JA	INOUT_E1		;jump if start > total
				
 01C0  03 47 12				ADD	AX,RH.RH4_CNT		;start + sector count
 01C3  3B C1				CMP	AX,CX			;can't exceed total count
 01C5  76 09				JNA	INOUT_A 		;jump if start + count <= total
				
 01C7				INOUT_E1:				;I/O not within VDISK sector boundaries
 01C7  C7 47 12 0000			MOV	RH.RH4_CNT,0		;set sectors transferred to zero
 01CC  B8 8008				MOV	AX,STAT_SNF		;indicate 'Sector not found' error
 01CF  C3				RET				;return with error status in AX
				
 01D0				INOUT_A:				;I/O within VDISK bounds
 01D0  8B 47 12				MOV	AX,RH.RH4_CNT		;get sector count
 01D3  2E: A3 0045 R			MOV	CS:SECT_LEFT,AX 	;save as sectors left to process
				
 01D7  2E: A3 0058 R			MOV	CS:SECT_LEFT_IN_FRAME,AX ;AN000; Save as sectors left to process
				
 01DB  2E: 80 3E 003B R 00		CMP	CS:EM_SW,0		;extended memory mode?
 01E1  75 57				JNE	INOUT_EM		;jump to extended memory I/O code
				
				;Compute offset and segment of VDISK buffer for starting segment in CX:SI
				
 01E3  8B 47 14				MOV	AX,RH.RH4_SSN		;starting sector number
 01E6  2E: F7 26 0033 R			MUL	CS:PARAS_PER_SECTOR	;* length of one sector in paragraphs
 01EB  2E: 03 06 0035 R			ADD	AX,CS:START_BUFFER_PARA ;+ segment of VDISK buffer sector 0
 01F0  8B C8				MOV	CX,AX			;segment address to CX
 01F2  33 F6				XOR	SI,SI			;offset is zero
				
				;Compute address of caller's Data Transfer Addr in DX:AX with smallest offset,
				;so that there is no possibility of overflowing a 64KB boundary moving MAX_CNT
				;sectors.
				
 01F4  B8 0010				MOV	AX,PARA_SIZE		;16
 01F7  F7 67 10				MUL	RH.RH4_DTAS		;* segment of caller's DTA in DX,AX
 01FA  03 47 0E				ADD	AX,RH.RH4_DTAO		;+ offset of caller's DTA
 01FD  80 D2 00				ADC	DL,0			;carry in from addition
 0200  2E: F7 36 0041 R			DIV	CS:WPARA_SIZE		;AX is segment of caller's DTA
									;DX is smallest offset possible
									;AX:DX = DTA address
				
				;AX:DX is caller's DTA segment:offset, CX:SI is VDISK buffer segment:offset
				
				;If this is an OUTPUT request, exchange the source and target addresses
				
 0205  80 7F 02 04			CMP	RH.RHC_CMD,CMD_INPUT	;INPUT operation?
 0209  74 03				JE	INOUT_B 		;jump if INPUT operation
				
 020B  91				XCHG	AX,CX			;swap source and target segment
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-17
Command Processing routines                                 

 020C  87 D6				XCHG	DX,SI			;swap source and target offset
				
 020E				INOUT_B:				;CX:SI is source, AX:DX is target
 020E  2E: 89 0E 0049 R			MOV	CS:IO_SRCS,CX		;save source segment
 0213  2E: 89 36 0047 R			MOV	CS:IO_SRCO,SI		;save source offset
 0218  2E: A3 004D R			MOV	CS:IO_TGTS,AX		;save target segment
 021C  2E: 89 16 004B R			MOV	CS:IO_TGTO,DX		;save target offset
				
 0221  EB 0E				JMP	SHORT INOUT_E		;AX := SECT_LEFT, test for zero
 0223				INOUT_C:				;SECT_LEFT in AX, non-zero
				
				;  Compute number of sectors to transfer in a single move,
				;  AX = minimum of (SECT_LEFT, MAX_CNT)
				
				;  MAX_CNT is the maximum number of sectors that can be moved without
				;  spanning a 64KB boundary (0FFFFH / Sector size, remainder truncated)
				
 0223  2E: 8B 0E 0043 R			MOV	CX,CS:MAX_CNT		;MAX sectors with one move
 0228  3B C1				CMP	AX,CX			;if SECT_LEFT cannot span 64KB boundary
 022A  76 02				JBE	INOUT_D 		;then move SECT_LEFT sectors
				
 022C  8B C1				MOV	AX,CX			;else move MAX_CNT sectors
 022E				INOUT_D:
				
 022E  E8 0421 R			CALL	INOUT_D_LOW_MEM 	;AN000;LOW MEMORY TRANSFER
				
				;Determine if more sectors need to be transferred
				
 0231				INOUT_E:				;do while SECT_LEFT <> zero
 0231  2E: A1 0045 R			MOV	AX,CS:SECT_LEFT 	;get sectors left to transfer
 0235  0B C0				OR	AX,AX			;set flags
 0237  75 EA				JNZ	INOUT_C 		;go back to transfer some sectors
 0239  C3				RET				;AX = zero, all sectors transferred
				
					SUBTTL	Extended Memory I/O routine
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-18
Extended Memory I/O routine                                 

					PAGE
				;-----------------------------------------------------------------------;
				;	Extended Memory I/O routine					;
				;-----------------------------------------------------------------------;
 023A				INOUT_EM:				;Extended memory I/O routine
									;change to larger stack
 023A  8C D6				MOV	SI,SS			;save old SS in SI
 023C  8B D4				MOV	DX,SP			;save old SP in DX
 023E  FA				CLI				;disable interrupts
 023F  8C C8				MOV	AX,CS
 0241  8E D0				MOV	SS,AX			;set SS = CS
 0243  BC 04A7 R			MOV	SP,OFFSET EM_STACK	;point to new stack
 0246  FB				STI				;enable interrupts
 0247  56				PUSH	SI			;save old SS at top of new stack
 0248  52				PUSH	DX			;save old SP on new stack
				
 0249  8B 77 0E				MOV	SI,RH.RH4_DTAO		;caller's DTA offset
				
				
 024C  2E: 80 3E 003B R 45		CMP	EM_SW,EM_Mem		;AC005; Is EM requested?
 0252  74 03				JE	INOUT_EM_A		;AN000;
 0254  E9 02EB R			JMP	INOUT_EMS		;AN000; Yes, compute page
				
 0257				INOUT_EM_A:				;AN000; No, compute 24-bit address
				
				;Compute 24-bit address of VDISK sector in CX (hi) and SI (low)
				
 0257  8B 47 14				MOV	AX,RH.RH4_SSN		;starting sector number
 025A  2E: F7 26 00E5 R			MUL	CS:BPB_SSZ		;* sector size = offset within buffer
 025F  2E: 03 06 003E R			ADD	AX,CS:START_EM_LO	;+ base address of this VDISK buffer
 0264  2E: 12 16 0040 R			ADC	DL,CS:START_EM_HI
 0269  8B CA				MOV	CX,DX			;save high byte
 026B  8B F0				MOV	SI,AX			;save low word
				
				;Compute 24-bit address of caller's DTA in DX (hi) and AX (low)
				
 026D  B8 0010				MOV	AX,PARA_SIZE		;16
 0270  F7 67 10				MUL	RH.RH4_DTAS		;* segment of caller's DTA
 0273  03 47 0E				ADD	AX,RH.RH4_DTAO		;+ offset of caller's DTA
 0276  80 D2 00				ADC	DL,0			;carry in from addition
				
				;Caller's DTA address is in CX,SI, VDISK buffer address is in DX,AX.
				
				;If this is an OUTPUT request, exchange the source and target addresses
				
 0279  80 7F 02 04			CMP	RH.RHC_CMD,CMD_INPUT	;INPUT operation?
 027D  74 03				JE	INOUT_EM_B		;jump if INPUT operation
				
 027F  87 D1				XCHG	DX,CX			;swap source and target high byte
 0281  96				XCHG	AX,SI			;swap source and target low word
				
 0282				INOUT_EM_B:				;CX,SI is source, DX,AX is target
				
 0282  2E: 89 36 010A R			MOV	SRC.DESC_BASEL,SI	;low 16 bits of source address
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-19
Extended Memory I/O routine                                 

 0287  2E: 88 0E 010C R			MOV	SRC.DESC_BASEH,CL	;high 8 bits of source address
				
 028C  2E: A3 0112 R			MOV	TGT.DESC_BASEL,AX	;low 16 bits of target address
 0290  2E: 88 16 0114 R			MOV	TGT.DESC_BASEH,DL	;high 8 bits of target address
				
 0295  EB 49				JMP	SHORT INOUT_EM_E	;AX := SECT_LEFT, test for zero
 0297				INOUT_EM_C:				;SECT_LEFT in AX, non-zero
				
				;  Compute number of sectors to transfer in a single move,
				;  AX = minimum of (SECT_LEFT, MAX_CNT)
				
				;  MAX_CNT is the maximum number of sectors that can be moved without
				;  spanning a 64KB boundary (0FFFFH / Sector size, remainder truncated)
				
 0297  2E: 8B 0E 0043 R			MOV	CX,CS:MAX_CNT		;MAX sectors with one move
 029C  3B C1				CMP	AX,CX			;if SECT_LEFT cannot span 64KB boundary
 029E  76 02				JBE	INOUT_EM_D		;then move SECT_LEFT sectors
				
 02A0  8B C1				MOV	AX,CX			;else move MAX_CNT sectors
 02A2				INOUT_EM_D:
 02A2  2E: 29 06 0045 R			SUB	CS:SECT_LEFT,AX 	;reduce number of sectors left to move
				
				;Move AX sectors from source to target
				
 02A7  2E: F7 26 00E5 R			MUL	CS:BPB_SSZ		;sectors * sector size = byte count
									;(cannot overflow into DX)
 02AC  2E: A3 0110 R			MOV	TGT.DESC_LMT,AX 	;store segment limit (byte count)
 02B0  2E: A3 0108 R			MOV	SRC.DESC_LMT,AX
				
 02B4  50				PUSH	AX			;preserve byte count on stack
				
 02B5  D1 E8				SHR	AX,1			;/2 = word count
 02B7  8B C8				MOV	CX,AX			;word count to CX
				
 02B9  0E				PUSH	CS
 02BA  07				POP	ES			;set ES = CS
 02BB  BE 00F8 R			MOV	SI,OFFSET GDT		;ES:SI point to GDT
				
 02BE  B4 87				MOV	AH,EM_BLKMOVE		;function is block move
 02C0  CD 15				INT	EM_INT			;move an even number of words
				
 02C2  59				POP	CX			;get byte count back from stack
				
 02C3  0A E4				OR	AH,AH			;get error code
				
 02C5  74 03				JZ	INOUT_UPDATE		;
 02C7  E9 0375 R			JMP	INOUT_EM_XE		;jump if I/O error encountered
				
 02CA				INOUT_UPDATE:
				
				;Update source and target addresses
				
 02CA  2E: 01 0E 010A R			ADD	SRC.DESC_BASEL,CX	;add bytes moved to source
 02CF  2E: 80 16 010C R 00		ADC	SRC.DESC_BASEH,0	;pick up any carry
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-20
Extended Memory I/O routine                                 

				
 02D5  2E: 01 0E 0112 R			ADD	TGT.DESC_BASEL,CX	;add bytes moved to target
 02DA  2E: 80 16 0114 R 00		ADC	TGT.DESC_BASEH,0	;pick up any carry
				
				;Determine if more sectors need to be transferred
				
 02E0				INOUT_EM_E:				;do while SECT_LEFT <> zero
 02E0  2E: A1 0045 R			MOV	AX,CS:SECT_LEFT 	;get sectors left to transfer
 02E4  0B C0				OR	AX,AX			;set flags
 02E6  75 AF				JNZ	INOUT_EM_C		;go back to transfer some sectors
				
 02E8  E9 036C R			JMP	INOUT_EM_X2		;AN000; All done . . . exit
				;-----------------------------------------------------------------------;
				;	EMS Support				  ;RPS; 		;
				;-----------------------------------------------------------------------;
				
 02EB				INOUT_EMS:				;AN000;
				
				; Save EMS state in case anyone is using it
 02EB  50				PUSH	AX			;AN000; DMS;SAVE IT
 02EC  53				PUSH	BX			;AN000; DMS;SAVE IT
 02ED  52				PUSH	DX			;AN000; DMS;SAVE IT
 02EE  57				push	di			;an000; dms;save it
 02EF  56				push	si			;an000; dms;save it
 02F0  1E				push	ds			;an000; dms;save it
 02F1  06				push	es			;an000; dms;save it
 02F2  8C C8				mov	ax,cs			;an000; dms;transfer cs to ds/es
 02F4  8E D8				mov	ds,ax			;an000; dms;
 02F6  8E C0				mov	es,ax			;an000; dms;
				
 02F8  BF 005E R			mov	di,offset cs:EMS_SAVE_ARRAY ;an000; point to save area
 02FB  BE 00DE R			mov	si,offset cs:EMS_SEG_ARRAY ;an000; point to segment area
 02FE  2E: C7 06 00DE R 0001		mov	word ptr cs:EMS_SEG_ARRAY,0001h ;an000; 1 segment to save
 0305  2E: A1 0052 R			mov	ax,cs:EMS_Frame_Addr	;an000; get segment
 0309  2E: A3 00E0 R			mov	word ptr cs:EMS_SEG_ARRAY+2,ax ;an000; segment
 030D  B8 4F00				MOV	AX,EMS_SAVE_STATE	;AN000; Function code to save active handle state
 0310  CD 67				INT	EMS_INT 		;AN000;
				
 0312  07				pop	es			;an000; dms;restore
 0313  1F				pop	ds			;an000; dms;restore
 0314  5E				pop	si			;an000; dms;restore
 0315  5F				pop	di			;an000; dms;restore
 0316  5A				POP	DX			;AN000; DMS;RESTORE
 0317  5B				POP	BX			;AN000; DMS;RESTORE
 0318  58				POP	AX			;AN000; DMS;RESTORE
				
				; Compute offset and segment of VDISK frame for starting segment in CX:SI
				; and page containing VDISK starting sector
				
 0319  1E				push	ds			;an000; dms;save ds
 031A  06				push	es			;an000; dms;save es
				
 031B  2E: C7 06 00E2 R 0000		mov	cs:curr_dta_off,0	;an000; dms;current offset = 0
 0322  8B 47 14				mov	ax,rh.rh4_ssn		;an000; dms;get 1st. sector
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-21
Extended Memory I/O routine                                 

 0325  2E: A3 0054 R			mov	cs:ems_curr_sect,ax	;an000; dms;save it
 0329  E8 0383 R			call	ems_page_off_calc	;an000; dms;calc page and off.
 032C  E8 039D R			call	ems_dta_calc		;an000; dms;calc DTA
 032F  E8 03C6 R			call	ems_src_tgt		;an000; dms;get src & tgt
				
				;	$do				;an000; dms;while sectors left
 0332				$$DO4:
 0332  E8 040C R			    call    map_frame		;an000; dms;map a page
 0335  E8 03E3 R			    call    ems_trf		;an000; dms;transfer data
 0338  2E: FF 0E 0045 R			    dec     cs:sect_left	;an000; dms;sect_left - 1
 033D  2E: 83 3E 0045 R 00		    cmp     cs:sect_left,0	;an000; dms;continue?
				;	$leave	e			;an000; dms;no - exit
 0343  74 0F				JE $$EN4
									;	    yes - continue
 0345  2E: A1 0054 R			    mov     ax,cs:ems_curr_sect ;an000; dms;get current sector
 0349  E8 0383 R			    call    ems_page_off_calc	;an000; dms;calc page and off.
 034C  E8 03B1 R			    call    ems_dta_adj 	;an000; dms;adjust DTA
 034F  E8 03C6 R			    call    ems_src_tgt 	;an000; dms;get src & tgt
				;	$enddo				;an000; dms;end while
 0352  EB DE				JMP SHORT $$DO4
 0354				$$EN4:
				
 0354  07				pop	es			;an000; dms;restore es
 0355  1F				pop	ds			;an000; dms;restore ds
				
				; Restore EMS state in case anyone was using it
									;AN000; No,
 0356  50				PUSH	AX			;AN000; DMS;SAVE IT
 0357  53				PUSH	BX			;AN000; DMS;SAVE IT
 0358  52				PUSH	DX			;AN000; DMS;SAVE IT
 0359  56				PUSH	SI			;AN000; DMS;SAVE IT
 035A  1E				push	ds			;an000; dms;save it
				
 035B  8C C8				mov	ax,cs			;an000; dms;get cs
 035D  8E D8				mov	ds,ax			;an000; dms;put in ds
 035F  B8 4F01				MOV	AX,EMS_RESTORE_STATE	;AN000;   Function code to restore active handle state
 0362  BE 005E R			MOV	SI,OFFSET CS:EMS_SAVE_ARRAY ;AN000; POINT TO SAVE ARRAY
 0365  CD 67				INT	EMS_INT 		;AN000;
				
 0367  1F				pop	ds			;an000; dms;restore
 0368  5E				POP	SI			;AN000; DMS;RESTORE
 0369  5A				POP	DX			;AN000; DMS;RESTORE
 036A  5B				POP	BX			;AN000; DMS;RESTORE
 036B  58				POP	AX			;AN000; DMS;RESTORE
				
				;-----------------------------------------------------------------------;
				
 036C				INOUT_EM_X2:				;revert to original stack
 036C  5F				POP	DI			;get old SP
 036D  5E				POP	SI			;get old SS
 036E  FA				CLI				;disable interrupts
 036F  8E D6				MOV	SS,SI			;restore old SS
 0371  8B E7				MOV	SP,DI			;restore old SP
 0373  FB				STI				;enable interrupts
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-22
Extended Memory I/O routine                                 

 0374  C3				RET				;return to IRPT_EXIT
				
 0375				INOUT_EM_XE:				;some error with INT 15H
 0375  2E: A3 003C R			MOV	CS:EM_STAT,AX		;save error status for debugging
 0379  C7 47 12 0000			MOV	RH.RH4_CNT,0		;indicate no sectors transferred
 037E  B8 8004				MOV	AX,STAT_CRC		;indicate CRC error
 0381  EB E9				JMP	INOUT_EM_X2		;fix stack and exit
 0383				INOUT	ENDP
				
				
				;=========================================================================
				; EMS_PAGE_OFF_CALC	: Calculates the current ems page to use and
				;			  the offset of the requested sector in that
				;			  page.
				;
				;	Inputs: 	AX - Sector for input/output
				;			SECT_PER_PAGE - # of sectors/ems page
				;			BPB_SSZ - Size in bytes of a sector
				;			EMS_FRAME_ADDR - Segment of ems page
				;
				;	Outputs:	CURR_EMS_PAGE - Currently active ems page
				;			CX:SI - Segment:Offset of logical sector
				;=========================================================================
				
 0383				ems_page_off_calc proc near		;an000; dms;calc page/offset
				
 0383  33 D2				xor	dx,dx			;an002; dms;clear high word
 0385  2E: F7 36 005A R			div	cs:sect_per_page	;an000; dms;determine page
 038A  2E: A3 0056 R			mov	cs:curr_ems_page,ax	;an002; dms;save page
 038E  8B C2				mov	ax,dx			;an002; dms;offset calc
 0390  2E: F7 26 00E5 R			mul	cs:bpb_ssz		;an000; dms;calc offset
 0395  8B F0				mov	si,ax			;an000; dms;save sector offset
 0397  2E: 8B 0E 0052 R			mov	cx,cs:ems_frame_addr	;an000; dms;obtain sector seg
				
 039C  C3				ret				;an000; dms;
				
 039D				ems_page_off_calc endp			;an000; dms;
				
				
				;=========================================================================
				; EMS_DTA_CALC		: Calculate the DTA buffer to be used.
				;
				;	Inputs: 	PARA_SIZE - 16
				;			RH4_DTAS  - Segment of DTA from request packet
				;			RH4_DTA0  - Offset of DTA from request packet
				;			WPARA_SIZE- 16
				;
				;	Outputs:	AX:DX - Segment:Offset of DTA buffer
				;=========================================================================
				
 039D				ems_dta_calc proc near			;an000; dms;calc DTA buffer
				
 039D  33 D2				xor	dx,dx			;an002; dms;clear high word
 039F  B8 0010				mov	ax,para_size		;an000; dms;get para size
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-23
Extended Memory I/O routine                                 

 03A2  F7 67 10				mul	rh.rh4_dtas		;an000; dms;times DTA segment
 03A5  03 47 0E				add	ax,rh.rh4_dtao		;an000; dms;+ DTA offset
 03A8  83 D2 00				adc	dx,0			;an002; dms;pick up carry
 03AB  2E: F7 36 0041 R			div	cs:wpara_size		;an000; dms;/16
				
 03B0  C3				ret				;an000; dms;
				
 03B1				ems_dta_calc endp			;an000; dms;
				
				
				;=========================================================================
				; EMS_DTA_ADJ		: Adjust DTA for the number of sectors having
				;			  been transferred.
				;
				;	External Calls	: EMS_DTA_CALC
				;
				;	Inputs: 	CURR_DTA_OFF - Current offset value to be adjusted.
				;
				;	Outputs:	CURR_DTA_OFF - Adjusted offset value into DTA
				;			DX - Adjusted offset value into DTA
				;=========================================================================
				
 03B1				ems_dta_adj proc near			;an000; dms;adjust DTA
				
 03B1  E8 039D R			call	ems_dta_calc		;an000; dms;
 03B4  50				push	ax			;an000; dms;save reg
 03B5  2E: A1 00E2 R			mov	ax,cs:curr_dta_off	;an000; dms;get current off.
 03B9  2E: 03 06 00E5 R			add	ax,cs:bpb_ssz		;an000; dms;adjust up
 03BE  2E: A3 00E2 R			mov	cs:curr_dta_off,ax	;an000; dms;save new off
 03C2  03 D0				add	dx,ax			;an000; dms;set dx to new off
 03C4  58				pop	ax			;an000; dms;restore reg
 03C5  C3				ret				;an000; dms;
				
 03C6				ems_dta_adj endp			;an000; dms;
				
				;=========================================================================
				; EMS_SRC_TGT		: Determine the source and target segments for
				;			  data transfer.
				;
				;	Inputs: 	RHC_CMD - Request packet command identifier
				;			AX:DX	- DTA
				;			CX:SI	- EMS page/sector
				;
				;	Outputs:	IO_SRCS - Segment of source of trf
				;			IO_SRCO - Offset of source of trf
				;			IO_TGTS - Segment of target for trf
				;			IO_TGTO - Offset of target for trf
				;=========================================================================
				
 03C6				ems_src_tgt proc near			;an000; dms;src/tgt calc
				
 03C6  80 7F 02 04			cmp	rh.rhc_cmd,cmd_input	;an000; dms;input/output?
				;	$if	ne			;an000; dms;
 03CA  74 03				JE $$IF7
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-24
Extended Memory I/O routine                                 

 03CC  91				    xchg    ax,cx		;an000; dms;swap src/tgt seg
 03CD  87 D6				    xchg    dx,si		;an000; dms;swap src/tgt off
				;	$endif				;an000; dms;
 03CF				$$IF7:
				
 03CF  2E: 89 0E 0049 R			mov	cs:io_srcs,cx		;an000; dms;save src seg
 03D4  2E: 89 36 0047 R			mov	cs:io_srco,si		;an000; dms;save src off
 03D9  2E: A3 004D R			mov	cs:io_tgts,ax		;an000; dms;save tgt seg
 03DD  2E: 89 16 004B R			mov	cs:io_tgto,dx		;an000; dms;save tgt off
 03E2  C3				ret				;an000; dms;
				
 03E3				ems_src_tgt endp			;an000; dms;
				
				
				;=========================================================================
				; EMS_TRF		: Perform the sector transfer of data.
				;
				;	Inputs: 	BPB_SSZ - Sector size
				;			IO_SRCA - Source address
				;			IO_TGTA - Target address
				;
				;	Outputs:	Transferred data
				;			EMS_CURR_SECT - Incremented 1
				;=========================================================================
				
 03E3				ems_trf proc	near			;an000; dms;transfer data
				
 03E3  2E: A1 00E5 R			mov	ax,cs:bpb_ssz		;an000; dms;set to sector size
 03E7  D1 E8				shr	ax,1			;an000; dms;make words
 03E9  8B C8				mov	cx,ax			;an000; dms;set loop counter
 03EB  1E				push	ds			;an000; dms;save regs
 03EC  06				push	es			;an000; dms;
				
 03ED  2E: C5 36 0047 R			lds	si,cs:io_srca		;an000; dms;get src address
 03F2  2E: C4 3E 004B R			les	di,cs:io_tgta		;an000; dms;get tgt address
				
 03F7  2E: 80 3E 00E4 R FF		CMP	CS:PC_386,TRUE		;AN000; DO WE HAVE A 386 MACHINE?
				;	$IF	E			;AN000; YES
 03FD  75 03				JNE $$IF9
 03FF  D1 E9				    SHR     CX,1		;AN000; /2 = DW COUNT
 0401  66				    DB	    66H 		;AN000; SIMULATE A MOVSDW
				;	$ENDIF				;AN000;
 0402				$$IF9:
 0402  F3/ A5				rep	movsw			;an000; dms;perform transfer
				
 0404  07				pop	es			;an000; dms;restore regs
 0405  1F				pop	ds			;an000; dms;
 0406  2E: FF 06 0054 R			inc	cs:ems_curr_sect	;an000; dms;increment sector
				
 040B  C3				ret				;an000; dms;
				
 040C				ems_trf endp				;an000; dms;
				
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-25
Extended Memory I/O routine                                 

				
 040C				MAP_FRAME PROC	NEAR			;AN000;
				
 040C  53				PUSH	BX			;AN000; DMS;
 040D  2E: A1 005C R			mov	ax,cs:DOS_Page		;an000; get physical page
 0411  B4 44				MOV	AH,EMS_MAP_HANDLE	;AN000; EMS function to map page
 0413  2E: 8B 1E 0056 R			MOV	BX,CS:CURR_EMS_PAGE	;AN000; Page number
 0418  2E: 8B 16 0050 R			MOV	DX,CS:EMS_HANDLE	;AN000; EMS handle
 041D  CD 67				INT	EMS_INT 		;AN000;
 041F  5B				POP	BX			;AN000; DMS;
 0420  C3				RET				;AN000;
				
 0421				MAP_FRAME ENDP				;AN000;
				
				
 0421				INOUT_D_LOW_MEM PROC NEAR		;AN000; LOW MEMORY TRANSFER
				
 0421  2E: 29 06 0045 R			SUB	CS:SECT_LEFT,AX 	;reduce number of sectors left to move
				
				;Move AX sectors from source to target
				
 0426  2E: F7 26 00E5 R			MUL	CS:BPB_SSZ		;sectors * sector size = byte count
									;(cannot overflow into DX)
 042B  D1 E8				SHR	AX,1			;/2 = word count
 042D  8B C8				MOV	CX,AX			;word count to CX for \REP MOVSW
				
 042F  2E: C5 36 0047 R			LDS	SI,CS:IO_SRCA		;source segment/offset to DS:SI
 0434  2E: C4 3E 004B R			LES	DI,CS:IO_TGTA		;target segment/offset to ES:DI
				
 0439  2E: 80 3E 00E4 R FF		CMP	CS:PC_386,TRUE		;AN000; DO WE HAVE A 386 MACHINE?
				;	$IF	E			;AN000; YES
 043F  75 03				JNE $$IF11
 0441  D1 E9				    SHR     CX,1		;AN000; /2 = DW COUNT
 0443  66				    DB	    66H 		;AN000; SIMULATE A MOVSDW
				;	$ENDIF				;AN000;
 0444				$$IF11:
 0444  F3/ A5				REP	MOVSW			;AN000; PERFORM DOUBLE WORD MOVE
				
				;Update source and target paragraph addresses
				;AX has number of words moved
				
 0446  D1 E8				SHR	AX,1			;words moved / 8 = paragraphs moved
 0448  D1 E8				SHR	AX,1
 044A  D1 E8				SHR	AX,1
				
 044C  2E: 01 06 0049 R			ADD	CS:IO_SRCS,AX		;add paragraphs moved to source segment
 0451  2E: 01 06 004D R			ADD	CS:IO_TGTS,AX		;add paragraphs moved to target segment
				
 0456  C3				RET
				
 0457				INOUT_D_LOW_MEM ENDP
				
				
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-26
Extended Memory I/O routine                                 

 0457  0028[				DW	40 DUP (?)		;stack for extended memory I/O
	   ????			
			 ]	
				
 04A7				EM_STACK LABEL	WORD
				
					SUBTTL	Boot Record
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-27
Boot Record                                                 

					PAGE
				;-----------------------------------------------------------------------;
				;	Adjust the assembly-time instruction counter to a paragraph	;
				;	boundary							;
				;-----------------------------------------------------------------------;
				
					IF	($-START) MOD 16
 04B0					    ORG     ($-START) + 16 - (($-START) MOD 16)
					ENDIF
				
 = 04B0				VDISK	EQU	$			;start of virtual disk buffer
 = 004B				VDISKP	EQU	($-START) / PARA_SIZE	;length of program in paragraphs
				;-----------------------------------------------------------------------;
				;	If this VDISK is in extended memory, this address is passed	;
				;	back to DOS as the end address that is to remain resident.	;
				;									;
				;	It this VDISK is not in extended memory, the VDISK buffer	;
				;	begins at this address, and the address passed back to DOS	;
				;	as the end address that is to remain resident is this address	;
				;	plus the length of the VDISK buffer.				;
				;-----------------------------------------------------------------------;
				
 04B0				BOOT_RECORD LABEL BYTE			;Format of Boot Record documented in
									;DOS Technical Reference Manual
 04B0  00 00 00				DB	0,0,0			;3-byte jump to boot code (not bootable)
 04B3  56 44 49 53 4B 78		DB	'VDISKx.x'		;8-byte vendor identification
       2E 78			
 04BB				BOOT_BPB LABEL	BYTE			;boot record copy of BIOS parameter block
 04BB  0000				DW	?			;number of bytes per disk sector
 04BD  00				DB	?			;sectors per allocation unit
 04BE  0000				DW	?			;number of reserved sectors (for boot record)
 04C0  00				DB	?			;number of File Allocation Table (FAT) copies
 04C1  0000				DW	?			;number of root directory entries
 04C3  0000				DW	?			;total number of sectors
 04C5  00				DB	?			;media descriptor byte
 04C6  0000				DW	?			;number of sectors occupied by a single FAT
				;end of boot record BIOS Parameter block
				
				;The following three words mean nothing to VDISK, they are placed here
				;to conform to the DOS standard for boot records.
 04C8  0008				DW	8			;sectors per track
 04CA  0001				DW	1			;number of heads
 04CC  0000				DW	0			;number of hidden sectors
				;The following word is the 16-bit kilobyte address of the first byte in
				;extended memory that is not occupied by a VDISK buffer
				;It is placed into this location so that other users of extended memory
				;may find where all the VDISKs end.
				
				;This field may be accessed by moving the boot record of the First extended
				;memory VDISK from absolute location 10 0000H.	Before assuming that the
				;value below is valid, the vendor ID (constant VDISK) should be verified
				;to make sure that SOME VDISK has been installed.
				
				;For example, if two VDISKs are installed, one 320KB and one 64KB, the
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-28
Boot Record                                                 

				;address calculations are as follows:
				
				;Extended memory start address	= 100000H (1024KB)
				;Start addr of 1st VDISK buffer = 100000H (1024KB)
				;Length of 1st VDISK buffer	= 050000H ( 320KB)
				;End addr of 1st VDISK buffer	= 14FFFFH
				;Start addr of 2nd VDISK buffer = 150000H (1344KB)
				;Length of 2nd VDISK buffer	= 010000H (  64KB)
				;End addr of 2nd VDISK buffer	= 15FFFFH
				;First byte after all VDISKs	= 160000H (1408KB)
				;Divide by 1024 		=   0580H (1408D)
				
				;-----------------------------------------------------------------------;
				;	Part 2 of Initialization (executed last)			;
				;-----------------------------------------------------------------------;
				;Initialization is divided into two parts.
				
				;INIT_P1 is overlaid by the virtual disk buffer
				
				;INIT_P1 is executed first, then jumps to INIT_P2.  INIT_P2 returns to caller.
				
				;Exercise caution if extending the initialization part 2 code.
				;It overlays the area immediately following the boot sector.
				;If this section of code must be expanded, make sure it fits into the minimum
				;sector size of 128 bytes.
				;Label TEST_LENGTH must equate to a non-negative value (TEST_LENGTH >= 0).
				;If this code it must be extended beyond the 128 byte length of the boot sector,
				;move all of INIT_P2 before label VDISK.
				
				;Registers at entry to INIT_P2 (set up at end of INIT_P1):
				;	BL = media control byte from BPB (for FAT)
				;	CX = number of FAT copies
				;	DX = number of bytes in one FAT - 3
				;	SI = OFFSET of Volume Label field
				;	ES:DI = VDISK buffer address of first FAT sector
				;	CS = DS = VDISK code segment
				
 04CE				INIT_P2 PROC				;second part of initialization
					ASSUME	DS:CSEG 		;DS set in INIT_P1
				
				;Initialize File Allocation Table(s) (FATs)
				
 04CE				INIT_P2_FAT:				;set up one FAT, sector number in AX
				
 04CE  51				PUSH	CX			;save loop counter on stack
 04CF  8A C3				MOV	AL,BL			;media control byte
 04D1  AA				STOSB				;store media control byte, increment DI
 04D2  B8 FFFF				MOV	AX,0FFFFH		;bytes 2 and 3 of FAT are 0FFH
 04D5  AB				STOSW
				
 04D6  8B CA				MOV	CX,DX			;FAT size in bytes - 3
 04D8  33 C0				XOR	AX,AX			;value to store in remainder of FAT
 04DA  F3/ AA				REP	STOSB			;clear remainder of FAT
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-29
Boot Record                                                 

 04DC  59				POP	CX			;get loop counter off stack
 04DD  E2 EF				LOOP	INIT_P2_FAT		;loop for all copies of the FAT
				
				;Put the volume label in the first directory entry
				
 04DF  B9 001A				MOV	CX,VOL_LABEL_LEN	;length of volume directory entry
 04E2  F3/ A4				REP	MOVSB			;move volume id to directory
				
				;Zero the remainder of the directory
				
 04E4  B8 0020				MOV	AX,DIR_ENTRY_SIZE	;length of 1 directory entry
 04E7  F7 26 00EB R			MUL	BPB_DIRN		;* number entries = bytes of directory
 04EB  2D 001A				SUB	AX,VOL_LABEL_LEN	;less length of volume label
 04EE  8B C8				MOV	CX,AX			;length of rest of directory
 04F0  33 C0				XOR	AX,AX
 04F2  F3/ AA				REP	STOSB			;clear directory to nulls
 04F4  C3				RET				;return with AX=0
 04F5				INIT_P2 ENDP
				
 04F5  0005[			PATCH_AREA DB	5 DUP ('PATCH AREA ')
	   50 41 54 43 48	
	   20 41 52 45 41	
	   20			
			 ]	
				
 = 0004				TEST_LENGTH EQU 128-($-VDISK)		;if negative, boot record has too much
									;data area, move some fields below VDISK
				;-----------------------------------------------------------------------;
				;	All fields that must remain resident after device driver	;
				;	initialization must be defined before this point.		;
				;-----------------------------------------------------------------------;
 052C  20 20 20 20 20 20		DB	'                         '
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20			
 0545  20 20 20 20 20 20		DB	'                            '
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20 20 20 20		
 0561  20 20 20 20 20 20		DB	'                            '
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20 20 20 20 20 20	
       20 20 20 20		
				
 057D  0000			MAXSEC_TRF DW	0			;maximum number of sectors to transfer when
									;in extended memory
				
 057F  0000			BUFF_SIZE DW	0			;desired VDISK buffer size in kilobytes
				
 0581  0064			MIN_MEMORY_LEFT DW 100			;minimum amount of system memory (kilobytes)
									;that must remain after VDISK is installed
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-30
Boot Record                                                 

				
 0583  0040			PARA_PER_KB DW	1024/PARA_SIZE		;paragraphs in one kilobyte
 0585  0400			C1024	DW	1024			;bytes in one kilobyte
 0587  0020			DIRE_SIZE DW	DIR_ENTRY_SIZE		;bytes in one directory entry
 0589  0000			DIR_SECTORS DW	?			;number of sectors of directory
				
 058B  00			ERR_FLAG DB	0			;error indicators to condition messages
 = 0080				ERR_BSIZE EQU	80H			;buffer size adjusted
 = 0040				ERR_SSZ EQU	40H			;sector size adjusted
 = 0020				ERR_DIRN EQU	20H			;number of directory entries adjusted
 = 0010				ERR_PASS EQU	10H			;some adjustment made that requires
									;recomputation of values previously computed
 = 0050				ERR_SSZB EQU	ERR_SSZ+ERR_PASS	;sector size altered this pass
 = 0008				ERR_SYSSZ EQU	08H			;system storage too small for VDISK
 = 0004				ERR_SWTCH EQU	04H			;invalid switch character
 = 0002				ERR_EXTSW EQU	02H			;extender card switches don't match memory size
 = 0001				ERR_ESIZE EQU	01H			;Transfer size adjusted
				
 058C  10			DOS_PG_SZ DB	DOS_PAGE_SZ		;AN000;
 058D  0010			DOS_Page_Size_Word dw DOS_Page_Sz	;an000;
				
 058F  00			err_flag2 db	0
 = 0001				err_baddos equ	01h			; Invalid DOS Version
				
				;-----------------------------------------------------------------------;
				;	SUBLIST definitions and EQUATES for Message Retreiver		;
				;-----------------------------------------------------------------------;
									;AN000; Message Number
 = 0001				INCORRECT_DOS EQU 1			;AN000;
 = 0002				SYS_TOO_SMALL EQU 2			;AN000;
 = 0003				VDISK_TITLE EQU 3			;AN000;
 = 0004				BUFFER_ADJUSTED EQU 4			;AN000;
 = 0005				SECTOR_ADJUSTED EQU 5			;AN000;
 = 0006				DIR_ADJUSTED EQU 6			;AN000;
 = 0007				INVALID_SW_CHAR EQU 7			;AN000;
 = 0008				TRANS_ADJUSTED EQU 8			;AN000;
 = 0009				BUF_SZ	EQU	9			;AN000;
 = 000A				SEC_SZ	EQU	10			;AN000;
 = 000B				DIR_ENTRIES EQU 11			;AN000;
 = 000C				TRANS_SZ EQU	12			;AN000;
 = 000D				VDISK_NOT_INST EQU 13			;AN000;
 = 000E				EXTEND_CARD_WRONG EQU 14		;AN000;
				
 = 0000				NO_REPLACE EQU	0			;AN000; CX = 0 -> No replacement
 = 0001				ONE_REPLACE EQU 1			;AN000; CX = 1 -> One replacement
 = 0000				UNLIMITED_MAX EQU 0			;AN000; MAX field - unlimited
 = 0001				SMALLEST_MIN EQU 1			;AN000; MIN field - 1 character long
 = 0020				PAD_BLANK EQU	20H			;AN000; PAD character is a blank
				
				
 0590  00			DRIVE_CODE DB	?			;AN000;
 0591  3A 00				DB	":",NULL		;AN000; ASCIIZ string for drive code
				
				; For the message: "VDISK Version 4.00 virtual disk %1",CR,LF
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-31
Boot Record                                                 

				
 0593				TITLE_SUBLIST LABEL BYTE
				
 0593  0B			TT_SIZE DB	11			;AN000; SUBLIST size  (PTR to next SUBLIST)
 0594  00			TT_RESV DB	0			;AN000; RESERVED
 0595  0590 R			TT_VALUEO DW	DRIVE_CODE		;AN000; Offset to ASCIIZ string
 0597  0000			TT_VALUES DW	?			;AN000; SEGMENT TO ASCIIZ STRING
 0599  01			TT_ID	DB	1			;AN000; n of %n
 059A  10			TT_FLAG DB	Left_Align+Char_Field_ASCIIZ
 059B  00			TT_MAXW DB	UNLIMITED_MAX		;AN000; Maximum field width
 059C  01			TT_MINW DB	SMALLEST_MIN		;AN000; Minimum field width
 059D  20			TT_PAD	DB	PAD_BLANK		;AN000; Character for Pad field
				
				; For the message: "Buffer size: %1 KB",CR,LF
				
 059E				BUF_SZ_SUBLIST LABEL BYTE
				
 059E  0B			B_SIZE	DB	11			;AN000; SUBLIST size  (PTR to next SUBLIST)
 059F  00			B_RESV	DB	0			;AN000; RESERVED
 05A0  057F R			B_VALUEO DW	BUFF_SIZE		;AN000; Offset to binary number
 05A2  0000			B_VALUES DW	?			;AN000; SEGMENT TO BINARY NUMBER
 05A4  01			B_ID	DB	1			;AN000; n of %n
 05A5  21			B_FLAG	DB	Left_Align+Unsgn_Bin_Word
 05A6  00			B_MAXW	DB	UNLIMITED_MAX		;AN000; Maximum field width
 05A7  01			B_MINW	DB	SMALLEST_MIN		;AN000; Minimum field width
 05A8  20			B_PAD	DB	PAD_BLANK		;AN000; Character for Pad field
				
				; For the message: "Sector size: %1",CR,LF
				
 05A9				SEC_SZ_SUBLIST LABEL BYTE
				
 05A9  0B			S_SIZE	DB	11			;AN000; SUBLIST size  (PTR to next SUBLIST)
 05AA  00			S_RESV	DB	0			;AN000; RESERVED
 05AB  00E5 R			S_VALUEO DW	BPB_SSZ 		;AN000; Offset to binary number
 05AD  0000			S_VALUES DW	?			;AN000; SEGMENT TO BINARY NUMBER
 05AF  01			S_ID	DB	1			;AN000; n of %n
 05B0  21			S_FLAG	DB	Left_Align+Unsgn_Bin_Word
 05B1  00			S_MAXW	DB	UNLIMITED_MAX		;AN000; Maximum field width
 05B2  01			S_MINW	DB	SMALLEST_MIN		;AN000; Minimum field width
 05B3  20			S_PAD	DB	PAD_BLANK		;AN000; Character for Pad field
				
				; For the message: "Directory entries: %1",CR,LF
				
 05B4				DIR_ENT_SUBLIST LABEL BYTE
				
 05B4  0B			D_SIZE	DB	11			;AN000; SUBLIST size  (PTR to next SUBLIST)
 05B5  00			D_RESV	DB	0			;AN000; RESERVED
 05B6  00EB R			D_VALUEO DW	BPB_DIRN		;AN000; Offset to binary number
 05B8  0000			D_VALUES DW	?			;AN000; SEGMENT TO BINARY NUMBER
 05BA  01			D_ID	DB	1			;AN000; n of %n
 05BB  21			D_FLAG	DB	Left_Align+Unsgn_Bin_Word
 05BC  00			D_MAXW	DB	UNLIMITED_MAX		;AN000; Maximum field width
 05BD  01			D_MINW	DB	SMALLEST_MIN		;AN000; Minimum field width
 05BE  20			D_PAD	DB	PAD_BLANK		;AN000; Character for Pad field
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-32
Boot Record                                                 

				
				; For the message: "Transfer size: %1",CR,LF
				
 05BF				TRANS_SZ_SUBLIST LABEL BYTE
				
 05BF  0B			T_SIZE	DB	11			;AN000; SUBLIST size  (PTR to next SUBLIST)
 05C0  00			T_RESV	DB	0			;AN000; RESERVED
 05C1  057D R			T_VALUEO DW	MAXSEC_TRF		;AN000; Offset to binary number
 05C3  0000			T_VALUES DW	?			;AN000; SEGMENT TO BINARY NUMBER
 05C5  01			T_ID	DB	1			;AN000; n of %n
 05C6  21			T_FLAG	DB	Left_Align+Unsgn_Bin_Word
 05C7  00			T_MAXW	DB	UNLIMITED_MAX		;AN000; Maximum field width
 05C8  01			T_MINW	DB	SMALLEST_MIN		;AN000; Minimum field width
 05C9  20			T_PAD	DB	PAD_BLANK		;AN000; Character for Pad field
				
				;-----------------------------------------------------------------------;
				;	EMS Support							;
				;-----------------------------------------------------------------------;
				
 05CA  000A[			FRAME_BUFFER DB 10 DUP(0)		;AN000;
	   00			
			 ]	
				
 05D4  56 44 49 53 4B 20	VDISK_Name db	"VDISK   "		;an000; dms;
       20 20			
				
 05DC  04			four	DB	4
				
				
					SUBTTL	Initialization, Part one
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-33
Initialization, Part one                                    

					PAGE
				;-----------------------------------------------------------------------;
				;	Command Code 0 - Initialization 				;
				;	At entry, DS:BX point to request header, AX = 0 		;
				;-----------------------------------------------------------------------;
				;Initialization is divided into two parts.
				;This part, executed first, is later overlaid by the VDISK buffer.
				
 05DD				INIT_P1 PROC				;first part of initialization
				
				;;;;;	PUSH	DS			;ICE
				;;;;;	push	bx			;ICE
				;;;;;	push	ax			;ICE
				
				;;;;;	mov	bx,0140H		;ICE
				;;;;;	xor	ax,ax			;ICE
				;;;;;	mov	ds,ax			;ICE
				;;;;;	mov	ax,word ptr ds:[bx]	;ICE
				;;;;;	mov	word ptr ds:[bx],ax	;ICE
				
				;;;;;	pop	ax			;ICE
				;;;;;	pop	bx			;ICE
				;;;;;	POP	DS			;ICE
				
 05DD  8C D2				MOV	DX,SS			;save stack segment register
 05DF  8B CC				MOV	CX,SP			;save stack pointer register
 05E1  FA				CLI				;inhibit interrupts while changing SS:SP
 05E2  8C C8				MOV	AX,CS			;move CS to SS through AX
 05E4  8E D0				MOV	SS,AX
 05E6  BC 1935 R			MOV	SP,OFFSET MSGEND	;end of VDISKMSG
 05E9  81 C4 0200			ADD	SP,STACK_SIZE		;+ length of our stack
				
 05ED  FB				STI				;allow interrupts
				
 05EE  52				PUSH	DX			;save old SS register on new stack
 05EF  51				PUSH	CX			;SAVE OLD SP REGISTER ON NEW STACK
				
				
				
 05F0  1E				PUSH	DS			;AN000;SAVE REGS
 05F1  06				PUSH	ES			;AN000;
				
 05F2  0E				PUSH	CS			;AN000;TRANSFER TO DS
 05F3  1F				POP	DS			;AN000;
 05F4  0E				PUSH	CS			;AN000;
 05F5  07				POP	ES			;AN000;
				
					ASSUME	DS:CSEG,ES:CSEG 	;AN000;
				
 05F6  E8 0F36 R			CALL	SYSLOADMSG		;AN000; LOAD messages and do DOS version check
 05F9  73 26				JNC	VDISK_CONTINUE_1	;AN000; Did we load OK?
 05FB  2E: 80 0E 058F R 01		or	cs:err_flag2,err_baddos
				
 0601  1E				push	ds			;an006; dms;save ds
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-34
Initialization, Part one                                    

 0602  53				push	bx			;an006; dms;save bx
 0603  2E: C5 1E 00F4 R			lds	bx,cs:RH_Ptra		;an006; dms;point to request header
 0608  C7 47 17 FFFF			mov	RH.RH0_Flag,-1		;an006; dms;signal BIO and error occurred
 060D  5B				pop	bx			;an006; dms;restore bx
 060E  1F				pop	ds			;an006; dms;restore ds
				
 060F  B8 000D				MOV	AX,VDISK_NOT_INST	;AN000;VDISK UNABLE TO BE INSTALLED
 0612  BB FFFF				MOV	BX,NO_HANDLE		;AN000;NO DISPLAY HANDLE
 0615  E8 1096 R			CALL	SYSDISPMSG		;AN000;DISPLAY THE MESSAGE
 0618  B8 0001				MOV	AX,INCORRECT_DOS	;AN000;BAD DOS VERSION
 061B  BB FFFF				MOV	BX,NO_HANDLE		;AN000;NO DISPLAY HANDLE
 061E  E8 1096 R			CALL	SYSDISPMSG		;AN000;DISPLAY THE MESSAGE
				
 0621				VDISK_CONTINUE_1:			;AN000;
				
 0621  07				POP	ES			;AN000;RESTORE REGS
 0622  1F				POP	DS			;AN000;
					ASSUME	DS:NOTHING,ES:NOTHING	;AN000;
				
 0623  E8 0697 R			CALL	PC_386_CHK		;AN000;SEE IF WE HAVE A 386 PC
									; Yes, continue
 0626  E8 06BD R			CALL	GET_PARMS		;get parameters from CONFIG.SYS line
				
 0629  0E				PUSH	CS
 062A  1F				POP	DS			;set DS = CS
					ASSUME	DS:CSEG,ES:CSEG
				
 062B  E8 07E4 R			CALL	APPLY_DEFAULTS		;supply any values not specified
 062E  E8 0832 R			CALL	DETERMINE_START 	;compute start address of VDISK buffer
 0631  E8 0888 R			CALL	VALIDATE		;validate parameters
 0634  E8 0B30 R			CALL	COPY_BPB		;Copy BIOS Parameter Block to boot record
				
 0637  E8 0B3E R			CALL	VERIFY_EXTENDER 	;Verify that extender card switches are right
				
 063A  F6 06 058B R 02			TEST	ERR_FLAG,ERR_EXTSW	;are switches wrong?
 063F  75 1F				JNZ	INIT_P1_A		;if so, exit with messages
				
 0641  2E: F6 06 058F R 01		test	cs:err_flag2,err_baddos
 0647  75 17				jnz	init_p1_a
				
 0649  80 3E 003B R 00			CMP	EM_SW,0 		;EXTENDED MEMORY REQUEST?
 064E  74 10				JE	INIT_P1_A		;jump if not
				
 0650  F6 06 058B R 08			TEST	ERR_FLAG,ERR_SYSSZ	;is system too small for VDISK?
 0655  75 09				JNZ	INIT_P1_A		;if so, don't do extended memory init
				
 0657  E8 0B7C R			CALL	UPDATE_AVAIL		;update AVAIL_HI and AVAIL_LO to reflect
									;addition of extended memory VDISK
 065A  E8 0BF3 R			CALL	FORMAT_VDISK		;construct a boot record, FATs and
									;directory in storage immediately
									;following this device driver
 065D  E8 0C7E R			CALL	MOVE_VDISK		;move formatted boot record, FATs,
									;and directory to extended memory
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-35
Initialization, Part one                                    

 0660				INIT_P1_A:
 0660  E8 0C9F R			CALL	FILL_RH 		;fill in INIT request header
 0663  E8 0CE6 R			CALL	WRITE_MESSAGES		;display all messages
 0666  59				POP	CX			;get old SP from stack
 0667  5A				POP	DX			;get old SS from stack
 0668  FA				CLI				;disable interrupts while changing SS:SP
 0669  8E D2				MOV	SS,DX			;restore stack segment register
 066B  8B E1				MOV	SP,CX			;restore stack pointer register
 066D  FB				STI				;enable interrupts
				;-----------------------------------------------------------------------;
				;	INIT_P2 must be short enough to fit into the boot sector	;
				;	(minimum size of boot sector is 128 bytes), so we set up	;
				;	as many pointers as we can to help keep INIT_P2 short.		;
				;									;
				;	ES:DI = storage address of first FAT sector			;
				;	BL = media control byte 					;
				;	CX = number of FAT copies					;
				;	DX = number of bytes in one FAT, less 3 			;
				;	SI = offset of VOL label field					;
				;-----------------------------------------------------------------------;
 066E  8E 06 0035 R			MOV	ES,START_BUFFER_PARA	;start paragraph of VDISK buffer
				
 0672  A1 00E8 R			MOV	AX,BPB_RES		;number of reserved sectors
 0675  F7 26 00E5 R			MUL	BPB_SSZ 		;* sector size
 0679  8B F8				MOV	DI,AX			;ES:DI point to FAT start
				
 067B  8A 1E 00EF R			MOV	BL,BPB_MCB		;media control byte
				
 067F  8A 0E 00EA R			MOV	CL,BPB_FATN		;number of FAT copies
 0683  32 ED				XOR	CH,CH
				
 0685  A1 00F0 R			MOV	AX,BPB_FATSZ		;FAT size in sectors
 0688  F7 26 00E5 R			MUL	BPB_SSZ 		;* sector size = total FAT bytes
				
 068C  2D 0003				SUB	AX,3			;-3 (FEFFFF stored by code)
 068F  8B D0				MOV	DX,AX
				
 0691  BE 0012 R			MOV	SI,OFFSET VOL_LABEL	;point to VOL label directory entry
 0694  E9 04CE R			JMP	INIT_P2 		;jump to second part of initialization
									;this is redundant if the VDISK is in
									;extended memory, but is executed anyway
				
				
				
					SUBTTL	PC_386_CHK
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-36
PC_386_CHK                                                  

					PAGE
				;=========================================================================
				; PC_386_CHK		: QUERIES THE BIOS TO DETERMINE WHAT TYPE OF
				;			  MACHINE WE ARE ON.  WE ARE LOOKING FOR A 386.
				;			  THIS WILL BE USED TO DETERMINE IF A DW MOVE
				;			  IS TO BE PERFORMED.
				;
				;	INPUTS		: NONE
				;
				;	OUTPUTS 	: PC_386 - FLAG SIGNALS IF WE ARE ON A 386 MACHINE.
				;=========================================================================
				
 0697				PC_386_CHK PROC NEAR			;AN000;DETERMINE MACHINE TYPE
				
 0697  50				PUSH	AX			;AN000;SAVE AFFECTED REGS
 0698  53				PUSH	BX			;AN000;
 0699  06				PUSH	ES			;AN000;
				
 069A  2E: C6 06 00E4 R 00		MOV	CS:PC_386,FALSE 	;AN000;INITIALIZE TO FALSE
				
 06A0  B4 C0				MOV	AH,0C0H 		;AN000;RETURN SYSTEM CONFIGURATION
 06A2  CD 15				INT	15H			;AN000;
				
				;	$IF	NC			;AN000;IF A GOOD RETURN
 06A4  72 13				JC $$IF13
 06A6  80 FC 00				    CMP     AH,0		;AN000;IS IT NEW FORMAT FOR CONFIG.
				;	    $IF     E			;AN000;YES
 06A9  75 0E				    JNE $$IF14
 06AB  26: 8A 47 02				MOV	AL,ES:[BX.BIOS_SD_MODELBYTE] ;AN000;CHECK MODEL
 06AF  3C F8					CMP	AL,0F8H 	;AN000;IS IT A 386 MACHINE?
				;		$IF	E		;AN000;YES
 06B1  75 06					JNE $$IF15
 06B3  2E: C6 06 00E4 R FF			    MOV     CS:PC_386,TRUE ;AN000;SIGNAL A 386
				;		$ENDIF			;AN000;
 06B9				$$IF15:
				;	    $ENDIF			;AN000;
 06B9				$$IF14:
				;	$ENDIF				;AN000;
 06B9				$$IF13:
				
 06B9  07				POP	ES			;AN000;RESTORE REGS.
 06BA  5B				POP	BX			;AN000;
 06BB  58				POP	AX			;AN000;
				
 06BC  C3				RET				;AN000;
				
 06BD				PC_386_CHK ENDP 			;AN000;
				
				
					SUBTTL	GET_PARMS Parameter Line Scan
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-37
GET_PARMS Parameter Line Scan                               

					PAGE
				;-----------------------------------------------------------------------;
				;GET_PARMS gets the parameters from the CONFIG.SYS statement		;
				;									;
				;Register usage:							;
				;	DS:SI indexes parameter string					;
				;	AL contains character from parameter string			;
				;	CX value from GET_NUMBER					;
				;-----------------------------------------------------------------------;
					ASSUME	DS:NOTHING		;DS:BX point to Request Header
 06BD				GET_PARMS PROC				;get parameters from CONFIG.SYS line
 06BD  1E				PUSH	DS			;save DS
 06BE  C5 77 12				LDS	SI,RH.RH0_BPBA		;DS:SI point to all after DEVICE=
									;in CONFIG.SYS line
 06C1  32 C0				XOR	AL,AL			;not at end of line
				
				;Skip until first delimiter is found.  There may be digits in the path string.
				
				;DS:SI points to  \pathstring\VDISK.SYS nn nn nn
				;The character following VDISK.SYS may have been changed to a null (00H).
				;All letters have been changed to uppercase.
				
 06C3				GET_PARMS_A:				;skip to DOS delimiter character
 06C3  E8 0787 R			CALL	GET_PCHAR		;get parameter character into AL
 06C6  74 73				JZ	Get_Parms_X_Exit	;get out if end of line encountered
 06C8  0A C0				OR	AL,AL			;test for null
 06CA  74 18				JZ	GET_PARMS_C		;
 06CC  3C 20				CMP	AL,' '
 06CE  74 14				JE	GET_PARMS_C		;
 06D0  3C 2C				CMP	AL,','
 06D2  74 10				JE	GET_PARMS_C		;
 06D4  3C 3B				CMP	AL,';'
 06D6  74 0C				JE	GET_PARMS_C		;
 06D8  3C 2B				CMP	AL,'+'
 06DA  74 08				JE	GET_PARMS_C		;
 06DC  3C 3D				CMP	AL,'='
 06DE  74 04				JE	GET_PARMS_C		;
 06E0  3C 09				CMP	AL,TAB
 06E2  75 DF				JNE	GET_PARMS_A		;skip until delimiter or CR
				
				
				
 06E4				GET_PARMS_C:
 06E4  56				PUSH	SI			;save to rescan
 06E5  2E: C6 06 003B R 00		MOV	CS:EM_SW,0		;INDICATE NO /E FOUND
 06EB  EB 06 90				JMP	GET_SLASH		;see if current character is an slash
				
 06EE				GET_PARMS_D:				;scan for /
 06EE  E8 0787 R			CALL	GET_PCHAR
 06F1  74 3F				JZ	GET_PARMS_B		;exit if end of line
				
 06F3				GET_SLASH:			;check for slash
 06F3  3C 2F				CMP	AL,'/'		;found slash?
 06F5  75 F7				JNE	GET_PARMS_D	;no, continue scan
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-38
GET_PARMS Parameter Line Scan                               

				
 06F7  E8 0787 R			CALL	GET_PCHAR	;get char following slash
 06FA  3C 45				CMP	AL,'E'		;don't have to test for lower case E,
								;letters have been changed to upper case
 06FC  75 0E				JNE	CHECK_FOR_X	;not 'E'				 ;AN005;
 06FE  2E: 80 3E 003B R 58		CMP	CS:EM_SW,'X'	;Was /X already defined?		 ;AN005;
 0704  74 24				JE	GET_PARMS_E	;indicate invalid switch		 ;AN005;
 0706  2E: A2 003B R			MOV	CS:EM_SW,AL	;indicate /E found			 ;AN005;
 070A  EB 12				JMP	SHORT GOT_E_OR_X					 ;AN005;
													 ;AN005;
 070C				CHECK_FOR_X:								 ;AN005;
 070C  3C 58				CMP	AL,'X'		;don't have to test for lower case X,    ;AN005;
								;letters have been changed to upper case ;AN005;
 070E  75 1A				JNE	GET_PARMS_E	;not 'X'				 ;AN005;
 0710  2E: 80 3E 003B R 45		CMP	CS:EM_SW,'E'	;Was /E already defined?		 ;AN005;
 0716  74 12				JE	GET_PARMS_E	;indicate invalid switch		 ;AN005;
 0718  2E: C6 06 003B R 58		MOV	CS:EM_SW,'X'	;indicate /X found			 ;AN005;
													 ;AN005;
 071E				GOT_E_OR_X:								 ;AN005;
 071E  E8 0787 R			CALL	GET_PCHAR	;get char following E or X		 ;AN005;
 0721  3C 3A				CMP	AL,':'		;is it a delimeter ?
 0723  75 C9				JNE	GET_PARMS_D	;not a ':'
				
				
 0725  E8 076F R			CALL	GET_MAXSIZE	;get maximum sector size
				
				
 0728  EB C4				JMP	GET_PARMS_D	;continue forward scan
				
 072A				GET_PARMS_E:			;/ found, not 'E'
 072A  2E: 80 0E 058B R 04		OR	CS:ERR_FLAG,ERR_SWTCH	;indicate invalid switch character
 0730  EB BC				JMP	GET_PARMS_D		;continue scan
				
				
				
 0732				GET_PARMS_B:				;now pointing to first delimiter
 0732  5E				POP	SI			;get pointer, used to rescan for /E
 0733  32 C0				XOR	AL,AL			;not at EOL now
 0735  E8 0787 R			CALL	GET_PCHAR		;get first character
 0738  E8 07A2 R			CALL	SKIP_TO_DIGIT		;skip to first digit
				
 073B				Get_Parms_X_Exit:
				
 073B  74 22				JZ	GET_PARMS_X		;found EOL, no digits remain
				
 073D  E8 07B3 R			CALL	GET_NUMBER		;extract digits, convert to binary
 0740  2E: 89 0E 057F R			MOV	CS:BUFF_SIZE,CX 	;store buffer size
				
 0745  E8 07A2 R			CALL	SKIP_TO_DIGIT		;skip to next digit
 0748  74 15				JZ	GET_PARMS_X		;found EOL, no digits remain
				
 074A  E8 07B3 R			CALL	GET_NUMBER		;extract digits, convert to binary
 074D  2E: 89 0E 00E5 R			MOV	CS:BPB_SSZ,CX		;store sector size
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-39
GET_PARMS Parameter Line Scan                               

 0752  E8 07A2 R			CALL	SKIP_TO_DIGIT		;skip to next digit
 0755  74 08				JZ	GET_PARMS_X		;found EOL, no digits remain
				
 0757  E8 07B3 R			CALL	GET_NUMBER		;extract digits, convert to binary
 075A  2E: 89 0E 00EB R			MOV	CS:BPB_DIRN,CX		;store number of directory entries
				
				
				
 075F				GET_PARMS_X:				;premature end of line
 075F  2E: F6 06 058B R 04		TEST	cs:ERR_FLAG,ERR_SWTCH	;was an invalid switch character found?
				;	$if	nz			;yes - set flag to regular VDISK	;an000; dms;
 0765  74 06				JZ $$IF19
									;  this is consistent with DOS 3.3
 0767  2E: C6 06 003B R 00			mov	cs:EM_SW,0	;set flag to regular VDISK		;an000; dms;
				;	$endif				;					;an000; dms;
 076D				$$IF19:
 076D  1F				POP	DS			;restore DS
 076E  C3				RET
				
				
 076F				GET_MAXSIZE PROC			;get maximum sector size
				
 076F  E8 0787 R			CALL	GET_PCHAR		;get next character
 0772  E8 0797 R			CALL	CHECK_NUM		;is it a number ?
 0775  74 07				JZ	GET_NEXTNUM		;yes, go get next number
 0777  2E: 80 0E 058B R 01		OR	CS:ERR_FLAG,ERR_ESIZE	;indicate invalid sector size
 077D  C3				RET				;
 077E				GET_NEXTNUM:				;get next number
 077E  E8 07B3 R			CALL	GET_NUMBER		;extract digits and convert to binary
 0781  2E: 89 0E 057D R			MOV	CS:MAXSEC_TRF,CX	;save maximum sector size to transfer
 0786  C3				RET
 0787				GET_MAXSIZE ENDP
				
				
				
 0787				GET_PCHAR PROC				;internal proc to get next character into AL
 0787  3C 0D				CMP	AL,CR			;carriage return already encountered?
 0789  74 0B				JE	GET_PCHAR_X		;don't read past end of line
 078B  3C 0A				CMP	AL,LF			;line feed already encountered?
 078D  74 07				JE	GET_PCHAR_X		;don't read past end of line
 078F  AC				LODSB				;get char from DS:SI, increment SI
 0790  3C 0D				CMP	AL,CR			;is the char a carriage return?
 0792  74 02				JE	GET_PCHAR_X		;yes, set Z flag at end of line
 0794  3C 0A				CMP	AL,LF			;no, is it a line feed?
 0796				GET_PCHAR_X:				;attempted read past end of line
 0796  C3				RET
 0797				GET_PCHAR ENDP				;returns char in AL
				
				
 0797				CHECK_NUM PROC				;check AL for ASCII digit
 0797  3C 30				CMP	AL,'0'			;< '0'?
 0799  72 06				JB	CHECK_NUM_X		;exit if it is
				
 079B  3C 39				CMP	AL,'9'			;> '9'?
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-40
GET_PARMS Parameter Line Scan                               

 079D  77 02				JA	CHECK_NUM_X		;exit if it is
				
 079F  3A C0				CMP	AL,AL			;set Z flag to indicate numeric
 07A1				CHECK_NUM_X:
 07A1  C3				RET				;Z set if numeric, NZ if not numeric
 07A2				CHECK_NUM ENDP
				
				
 07A2				SKIP_TO_DIGIT PROC			;skip to first numeric character
 07A2  E8 0797 R			CALL	CHECK_NUM		;is current char a digit?
 07A5  74 06				JZ	SKIP_TO_DIGIT_X 	;if so, skip is complete
				
 07A7  E8 0787 R			CALL	GET_PCHAR		;get next character from line
 07AA  75 F6				JNZ	SKIP_TO_DIGIT		;loop until first digit or CR or LF
 07AC  C3				RET				;character is CR or LF
				
 07AD				SKIP_TO_DIGIT_X:
 07AD  3C 00				CMP	AL,0			;digit found, force NZ
 07AF  C3				RET
 07B0				SKIP_TO_DIGIT ENDP
				
 07B0  000A			C10	DW	10
 07B2  00			GN_ERR	DB	?			;zero if no overflow in accumulation
				
 07B3				GET_NUMBER PROC 			;convert string of digits to binary value
 07B3  33 C9				XOR	CX,CX			;accumulate number in CX
 07B5  2E: 88 0E 07B2 R			MOV	CS:GN_ERR,CL		;no overflow yet
 07BA				GET_NUMBER_A:				;accumulate next digit
 07BA  2C 30				SUB	AL,'0'			;convert ASCII to binary
 07BC  98				CBW				;clear AH
 07BD  91				XCHG	AX,CX			;previous accumulation in AX, new digit in CL
 07BE  2E: F7 26 07B0 R			MUL	CS:C10			;DX:AX := AX*10
 07C3  2E: 08 16 07B2 R			OR	CS:GN_ERR,DL		;set GN_ERR <> 0 if overflow
 07C8  03 C1				ADD	AX,CX			;add new digit from
 07CA  91				XCHG	AX,CX			;number now in CX
 07CB  4E				DEC	SI			;back up to prior entry
 07CC  B0 20				MOV	AL,' '			;blank out prior entry
 07CE  88 04				MOV	[SI],AL 		;
 07D0  46				INC	SI			;set to current entry
 07D1  E8 0787 R			CALL	GET_PCHAR		;get next character
 07D4  E8 0797 R			CALL	CHECK_NUM		;see if it was numeric
 07D7  74 E1				JZ	GET_NUMBER_A		;continue accumulating
 07D9  2E: 80 3E 07B2 R 00		CMP	CS:GN_ERR,0		;did we overflow?
 07DF  74 02				JE	GET_NUMBER_B		;if not, we're done
 07E1  33 C9				XOR	CX,CX			;return zero (always invalid) if overflow
 07E3				GET_NUMBER_B:
 07E3  C3				RET				;number in CX, next char in AL
 07E4				GET_NUMBER ENDP
				
 07E4				GET_PARMS ENDP
				
					SUBTTL	APPLY_DEFAULTS
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-41
APPLY_DEFAULTS                                              

					PAGE
				;-----------------------------------------------------------------------;
				;	APPLY_DEFAULTS supplies any parameter values that the user	;
				;	failed to specify						;
				;-----------------------------------------------------------------------;
					ASSUME	DS:CSEG
 07E4				APPLY_DEFAULTS PROC
 07E4  33 C0				XOR	AX,AX
 07E6  39 06 057F R			CMP	BUFF_SIZE,AX		;is buffer size zero?
 07EA  75 0B				JNE	APPLY_DEFAULTS_A	;no, user specified something
				
 07EC  C7 06 057F R 0040		MOV	BUFF_SIZE,DFLT_BSIZE	;supply default buffer size
 07F2  80 0E 058B R 80			OR	ERR_FLAG,ERR_BSIZE	;indicate buffersize adjusted
				
 07F7				APPLY_DEFAULTS_A:
 07F7  39 06 00E5 R			CMP	BPB_SSZ,AX		;is sector size zero?
 07FB  75 0B				JNE	APPLY_DEFAULTS_B	;no, user specified something
				
 07FD  C7 06 00E5 R 0080		MOV	BPB_SSZ,DFLT_SSZ	;supply default sector size
 0803  80 0E 058B R 40			OR	ERR_FLAG,ERR_SSZ	;indicate sector size adjusted
				
 0808				APPLY_DEFAULTS_B:
 0808  39 06 00EB R			CMP	BPB_DIRN,AX		;are directory entries zero?
 080C  75 0B				JNE	APPLY_DEFAULTS_C	;no, user specified something
				
 080E  C7 06 00EB R 0040		MOV	BPB_DIRN,DFLT_DIRN	;supply default directory entries
 0814  80 0E 058B R 20			OR	ERR_FLAG,ERR_DIRN	;indicate directory entries adjusted
				
 0819				APPLY_DEFAULTS_C:			;
 0819  80 3E 003B R 00			CMP	EM_SW,0 		;EXTENDED MEMORY
 081E  74 11				JE	APPLY_DEFAULTS_D	;no, jump around
 0820  39 06 057D R			CMP	MAXSEC_TRF,AX		;is maximum sectors zero?
 0824  75 0B				JNE	APPLY_DEFAULTS_D	;no, user specified something
				
 0826  C7 06 057D R 0008		MOV	MAXSEC_TRF,DFLT_ESS	;supply default maximum number of
									;sector to transfer
 082C  80 0E 058B R 01			OR	ERR_FLAG,ERR_ESIZE	;indicate transfer size adjusted
 0831				APPLY_DEFAULTS_D:
 0831  C3				RET
 0832				APPLY_DEFAULTS ENDP
				
					SUBTTL	DETERMINE_START address of VDISK buffer
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-42
DETERMINE_START address of VDISK buffer                     

					PAGE
				;-----------------------------------------------------------------------;
				;	DETERMINE_START figures out the starting address of the VDISK	;
				;	buffer								;
				;-----------------------------------------------------------------------;
					ASSUME	DS:CSEG
 0832				DETERMINE_START PROC
				
				;If extended memory is NOT being used, the VDISK buffer immediately
				;follows the resident code.
				
				;If extended memory IS being used, START_BUFFER_PARA becomes the
				;end of device driver address passed back to DOS.
				
 0832  8C C8				MOV	AX,CS			;start para of VDISK code
 0834  05 004B				ADD	AX,VDISKP		;+ length of resident code
 0837  A3 0035 R			MOV	START_BUFFER_PARA,AX	;save as buffer start para
				
 083A  80 3E 003B R 00			CMP	EM_SW,0 		;IS EXTENDED MEMORY REQUESTED?
 083F  74 40				JE	DETERMINE_START_X	;if not, we're done here
				
				;-----------------------------------------------------------------------;AN000;
				;If EMS is not installed, the calculation to determine the starting address
				;of the VDISK will remain the same.
				
				;If EMS is installed we really don't need this calculation, the EMM will
				;manage the expanded memory insuring mutiple VDISKs may reside concurrently.
				;-----------------------------------------------------------------------;AN000;
				
 0841  80 3E 003B R 58			cmp	EM_SW,EMS_Mem		;EMS requested? 			;an005; dms;
 0846  74 39				je	Determine_Start_X	;yes - leave routine			;an005; dms;
									;no  - continue routine
				
 0848  F8				clc				;an001; dms;clear carry for INT
 0849  B8 8800				MOV	AX,EM_MEMSIZE		;an001; dms; get EM memory size
 084C  CD 15				INT	EM_INT			;an001; dms; INT 15h
 084E  72 31				JC	Determine_Start_X	;an001; dms; no extended memory installed
 0850  0B C0				or	ax,ax			;an001; dms;see if memory returned
 0852  74 2D				jz	Determine_Start_X	;an001; dms;signal no memory
				
 0854  33 D2				xor	dx,dx			;an001; dms;clear dx
 0856  2E: 2B 06 057F R			sub	ax,cs:Buff_Size 	;an001; dms;get starting KB location
 085B  72 24				jc	Determine_Start_X	;an001; dms;buffer too large
				
 085D  2E: A3 0037 R			mov	cs:EM_New_Size,ax	;an001; dms;save new size of EM for later use
 0861  F7 26 0585 R			mul	C1024			;an001; dms;get total byte count
 0865  2E: 03 06 002C R			add	ax,cs:Avail_Lo		;an001; dms;add in low word of EM start
 086A  2E: 12 16 002E R			adc	dl,cs:Avail_Hi		;an001; dms;add in high word of EM start
				
 086F  2E: A3 002C R			mov	cs:Avail_Lo,ax		;an001; dms;save new low beginning word
 0873  2E: 88 16 002E R			mov	cs:Avail_Hi,dl		;an001; dms;save new high beginning word
				
 0878  2E: A3 003E R			mov	cs:Start_EM_Lo,ax	;an001; dms;load in new beginning word
 087C  2E: 88 16 0040 R			mov	cs:Start_EM_Hi,dl	;an001; dms;load in new beginning byte
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-43
DETERMINE_START address of VDISK buffer                     

				
 0881				DETERMINE_START_X:
				
 0881  C3				RET
 0882				DETERMINE_START ENDP
				
					SUBTTL	VALIDATE parameters
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-44
VALIDATE parameters                                         

					PAGE
				;-----------------------------------------------------------------------;
				;	VALIDATE adjusts parameters as necessary			;
				;-----------------------------------------------------------------------;
 0882				VAL_SSZ_TBL LABEL WORD			;table of valid sector sizes
 0882  0080			VAL_SSZ_S DW	128			;smallest valid sector size
 0884  0100				DW	256
 0886  0200			VAL_SSZ_L DW	512			;largest valid sector size
 = 0003				VAL_SSZ_N EQU	($-VAL_SSZ_TBL)/2	;number of table entries
				
					ASSUME	DS:CSEG
 0888				VALIDATE PROC				;validate parameters
				;;ice	PUSH	DS			;ICE
				;;ice	push	bx			;ICE
				;;ice	push	ax			;ICE
				
				;;ice	mov	bx,0140H		;ICE
				;;ice	xor	ax,ax			;ICE
				;;ice	mov	ds,ax			;ICE
				;;ice	mov	ax,word ptr ds:[bx]	;ICE
				;;ice	mov	word ptr ds:[bx],ax	;ICE
				
				;;ice	pop	ax			;ICE
				;;ice	pop	bx			;ICE
				;;ice	POP	DS			;ICE
 0888  C6 06 00E7 R 01			MOV	BPB_AUSZ,1		;initial allocation unit is 1 sector
				
 088D  E8 090F R			CALL	VAL_BSIZE		;validate buffer size
				
 0890  E8 0A1A R			CALL	VAL_SSZ 		;validate (adjust if necessary) BPB_SSZ
				
 0893				VALIDATE_A:
 0893  80 26 058B R EF			AND	ERR_FLAG,255-ERR_PASS	;indicate nothing changed this pass
				
 0898  A1 00E5 R			MOV	AX,BPB_SSZ		;sector size
 089B  99				CWD				;clear DX for division
 089C  F7 36 0041 R			DIV	WPARA_SIZE		;sector size/para size
 08A0  A3 0033 R			MOV	PARAS_PER_SECTOR,AX	;number of paragraphs/sector
				
 08A3  B8 4000				mov	ax,EMS_Page_Size	;an002; dms;EMS page size
 08A6  33 D2				xor	dx,dx			;an002; dms;clear high word
 08A8  F7 36 00E5 R			div	BPB_SSZ 		;an002; dms;get sectors/page
 08AC  A3 005A R			mov	Sect_Per_Page,ax	;an002; dms;save sectors/page
				
				;;;;;	MOV	AX,BPB_SSZ		;AN000; Sector size
				;;;;;	xor	dx,dx			;an001; clear high word
				;;;;;	DIV	DOS_Page_Size_Word	;an001; Sector size/page size
				;;;;;	MOV	SECT_PER_PAGE,AX	;an001; Number of sectors/page
				
 08AF  A1 057F R			MOV	AX,BUFF_SIZE		;requested buffersize in KB
 08B2  F7 26 0585 R			MUL	C1024			;DX:AX = buffer size in bytes
 08B6  F7 36 00E5 R			DIV	BPB_SSZ 		;/sector size = # sectors
 08BA  A3 00ED R			MOV	BPB_SECN,AX		;store number of sectors
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-45
VALIDATE parameters                                         

 08BD  E8 0A77 R			CALL	VAL_DIRN		;validate number of directory entries
				
 08C0  F6 06 058B R 10			TEST	ERR_FLAG,ERR_PASS	;may have reset sector size
 08C5  75 CC				JNZ	VALIDATE_A		;recompute directory & FAT sizes
				
 08C7  E8 0AC4 R			CALL	VAL_FAT 		;compute FAT entries, validity test
				
 08CA  F6 06 058B R 10			TEST	ERR_FLAG,ERR_PASS	;if cluster size altered this pass
 08CF  75 C2				JNZ	VALIDATE_A		;recompute directory & FAT sizes
				
				;Make certain buffer size is large enough to contain:
				;	boot sector(s)
				;	FAT sector(s)
				;	directory sector(s)
				;	at least 1 data cluster
				
 08D1  A0 00EA R			MOV	AL,BPB_FATN		;number of FAT copies
 08D4  98				CBW				;clear AH
 08D5  F7 26 00F0 R			MUL	BPB_FATSZ		;* sectors for 1 FAT = FAT sectors
 08D9  03 06 00E8 R			ADD	AX,BPB_RES		;+ reserved sectors
 08DD  03 06 0589 R			ADD	AX,DIR_SECTORS		;+ directory sectors
 08E1  8A 0E 00E7 R			MOV	CL,BPB_AUSZ		;get sectors/cluster
 08E5  32 ED				XOR	CH,CH			;CX = sectors in one cluster
 08E7  03 C1				ADD	AX,CX			;+ one data cluster
 08E9  39 06 00ED R			CMP	BPB_SECN,AX		;compare with sectors available
 08ED  73 1F				JAE	VALIDATE_X		;jump if enough sectors
				
 08EF  83 3E 0589 R 01			CMP	DIR_SECTORS,1		;down to 1 directory sector?
 08F4  76 13				JBE	VALIDATE_C		;can't let it go below 1
				
 08F6  A1 00E5 R			MOV	AX,BPB_SSZ		;sector size
 08F9  99				CWD				;clear DX for division
 08FA  F7 36 0587 R			DIV	DIRE_SIZE		;sectorsize/dir entry size = entries/sector
 08FE  29 06 00EB R			SUB	BPB_DIRN,AX		;reduce directory entries by 1 sector
				
 0902  80 0E 058B R 20			OR	ERR_FLAG,ERR_DIRN	;indicate directory entries adjusted
 0907  EB 8A				JMP	VALIDATE_A		;retry with new directory entries number
				
 0909				VALIDATE_C:				;not enough space for any VDISK
 0909  80 0E 058B R 08			OR	ERR_FLAG,ERR_SYSSZ
 090E				VALIDATE_X:
 090E  C3				RET
				
					SUBTTL	VAL_BSIZE Validate buffer size
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-46
VAL_BSIZE Validate buffer size                              

					PAGE
				;-----------------------------------------------------------------------;
				;	VAL_BSIZE adjusts the buffer size as necessary			;
				;-----------------------------------------------------------------------;
 090F				VAL_BSIZE PROC
 090F  E8 0956 R			CALL	GET_MSIZE		;determine memory available to VDISK
									;returns available KB in AX
 0912  0B C0				OR	AX,AX			;is any memory available at all?
 0914  75 18				JNZ	VAL_BSIZE_B		;yes, continue
				
 0916  80 0E 058B R 08			OR	ERR_FLAG,ERR_SYSSZ	;indicate system too small for VDISK
 091B  C7 06 057F R 0001		MOV	BUFF_SIZE,1		;set up minimal values to continue init
 0921  A1 0882 R			MOV	AX,VAL_SSZ_S		;smallest possible sector size
 0924  A3 00E5 R			MOV	BPB_SSZ,AX
 0927  C7 06 00EB R 0004		MOV	BPB_DIRN,4		;4 directory entries
 092D  C3				RET
				
 092E				VAL_BSIZE_B:				;some memory is available
 092E  3B 06 057F R			CMP	AX,BUFF_SIZE		;is available memory >= requested?
 0932  73 21				JAE	VAL_BSIZE_C		;if so, we're done
				
 0934  A3 057F R			MOV	BUFF_SIZE,AX		;give all available memory
 0937  2E: C7 06 0037 R 0000		mov	cs:EM_New_Size,0	;an001; dms;save new size of EM for later use
 093E  2E: A1 002C R			mov	ax,cs:Avail_Lo		;an001; dms;get low word of EM start
 0942  2E: 8A 16 002E R			mov	dl,cs:Avail_Hi		;an001; dms;get high byte of EM start
				
 0947  2E: A3 003E R			mov	cs:Start_EM_Lo,ax	;an001; dms;load in new beginning word
 094B  2E: 88 16 0040 R			mov	cs:Start_EM_Hi,dl	;an001; dms;load in new beginning byte
 0950  80 0E 058B R 80			OR	ERR_FLAG,ERR_BSIZE	;indicate buffersize adjusted
 0955				VAL_BSIZE_C:
				
				
 0955  C3				RET
				
				
 0956				GET_MSIZE PROC				;determine memory available to VDISK
									;returns KB available in AX
 0956  80 3E 003B R 00			CMP	EM_SW,0 		;EXTENDED MEMORY?
 095B  74 2B				JE	GET_MSIZE_2		;use non-extended memory routine
				
 095D  80 3E 003B R 45			cmp	EM_SW,EM_Mem		;Extended memory requested?		;an005; dms;
 0962  74 18				je	Use_Extended_Support	;yes					;an005; dms;
									;no - check for EMS availability
				
				
 0964  E8 09A3 R			CALL	EMS_CHECK		;AN000; Check if EMS is installed
 0967  72 37				JC	GET_MSIZE_Z		;AN000; Yes, it is installed but in error
									;	 then notify caller by setting AX to zero
 0969  80 FC FF				CMP	AH,NOT EMS_INSTALLED_FLAG ;AN000;
 096C  74 32				JE	Get_Msize_Z		;ac005; flag an error occurred
 096E  88 26 004F R			MOV	EM_SW2,AH		;AN000;   Set EMS flag
 0972  E8 0A0D R			CALL	EMS_GET_PAGES		;AN000;   Get count of total number of pages
 0975  33 D2				xor	dx,dx			;an002;   clear high word
 0977  F7 26 058D R			MUL	DOS_Page_Size_Word	;ac002;   Number of pages * KB per page
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-47
VAL_BSIZE Validate buffer size                              

 097B  C3				RET				;AN000;   Return with AX = number of whole free kilobytes
									;
 097C				USE_EXTENDED_SUPPORT:			;AN000; No, EMS is not installed
				
 097C  B8 8800				MOV	AX,EM_MEMSIZE		;function code to AH
 097F  CD 15				INT	EM_INT			;get extended memory size in AX
 0981  72 1D				JC	GET_MSIZE_Z		;if error, no extended memory installed
 0983  0B C0				or	ax,ax			;an000; dms;see if memory returned
 0985  74 19				jz	GET_MSIZE_Z		;an000; dms;signal no memory
				
 0987  C3				RET
				
 0988				GET_MSIZE_2:				;non-extended memory size determination
				
				;Compute AX = total system size, - (VDISK end address + 64KB)
				
 0988  A1 0035 R			MOV	AX,START_BUFFER_PARA	;paragraph end of VDISK code
 098B  33 D2				XOR	DX,DX			;clear for division
 098D  F7 36 0583 R			DIV	PARA_PER_KB		;KB address of load point
 0991  83 C2 FF				ADD	DX,0FFFFH		;round upward to KB boundary
 0994  13 06 0581 R			ADC	AX,MIN_MEMORY_LEFT	;pick up CY and the 64KB we should leave
 0998  50				PUSH	AX			;save across interrupt
 0999  CD 12				INT	MEM_SIZE		;get total system size
 099B  5A				POP	DX			;amount of total that we can't use
 099C  2B C2				SUB	AX,DX			;available space to VDISK
 099E  73 02				JNC	GET_MSIZE_X		;exit if positive
				
 09A0				GET_MSIZE_Z:
 09A0  33 C0				XOR	AX,AX			;indicate no memory available
 09A2				GET_MSIZE_X:				;exit from memory size determination
 09A2  C3				RET
 09A3				GET_MSIZE ENDP
				
 09A3				VAL_BSIZE ENDP
				
				
				
 09A3				EMS_CHECK PROC	NEAR			;AN000;
				
 09A3  E8 09E0 R			CALL	EMS_CHECK1		;AN000; SEE IF EMS INSTALLED
 09A6  73 05				JNC	EMS_INSTALLED		;AN000; No,
 09A8  B4 FF				MOV	AH,NOT EMS_INSTALLED_FLAG ;AN000;  Flag EMS not installed
 09AA  F8				CLC				;AN000;  Make sure carry is Clear
 09AB  EB 32				JMP	SHORT EMS_CHECK_EXIT	;AN000;  Leave check routine
				
 09AD				EMS_INSTALLED:				;AN000; Yes,
				
 09AD  06				push	es				;an000; save es - call destroys it
 09AE  57				push	di				;an006; save di
				
 09AF  B4 1B				mov	ah,EMS_2F_Handler		;an006;see if our 2Fh is there
 09B1  32 C0				xor	al,al				;an006;
 09B3  CD 2F				int	2Fh				;an006;
 09B5  3C FF				cmp	al,0ffh 			;an006;2Fh handler there?
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-48
VAL_BSIZE Validate buffer size                              

				;	$if	e				;an006;yes
 09B7  75 21				JNE $$IF21
 09B9  B4 1B					mov	ah,EMS_2F_Handler	;an006;get EMS page for VDISK
 09BB  B0 FF					mov	al,0FFh 		;an006;
 09BD  BF 00FE					mov	di,0FEh 		;an006;
 09C0  CD 2F					int	2Fh			;ac006;
				
 09C2  0A E4					or	ah,ah			;an006;page available?
				;		$if	z			;an006;yes
 09C4  75 0F					JNZ $$IF22
 09C6  2E: 8C 06 0052 R					mov	cs:EMS_Frame_Addr,es	;an006;save segment value
 09CB  2E: 89 3E 005C R					mov	cs:DOS_Page,di	;an006;save physical page #
 09D0  F8						clc			;an006;flag memory available
 09D1  B4 00						mov	ah,EMS_INSTALLED_FLAG ;an000;signal EMS here
				;		$else				;an006;no memory avail.
 09D3  EB 03					JMP SHORT $$EN22
 09D5				$$IF22:
 09D5  B4 FF						mov	ah,not EMS_INSTALLED_FLAG ;an000;signal no EMS
 09D7  F9						stc			;an006;flag it
				;		$endif				;an006;
 09D8				$$EN22:
				;	$else
 09D8  EB 03				JMP SHORT $$EN21
 09DA				$$IF21:
 09DA  B4 FF					mov	ah,not EMS_INSTALLED_FLAG ;AN000;signal no EMS
 09DC  F9					stc				;an006;signal not there
				;	$endif
 09DD				$$EN21:
				
 09DD  5F				pop	di				;an006;restore di
 09DE  07				pop	es				;an000;restore es
				
 09DF				EMS_Check_Exit:
				
 09DF  C3				RET				;AN000;    Return
				
 09E0				EMS_CHECK ENDP				;AN000;
				
				
				
				;=========================================================================
				; EMS_CHECK1		: THIS MODULE DETERMINES WHETHER OR NOT EMS IS
				;			  INSTALLED FOR THIS SESSION.
				;
				;	INPUTS		: NONE
				;
				;	OUTPUTS 	: ES:BX - FRAME ARRAY
				;			  CY	- EMS NOT AVAILABLE
				;			  NC	- EMS AVAILABLE
				;=========================================================================
				
 09E0				EMS_CHECK1 PROC NEAR			;AN000;EMS INSTALL CHECK
				
 09E0  1E				push	ds			;an000;save ds - we stomp it
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-49
VAL_BSIZE Validate buffer size                              

 09E1  B8 0000				mov	ax,00h			;an000;set ax to 0
 09E4  8E D8				mov	ds,ax			;an000;set ds to 0
 09E6  83 3E 019C 00			cmp	ds:word ptr[067h*4+0],0 ;an000;see if int 67h is there
 09EB  1F				pop	ds			;an000;restore ds
				;	$IF	NE			;AN000;EMS VECTOR CONTAINS DATA
 09EC  74 1D				JE $$IF27
 09EE  B4 40				    MOV     AH,EMS_STATUS	;AN000;see if EMS installed
 09F0  32 C0				    XOR     AL,AL		;AN000;CLEAR AL
 09F2  CD 67				    INT     EMS_INT		;AN000;
 09F4  0A E4				    OR	    AH,AH		;AN000;EMS INSTALLED?
				;	    $IF     Z			;AN000;YES
 09F6  75 10				    JNZ $$IF28
 09F8  B4 46					MOV	AH,EMS_VERSION	;AN000;GET VERSION NUMBER
 09FA  32 C0					XOR	AL,AL		;AN000;CLEAR AL
 09FC  CD 67					INT	EMS_INT 	;AN000;
 09FE  3C 40					CMP	AL,EMS_VERSION_LEVEL ;AN000;CORRECT VERSION?
				;		$IF	AE		;AN000;YES
 0A00  72 03					JNAE $$IF29
 0A02  F8					    CLC 		;AN000;FLAG IT AS GOOD EMS
				;		$ELSE			;AN000;
 0A03  EB 01					JMP SHORT $$EN29
 0A05				$$IF29:
 0A05  F9					    STC 		;AN000;BAD EMS
				;		$ENDIF			;AN000;
 0A06				$$EN29:
				;	    $ELSE			;AN000;
 0A06  EB 01				    JMP SHORT $$EN28
 0A08				$$IF28:
 0A08  F9					STC			;AN000;EMS NOT INSTALLED
				;	    $ENDIF			;AN000;
 0A09				$$EN28:
				;	$ELSE				;AN000;
 0A09  EB 01				JMP SHORT $$EN27
 0A0B				$$IF27:
 0A0B  F9				    STC 			;AN000;EMS VECTOR NOT THERE
				;	$ENDIF				;AN000;
 0A0C				$$EN27:
				
 0A0C  C3				RET				;AN000;RETURN TO CALLER
				
 0A0D				EMS_CHECK1 ENDP 			;AN000;
				
				
 0A0D				EMS_GET_PAGES PROC NEAR 		;AN000;
				
 0A0D  B4 42				MOV	AH,EMS_GET_NUM_PAGES	;AN000; Query EMS for page count
 0A0F  CD 67				INT	EMS_INT 		;AN000;
 0A11  0A E4				OR	AH,AH			;AN000; Has EMS returned page count?
 0A13  75 03				JNZ	EMS_GET_ERROR		;AN000; Yes,
 0A15  8B C3				MOV	AX,BX			;AN000;   Get number of pages
 0A17  C3				RET				;AN000;
				
 0A18				EMS_GET_ERROR:				;AN000;
 0A18  F9				STC				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-50
VAL_BSIZE Validate buffer size                              

 0A19  C3				RET				;AN000;
				
 0A1A				EMS_GET_PAGES ENDP
				
					SUBTTL	VAL_SSZ Validate Sector Size
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-51
VAL_SSZ Validate Sector Size                                

					PAGE
				;-----------------------------------------------------------------------;
				;	VAL_SSZ validates sector size, adjusting if necessary		;
				;-----------------------------------------------------------------------;
 0A1A				VAL_SSZ PROC				;validate sector size
 0A1A  2E: 80 3E 003B R 00		CMP	CS:EM_SW,0		;EXTENDED MEMORY?
 0A20  74 21				JE	VAL_SSZ_ST		;no,go check sector size
 0A22  8B 1E 057D R			MOV	BX,MAXSEC_TRF		;move number of sectors to transfer
 0A26  83 FB 01				CMP	BX,1			;> or equal to 1 ?
 0A29  72 08				JB	DFLT_TRF		;set default if it is
 0A2B  83 FB 08				CMP	BX,8			;> than 8 ?
 0A2E  77 03				JA	DFLT_TRF		;set default if it is
 0A30  EB 11 90				JMP	VAL_SSZ_ST		;continue processing
				
 0A33				DFLT_TRF:				;set default
 0A33  C7 06 057D R 0008		MOV	MAXSEC_TRF,DFLT_ESS	;
 0A39  8B 1E 057D R			MOV	BX,MAXSEC_TRF		;
 0A3D  2E: 80 0E 058B R 01		OR	CS:ERR_FLAG,ERR_ESIZE	;indicate transfer size adjusted
				
 0A43				VAL_SSZ_ST:				;validate sector size
 0A43  89 1E 0043 R			MOV	MAX_CNT,BX		;initialize maximum number of sectors
									;to transfer for extended memory case
 0A47  8B 1E 00E5 R			MOV	BX,BPB_SSZ		;requested sector size
 0A4B  B9 0003				MOV	CX,VAL_SSZ_N		;number of table entries
 0A4E  BE 0882 R			MOV	SI,OFFSET VAL_SSZ_TBL	;DS:SI point to table start
 0A51				VAL_SSZ_A:
 0A51  AD				LODSW				;get table entry, step table pointer
 0A52  3B C3				CMP	AX,BX			;is value in table?
 0A54  74 0E				JE	VAL_SSZ_X		;exit if value found
 0A56  E2 F9				LOOP	VAL_SSZ_A		;loop until table end
				
 0A58  BB 0080				MOV	BX,DFLT_SSZ		;get default sector size
 0A5B  89 1E 00E5 R			MOV	BPB_SSZ,BX		;set sector size to default value
 0A5F  80 0E 058B R 40			OR	ERR_FLAG,ERR_SSZ	;indicate sector size adjusted
 0A64				VAL_SSZ_X:
				
				;Compute the maximum number of sectors that can be moved in 64KB (less one)
				;Restricting moves to this amount avoids 64KB boundary problems.
				
 0A64  2E: 80 3E 003B R 00		CMP	CS:EM_SW,0		;EXTENDED MEMORY?
 0A6A  75 0A				JNE	SIZE_DONE		;yes, we are done
 0A6C  33 D2				XOR	DX,DX
 0A6E  B8 FFFF				MOV	AX,0FFFFH		;64KB - 1
 0A71  F7 F3				DIV	BX			;/sector size
 0A73  A3 0043 R			MOV	MAX_CNT,AX		;max sectors in one move
 0A76				SIZE_DONE:
 0A76  C3				RET
 0A77				VAL_SSZ ENDP
				
					SUBTTL	VAL_DIRN Validate number of directory entries
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-52
VAL_DIRN Validate number of directory entries               

					PAGE
				;-----------------------------------------------------------------------;
				;	VAL_DIRN validates and adjusts the number of directory entries. ;
				;									;
				;	Minimum is MIN_DIRN, maximum is MAX_DIRN.  If outside these	;
				;	limits, DFLT_DIRN is used.					;
				;									;
				;	The number of directory entries is rounded upward to fill	;
				;	a sector							;
				;-----------------------------------------------------------------------;
 0A77				VAL_DIRN PROC
 0A77  A1 00EB R			MOV	AX,BPB_DIRN		;requested directory entries
 0A7A  3D 0002				CMP	AX,MIN_DIRN		;if less than minimum
 0A7D  72 05				JB	VAL_DIRN_A		;use default instead
				
 0A7F  3D 0200				CMP	AX,MAX_DIRN		;if <= maximum
 0A82  76 08				JBE	VAL_DIRN_B		;accept value as provided
				
 0A84				VAL_DIRN_A:
 0A84  B8 0040				MOV	AX,DFLT_DIRN		;use default directory entries
 0A87  80 0E 058B R 20			OR	ERR_FLAG,ERR_DIRN	;indicate directory entries adjusted
 0A8C				VAL_DIRN_B:				;AX is number of directory entries
 0A8C  F7 26 0587 R			MUL	DIRE_SIZE		;* 32 = bytes of directory requested
 0A90  F7 36 00E5 R			DIV	BPB_SSZ 		;/ sector size = # of directory sectors
 0A94  0B D2				OR	DX,DX			;test remainder for zero
 0A96  74 06				JZ	VAL_DIRN_C		;jump if exact fit
				
 0A98  40				INC	AX			;increment directory sectors
 0A99  80 0E 058B R 20			OR	ERR_FLAG,ERR_DIRN	;indicate directory entries adjusted
 0A9E				VAL_DIRN_C:				;make sure enough sectors available
 0A9E  8B 16 00ED R			MOV	DX,BPB_SECN		;total sectors on media
 0AA2  2B 16 00E8 R			SUB	DX,BPB_RES		;less reserved sectors
 0AA6  83 EA 02				SUB	DX,2			;less minimum FAT and 1 data sector
 0AA9  3B C2				CMP	AX,DX			;if directory sectors <= available
 0AAB  7E 08				JLE	VAL_DIRN_D		;use requested amount
				
 0AAD  B8 0001				MOV	AX,1			;use only one directory sector
 0AB0  80 0E 058B R 20			OR	ERR_FLAG,ERR_DIRN	;indicate directory entries adjusted
 0AB5				VAL_DIRN_D:
 0AB5  A3 0589 R			MOV	DIR_SECTORS,AX		;save number of directory sectors
 0AB8  F7 26 00E5 R			MUL	BPB_SSZ 		;dir sectors * sector size = dir bytes
 0ABC  F7 36 0587 R			DIV	DIRE_SIZE		;dir bytes / entry size = entries
 0AC0  A3 00EB R			MOV	BPB_DIRN,AX		;store adjusted directory entries
 0AC3  C3				RET
 0AC4				VAL_DIRN ENDP
				
					SUBTTL	VAL_FAT Validate File Allocation Table (FAT)
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-53
VAL_FAT Validate File Allocation Table (FAT)                

					PAGE
				;-----------------------------------------------------------------------;
				;VAL_FAT computes:							;
				;BPB_FATSZ, the number of sectors required per FAT copy 		;
				;									;
				;Each FAT entry is 12 bits long, for a maximum of 4095 FAT entries.	;
				;(A few FAT entries are reserved, so the highest number of FAT entries	;
				;we permit is 0FE0H.)  With large buffer sizes and small sector sizes,	;
				;we have more allocation units to describe than a 12-bit entry will	;
				;describe.  If the number of FAT entries is too large, the sector size	;
				;is increased (up to a maximum of 512 bytes), and then the allocation	;
				;unit (cluster) size is doubled, until we have few enough allocation	;
				;units to be properly described in 12 bits.				;
				;									;
				;This computation is slightly conservative in that the FAT entries	;
				;necessary to describe the FAT sectors are included in the computation. ;
				;-----------------------------------------------------------------------;
 0AC4				VAL_FAT PROC
 0AC4  A1 00ED R			MOV	AX,BPB_SECN		;total number of sectors
 0AC7  2B 06 00E8 R			SUB	AX,BPB_RES		;don't count boot sector(s)
 0ACB  2B 06 0589 R			SUB	AX,DIR_SECTORS		;don't count directory sectors
				
 0ACF  3D 0000				CMP	AX,0000h		;an000; dms; fix ptm 112; any left?
 0AD2  77 0D				JA	VAL_FAT_A		;an000; dms; fix ptm 112; yes
				
				;;;;;	JG	VAL_FAT_A		;jump if some remaining
 0AD4  C7 06 00E5 R 0080		MOV	BPB_SSZ,DFLT_SSZ	;force default sector size
 0ADA  80 0E 058B R 50			OR	ERR_FLAG,ERR_SSZ+ERR_PASS ;indicate sector size adjusted
 0ADF  EB 4E				JMP	SHORT VAL_FAT_X 	;recompute all values
 0AE1				VAL_FAT_A:
 0AE1  33 D2				XOR	DX,DX			;clear DX for division
 0AE3  8A 0E 00E7 R			MOV	CL,BPB_AUSZ		;CX = sectors/cluster
 0AE7  32 ED				XOR	CH,CH
 0AE9  F7 F1				DIV	CX			;whole number of clusters in AX
 0AEB  83 C2 FF				ADD	DX,0FFFFH		;set carry if remainder
 0AEE  15 0000				ADC	AX,0			;increment AX if remainder
 0AF1  3D 0FE0				CMP	AX,MAX_FATE		;number of FAT entries too large?
 0AF4  76 1F				JBE	VAL_FAT_C		;no, continue
				
 0AF6  A1 00E5 R			MOV	AX,BPB_SSZ		;pick up current sector size
 0AF9  3B 06 0886 R			CMP	AX,VAL_SSZ_L		;already at largest permitted?
 0AFD  74 0B				JE	VAL_FAT_B		;yes, can't make it any larger
				
 0AFF  D1 26 00E5 R			SHL	BPB_SSZ,1		;double sector size
 0B03  80 0E 058B R 50			OR	ERR_FLAG,ERR_SSZB	;indicate sector size adjusted
 0B08  EB 25				JMP	SHORT VAL_FAT_X 	;recompute all sizes with new BPBSSZ
				
 0B0A				VAL_FAT_B:				;sector size is at maximum
 0B0A  D0 26 00E7 R			SHL	BPB_AUSZ,1		;double allocation unit size
 0B0E  80 0E 058B R 10			OR	ERR_FLAG,ERR_PASS	;indicate another pass required
 0B13  EB 1A				JMP	SHORT VAL_FAT_X 	;recompute values
				
 0B15				VAL_FAT_C:				;FAT size =  1.5 * number of clusters
 0B15  8B C8				MOV	CX,AX			;number of clusters
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-54
VAL_FAT Validate File Allocation Table (FAT)                

 0B17  D1 E0				SHL	AX,1			;* 2
 0B19  03 C1				ADD	AX,CX			;* 3
 0B1B  D1 E8				SHR	AX,1			;* 1.5
 0B1D  15 0003				ADC	AX,3			;add 3 bytes for first 2 FAT entries
									;(media descriptor and FFFFH), and CY
 0B20  33 D2				XOR	DX,DX			;clear DX for division
 0B22  F7 36 00E5 R			DIV	BPB_SSZ 		;FAT size/sector size
 0B26  83 C2 FF				ADD	DX,0FFFFH		;set carry if remainder
 0B29  15 0000				ADC	AX,0			;round upward
 0B2C  A3 00F0 R			MOV	BPB_FATSZ,AX		;number of sectors for 1 FAT copy
 0B2F				VAL_FAT_X:
 0B2F  C3				RET
 0B30				VAL_FAT ENDP
				
				
 0B30				VALIDATE ENDP
				
					SUBTTL	COPY_BPB Copy BPB to Boot Record
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-55
COPY_BPB Copy BPB to Boot Record                            

					PAGE
				;-----------------------------------------------------------------------;
				;	COPY_BPB copies the BIOS Parameter Block (BPB)			;
				;	to the VDISK Boot Record					;
				;-----------------------------------------------------------------------;
					ASSUME	DS:CSEG
 0B30				COPY_BPB PROC				;Copy BBP to Boot Record
 0B30  1E				PUSH	DS
 0B31  07				POP	ES			;set ES = DS
				
 0B32  B9 000D				MOV	CX,BPB_LEN		;length of BPB
 0B35  BE 00E5 R			MOV	SI,OFFSET BPB		;source offset
 0B38  BF 04BB R			MOV	DI,OFFSET BOOT_BPB	;target offset
 0B3B  F3/ A4				REP	MOVSB			;copy BPB to boot record
 0B3D  C3				RET
 0B3E				COPY_BPB ENDP
				
					SUBTTL	VERIFY_EXTENDER
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-56
VERIFY_EXTENDER                                             

					PAGE
				;-----------------------------------------------------------------------;
				;	VERIFY_EXTENDER makes sure that if an Expansion Unit is 	;
				;	installed, the memory size switches on the Extender Card	;
				;	are correctly set.						;
				;-----------------------------------------------------------------------;
				
				
					ASSUME	DS:CSEG
 = 0210				EXT_P210 EQU	0210H			;write to latch expansion bus data
									;read to verify expansion bus data
 = 0213				EXT_P213 EQU	0213H			;Expansion Unit status
				
 0B3E				VERIFY_EXTENDER PROC
				
 0B3E  90				NOP
				
 0B3F  BA 0210				MOV	DX,EXT_P210		;Expansion bus data port address
				
 0B42  B8 5555				MOV	AX,5555H		;set data pattern
 0B45  EE				OUT	DX,AL			;write 55H to control port
 0B46  52				PUSH	DX
 0B47  5A				POP	DX
				
 0B48  EB 00				JMP	SHORT $+2		;Let the I/O circuits catch up
 0B4A  E4 20				IN	AL,020h 		;Clear the CMOS bus drivers!
				
 0B4C  EC				IN	AL,DX			;recover data
 0B4D  3A E0				CMP	AH,AL			;did we recover the same data?
 0B4F  75 2A				JNE	VERIFY_EXTENDER_X	;if not, no extender card
				
 0B51  F7 D0				NOT	AX			;set AX = 0AAAAH
 0B53  EE				OUT	DX,AL			;write 0AAH to control port
 0B54  52				PUSH	DX			;load data line
 0B55  5A				POP	DX			;load data line
				
 0B56  EB 00				JMP	SHORT $+2		;Let the I/O circuits catch up
 0B58  E4 20				IN	AL,020h 		;Clear the CMOS bus drivers!
				
 0B5A  EC				IN	AL,DX			;recover data
 0B5B  3A E0				CMP	AH,AL			;did we recover the same data?
 0B5D  75 1C				JNE	VERIFY_EXTENDER_X	;if not, no extender card
				
				;Expansion Unit is present.
				
				;Determine what the switch settings should be on the Extender Card
				
 0B5F  CD 12				INT	MEM_SIZE		;get system memory size in KB in AX
 0B61  05 003F				ADD	AX,63D			;memory size + 63K
 0B64  B1 06				MOV	CL,6			;2^6 = 64
 0B66  D3 E8				SHR	AX,CL			;divide by 64
									;AX is highest segment address
 0B68  8A E0				MOV	AH,AL			;save number of segments
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-57
VERIFY_EXTENDER                                             

				;Read Expander card switch settings
				
 0B6A  BA 0213				MOV	DX,EXT_P213		;expansion unit status
 0B6D  EC				IN	AL,DX			;read status
									;bits 7-4 (hi nibble) are switches
 0B6E  B1 04				MOV	CL,4			;shift count
 0B70  D2 E8				SHR	AL,CL			;shift switches to bits 3-0 of AL
				
 0B72  3A E0				CMP	AH,AL			;do switches match memory size?
 0B74  74 05				JE	VERIFY_EXTENDER_X	;yes, exit normally
				
 0B76  80 0E 058B R 02			OR	ERR_FLAG,ERR_EXTSW	;indicate switch settings are wrong
				
 0B7B				VERIFY_EXTENDER_X:
 0B7B  C3				RET
 0B7C				VERIFY_EXTENDER ENDP
				
					SUBTTL	UPDATE_AVAIL
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-58
UPDATE_AVAIL                                                

					PAGE
				;-----------------------------------------------------------------------;
				;	UPDATE_AVAIL updates the address of the first byte in extended	;
				;	memory not used by any VDISK buffer				;
				;-----------------------------------------------------------------------;
				;If EMS is installed, we must allocate memory here and obtain the	;
				;handle which we will use throughout our existance. AVAIL_LO and _HI	;
				;really mean nothing to us.						;
				;-----------------------------------------------------------------------;
				
 0B7C				UPDATE_AVAIL PROC
 0B7C  A1 057F R			MOV	AX,BUFF_SIZE		;number of KB of VDISK buffer
				
 0B7F  80 3E 004F R 00			CMP	EM_SW2,EMS_INSTALLED_FLAG ;AN000; Is EMS installed?
 0B84  75 23				JNE	USE_INT15_LOGIC 	;ac006; Yes,
 0B86  33 D2				xor	dx,dx			;an003; clear high word
 0B88  F7 36 058D R			div	DOS_Page_Size_Word	;ac003;   Calculate number of pages needed
 0B8C  0B D2				or	dx,dx			;an004; remainder?
				;	$if	nz			;an004; yes
 0B8E  74 01				JZ $$IF36
 0B90  40				    inc     ax			;an004; need 1 extra page
				;	$endif				;an004;
 0B91				$$IF36:
 0B91  8B D8				MOV	BX,AX			;AN000;   Prepare for EMS call
				
 0B93  B4 43				MOV	AH,EMS_ALLOC_PAGES	;AN000;   Allocate requested pages
 0B95  CD 67				INT	EMS_INT 		;AN000;
 0B97  0A E4				OR	AH,AH			;AN000;   Was there an error allocating?
 0B99  75 08				JNZ	ALLOC_ERROR		;AN000;   No,
 0B9B  89 16 0050 R			MOV	EMS_HANDLE,DX		;AN000;     Save EMS handle for this VDISK
 0B9F  E8 0BBB R			call	EMS_Build_Handle_Name	;an000; dms;
				
 0BA2  C3				RET				;AN000;
									;AN000;
 0BA3				ALLOC_ERROR:				;AN000;
 0BA3  C6 06 058B R FF			MOV	ERR_FLAG,EMS_ALLOC_ERROR ;AN000;    ??????    *RPS
 0BA8  C3				RET				;AN000;
									;AN000;
 0BA9				USE_INT15_LOGIC:			;AN000;
				
 0BA9  E8 0BAD R			call	Modify_CMOS_EM		;an001; dms;adjust EM for new size
				
 0BAC  C3				RET
 0BAD				UPDATE_AVAIL ENDP
				
				
				;=========================================================================
				; Modify_CMOS_EM	: This routine modifies the size of extended
				;			  memory.  By modifying the size of extended
				;			  memory other users will not have the potential
				;			  to overlay a VDISK residing in EM.
				;
				;	Inputs	: EM_New_Size	- The new size that EM will be after
				;				  creation of this VDISK.
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-59
UPDATE_AVAIL                                                

				;	Outputs : Modified data in CMOS for EM.  Bytes 17h & 18h at
				;						 port 71h.
				;=========================================================================
				
 0BAD				Modify_CMOS_EM Proc Near		;an001; dms;
				
 0BAD  50				push	ax			;an001; dms;save ax
 0BAE  E8 0C5D R			call	Steal_Int15		;an001; dms;get INT 15h vector
				
 0BB1  2E: A1 0037 R			mov	ax,word ptr cs:EM_New_Size ;an001; dms;transfer new size
 0BB5  2E: A3 0039 R			mov	word ptr cs:EM_KSize,ax ;an001; dms;set EM size to new size
 0BB9  58				pop	ax			;an001; dms;restore ax
				
 0BBA  C3				ret				;an001; dms;
				
 0BBB				Modify_CMOS_EM endp			;an001; dms;
				
				;=========================================================================
				; EMS_Build_Handle_Name 	- This routine will build an EMS handle's
				;				  name as follows:
				;					VDISK D:
				;
				;	Inputs	: DX	- Handle to have associated name
				;
				;	Outputs : Handle name
				;=========================================================================
				
 0BBB				EMS_Build_Handle_Name proc near 	;an000; dms;
				
 0BBB  56				push	si			;an000; dms;save si
 0BBC  51				push	cx			;an000; dms;save cx
				
 0BBD  1E				push	ds			;an000; dms;save ds
 0BBE  53				push	bx			;an000; dms;save bx
 0BBF  C5 1E 00F4 R			lds	bx,RH_Ptra		;an000; dms;point to request header
 0BC3  8A 6F 16				mov	ch,RH.RH0_Driv		;an000; dms;get drive number
 0BC6  80 C5 41				add	ch,'A'			;an000; dms;convert to drive letter
 0BC9  5B				pop	bx			;an000; dms;restore bx
 0BCA  1F				pop	ds			;an000; dms;restore ds
				
 0BCB  BE 05D4 R			mov	si,offset    VDISK_Name ;an000; dms;point to "VDISK " literal
 0BCE  88 6C 06				mov	byte ptr [si+6],ch	;an000; dms;put drive letter in string
 0BD1  C6 44 07 3A			mov	byte ptr [si+7],":"	;an000; dms;colon terminate it
				
 0BD5  B8 5301				mov	ax,EMS_Set_Handle_Name	;an000; dms;set the handle's name
 0BD8  CD 67				int	EMS_INT 		;an000; dms;
				
 0BDA  59				pop	cx			;an000; dms;restore cx
 0BDB  5E				pop	si			;an000; dms;restore si
				
 0BDC  C3				ret				;an000; dms;
				
 0BDD				EMS_Build_Handle_Name endp		;an000; dms;
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-60
FORMAT_VDISK                                                

					SUBTTL	FORMAT_VDISK
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-61
FORMAT_VDISK                                                

					PAGE
				;-----------------------------------------------------------------------;
				;	This Request Header is used by MOVE_VDISK to move the		;
				;	first few sectors of the virtual disk (boot, FAT, and		;
				;	Directory) into extended memory.				;
				;-----------------------------------------------------------------------;
				
 0BDD  16			MOVE_RH DB	MOVE_RH_L		;length of request header
 0BDE  00				DB	0			;sub unit
 0BDF  08				DB	8			;output operation
 0BE0  0000				DW	0			;status
 0BE2  0000000000000000			DQ	?			;reserved for DOS
 0BEA  00				DB	?			;media descriptor byte
 0BEB  0000			MOVE_RHO DW	?			;offset of data transfer address
 0BED  0000			MOVE_RHS DW	?			;segment of data transfer address
 0BEF  0000			MOVE_RHCNT DW	?			;count of sectors to transfer
 0BF1  0000				DW	0			;starting sector number
 = 0016				MOVE_RH_L EQU	$-MOVE_RH		;length of request header
				
				;-----------------------------------------------------------------------;
				;	FORMAT_VDISK formats the boot sector, FAT, and directory of an	;
				;	extended memory VDISK in storage immediately following		;
				;	VDISK code, in preparation for moving to extended memory.	;
				;-----------------------------------------------------------------------;
 0BF3				FORMAT_VDISK PROC			;format boot record, FATs and directory
				
 0BF3  8C C8				MOV	AX,CS			;compute 20-bit address
 0BF5  F7 26 0041 R			MUL	WPARA_SIZE		;16 * segment
 0BF9  05 1935 R			ADD	AX,OFFSET MSGEND	;+ offset
 0BFC  80 D2 00				ADC	DL,0			;pick up carry
 0BFF  05 0200				ADD	AX,STACK_SIZE		;plus stack size
 0C02  80 D2 00				ADC	DL,0			;pick up carry
				
 0C05  F7 36 0041 R			DIV	WPARA_SIZE		;split into segment(AX)&offset(DX)
 0C09  A3 0BED R			MOV	MOVE_RHS,AX		;save in Request Header for move
 0C0C  89 16 0BEB R			MOV	MOVE_RHO,DX
				
 0C10  8B FA				MOV	DI,DX			;offset to DI
 0C12  8E C0				MOV	ES,AX			;segment to ES
				
				;copy the boot record
				
 0C14  BE 04B0 R			MOV	SI,OFFSET BOOT_RECORD	;point to source field
 0C17  A1 00E8 R			MOV	AX,BPB_RES		;number of reserved sectors
 0C1A  F7 26 00E5 R			MUL	BPB_SSZ 		;* sector size = length of boot records
 0C1E  8B C8				MOV	CX,AX			;length to CX for move
 0C20  F3/ A4				REP	MOVSB			;move boot record(s)
				
				;format the FAT(s)
				
 0C22  8A 0E 00EA R			MOV	CL,BPB_FATN		;number of FATs
 0C26  32 ED				XOR	CH,CH
 0C28				FORMAT_VDISK_A: 			;set up one FAT
 0C28  51				PUSH	CX			;save loop counter on stack
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-62
FORMAT_VDISK                                                

 0C29  A0 00EF R			MOV	AL,BPB_MCB		;media control byte
 0C2C  AA				STOSB				;store media control byte, increment DI
 0C2D  B8 FFFF				MOV	AX,0FFFFH		;bytes 2 and 3 of FAT are 0FFH
 0C30  AB				STOSW
 0C31  A1 00F0 R			MOV	AX,BPB_FATSZ		;number of sectors per FAT
 0C34  F7 26 00E5 R			MUL	BPB_SSZ 		;* sector size = length of FAT in bytes
 0C38  2D 0003				SUB	AX,3			;less the 3 bytes we've stored
 0C3B  8B C8				MOV	CX,AX			;count to CX
 0C3D  33 C0				XOR	AX,AX
 0C3F  F3/ AA				REP	STOSB			;clear remainder of FAT
 0C41  59				POP	CX			;get loop counter off stack
 0C42  E2 E4				LOOP	FORMAT_VDISK_A		;loop for all copies of the FAT
				
				;Format the directory
				
 0C44  BE 0012 R			MOV	SI,OFFSET VOL_LABEL	;point to volume label
 0C47  B9 001A				MOV	CX,VOL_LABEL_LEN	;length of volume directory entry
 0C4A  F3/ A4				REP	MOVSB			;move volume id to directory
 0C4C  B8 0020				MOV	AX,DIR_ENTRY_SIZE	;length of 1 directory entry
 0C4F  F7 26 00EB R			MUL	BPB_DIRN		;* number entries = bytes of directory
 0C53  2D 001A				SUB	AX,VOL_LABEL_LEN	;less length of volume label
 0C56  8B C8				MOV	CX,AX			;CX = length of rest of directory
 0C58  33 C0				XOR	AX,AX
 0C5A  F3/ AA				REP	STOSB			;clear directory to nulls
 0C5C  C3				RET
 0C5D				FORMAT_VDISK ENDP
				
					SUBTTL	STEAL_INT15
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-63
STEAL_INT15                                                 

					PAGE
				;-----------------------------------------------------------------------;
				;	STEAL_INT15 changes the INT 15H vector to point to this VDISK	;
				;	so that subsequent calls to INT15H may determine the actual	;
				;	size of EM after VDISK's allocation of it.                      ;
				;-----------------------------------------------------------------------;
 0C5D				STEAL_INT15 PROC
 0C5D  1E				PUSH	DS
 0C5E  33 C0				XOR	AX,AX
 0C60  8E D8				MOV	DS,AX			;set DS = 0
					ASSUME	DS:INT_VEC
 0C62  FA				CLI				;disable interrupts
 0C63  C4 3E 0054 R			LES	DI,DS:EM_VEC		;get original vector's content
 0C67  2E: 89 3E 002F R			MOV	CS:INTV15O,DI		;save original vector
 0C6C  2E: 8C 06 0031 R			MOV	CS:INTV15S,ES
 0C71  C7 06 0054 R 0128 R		MOV	DS:EM_VECO,OFFSET VDISK_INT15 ;offset of new INT routine
 0C77  8C 0E 0056 R			MOV	DS:EM_VECS,CS		;segment of new INT routine
 0C7B  FB				STI				;enable interrupts again
 0C7C  1F				POP	DS			;restore DS
 0C7D  C3				RET
 0C7E				STEAL_INT15 ENDP
				
				
				
					SUBTTL	MOVE_VDISK
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-64
MOVE_VDISK                                                  

					PAGE
				;-----------------------------------------------------------------------;
				;	MOVE_VDISK moves the formatted boot sector, FAT, and directory	;
				;	into extended memory.						;
				;-----------------------------------------------------------------------;
				
 0C7E				MOVE_VDISK PROC
 0C7E  2E: A0 00EA R			MOV	AL,cs:BPB_FATN		;number of FAT copies
 0C82  98				CBW				;clear AH
 0C83  2E: F7 26 00F0 R			MUL	cs:BPB_FATSZ		;number of FAT sectors
 0C88  2E: 03 06 00E8 R			ADD	AX,cs:BPB_RES		;+ reserved sectors
 0C8D  2E: 03 06 0589 R			ADD	AX,cs:DIR_SECTORS	;+ directory sectors
 0C92  2E: A3 0BEF R			MOV	cs:MOVE_RHCNT,AX	;store as I/O length
				
 0C96  BB 0BDD R			MOV	BX,OFFSET MOVE_RH	;DS:BX point to request header
 0C99  1E				PUSH	DS			;make sure DS gets preserved
 0C9A  E8 01B4 R			CALL	INOUT			;move to extended memory
 0C9D  1F				POP	DS
 0C9E  C3				RET
 0C9F				MOVE_VDISK ENDP
				
					SUBTTL	FILL_RH Fill in Request Header
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-65
FILL_RH Fill in Request Header                              

					PAGE
				;-----------------------------------------------------------------------;
				;	FILL_RH fills in the Request Header returned to DOS		;
				;-----------------------------------------------------------------------;
					ASSUME	DS:CSEG
 0C9F				FILL_RH PROC				;fill in INIT Request Header fields
 0C9F  8B 0E 0035 R			MOV	CX,START_BUFFER_PARA	;segment end of VDISK resident code
 0CA3  A1 0033 R			MOV	AX,PARAS_PER_SECTOR	;paragraphs per sector
 0CA6  F7 26 00ED R			MUL	BPB_SECN		;* number of sectors
 0CAA  03 C1				ADD	AX,CX			;+ starting segment
 0CAC  8B D0				MOV	DX,AX			;DX is segment of end VDISK buffer
 0CAE  80 3E 003B R 00			CMP	EM_SW,0 		;AC000; DMS; IF EM NOT REQUESTED
				;	$IF	NE			;AN000; DMS; EM REQUESTED
 0CB3  74 02				JE $$IF38
 0CB5  8B D1				    MOV     DX,CX		;AN000; DMS;END OF CODE SEGMENT ADDR
				;	$ENDIF				;AN000; DMS;
 0CB7				$$IF38:
				
 0CB7				FILL_RH_A:				;DX is proper ending segment address
 0CB7  B0 01				MOV	AL,1			;number of units
 0CB9  2E: F6 06 058F R 01		test	CS:err_flag2,err_baddos
 0CBF  75 07				jnz	dont_install
				
 0CC1  F6 06 058B R 0A			TEST	ERR_FLAG,ERR_SYSSZ+ERR_EXTSW ;if bypassing install
 0CC6  74 04				JZ	FILL_RH_B		;jump if installing driver
				
 0CC8				dont_install:
 0CC8  8C CA				MOV	DX,CS			;segment of end address
 0CCA  32 C0				XOR	AL,AL			;number of units is zero
 0CCC				FILL_RH_B:
 0CCC  1E				PUSH	DS			;preserve DS
 0CCD  C5 1E 00F4 R			LDS	BX,RH_PTRA		;get Request Header addr in DS:BX
 0CD1  88 47 0D				MOV	RH.RH0_NUN,AL		;store number of units (0 or 1)
 0CD4  C7 47 0E 0000			MOV	RH.RH0_ENDO,0		;end offset is always zero
 0CD9  89 57 10				MOV	RH.RH0_ENDS,DX		;end of VDISK or end of buffer
 0CDC  C7 47 12 00F2 R			MOV	RH.RH0_BPBO,OFFSET BPB_PTR
 0CE1  8C 4F 14				MOV	RH.RH0_BPBS,CS		;BPB array address
 0CE4  1F				POP	DS			;restore DS
 0CE5  C3				RET
 0CE6				FILL_RH ENDP
				
					SUBTTL	WRITE_MESSAGES and associated routines
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-66
WRITE_MESSAGES and associated routines                      

					PAGE
				;-----------------------------------------------------------------------;
				;	WRITE_MESSAGE writes a series of messages to the standard	;
				;	output device showing the VDISK parameter values actually used. ;
				;-----------------------------------------------------------------------;
				
					ASSUME	DS:CSEG
 0CE6				WRITE_MESSAGES PROC			;display all messages
				
				
 0CE6  2E: F6 06 058F R 01		test	cs:err_flag2,err_baddos ;AN000;
 0CEC  74 01				JZ	DISPLAY_ALL_MESSAGES	;AN000;
 0CEE  C3				RET
				
 0CEF				DISPLAY_ALL_MESSAGES:			;AN000; No, then display messages
				
 0CEF  1E				PUSH	DS			;preserve DS
 0CF0  C5 1E 00F4 R			LDS	BX,RH_PTRA		;get Request Header Address
 0CF4  8A 4F 16				MOV	CL,RH.RH0_DRIV		;get drive code
 0CF7  80 C1 41				ADD	CL,'A'			;convert to drive letter
 0CFA  1F				POP	DS			;restore DS
				
 0CFB  B8 0003				MOV	AX,VDISK_TITLE		;AN000; 'VDISK Version 3.3 virtual disk $'
 0CFE  8D 36 0593 R			LEA	SI,TITLE_SUBLIST	;AN000; Specify SUBLIST to use for replacement
 0D02  88 0E 0590 R			MOV	DRIVE_CODE,CL		;AN000; Save drive code
 0D06  B9 0001				MOV	CX,ONE_REPLACE		;AN000; Notify SYSDISPMSG of 1 replacement
 0D09  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D0C  73 03				JNC	WRITE_MESSAGES_A	;AN000; Was there an error?
 0D0E  E9 0DE8 R			JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
				;If any of the user specified values has been adjusted, issue an
				;appropriate message
				
 0D11				WRITE_MESSAGES_A:			;AN000; NO,
 0D11  F6 06 058B R 80			TEST	ERR_FLAG,ERR_BSIZE	;was buffersize adjusted?
 0D16  74 09				JZ	WRITE_MESSAGES_B	;if not, skip message
				
 0D18  B8 0004				MOV	AX,BUFFER_ADJUSTED	;AN000; "Buffer size adjusted",CR,LF
 0D1B  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D1E  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
				
 0D21				WRITE_MESSAGES_B:			;AN000; NO,
 0D21  F6 06 058B R 40			TEST	ERR_FLAG,ERR_SSZ	;was sector size adjusted?
 0D26  74 0E				JZ	WRITE_MESSAGES_C	;if not, skip message
				
 0D28  B8 0005				MOV	AX,SECTOR_ADJUSTED	;AN000; "Sector size adjusted",CR,LF
 0D2B  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D2E  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D31  73 03				JNC	WRITE_MESSAGES_C	;AN000; Was there an error?
 0D33  E9 0DE8 R			JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
 0D36				WRITE_MESSAGES_C:
 0D36  F6 06 058B R 20			TEST	ERR_FLAG,ERR_DIRN	;were directory entries adjusted?
 0D3B  74 0E				JZ	WRITE_MESSAGES_D0	;if not, skip message
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-67
WRITE_MESSAGES and associated routines                      

				
 0D3D  B8 0006				MOV	AX,DIR_ADJUSTED 	;AN000; "Directory entries adjusted",CR,LF
 0D40  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D43  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D46  73 03				JNC	WRITE_MESSAGES_D0	;AN000; Was there an error?
 0D48  E9 0DE8 R			JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
 0D4B				WRITE_MESSAGES_D0:
 0D4B  F6 06 058B R 01			TEST	ERR_FLAG,ERR_ESIZE	;was transfer size adjusted?
 0D50  74 0E				JZ	WRITE_MESSAGES_D	;if not, skip message
				
 0D52  B8 0008				MOV	AX,TRANS_ADJUSTED	;AN000; "Transfer size adjusted",CR,LF
 0D55  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D58  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D5B  73 03				JNC	WRITE_MESSAGES_D	;AN000; Was there an error?
 0D5D  E9 0DE8 R			JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
 0D60				WRITE_MESSAGES_D:
 0D60  F6 06 058B R 04			TEST	ERR_FLAG,ERR_SWTCH	;was an invalid switch character found?
 0D65  74 0E				JZ	WRITE_MESSAGES_E	;if not, skip message
				
 0D67  B8 0007				MOV	AX,INVALID_SW_CHAR	;AN000; "Invalid switch character",CR,LF
 0D6A  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D6D  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D70  73 03				JNC	WRITE_MESSAGES_E	;AN000; Was there an error?
 0D72  EB 74 90				JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
 0D75				WRITE_MESSAGES_E:
 0D75  F6 06 058B R 08			TEST	ERR_FLAG,ERR_SYSSZ	;is system size too small to install?
 0D7A  74 15				JZ	WRITE_MESSAGES_F	;if not, bypass error message
				
 0D7C  B8 000D				MOV	AX,VDISK_NOT_INST	;AN000; "VDISK not installed - "
 0D7F  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D82  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D85  B8 0002				MOV	AX,SYS_TOO_SMALL	;AN000; "Insufficient memory",CR,LF
 0D88  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0D8B  73 03				JNC	WRITE_MESSAGES_RET	;AN000; Was there an error?
 0D8D  EB 59 90				JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
 0D90				WRITE_MESSAGES_RET:
 0D90  C3				RET				;skip messages showing adjusted sizes
				
 0D91				WRITE_MESSAGES_F:
 0D91  F6 06 058B R 02			TEST	ERR_FLAG,ERR_EXTSW	;extender card switches wrong?
 0D96  74 14				JZ	WRITE_MESSAGES_G	;if not, bypass error message
				
 0D98  B8 000D				MOV	AX,VDISK_NOT_INST	;AN000; "VDISK not installed - "
 0D9B  B9 0000				MOV	CX,NO_REPLACE		;AN000; Notify SYSDISPMSG of no replacement
 0D9E  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DA1  B8 000E				MOV	AX,EXTEND_CARD_WRONG	;AN000; "Extender Card switches",CR,LF,"do not match system 
				memory size",CR,LF,CR,LF
 0DA4  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DA7  73 E7				JNC	WRITE_MESSAGES_RET	;AN000; Was there an error?
 0DA9  EB 3D 90				JMP	SYSDISP_ERROR		;AN000; YES, display the extended error
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-68
WRITE_MESSAGES and associated routines                      

 0DAC				WRITE_MESSAGES_G:			;display adjusted size messages
 0DAC  B8 0009				MOV	AX,BUF_SZ		;AN000; "Buffer size: %1 KB",CR,LF
 0DAF  8D 36 059E R			LEA	SI,BUF_SZ_SUBLIST	;AN000; Specify SUBLIST to use for replacement
 0DB3  B9 0001				MOV	CX,ONE_REPLACE		;AN000; Notify SYSDISPMSG of 1 replacement
 0DB6  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DB9  72 2D				JC	SYSDISP_ERROR		;AN000;
				
 0DBB  B8 000A				MOV	AX,SEC_SZ		;AN000; "Sector size: %1",CR,LF
 0DBE  8D 36 05A9 R			LEA	SI,SEC_SZ_SUBLIST	;AN000; Specify SUBLIST to use for replacement
 0DC2  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DC5  72 21				JC	SYSDISP_ERROR		;AN000;
				
 0DC7  B8 000B				MOV	AX,DIR_ENTRIES		;AN000; "Directory entries: %1",CR,LF
 0DCA  8D 36 05B4 R			LEA	SI,DIR_ENT_SUBLIST	;AN000; Specify SUBLIST to use for replacement
 0DCE  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DD1  72 15				JC	SYSDISP_ERROR		;AN000;
				
 0DD3  2E: 80 3E 003B R 00		CMP	CS:EM_SW,0		;extended memory ?
 0DD9  74 0C				JE	END_LINE		;
 0DDB  B8 000C				MOV	AX,TRANS_SZ		;AN000; "Transfer size: %1",CR,LF,CR,LF
 0DDE  8D 36 05BF R			LEA	SI,TRANS_SZ_SUBLIST	;AN000; Specify SUBLIST to use for replacement
 0DE2  E8 0E0F R			CALL	DISPLAY_MESSAGE 	;AN000; Display the message
 0DE5  72 01				JC	SYSDISP_ERROR		;AN000;
				
				
 0DE7				END_LINE:
 0DE7  C3				RET				;return to INIT_P1
				
 0DE8				SYSDISP_ERROR:
				
 0DE8  1E				push	ds			;an006; dms;save ds
 0DE9  53				push	bx			;an006; dms;save bx
 0DEA  2E: C5 1E 00F4 R			lds	bx,cs:RH_Ptra		;an006; dms;point to request header
 0DEF  C7 47 17 FFFF			mov	RH.RH0_Flag,-1		;an006; dms;signal BIO and error occurred
 0DF4  5B				pop	bx			;an006; dms;restore bx
 0DF5  1F				pop	ds			;an006; dms;restore ds
				
									;AN000; Set error conditions
 0DF6  BB FFFF				MOV	BX,NO_HANDLE		;AN000; Write to NO_HANDLE
 0DF9  B9 0000				MOV	CX,NO_REPLACE		;AN000;
 0DFC  B6 01				MOV	DH,EXT_ERR_CLASS	;AN000;
 0DFE  B2 00				MOV	DL,NO_INPUT		;AN000;
				
 0E00  1E				PUSH	DS			;AN000;SET UP ADDRESSIBILITY TO MSG
 0E01  06				PUSH	ES			;AN000;
				
 0E02  0E				PUSH	CS			;AN000;TRANSFER CS
 0E03  1F				POP	DS			;AN000;  TO DS
 0E04  51				PUSH	CX			;AN000;TRANSFER CS
 0E05  07				POP	ES			;AN000;  TO ES
				
					ASSUME	DS:CSEG,ES:CSEG 	;AN000;
 0E06  E8 0E25 R			CALL	GET_PARM_SEGMENT	;AN000;OBTAIN PARM SEGMENT
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-69
WRITE_MESSAGES and associated routines                      

 0E09  E8 1096 R			CALL	SYSDISPMSG		;AN000;
				
 0E0C  07				POP	ES			;AN000;RESTORE REG
 0E0D  1F				POP	DS			;AN000;RESTORE REG
					ASSUME	DS:NOTHING,ES:NOTHING	;AN000;
				
 0E0E  C3				RET				;AN000;
				
 0E0F				WRITE_MESSAGES ENDP
				
				
 0E0F				DISPLAY_MESSAGE PROC NEAR
									;AN000; Set default values
 0E0F  BB FFFF				MOV	BX,NO_HANDLE		;AN000; Output handle is NO_HANDLE
 0E12  B6 FF				MOV	DH,UTILITY_MSG_CLASS	;AN000; Utility class message
 0E14  B2 00				MOV	DL,NO_INPUT		;AN000; No input is requested
 0E16  1E				PUSH	DS			;AN000;SET UP ADDRESSIBILITY TO MSG
 0E17  06				PUSH	ES			;AN000;
				
 0E18  0E				PUSH	CS			;AN000;TRANSFER CS
 0E19  1F				POP	DS			;AN000;  TO DS
 0E1A  0E				PUSH	CS			;AN000;TRANSFER CS
 0E1B  07				POP	ES			;AN000;  TO ES
				
					ASSUME	DS:CSEG,ES:CSEG 	;AN000;
 0E1C  E8 0E25 R			CALL	GET_PARM_SEGMENT	;AN000;OBTAIN PARM SEGMENT
				
 0E1F  E8 1096 R			CALL	SYSDISPMSG		;AN000;
				
 0E22  07				POP	ES			;AN000;RESTORE REG
 0E23  1F				POP	DS			;AN000;RESTORE REG
					ASSUME	DS:NOTHING,ES:NOTHING	;AN000;
				
 0E24  C3				RET				;AN000;
				
 0E25				DISPLAY_MESSAGE ENDP
				
 0E25				GET_PARM_SEGMENT PROC			;AN000;OBTAIN PARM SEGMENT
				
 0E25  51				PUSH	CX			;AN000;SAVE CX - WE STOMP IT
 0E26  56				PUSH	SI			;AN000;SAVE SI - WE STOMP IT
				
 0E27  83 F9 00				CMP	CX,00H			;AN000;SEE IF REPLACEMENT IS REQUIRED
 0E2A  74 08				JE	GPS_END 		;AN000;END IF ZERO
				
 0E2C					GPS_CONTINUE:			;AN000;LOOP CONTINUE
				
 0E2C  8C 5C 04				MOV	[SI].SL_SEGMENT,DS	;AN000;SET UP SEGMENT
 0E2F  83 C6 0B				ADD	SI,11			;AN000;INCREASE SI BY TABLE SZ
				
 0E32  E2 F8				LOOP	GPS_CONTINUE		;AN000;CONTINUE LOOP IF CX NOT ZERO
				
 0E34					GPS_END:			;AN000;EXIT POINT
				
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Page     1-70
WRITE_MESSAGES and associated routines                      

 0E34  5E				POP	SI			;AN000;RESTORE SI
 0E35  59				POP	CX			;AN000;RESTORE CX
				
 0E36  C3				RET				;AN000;RETURN TO CALLER
				
 0E37				GET_PARM_SEGMENT ENDP			;AN000;
				
				
				
				
 0E37				INIT_P1 ENDP				;end of INIT part one
				.list
 1935				MSGEND	LABEL	BYTE			;AN000;
				
 1935				CSEG	ENDS
					END

Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-1


Macros:

		N a m e			Lines

$M_BUILD_PTRS  . . . . . . . . .  	  18
$M_INC . . . . . . . . . . . . .  	   3
$M_MAKE  . . . . . . . . . . . .  	  10
$M_MAKE_COMR . . . . . . . . . .  	  21
$M_MAKE_COMT . . . . . . . . . .  	   5
$M_POPF  . . . . . . . . . . . .  	   5
MSG_SERVICES . . . . . . . . . .  	  34
MSG_SERVICES2  . . . . . . . . .  	  14
MSG_UTILNAME . . . . . . . . . .  	   5

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

$M_CLASS_ID  . . . . . . . . . .  	0004	0003
  $M_CLS_ID  . . . . . . . . . .  	0000
  $M_COMMAND_VER . . . . . . . .  	0001
  $M_NUM_CLS_MSG . . . . . . . .  	0003
$M_COUNTRY_INFO  . . . . . . . .  	0056	000A
  $M_HEADER  . . . . . . . . . .  	0000
  $M_DATE_FORMAT . . . . . . . .  	0044
  $M_CURR_SEPARA . . . . . . . .  	0046
  $M_THOU_SEPARA . . . . . . . .  	004B
  $M_DECI_SEPARA . . . . . . . .  	004D
  $M_DATE_SEPARA . . . . . . . .  	004F
  $M_TIME_SEPARA . . . . . . . .  	0051
  $M_CURR_FORMAT . . . . . . . .  	0053
  $M_SIG_DIGS_CU . . . . . . . .  	0054
  $M_TIME_FORMAT . . . . . . . .  	0055
$M_ID  . . . . . . . . . . . . .  	0004	0002
  $M_NUM . . . . . . . . . . . .  	0000
  $M_TXT_PTR . . . . . . . . . .  	0002
$M_RES_ADDRS . . . . . . . . . .  	0085	0017
  $M_EXT_ERR_ADDRS . . . . . . .  	0000
  $M_EXT_FILE  . . . . . . . . .  	0004
  $M_EXT_COMMAND . . . . . . . .  	0008
  $M_EXT_TERM  . . . . . . . . .  	000C
  $M_PARSE_COMMAND . . . . . . .  	0010
  $M_PARSE_ADDRS . . . . . . . .  	0014
  $M_PARSE_TERM  . . . . . . . .  	0018
  $M_CRIT_ADDRS  . . . . . . . .  	001C
  $M_CRIT_COMMAND  . . . . . . .  	0020
  $M_CRIT_TERM . . . . . . . . .  	0024
  $M_DISK_PROC_ADDR  . . . . . .  	0028
  $M_CLASS_ADDRS . . . . . . . .  	002C
  $M_CLS_TERM  . . . . . . . . .  	0030
  $M_DBCS_VEC  . . . . . . . . .  	0034
  $M_HANDLE  . . . . . . . . . .  	0038
  $M_SIZE  . . . . . . . . . . .  	003A
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-2


  $M_CRLF  . . . . . . . . . . .  	003B
  $M_CLASS . . . . . . . . . . .  	003D
  $M_RETURN_ADDR . . . . . . . .  	003E
  $M_MSG_NUM . . . . . . . . . .  	0040
  $M_DIVISOR . . . . . . . . . .  	0042
  $M_TEMP_BUF  . . . . . . . . .  	0044
  $M_BUF_TERM  . . . . . . . . .  	0084
$M_SUBLIST_STRUC . . . . . . . .  	000B	0008
  $M_S_SIZE  . . . . . . . . . .  	0000
  $M_S_RESV  . . . . . . . . . .  	0001
  $M_S_VALUE . . . . . . . . . .  	0002
  $M_S_ID  . . . . . . . . . . .  	0006
  $M_S_FLAG  . . . . . . . . . .  	0007
  $M_S_MAXW  . . . . . . . . . .  	0008
  $M_S_MINW  . . . . . . . . . .  	0009
  $M_S_PAD . . . . . . . . . . .  	000A
BIOS_SYSTEM_DESCRIPTOR . . . . .  	000A	0006
  BIOS_SD_LENG . . . . . . . . .  	0000
  BIOS_SD_MODELBYTE  . . . . . .  	0002
  BIOS_SD_SCND_MODELBYTE . . . .  	0003
  BIOS_SD_FEATUREBYTE1 . . . . .  	0005
DESC . . . . . . . . . . . . . .  	0008	0005
  DESC_LMT . . . . . . . . . . .  	0000
  DESC_BASEL . . . . . . . . . .  	0002
  DESC_BASEH . . . . . . . . . .  	0004
GET_PAGE_FRAME_STRUC . . . . . .  	0004	0003
  FRAME_SEGMENT  . . . . . . . .  	0000
  START_PAGE . . . . . . . . . .  	0002
  NUM_PAGE . . . . . . . . . . .  	0003
RH0  . . . . . . . . . . . . . .  	0019	0008
  RH0_NUN  . . . . . . . . . . .  	000D
  RH0_ENDO . . . . . . . . . . .  	000E
  RH0_ENDS . . . . . . . . . . .  	0010
  RH0_BPBO . . . . . . . . . . .  	0012
  RH0_BPBS . . . . . . . . . . .  	0014
  RH0_DRIV . . . . . . . . . . .  	0016
  RH0_FLAG . . . . . . . . . . .  	0017
RH1  . . . . . . . . . . . . . .  	000F	0003
  RH1_RET  . . . . . . . . . . .  	000E
RH2  . . . . . . . . . . . . . .  	0016	0006
  RH2_BPBO . . . . . . . . . . .  	0012
  RH2_BPBS . . . . . . . . . . .  	0014
RH4  . . . . . . . . . . . . . .  	0016	0006
  RH4_DTAO . . . . . . . . . . .  	000E
  RH4_DTAS . . . . . . . . . . .  	0010
  RH4_CNT  . . . . . . . . . . .  	0012
  RH4_SSN  . . . . . . . . . . .  	0014
RHC  . . . . . . . . . . . . . .  	000D	0005
  RHC_CMD  . . . . . . . . . . .  	0002
  RHC_STA  . . . . . . . . . . .  	0003
SUBLIST  . . . . . . . . . . . .  	000B	0009
  SL_SIZE  . . . . . . . . . . .  	0000
  SL_RES . . . . . . . . . . . .  	0001
  SL_OFFSET  . . . . . . . . . .  	0002
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-3


  SL_SEGMENT . . . . . . . . . .  	0004
  SL_ID  . . . . . . . . . . . .  	0006
  SL_FLAG  . . . . . . . . . . .  	0007
  SL_MAXW  . . . . . . . . . . .  	0008
  SL_MINW  . . . . . . . . . . .  	0009
  SL_PAD . . . . . . . . . . . .  	000A

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CSEG . . . . . . . . . . . . . .  	1935	PARA	PUBLIC	'CODE'
INT_VEC  . . . . . . . . . . . .  	0058	AT	0000	

Symbols:            

                N a m e         	Type	 Value	 Attr

ACTION_39  . . . . . . . . . . .  	NUMBER	0004	
ALLOC_ERROR  . . . . . . . . . .  	L NEAR	0BA3	CSEG
ALT_EXPECTED_VERSION . . . . . .  	NUMBER	1A05	
ALT_GOOD_DOS . . . . . . . . . .  	L NEAR	107A	CSEG
ALT_MAJOR_VERSION  . . . . . . .  	NUMBER	0005	
ALT_MINOR_VERSION  . . . . . . .  	NUMBER	001A	
AMIS_ID  . . . . . . . . . . . .  	L NEAR	0F2C	CSEG
AMIS_ID_MSG  . . . . . . . . . .  	L NEAR	0F31	CSEG
AMIS_ID_MSG_END  . . . . . . . .  	L NEAR	0F36	CSEG
amis_sign  . . . . . . . . . . .  	L NEAR	0F1C	CSEG	Global
AMIS_SIGN_SEGMENT  . . . . . . .  	ALIAS	 CSEG		
APPLY_DEFAULTS . . . . . . . . .  	N PROC	07E4	CSEG	Length = 004E
APPLY_DEFAULTS_A . . . . . . . .  	L NEAR	07F7	CSEG
APPLY_DEFAULTS_B . . . . . . . .  	L NEAR	0808	CSEG
APPLY_DEFAULTS_C . . . . . . . .  	L NEAR	0819	CSEG
APPLY_DEFAULTS_D . . . . . . . .  	L NEAR	0831	CSEG
AVAIL_HI . . . . . . . . . . . .  	L BYTE	002E	CSEG
AVAIL_LO . . . . . . . . . . . .  	L WORD	002C	CSEG

BELL . . . . . . . . . . . . . .  	NUMBER	0007	
BIN_HEX_BYTE . . . . . . . . . .  	NUMBER	0013	
BIN_HEX_DWORD  . . . . . . . . .  	NUMBER	0033	
BIN_HEX_TYPE . . . . . . . . . .  	NUMBER	0003	
BIN_HEX_WORD . . . . . . . . . .  	NUMBER	0023	
BLD_BPB  . . . . . . . . . . . .  	N PROC	01A7	CSEG	Length = 0009
BOOT_BPB . . . . . . . . . . . .  	L BYTE	04BB	CSEG
BOOT_RECORD  . . . . . . . . . .  	L BYTE	04B0	CSEG
BPB  . . . . . . . . . . . . . .  	L BYTE	00E5	CSEG
BPB_AUSZ . . . . . . . . . . . .  	L BYTE	00E7	CSEG
BPB_DIRN . . . . . . . . . . . .  	L WORD	00EB	CSEG
BPB_FATN . . . . . . . . . . . .  	L BYTE	00EA	CSEG
BPB_FATSZ  . . . . . . . . . . .  	L WORD	00F0	CSEG
BPB_LEN  . . . . . . . . . . . .  	NUMBER	000D	
BPB_MCB  . . . . . . . . . . . .  	L BYTE	00EF	CSEG
BPB_PTR  . . . . . . . . . . . .  	L WORD	00F2	CSEG
BPB_RES  . . . . . . . . . . . .  	L WORD	00E8	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-4


BPB_SECN . . . . . . . . . . . .  	L WORD	00ED	CSEG
BPB_SSZ  . . . . . . . . . . . .  	L WORD	00E5	CSEG
BUFFER_ADJUSTED  . . . . . . . .  	NUMBER	0004	
BUFFER_ENTRY_SIZE  . . . . . . .  	NUMBER	0004	
BUFF_SIZE  . . . . . . . . . . .  	L WORD	057F	CSEG
BUF_SZ . . . . . . . . . . . . .  	NUMBER	0009	
BUF_SZ_SUBLIST . . . . . . . . .  	L BYTE	059E	CSEG
B_FLAG . . . . . . . . . . . . .  	L BYTE	05A5	CSEG
B_ID . . . . . . . . . . . . . .  	L BYTE	05A4	CSEG
B_MAXW . . . . . . . . . . . . .  	L BYTE	05A6	CSEG
B_MINW . . . . . . . . . . . . .  	L BYTE	05A7	CSEG
B_PAD  . . . . . . . . . . . . .  	L BYTE	05A8	CSEG
B_RESV . . . . . . . . . . . . .  	L BYTE	059F	CSEG
B_SIZE . . . . . . . . . . . . .  	L BYTE	059E	CSEG
B_VALUEO . . . . . . . . . . . .  	L WORD	05A0	CSEG
B_VALUES . . . . . . . . . . . .  	L WORD	05A2	CSEG

C10  . . . . . . . . . . . . . .  	L WORD	07B0	CSEG
C1024  . . . . . . . . . . . . .  	L WORD	0585	CSEG
CHARMSG  . . . . . . . . . . . .  	NUMBER	FFFF	
CHAR_FIELD_ASCIIZ  . . . . . . .  	NUMBER	0010	
CHAR_FIELD_CHAR  . . . . . . . .  	NUMBER	0000	
CHAR_TYPE  . . . . . . . . . . .  	NUMBER	0000	
CHECK_AMIS . . . . . . . . . . .  	L NEAR	101E	CSEG
CHECK_AMIS_DONE  . . . . . . . .  	L NEAR	1055	CSEG
CHECK_AMIS_LOOP  . . . . . . . .  	L NEAR	1027	CSEG
CHECK_AMIS_NEXT  . . . . . . . .  	L NEAR	1050	CSEG
CHECK_AMIS_UNSUP . . . . . . . .  	L NEAR	1054	CSEG
CHECK_FOR_X  . . . . . . . . . .  	L NEAR	070C	CSEG
CHECK_NUM  . . . . . . . . . . .  	N PROC	0797	CSEG	Length = 000B
CHECK_NUM_X  . . . . . . . . . .  	L NEAR	07A1	CSEG
CLASS_1_MESSAGECOUNT . . . . . .  	NUMBER	0001	
CLASS_2_MESSAGECOUNT . . . . . .  	NUMBER	0008	
CLASS_A_MESSAGECOUNT . . . . . .  	NUMBER	000E	
CMD_INPUT  . . . . . . . . . . .  	NUMBER	0004	
CMD_TABLE  . . . . . . . . . . .  	L WORD	0145	CSEG
COLON  . . . . . . . . . . . . .  	NUMBER	003A	
COMR . . . . . . . . . . . . . .  	NUMBER	0000	
COMT . . . . . . . . . . . . . .  	NUMBER	0000	
COPY_BPB . . . . . . . . . . . .  	N PROC	0B30	CSEG	Length = 000E
CR . . . . . . . . . . . . . . .  	NUMBER	000D	
CURR_DTA_OFF . . . . . . . . . .  	L WORD	00E2	CSEG
CURR_EMS_PAGE  . . . . . . . . .  	L WORD	0056	CSEG

DATEMSG  . . . . . . . . . . . .  	NUMBER	0000	
DATE_MD  . . . . . . . . . . . .  	NUMBER	0014	
DATE_MDY_2 . . . . . . . . . . .  	NUMBER	0024	
DATE_MDY_4 . . . . . . . . . . .  	NUMBER	0034	
DATE_TYPE  . . . . . . . . . . .  	NUMBER	0004	
DETERMINE_START  . . . . . . . .  	N PROC	0832	CSEG	Length = 0050
DETERMINE_START_X  . . . . . . .  	L NEAR	0881	CSEG
DEVICE_CLOSE . . . . . . . . . .  	L NEAR	01B3	CSEG
DEVICE_OPEN  . . . . . . . . . .  	L NEAR	01B3	CSEG
DFLT_BSIZE . . . . . . . . . . .  	NUMBER	0040	
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-5


DFLT_DIRN  . . . . . . . . . . .  	NUMBER	0040	
DFLT_ESS . . . . . . . . . . . .  	NUMBER	0008	
DFLT_SSZ . . . . . . . . . . . .  	NUMBER	0080	
DFLT_TRF . . . . . . . . . . . .  	L NEAR	0A33	CSEG
DIRE_SIZE  . . . . . . . . . . .  	L WORD	0587	CSEG
DIR_ADJUSTED . . . . . . . . . .  	NUMBER	0006	
DIR_ENTRIES  . . . . . . . . . .  	NUMBER	000B	
DIR_ENTRY_SIZE . . . . . . . . .  	NUMBER	0020	
DIR_ENT_SUBLIST  . . . . . . . .  	L BYTE	05B4	CSEG
DIR_SECTORS  . . . . . . . . . .  	L WORD	0589	CSEG
DISK_PROC  . . . . . . . . . . .  	NUMBER	0000	
DISPLAYMSG . . . . . . . . . . .  	NUMBER	0000	
DISPLAY_ALL_MESSAGES . . . . . .  	L NEAR	0CEF	CSEG
DISPLAY_MESSAGE  . . . . . . . .  	N PROC	0E0F	CSEG	Length = 0016
DONT_INSTALL . . . . . . . . . .  	L NEAR	0CC8	CSEG
DOS  . . . . . . . . . . . . . .  	NUMBER	0021	
DOS_BUF_KEYB_INP . . . . . . . .  	NUMBER	000A	
DOS_CLOSE_FILE . . . . . . . . .  	NUMBER	003E	
DOS_CLR_KEYB_BUF . . . . . . . .  	NUMBER	000C	
DOS_CLR_KEYB_BUF_MASK  . . . . .  	NUMBER	00C0	
DOS_CON_INP  . . . . . . . . . .  	NUMBER	0008	
DOS_DIR_CON_INP  . . . . . . . .  	NUMBER	0007	
DOS_DISP_CHAR  . . . . . . . . .  	NUMBER	0002	
DOS_DISP_STRING  . . . . . . . .  	NUMBER	0009	
DOS_EXTENDED_OPEN  . . . . . . .  	NUMBER	6C00	
DOS_GET_ADDR . . . . . . . . . .  	NUMBER	0008	
DOS_GET_COUNTRY  . . . . . . . .  	NUMBER	0038	
DOS_GET_CRITICAL . . . . . . . .  	NUMBER	0004	
DOS_GET_DBCS_INFO  . . . . . . .  	NUMBER	6300	
DOS_GET_EXTENDED . . . . . . . .  	NUMBER	0000	
DOS_GET_EXT_ERROR  . . . . . . .  	NUMBER	0059	
DOS_GET_EXT_ERROR_BX . . . . . .  	NUMBER	0000	
DOS_GET_EXT_PARSE_ADD  . . . . .  	NUMBER	122E	
DOS_GET_FILE . . . . . . . . . .  	NUMBER	0006	
DOS_GET_PARSE  . . . . . . . . .  	NUMBER	0002	
DOS_GET_VERSION  . . . . . . . .  	NUMBER	0030	
DOS_IOCTL_GET_INFO . . . . . . .  	NUMBER	4400	
DOS_IOCTL_SET_INFO . . . . . . .  	NUMBER	4401	
DOS_KEYB_INP . . . . . . . . . .  	NUMBER	0001	
DOS_LSEEK_FILE . . . . . . . . .  	NUMBER	4200	
DOS_PAGE . . . . . . . . . . . .  	L WORD	005C	CSEG
DOS_PAGE_SIZE_WORD . . . . . . .  	L WORD	058D	CSEG
DOS_PAGE_SZ  . . . . . . . . . .  	NUMBER	0010	
DOS_PCHR . . . . . . . . . . . .  	NUMBER	0002	
DOS_PG_SZ  . . . . . . . . . . .  	L BYTE	058C	CSEG
DOS_PSTR . . . . . . . . . . . .  	NUMBER	0009	
DOS_READ_BYTE  . . . . . . . . .  	NUMBER	003F	
DOS_SET_ADDR . . . . . . . . . .  	NUMBER	0009	
DOS_VERS . . . . . . . . . . . .  	NUMBER	0030	
DOS_WRITE_HANDLE . . . . . . . .  	NUMBER	0040	
DRIVE_CODE . . . . . . . . . . .  	L BYTE	0590	CSEG
D_FLAG . . . . . . . . . . . . .  	L BYTE	05BB	CSEG
D_ID . . . . . . . . . . . . . .  	L BYTE	05BA	CSEG
D_MAXW . . . . . . . . . . . . .  	L BYTE	05BC	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-6


D_MINW . . . . . . . . . . . . .  	L BYTE	05BD	CSEG
D_PAD  . . . . . . . . . . . . .  	L BYTE	05BE	CSEG
D_RESV . . . . . . . . . . . . .  	L BYTE	05B5	CSEG
D_SIZE . . . . . . . . . . . . .  	L BYTE	05B4	CSEG
D_VALUEO . . . . . . . . . . . .  	L WORD	05B6	CSEG
D_VALUES . . . . . . . . . . . .  	L WORD	05B8	CSEG

EMS_2F_HANDLER . . . . . . . . .  	NUMBER	001B	
EMS_ALLOC_ERROR  . . . . . . . .  	NUMBER	-0001	
EMS_ALLOC_PAGES  . . . . . . . .  	NUMBER	0043	
EMS_BUILD_HANDLE_NAME  . . . . .  	N PROC	0BBB	CSEG	Length = 0022
EMS_CHECK  . . . . . . . . . . .  	N PROC	09A3	CSEG	Length = 003D
EMS_CHECK1 . . . . . . . . . . .  	N PROC	09E0	CSEG	Length = 002D
EMS_CHECK_EXIT . . . . . . . . .  	L NEAR	09DF	CSEG
EMS_CURR_SECT  . . . . . . . . .  	L WORD	0054	CSEG
EMS_DTA_ADJ  . . . . . . . . . .  	N PROC	03B1	CSEG	Length = 0015
EMS_DTA_CALC . . . . . . . . . .  	N PROC	039D	CSEG	Length = 0014
EMS_EXPECTED_VERSION . . . . . .  	NUMBER	0034	
EMS_FRAME_ADDR . . . . . . . . .  	L WORD	0052	CSEG
EMS_FRAME_SEG  . . . . . . . . .  	NUMBER	5800	
EMS_GET_ERROR  . . . . . . . . .  	L NEAR	0A18	CSEG
EMS_GET_NUM_PAGES  . . . . . . .  	NUMBER	0042	
EMS_GET_PAGES  . . . . . . . . .  	N PROC	0A0D	CSEG	Length = 000D
EMS_HANDLE . . . . . . . . . . .  	L WORD	0050	CSEG
EMS_INSTALLED  . . . . . . . . .  	L NEAR	09AD	CSEG
EMS_INSTALLED_FLAG . . . . . . .  	NUMBER	0000	
EMS_INT  . . . . . . . . . . . .  	NUMBER	0067	
EMS_LOW_ERROR  . . . . . . . . .  	NUMBER	0080	
EMS_MAP_HANDLE . . . . . . . . .  	NUMBER	0044	
EMS_MEM  . . . . . . . . . . . .  	NUMBER	0058	
EMS_PAGE_OFF_CALC  . . . . . . .  	N PROC	0383	CSEG	Length = 001A
EMS_PAGE_SIZE  . . . . . . . . .  	NUMBER	4000	
EMS_RESTORE_STATE  . . . . . . .  	NUMBER	4F01	
EMS_SAVE_ARRAY . . . . . . . . .  	L BYTE	005E	CSEG	Length = 0080
EMS_SAVE_STATE . . . . . . . . .  	NUMBER	4F00	
EMS_SEG_ARRAY  . . . . . . . . .  	L DWORD	00DE	CSEG
EMS_SET_HANDLE_NAME  . . . . . .  	NUMBER	5301	
EMS_SRC_TGT  . . . . . . . . . .  	N PROC	03C6	CSEG	Length = 001D
EMS_STATUS . . . . . . . . . . .  	NUMBER	0040	
EMS_TRF  . . . . . . . . . . . .  	N PROC	03E3	CSEG	Length = 0029
EMS_VERSION  . . . . . . . . . .  	NUMBER	0046	
EMS_VERSION_LEVEL  . . . . . . .  	NUMBER	0040	
EM_BLKMOVE . . . . . . . . . . .  	NUMBER	0087	
EM_INT . . . . . . . . . . . . .  	NUMBER	0015	
EM_KSIZE . . . . . . . . . . . .  	L WORD	0039	CSEG
EM_MEM . . . . . . . . . . . . .  	NUMBER	0045	
EM_MEMSIZE . . . . . . . . . . .  	NUMBER	8800	
EM_NEW_SIZE  . . . . . . . . . .  	L WORD	0037	CSEG
EM_SIZE_GET  . . . . . . . . . .  	NUMBER	0088	
EM_STACK . . . . . . . . . . . .  	L WORD	04A7	CSEG
EM_STAT  . . . . . . . . . . . .  	L WORD	003C	CSEG
EM_SW  . . . . . . . . . . . . .  	L BYTE	003B	CSEG
EM_SW2 . . . . . . . . . . . . .  	L BYTE	004F	CSEG
EM_VEC . . . . . . . . . . . . .  	L DWORD	0054	INT_VEC
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-7


EM_VECO  . . . . . . . . . . . .  	L WORD	0054	INT_VEC
EM_VECS  . . . . . . . . . . . .  	L WORD	0056	INT_VEC
END_LINE . . . . . . . . . . . .  	L NEAR	0DE7	CSEG
ERROR_CLASS_39 . . . . . . . . .  	NUMBER	0001	
ERR_BADDOS . . . . . . . . . . .  	NUMBER	0001	
ERR_BSIZE  . . . . . . . . . . .  	NUMBER	0080	
ERR_DIRN . . . . . . . . . . . .  	NUMBER	0020	
ERR_ESIZE  . . . . . . . . . . .  	NUMBER	0001	
ERR_EXTSW  . . . . . . . . . . .  	NUMBER	0002	
ERR_FLAG . . . . . . . . . . . .  	L BYTE	058B	CSEG
ERR_FLAG2  . . . . . . . . . . .  	L BYTE	058F	CSEG
ERR_PASS . . . . . . . . . . . .  	NUMBER	0010	
ERR_SSZ  . . . . . . . . . . . .  	NUMBER	0040	
ERR_SSZB . . . . . . . . . . . .  	NUMBER	0050	
ERR_SWTCH  . . . . . . . . . . .  	NUMBER	0004	
ERR_SYSSZ  . . . . . . . . . . .  	NUMBER	0008	
EXPECTED_VERSION . . . . . . . .  	NUMBER	0004	
EXTEND_CARD_WRONG  . . . . . . .  	NUMBER	000E	
EXT_ERR_39 . . . . . . . . . . .  	NUMBER	0027	
EXT_ERR_CLASS  . . . . . . . . .  	NUMBER	0001	
EXT_P210 . . . . . . . . . . . .  	NUMBER	0210	
EXT_P213 . . . . . . . . . . . .  	NUMBER	0213	

FALSE  . . . . . . . . . . . . .  	NUMBER	0000	
FARMSG . . . . . . . . . . . . .  	NUMBER	0000	
FILL_RH  . . . . . . . . . . . .  	N PROC	0C9F	CSEG	Length = 0047
FILL_RH_A  . . . . . . . . . . .  	L NEAR	0CB7	CSEG
FILL_RH_B  . . . . . . . . . . .  	L NEAR	0CCC	CSEG
FORMAT_VDISK . . . . . . . . . .  	N PROC	0BF3	CSEG	Length = 006A
FORMAT_VDISK_A . . . . . . . . .  	L NEAR	0C28	CSEG
FORMFD . . . . . . . . . . . . .  	NUMBER	000C	
FOUR . . . . . . . . . . . . . .  	L BYTE	05DC	CSEG
FRAME_BUFFER . . . . . . . . . .  	L BYTE	05CA	CSEG	Length = 000A

GDT  . . . . . . . . . . . . . .  	L BYTE	00F8	CSEG
GETMSG . . . . . . . . . . . . .  	NUMBER	0000	
GET_MAXSIZE  . . . . . . . . . .  	N PROC	076F	CSEG	Length = 0018
GET_MSIZE  . . . . . . . . . . .  	N PROC	0956	CSEG	Length = 004D
GET_MSIZE_2  . . . . . . . . . .  	L NEAR	0988	CSEG
GET_MSIZE_X  . . . . . . . . . .  	L NEAR	09A2	CSEG
GET_MSIZE_Z  . . . . . . . . . .  	L NEAR	09A0	CSEG
GET_NEXTNUM  . . . . . . . . . .  	L NEAR	077E	CSEG
GET_NUMBER . . . . . . . . . . .  	N PROC	07B3	CSEG	Length = 0031
GET_NUMBER_A . . . . . . . . . .  	L NEAR	07BA	CSEG
GET_NUMBER_B . . . . . . . . . .  	L NEAR	07E3	CSEG
GET_PARMS  . . . . . . . . . . .  	N PROC	06BD	CSEG	Length = 0127
GET_PARMS_A  . . . . . . . . . .  	L NEAR	06C3	CSEG
GET_PARMS_B  . . . . . . . . . .  	L NEAR	0732	CSEG
GET_PARMS_C  . . . . . . . . . .  	L NEAR	06E4	CSEG
GET_PARMS_D  . . . . . . . . . .  	L NEAR	06EE	CSEG
GET_PARMS_E  . . . . . . . . . .  	L NEAR	072A	CSEG
GET_PARMS_X  . . . . . . . . . .  	L NEAR	075F	CSEG
GET_PARMS_X_EXIT . . . . . . . .  	L NEAR	073B	CSEG
GET_PARM_SEGMENT . . . . . . . .  	N PROC	0E25	CSEG	Length = 0012
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-8


GET_PCHAR  . . . . . . . . . . .  	N PROC	0787	CSEG	Length = 0010
GET_PCHAR_X  . . . . . . . . . .  	L NEAR	0796	CSEG
GET_SLASH  . . . . . . . . . . .  	L NEAR	06F3	CSEG
GN_ERR . . . . . . . . . . . . .  	L BYTE	07B2	CSEG
GOT_E_OR_X . . . . . . . . . . .  	L NEAR	071E	CSEG
GPS_CONTINUE . . . . . . . . . .  	L NEAR	0E2C	CSEG
GPS_END  . . . . . . . . . . . .  	L NEAR	0E34	CSEG

HOME . . . . . . . . . . . . . .  	NUMBER	000B	

IFSFUNC_INSTALLED  . . . . . . .  	NUMBER	00FF	
IFSFUNC_INSTALL_CHECK  . . . . .  	NUMBER	0500	
IFS_GET_ERR_TEXT . . . . . . . .  	NUMBER	0502	
INCORRECT_DOS  . . . . . . . . .  	NUMBER	0001	
INIT_P1  . . . . . . . . . . . .  	N PROC	05DD	CSEG	Length = 085A
INIT_P1_A  . . . . . . . . . . .  	L NEAR	0660	CSEG
INIT_P2  . . . . . . . . . . . .  	N PROC	04CE	CSEG	Length = 0027
INIT_P2_FAT  . . . . . . . . . .  	L NEAR	04CE	CSEG
INOUT  . . . . . . . . . . . . .  	N PROC	01B4	CSEG	Length = 01CF
INOUT_A  . . . . . . . . . . . .  	L NEAR	01D0	CSEG
INOUT_B  . . . . . . . . . . . .  	L NEAR	020E	CSEG
INOUT_C  . . . . . . . . . . . .  	L NEAR	0223	CSEG
INOUT_D  . . . . . . . . . . . .  	L NEAR	022E	CSEG
INOUT_D_LOW_MEM  . . . . . . . .  	N PROC	0421	CSEG	Length = 0036
INOUT_E  . . . . . . . . . . . .  	L NEAR	0231	CSEG
INOUT_E1 . . . . . . . . . . . .  	L NEAR	01C7	CSEG
INOUT_EM . . . . . . . . . . . .  	L NEAR	023A	CSEG
INOUT_EMS  . . . . . . . . . . .  	L NEAR	02EB	CSEG
INOUT_EM_A . . . . . . . . . . .  	L NEAR	0257	CSEG
INOUT_EM_B . . . . . . . . . . .  	L NEAR	0282	CSEG
INOUT_EM_C . . . . . . . . . . .  	L NEAR	0297	CSEG
INOUT_EM_D . . . . . . . . . . .  	L NEAR	02A2	CSEG
INOUT_EM_E . . . . . . . . . . .  	L NEAR	02E0	CSEG
INOUT_EM_X2  . . . . . . . . . .  	L NEAR	036C	CSEG
INOUT_EM_XE  . . . . . . . . . .  	L NEAR	0375	CSEG
INOUT_UPDATE . . . . . . . . . .  	L NEAR	02CA	CSEG
INPUT  . . . . . . . . . . . . .  	L NEAR	01B4	CSEG
INPUTMSG . . . . . . . . . . . .  	NUMBER	0000	
INPUT_FLUSH  . . . . . . . . . .  	L NEAR	018A	CSEG
INPUT_IOCTL  . . . . . . . . . .  	L NEAR	018A	CSEG
INPUT_NOWAIT . . . . . . . . . .  	L NEAR	018A	CSEG
INPUT_STATUS . . . . . . . . . .  	L NEAR	018A	CSEG
INTV15 . . . . . . . . . . . . .  	L DWORD	002F	CSEG
INTV15O  . . . . . . . . . . . .  	L WORD	002F	CSEG
INTV15S  . . . . . . . . . . . .  	L WORD	0031	CSEG
INVALID_SW_CHAR  . . . . . . . .  	NUMBER	0007	
IO_SRCA  . . . . . . . . . . . .  	L DWORD	0047	CSEG
IO_SRCO  . . . . . . . . . . . .  	L WORD	0047	CSEG
IO_SRCS  . . . . . . . . . . . .  	L WORD	0049	CSEG
IO_TGTA  . . . . . . . . . . . .  	L DWORD	004B	CSEG
IO_TGTO  . . . . . . . . . . . .  	L WORD	004B	CSEG
IO_TGTS  . . . . . . . . . . . .  	L WORD	004D	CSEG
IRPT . . . . . . . . . . . . . .  	F PROC	0165	CSEG	Length = 003D
IRPT_CMD_ERROR . . . . . . . . .  	L NEAR	018A	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-9


IRPT_CMD_EXIT  . . . . . . . . .  	L NEAR	018E	CSEG
IRPT_CMD_HIGH  . . . . . . . . .  	L NEAR	018B	CSEG

LEFT_ALIGN . . . . . . . . . . .  	NUMBER	0000	
LF . . . . . . . . . . . . . . .  	NUMBER	000A	
LOADMSG  . . . . . . . . . . . .  	NUMBER	0000	
LOCUS_39 . . . . . . . . . . . .  	NUMBER	0001	
LOWEST_4CH_VERSION . . . . . . .  	NUMBER	0002	
LOW_NIB_MASK . . . . . . . . . .  	NUMBER	000F	

MAJOR_VERSION  . . . . . . . . .  	NUMBER	0004	
MAP_FRAME  . . . . . . . . . . .  	N PROC	040C	CSEG	Length = 0015
MAXSEC_TRF . . . . . . . . . . .  	L WORD	057D	CSEG
MAX_CMD  . . . . . . . . . . . .  	NUMBER	000F	
MAX_CNT  . . . . . . . . . . . .  	L WORD	0043	CSEG
MAX_DIRN . . . . . . . . . . . .  	NUMBER	0200	
MAX_FATE . . . . . . . . . . . .  	NUMBER	0FE0	
MEDIA_CHECK  . . . . . . . . . .  	N PROC	01A2	CSEG	Length = 0005
MEM_SIZE . . . . . . . . . . . .  	NUMBER	0012	
MINOR_VERSION  . . . . . . . . .  	NUMBER	0000	
MIN_DIRN . . . . . . . . . . . .  	NUMBER	0002	
MIN_MEMORY_LEFT  . . . . . . . .  	L WORD	0581	CSEG
MODIFY_CMOS_EM . . . . . . . . .  	N PROC	0BAD	CSEG	Length = 000E
MOVE_RH  . . . . . . . . . . . .  	L BYTE	0BDD	CSEG
MOVE_RHCNT . . . . . . . . . . .  	L WORD	0BEF	CSEG
MOVE_RHO . . . . . . . . . . . .  	L WORD	0BEB	CSEG
MOVE_RHS . . . . . . . . . . . .  	L WORD	0BED	CSEG
MOVE_RH_L  . . . . . . . . . . .  	NUMBER	0016	
MOVE_VDISK . . . . . . . . . . .  	N PROC	0C7E	CSEG	Length = 0021
MSGDATA  . . . . . . . . . . . .  	NUMBER	0000	
MSGEND . . . . . . . . . . . . .  	L BYTE	1935	CSEG
MSG_SER_CLASS  . . . . . . . . .  	NUMBER	0000	

NEARMSG  . . . . . . . . . . . .  	NUMBER	FFFF	
NEW_EXPECTED_VERSION . . . . . .  	NUMBER	2605	
NEW_MAJOR_VERSION  . . . . . . .  	NUMBER	0005	
NEW_MINOR_VERSION  . . . . . . .  	NUMBER	0026	
NOCHECKSTDIN . . . . . . . . . .  	NUMBER	0000	
NOCHECKSTDOUT  . . . . . . . . .  	NUMBER	0000	
NOT_EX_FAIL_EX_OPEN  . . . . . .  	NUMBER	0101	
NOVERCHECKMSG  . . . . . . . . .  	NUMBER	0000	
NO_CRIT_OPEN . . . . . . . . . .  	NUMBER	2000	
NO_HANDLE  . . . . . . . . . . .  	NUMBER	FFFF	
NO_INPUT . . . . . . . . . . . .  	NUMBER	0000	
NO_REPLACE . . . . . . . . . . .  	NUMBER	0000	
NULL . . . . . . . . . . . . . .  	NUMBER	0000	
NUMMSG . . . . . . . . . . . . .  	NUMBER	FFFF	

ONE_REPLACE  . . . . . . . . . .  	NUMBER	0001	
OUTPUT . . . . . . . . . . . . .  	L NEAR	01B4	CSEG
OUTPUT_FLUSH . . . . . . . . . .  	L NEAR	018A	CSEG
OUTPUT_IOCTL . . . . . . . . . .  	L NEAR	018A	CSEG
OUTPUT_STATUS  . . . . . . . . .  	L NEAR	018A	CSEG
OUTPUT_VERIFY  . . . . . . . . .  	L NEAR	01B4	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-10



PAD_BLANK  . . . . . . . . . . .  	NUMBER	0020	
PARAS_PER_SECTOR . . . . . . . .  	L WORD	0033	CSEG
PARA_PER_KB  . . . . . . . . . .  	L WORD	0583	CSEG
PARA_SIZE  . . . . . . . . . . .  	NUMBER	0010	
PARSE_ERR_CLASS  . . . . . . . .  	NUMBER	0002	
PATCH_AREA . . . . . . . . . . .  	L BYTE	04F5	CSEG	Length = 0005
PC_386 . . . . . . . . . . . . .  	L BYTE	00E4	CSEG
PC_386_CHK . . . . . . . . . . .  	N PROC	0697	CSEG	Length = 0026

REMOVABLE_MEDIA  . . . . . . . .  	N PROC	01B0	CSEG	Length = 0004
RESERVED . . . . . . . . . . . .  	NUMBER	0000	
RH . . . . . . . . . . . . . . .  	TEXT  DS:[BX]		
RH0_BPBA . . . . . . . . . . . .  	DWORD	0012	
RH4_DTAA . . . . . . . . . . . .  	DWORD	000E	
RH_PTRA  . . . . . . . . . . . .  	L DWORD	00F4	CSEG
RH_PTRO  . . . . . . . . . . . .  	L WORD	00F4	CSEG
RH_PTRS  . . . . . . . . . . . .  	L WORD	00F6	CSEG
RIGHT_ALIGN  . . . . . . . . . .  	NUMBER	0080	

SECTOR_ADJUSTED  . . . . . . . .  	NUMBER	0005	
SECT_LEFT  . . . . . . . . . . .  	L WORD	0045	CSEG
SECT_LEFT_IN_FRAME . . . . . . .  	L WORD	0058	CSEG
SECT_PER_PAGE  . . . . . . . . .  	L WORD	005A	CSEG
SEC_SZ . . . . . . . . . . . . .  	NUMBER	000A	
SEC_SZ_SUBLIST . . . . . . . . .  	L BYTE	05A9	CSEG
SETSTDIO . . . . . . . . . . . .  	NUMBER	0000	
SGN_BIN_BYTE . . . . . . . . . .  	NUMBER	0012	
SGN_BIN_DWORD  . . . . . . . . .  	NUMBER	0032	
SGN_BIN_TYPE . . . . . . . . . .  	NUMBER	0002	
SGN_BIN_WORD . . . . . . . . . .  	NUMBER	0022	
SINGLE_SEGMENT . . . . . . . . .  	NUMBER	0001	
SIZE_DONE  . . . . . . . . . . .  	L NEAR	0A76	CSEG
SKIP_TO_DIGIT  . . . . . . . . .  	N PROC	07A2	CSEG	Length = 000E
SKIP_TO_DIGIT_X  . . . . . . . .  	L NEAR	07AD	CSEG
SMALLEST_MIN . . . . . . . . . .  	NUMBER	0001	
SRC  . . . . . . . . . . . . . .  	L QWORD	0108	CSEG
STACK_SIZE . . . . . . . . . . .  	NUMBER	0200	
START  . . . . . . . . . . . . .  	NEAR	0000	CSEG
START_BUFFER_PARA  . . . . . . .  	L WORD	0035	CSEG
START_EM_HI  . . . . . . . . . .  	L BYTE	0040	CSEG
START_EM_LO  . . . . . . . . . .  	L WORD	003E	CSEG
STAT_BUSY  . . . . . . . . . . .  	NUMBER	0200	
STAT_CMDERR  . . . . . . . . . .  	NUMBER	8003	
STAT_CRC . . . . . . . . . . . .  	NUMBER	8004	
STAT_DONE  . . . . . . . . . . .  	NUMBER	0001	
STAT_SNF . . . . . . . . . . . .  	NUMBER	8008	
STDAUX . . . . . . . . . . . . .  	NUMBER	0003	
STDERR . . . . . . . . . . . . .  	NUMBER	0002	
STDIN  . . . . . . . . . . . . .  	NUMBER	0000	
STDOUT . . . . . . . . . . . . .  	NUMBER	0001	
STDPRN . . . . . . . . . . . . .  	NUMBER	0004	
STEAL_INT15  . . . . . . . . . .  	N PROC	0C5D	CSEG	Length = 0021
STRATEGY . . . . . . . . . . . .  	F PROC	013A	CSEG	Length = 000B
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-11


SUBLIST_LENGTH . . . . . . . . .  	NUMBER	000B	
SYSDISPMSG . . . . . . . . . . .  	N PROC	1096	CSEG	Length = 0047
SYSDISP_ERROR  . . . . . . . . .  	L NEAR	0DE8	CSEG
SYSLOADMSG . . . . . . . . . . .  	N PROC	0F36	CSEG	Length = 00A8
SYS_TOO_SMALL  . . . . . . . . .  	NUMBER	0002	
S_FLAG . . . . . . . . . . . . .  	L BYTE	05B0	CSEG
S_ID . . . . . . . . . . . . . .  	L BYTE	05AF	CSEG
S_MAXW . . . . . . . . . . . . .  	L BYTE	05B1	CSEG
S_MINW . . . . . . . . . . . . .  	L BYTE	05B2	CSEG
S_PAD  . . . . . . . . . . . . .  	L BYTE	05B3	CSEG
S_RESV . . . . . . . . . . . . .  	L BYTE	05AA	CSEG
S_SIZE . . . . . . . . . . . . .  	L BYTE	05A9	CSEG
S_VALUEO . . . . . . . . . . . .  	L WORD	05AB	CSEG
S_VALUES . . . . . . . . . . . .  	L WORD	05AD	CSEG

TAB  . . . . . . . . . . . . . .  	NUMBER	0009	
TEST_LENGTH  . . . . . . . . . .  	NUMBER	0004	
TGT  . . . . . . . . . . . . . .  	L QWORD	0110	CSEG
TIMEMSG  . . . . . . . . . . . .  	NUMBER	0000	
TIME_24_TYPE . . . . . . . . . .  	NUMBER	0006	
TIME_CTY_TYPE  . . . . . . . . .  	NUMBER	0005	
TIME_HHMMSSHH_24 . . . . . . . .  	NUMBER	0026	
TIME_HHMMSSHH_CTY  . . . . . . .  	NUMBER	0025	
TIME_HHMMSS_24 . . . . . . . . .  	NUMBER	0016	
TIME_HHMMSS_CTY  . . . . . . . .  	NUMBER	0015	
TIME_HHMM_24 . . . . . . . . . .  	NUMBER	0006	
TIME_HHMM_CTY  . . . . . . . . .  	NUMBER	0005	
TITLE_SUBLIST  . . . . . . . . .  	L BYTE	0593	CSEG
TRANS_ADJUSTED . . . . . . . . .  	NUMBER	0008	
TRANS_SZ . . . . . . . . . . . .  	NUMBER	000C	
TRANS_SZ_SUBLIST . . . . . . . .  	L BYTE	05BF	CSEG
TRUE . . . . . . . . . . . . . .  	NUMBER	FFFF	
TT_FLAG  . . . . . . . . . . . .  	L BYTE	059A	CSEG
TT_ID  . . . . . . . . . . . . .  	L BYTE	0599	CSEG
TT_MAXW  . . . . . . . . . . . .  	L BYTE	059B	CSEG
TT_MINW  . . . . . . . . . . . .  	L BYTE	059C	CSEG
TT_PAD . . . . . . . . . . . . .  	L BYTE	059D	CSEG
TT_RESV  . . . . . . . . . . . .  	L BYTE	0594	CSEG
TT_SIZE  . . . . . . . . . . . .  	L BYTE	0593	CSEG
TT_VALUEO  . . . . . . . . . . .  	L WORD	0595	CSEG
TT_VALUES  . . . . . . . . . . .  	L WORD	0597	CSEG
T_FLAG . . . . . . . . . . . . .  	L BYTE	05C6	CSEG
T_ID . . . . . . . . . . . . . .  	L BYTE	05C5	CSEG
T_MAXW . . . . . . . . . . . . .  	L BYTE	05C7	CSEG
T_MINW . . . . . . . . . . . . .  	L BYTE	05C8	CSEG
T_PAD  . . . . . . . . . . . . .  	L BYTE	05C9	CSEG
T_RESV . . . . . . . . . . . . .  	L BYTE	05C0	CSEG
T_SIZE . . . . . . . . . . . . .  	L BYTE	05BF	CSEG
T_VALUEO . . . . . . . . . . . .  	L WORD	05C1	CSEG
T_VALUES . . . . . . . . . . . .  	L WORD	05C3	CSEG

UNLIMITED_MAX  . . . . . . . . .  	NUMBER	0000	
UNSGN_BIN_BYTE . . . . . . . . .  	NUMBER	0011	
UNSGN_BIN_DWORD  . . . . . . . .  	NUMBER	0031	
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-12


UNSGN_BIN_TYPE . . . . . . . . .  	NUMBER	0001	
UNSGN_BIN_WORD . . . . . . . . .  	NUMBER	0021	
UPDATE_AVAIL . . . . . . . . . .  	N PROC	0B7C	CSEG	Length = 0031
USE_EXTENDED_SUPPORT . . . . . .  	L NEAR	097C	CSEG
USE_INT15_LOGIC  . . . . . . . .  	L NEAR	0BA9	CSEG
UTILITY_MSG_CLASS  . . . . . . .  	NUMBER	00FF	

VALIDATE . . . . . . . . . . . .  	N PROC	0888	CSEG	Length = 02A8
VALIDATE_A . . . . . . . . . . .  	L NEAR	0893	CSEG
VALIDATE_C . . . . . . . . . . .  	L NEAR	0909	CSEG
VALIDATE_X . . . . . . . . . . .  	L NEAR	090E	CSEG
VAL_BSIZE  . . . . . . . . . . .  	N PROC	090F	CSEG	Length = 0094
VAL_BSIZE_B  . . . . . . . . . .  	L NEAR	092E	CSEG
VAL_BSIZE_C  . . . . . . . . . .  	L NEAR	0955	CSEG
VAL_DIRN . . . . . . . . . . . .  	N PROC	0A77	CSEG	Length = 004D
VAL_DIRN_A . . . . . . . . . . .  	L NEAR	0A84	CSEG
VAL_DIRN_B . . . . . . . . . . .  	L NEAR	0A8C	CSEG
VAL_DIRN_C . . . . . . . . . . .  	L NEAR	0A9E	CSEG
VAL_DIRN_D . . . . . . . . . . .  	L NEAR	0AB5	CSEG
VAL_FAT  . . . . . . . . . . . .  	N PROC	0AC4	CSEG	Length = 006C
VAL_FAT_A  . . . . . . . . . . .  	L NEAR	0AE1	CSEG
VAL_FAT_B  . . . . . . . . . . .  	L NEAR	0B0A	CSEG
VAL_FAT_C  . . . . . . . . . . .  	L NEAR	0B15	CSEG
VAL_FAT_X  . . . . . . . . . . .  	L NEAR	0B2F	CSEG
VAL_SSZ  . . . . . . . . . . . .  	N PROC	0A1A	CSEG	Length = 005D
VAL_SSZ_A  . . . . . . . . . . .  	L NEAR	0A51	CSEG
VAL_SSZ_L  . . . . . . . . . . .  	L WORD	0886	CSEG
VAL_SSZ_N  . . . . . . . . . . .  	NUMBER	0003	
VAL_SSZ_S  . . . . . . . . . . .  	L WORD	0882	CSEG
VAL_SSZ_ST . . . . . . . . . . .  	L NEAR	0A43	CSEG
VAL_SSZ_TBL  . . . . . . . . . .  	L WORD	0882	CSEG
VAL_SSZ_X  . . . . . . . . . . .  	L NEAR	0A64	CSEG
VDISK  . . . . . . . . . . . . .  	NEAR	04B0	CSEG
VDISKP . . . . . . . . . . . . .  	NUMBER	004B	
VDISK_CONTINUE_1 . . . . . . . .  	L NEAR	0621	CSEG
VDISK_INT15  . . . . . . . . . .  	N PROC	0128	CSEG	Length = 0012
VDISK_NAME . . . . . . . . . . .  	L BYTE	05D4	CSEG
VDISK_NOT_INST . . . . . . . . .  	NUMBER	000D	
VDISK_TITLE  . . . . . . . . . .  	NUMBER	0003	
VERIFY_EXTENDER  . . . . . . . .  	N PROC	0B3E	CSEG	Length = 003E
VERIFY_EXTENDER_X  . . . . . . .  	L NEAR	0B7B	CSEG
VOL_LABEL  . . . . . . . . . . .  	L BYTE	0012	CSEG
VOL_LABEL_LEN  . . . . . . . . .  	NUMBER	001A	

WPARA_SIZE . . . . . . . . . . .  	L WORD	0041	CSEG
WRITE_MESSAGES . . . . . . . . .  	N PROC	0CE6	CSEG	Length = 0129
WRITE_MESSAGES_A . . . . . . . .  	L NEAR	0D11	CSEG
WRITE_MESSAGES_B . . . . . . . .  	L NEAR	0D21	CSEG
WRITE_MESSAGES_C . . . . . . . .  	L NEAR	0D36	CSEG
WRITE_MESSAGES_D . . . . . . . .  	L NEAR	0D60	CSEG
WRITE_MESSAGES_D0  . . . . . . .  	L NEAR	0D4B	CSEG
WRITE_MESSAGES_E . . . . . . . .  	L NEAR	0D75	CSEG
WRITE_MESSAGES_F . . . . . . . .  	L NEAR	0D91	CSEG
WRITE_MESSAGES_G . . . . . . . .  	L NEAR	0DAC	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-13


WRITE_MESSAGES_RET . . . . . . .  	L NEAR	0D90	CSEG

$$DO4  . . . . . . . . . . . . .  	L NEAR	0332	CSEG
$$EN1  . . . . . . . . . . . . .  	L NEAR	0139	CSEG
$$EN21 . . . . . . . . . . . . .  	L NEAR	09DD	CSEG
$$EN22 . . . . . . . . . . . . .  	L NEAR	09D8	CSEG
$$EN27 . . . . . . . . . . . . .  	L NEAR	0A0C	CSEG
$$EN28 . . . . . . . . . . . . .  	L NEAR	0A09	CSEG
$$EN29 . . . . . . . . . . . . .  	L NEAR	0A06	CSEG
$$EN4  . . . . . . . . . . . . .  	L NEAR	0354	CSEG
$$IF1  . . . . . . . . . . . . .  	L NEAR	0134	CSEG
$$IF11 . . . . . . . . . . . . .  	L NEAR	0444	CSEG
$$IF13 . . . . . . . . . . . . .  	L NEAR	06B9	CSEG
$$IF14 . . . . . . . . . . . . .  	L NEAR	06B9	CSEG
$$IF15 . . . . . . . . . . . . .  	L NEAR	06B9	CSEG
$$IF19 . . . . . . . . . . . . .  	L NEAR	076D	CSEG
$$IF21 . . . . . . . . . . . . .  	L NEAR	09DA	CSEG
$$IF22 . . . . . . . . . . . . .  	L NEAR	09D5	CSEG
$$IF27 . . . . . . . . . . . . .  	L NEAR	0A0B	CSEG
$$IF28 . . . . . . . . . . . . .  	L NEAR	0A08	CSEG
$$IF29 . . . . . . . . . . . . .  	L NEAR	0A05	CSEG
$$IF36 . . . . . . . . . . . . .  	L NEAR	0B91	CSEG
$$IF38 . . . . . . . . . . . . .  	L NEAR	0CB7	CSEG
$$IF7  . . . . . . . . . . . . .  	L NEAR	03CF	CSEG
$$IF9  . . . . . . . . . . . . .  	L NEAR	0402	CSEG
$MDO123  . . . . . . . . . . . .  	L NEAR	113E	CSEG
$MDO139  . . . . . . . . . . . .  	L NEAR	11A7	CSEG
$MDO145  . . . . . . . . . . . .  	L NEAR	11CA	CSEG
$MDO165  . . . . . . . . . . . .  	L NEAR	1232	CSEG
$MDO167  . . . . . . . . . . . .  	L NEAR	123C	CSEG
$MDO175  . . . . . . . . . . . .  	L NEAR	1269	CSEG
$MDO215  . . . . . . . . . . . .  	L NEAR	133A	CSEG
$MDO219  . . . . . . . . . . . .  	L NEAR	1361	CSEG
$MDO259  . . . . . . . . . . . .  	L NEAR	1452	CSEG
$MDO280  . . . . . . . . . . . .  	L NEAR	14C3	CSEG
$MDO291  . . . . . . . . . . . .  	L NEAR	14EF	CSEG
$MDO301  . . . . . . . . . . . .  	L NEAR	151E	CSEG
$MDO310  . . . . . . . . . . . .  	L NEAR	1545	CSEG
$MDO321  . . . . . . . . . . . .  	L NEAR	1588	CSEG
$MEN104  . . . . . . . . . . . .  	L NEAR	10DC	CSEG
$MEN107  . . . . . . . . . . . .  	L NEAR	10F2	CSEG
$MEN110  . . . . . . . . . . . .  	L NEAR	1113	CSEG
$MEN119  . . . . . . . . . . . .  	L NEAR	114B	CSEG
$MEN123  . . . . . . . . . . . .  	L NEAR	114B	CSEG
$MEN128  . . . . . . . . . . . .  	L NEAR	117A	CSEG
$MEN139  . . . . . . . . . . . .  	L NEAR	11BE	CSEG
$MEN145  . . . . . . . . . . . .  	L NEAR	1228	CSEG
$MEN146  . . . . . . . . . . . .  	L NEAR	11E2	CSEG
$MEN150  . . . . . . . . . . . .  	L NEAR	1223	CSEG
$MEN154  . . . . . . . . . . . .  	L NEAR	1223	CSEG
$MEN165  . . . . . . . . . . . .  	L NEAR	1322	CSEG
$MEN167  . . . . . . . . . . . .  	L NEAR	1259	CSEG
$MEN175  . . . . . . . . . . . .  	L NEAR	1282	CSEG
$MEN180  . . . . . . . . . . . .  	L NEAR	1295	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-14


$MEN187  . . . . . . . . . . . .  	L NEAR	12C8	CSEG
$MEN188  . . . . . . . . . . . .  	L NEAR	12B6	CSEG
$MEN192  . . . . . . . . . . . .  	L NEAR	12C8	CSEG
$MEN199  . . . . . . . . . . . .  	L NEAR	1308	CSEG
$MEN20 . . . . . . . . . . . . .  	L NEAR	0FDD	CSEG
$MEN200  . . . . . . . . . . . .  	L NEAR	1300	CSEG
$MEN202  . . . . . . . . . . . .  	L NEAR	1300	CSEG
$MEN211  . . . . . . . . . . . .  	L NEAR	1315	CSEG
$MEN219  . . . . . . . . . . . .  	L NEAR	13C7	CSEG
$MEN220  . . . . . . . . . . . .  	L NEAR	1397	CSEG
$MEN222  . . . . . . . . . . . .  	L NEAR	1397	CSEG
$MEN224  . . . . . . . . . . . .  	L NEAR	1397	CSEG
$MEN229  . . . . . . . . . . . .  	L NEAR	13BF	CSEG
$MEN230  . . . . . . . . . . . .  	L NEAR	13B1	CSEG
$MEN240  . . . . . . . . . . . .  	L NEAR	13E7	CSEG
$MEN243  . . . . . . . . . . . .  	L NEAR	13F4	CSEG
$MEN247  . . . . . . . . . . . .  	L NEAR	144F	CSEG
$MEN248  . . . . . . . . . . . .  	L NEAR	1433	CSEG
$MEN25 . . . . . . . . . . . . .  	L NEAR	1095	CSEG
$MEN252  . . . . . . . . . . . .  	L NEAR	144B	CSEG
$MEN259  . . . . . . . . . . . .  	L NEAR	146F	CSEG
$MEN261  . . . . . . . . . . . .  	L NEAR	1463	CSEG
$MEN27 . . . . . . . . . . . . .  	L NEAR	108A	CSEG
$MEN292  . . . . . . . . . . . .  	L NEAR	1502	CSEG
$MEN307  . . . . . . . . . . . .  	L NEAR	154E	CSEG
$MEN314  . . . . . . . . . . . .  	L NEAR	156E	CSEG
$MEN317  . . . . . . . . . . . .  	L NEAR	1595	CSEG
$MEN321  . . . . . . . . . . . .  	L NEAR	1593	CSEG
$MEN325  . . . . . . . . . . . .  	L NEAR	1629	CSEG
$MEN333  . . . . . . . . . . . .  	L NEAR	1629	CSEG
$MEN93 . . . . . . . . . . . . .  	L NEAR	10D0	CSEG
$MEN94 . . . . . . . . . . . . .  	L NEAR	10BC	CSEG
$MEN97 . . . . . . . . . . . . .  	L NEAR	10CA	CSEG
$MIF104  . . . . . . . . . . . .  	L NEAR	10D8	CSEG
$MIF107  . . . . . . . . . . . .  	L NEAR	10EF	CSEG
$MIF110  . . . . . . . . . . . .  	L NEAR	1103	CSEG
$MIF112  . . . . . . . . . . . .  	L NEAR	1113	CSEG
$MIF113  . . . . . . . . . . . .  	L NEAR	1113	CSEG
$MIF117  . . . . . . . . . . . .  	L NEAR	1118	CSEG
$MIF119  . . . . . . . . . . . .  	L NEAR	113C	CSEG
$MIF120  . . . . . . . . . . . .  	L NEAR	113A	CSEG
$MIF127  . . . . . . . . . . . .  	L NEAR	117B	CSEG
$MIF128  . . . . . . . . . . . .  	L NEAR	1178	CSEG
$MIF129  . . . . . . . . . . . .  	L NEAR	1176	CSEG
$MIF134  . . . . . . . . . . . .  	L NEAR	119B	CSEG
$MIF135  . . . . . . . . . . . .  	L NEAR	119B	CSEG
$MIF138  . . . . . . . . . . . .  	L NEAR	11BE	CSEG
$MIF141  . . . . . . . . . . . .  	L NEAR	11BA	CSEG
$MIF146  . . . . . . . . . . . .  	L NEAR	11DF	CSEG
$MIF150  . . . . . . . . . . . .  	L NEAR	11FF	CSEG
$MIF151  . . . . . . . . . . . .  	L NEAR	11FD	CSEG
$MIF154  . . . . . . . . . . . .  	L NEAR	1212	CSEG
$MIF155  . . . . . . . . . . . .  	L NEAR	1210	CSEG
$MIF158  . . . . . . . . . . . .  	L NEAR	1223	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-15


$MIF159  . . . . . . . . . . . .  	L NEAR	1223	CSEG
$MIF166  . . . . . . . . . . . .  	L NEAR	1259	CSEG
$MIF169  . . . . . . . . . . . .  	L NEAR	1254	CSEG
$MIF173  . . . . . . . . . . . .  	L NEAR	1295	CSEG
$MIF174  . . . . . . . . . . . .  	L NEAR	1295	CSEG
$MIF175  . . . . . . . . . . . .  	L NEAR	1276	CSEG
$MIF180  . . . . . . . . . . . .  	L NEAR	1292	CSEG
$MIF187  . . . . . . . . . . . .  	L NEAR	12B8	CSEG
$MIF188  . . . . . . . . . . . .  	L NEAR	12B5	CSEG
$MIF192  . . . . . . . . . . . .  	L NEAR	12BF	CSEG
$MIF194  . . . . . . . . . . . .  	L NEAR	12C6	CSEG
$MIF199  . . . . . . . . . . . .  	L NEAR	1305	CSEG
$MIF20 . . . . . . . . . . . . .  	L NEAR	0FD9	CSEG
$MIF200  . . . . . . . . . . . .  	L NEAR	12E6	CSEG
$MIF202  . . . . . . . . . . . .  	L NEAR	1300	CSEG
$MIF211  . . . . . . . . . . . .  	L NEAR	1311	CSEG
$MIF216  . . . . . . . . . . . .  	L NEAR	1349	CSEG
$MIF220  . . . . . . . . . . . .  	L NEAR	136F	CSEG
$MIF222  . . . . . . . . . . . .  	L NEAR	137D	CSEG
$MIF224  . . . . . . . . . . . .  	L NEAR	1390	CSEG
$MIF229  . . . . . . . . . . . .  	L NEAR	13B3	CSEG
$MIF23 . . . . . . . . . . . . .  	L NEAR	0FF5	CSEG
$MIF230  . . . . . . . . . . . .  	L NEAR	13A4	CSEG
$MIF234  . . . . . . . . . . . .  	L NEAR	13BB	CSEG
$MIF239  . . . . . . . . . . . .  	L NEAR	13F6	CSEG
$MIF240  . . . . . . . . . . . .  	L NEAR	13E6	CSEG
$MIF243  . . . . . . . . . . . .  	L NEAR	13EE	CSEG
$MIF247  . . . . . . . . . . . .  	L NEAR	1435	CSEG
$MIF248  . . . . . . . . . . . .  	L NEAR	142E	CSEG
$MIF25 . . . . . . . . . . . . .  	L NEAR	107D	CSEG
$MIF252  . . . . . . . . . . . .  	L NEAR	1442	CSEG
$MIF254  . . . . . . . . . . . .  	L NEAR	144B	CSEG
$MIF258  . . . . . . . . . . . .  	L NEAR	147E	CSEG
$MIF259  . . . . . . . . . . . .  	L NEAR	1467	CSEG
$MIF261  . . . . . . . . . . . .  	L NEAR	1460	CSEG
$MIF269  . . . . . . . . . . . .  	L NEAR	147E	CSEG
$MIF27 . . . . . . . . . . . . .  	L NEAR	1087	CSEG
$MIF270  . . . . . . . . . . . .  	L NEAR	147A	CSEG
$MIF274  . . . . . . . . . . . .  	L NEAR	1486	CSEG
$MIF276  . . . . . . . . . . . .  	L NEAR	14A8	CSEG
$MIF278  . . . . . . . . . . . .  	L NEAR	14D8	CSEG
$MIF279  . . . . . . . . . . . .  	L NEAR	14D8	CSEG
$MIF281  . . . . . . . . . . . .  	L NEAR	14D4	CSEG
$MIF286  . . . . . . . . . . . .  	L NEAR	14EB	CSEG
$MIF287  . . . . . . . . . . . .  	L NEAR	14EB	CSEG
$MIF290  . . . . . . . . . . . .  	L NEAR	1514	CSEG
$MIF292  . . . . . . . . . . . .  	L NEAR	1501	CSEG
$MIF295  . . . . . . . . . . . .  	L NEAR	1510	CSEG
$MIF299  . . . . . . . . . . . .  	L NEAR	1533	CSEG
$MIF300  . . . . . . . . . . . .  	L NEAR	1533	CSEG
$MIF302  . . . . . . . . . . . .  	L NEAR	152F	CSEG
$MIF307  . . . . . . . . . . . .  	L NEAR	1541	CSEG
$MIF309  . . . . . . . . . . . .  	L NEAR	154E	CSEG
$MIF314  . . . . . . . . . . . .  	L NEAR	156A	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-16


$MIF317  . . . . . . . . . . . .  	L NEAR	1588	CSEG
$MIF318  . . . . . . . . . . . .  	L NEAR	1586	CSEG
$MIF325  . . . . . . . . . . . .  	L NEAR	15D1	CSEG
$MIF326  . . . . . . . . . . . .  	L NEAR	15C2	CSEG
$MIF327  . . . . . . . . . . . .  	L NEAR	15BB	CSEG
$MIF330  . . . . . . . . . . . .  	L NEAR	15CF	CSEG
$MIF333  . . . . . . . . . . . .  	L NEAR	15FF	CSEG
$MIF334  . . . . . . . . . . . .  	L NEAR	15F0	CSEG
$MIF335  . . . . . . . . . . . .  	L NEAR	15E9	CSEG
$MIF338  . . . . . . . . . . . .  	L NEAR	15FD	CSEG
$MIF341  . . . . . . . . . . . .  	L NEAR	161C	CSEG
$MIF342  . . . . . . . . . . . .  	L NEAR	1615	CSEG
$MIF345  . . . . . . . . . . . .  	L NEAR	1629	CSEG
$MIF349  . . . . . . . . . . . .  	L NEAR	1635	CSEG
$MIF93 . . . . . . . . . . . . .  	L NEAR	10CC	CSEG
$MIF94 . . . . . . . . . . . . .  	L NEAR	10B9	CSEG
$MIF97 . . . . . . . . . . . . .  	L NEAR	10C6	CSEG
$MLL149  . . . . . . . . . . . .  	L NEAR	11EC	CSEG
$MLL168  . . . . . . . . . . . .  	L NEAR	124B	CSEG
$MLL178  . . . . . . . . . . . .  	L NEAR	127E	CSEG
$MLL202  . . . . . . . . . . . .  	L NEAR	12F8	CSEG
$MLL214  . . . . . . . . . . . .  	L NEAR	1322	CSEG
$MSR175  . . . . . . . . . . . .  	L NEAR	1295	CSEG
$MSR259  . . . . . . . . . . . .  	L NEAR	1470	CSEG
$MXL3  . . . . . . . . . . . . .  	L NEAR	12A2	CSEG
$MXL4  . . . . . . . . . . . . .  	L NEAR	1322	CSEG
$MXL5  . . . . . . . . . . . . .  	L NEAR	13C7	CSEG
$M_1_FF_END  . . . . . . . . . .  	L BYTE	1651	CSEG
$M_1_FF_MSG  . . . . . . . . . .  	L BYTE	163F	CSEG
$M_1_FF_STRUC  . . . . . . . . .  	L BYTE	163B	CSEG
$M_2_00001H_END  . . . . . . . .  	L BYTE	1693	CSEG
$M_2_00001H_MSG  . . . . . . . .  	L BYTE	167F	CSEG
$M_2_00001H_STRUC  . . . . . . .  	L BYTE	165F	CSEG
$M_2_00002H_END  . . . . . . . .  	L BYTE	16AE	CSEG
$M_2_00002H_MSG  . . . . . . . .  	L BYTE	1693	CSEG
$M_2_00002H_STRUC  . . . . . . .  	L BYTE	1663	CSEG
$M_2_00003H_END  . . . . . . . .  	L BYTE	16BD	CSEG
$M_2_00003H_MSG  . . . . . . . .  	L BYTE	16AE	CSEG
$M_2_00003H_STRUC  . . . . . . .  	L BYTE	1667	CSEG
$M_2_00004H_END  . . . . . . . .  	L BYTE	16CD	CSEG
$M_2_00004H_MSG  . . . . . . . .  	L BYTE	16BD	CSEG
$M_2_00004H_STRUC  . . . . . . .  	L BYTE	166B	CSEG
$M_2_00006H_END  . . . . . . . .  	L BYTE	16F2	CSEG
$M_2_00006H_MSG  . . . . . . . .  	L BYTE	16CD	CSEG
$M_2_00006H_STRUC  . . . . . . .  	L BYTE	166F	CSEG
$M_2_00007H_END  . . . . . . . .  	L BYTE	170E	CSEG
$M_2_00007H_MSG  . . . . . . . .  	L BYTE	16F2	CSEG
$M_2_00007H_STRUC  . . . . . . .  	L BYTE	1673	CSEG
$M_2_00008H_END  . . . . . . . .  	L BYTE	172A	CSEG
$M_2_00008H_MSG  . . . . . . . .  	L BYTE	170E	CSEG
$M_2_00008H_STRUC  . . . . . . .  	L BYTE	1677	CSEG
$M_2_FF_END  . . . . . . . . . .  	L BYTE	1739	CSEG
$M_2_FF_MSG  . . . . . . . . . .  	L BYTE	172A	CSEG
$M_2_FF_STRUC  . . . . . . . . .  	L BYTE	167B	CSEG
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-17


$M_ADDR_SZ_FAR . . . . . . . . .  	NUMBER	0004	
$M_ADDR_SZ_NEAR  . . . . . . . .  	NUMBER	0002	
$M_ADD_CRLF  . . . . . . . . . .  	N PROC	1185	CSEG	Length = 0017
$M_ALIGN_MASK  . . . . . . . . .  	NUMBER	0080	
$M_AM  . . . . . . . . . . . . .  	NUMBER	0061	
$M_A_00001H_END  . . . . . . . .  	L BYTE	1798	CSEG
$M_A_00001H_MSG  . . . . . . . .  	L BYTE	1780	CSEG
$M_A_00001H_STRUC  . . . . . . .  	L BYTE	1748	CSEG
$M_A_00002H_END  . . . . . . . .  	L BYTE	17AE	CSEG
$M_A_00002H_MSG  . . . . . . . .  	L BYTE	1798	CSEG
$M_A_00002H_STRUC  . . . . . . .  	L BYTE	174C	CSEG
$M_A_00003H_END  . . . . . . . .  	L BYTE	17DB	CSEG
$M_A_00003H_MSG  . . . . . . . .  	L BYTE	17AE	CSEG
$M_A_00003H_STRUC  . . . . . . .  	L BYTE	1750	CSEG
$M_A_00004H_END  . . . . . . . .  	L BYTE	17F5	CSEG
$M_A_00004H_MSG  . . . . . . . .  	L BYTE	17DB	CSEG
$M_A_00004H_STRUC  . . . . . . .  	L BYTE	1754	CSEG
$M_A_00005H_END  . . . . . . . .  	L BYTE	180F	CSEG
$M_A_00005H_MSG  . . . . . . . .  	L BYTE	17F5	CSEG
$M_A_00005H_STRUC  . . . . . . .  	L BYTE	1758	CSEG
$M_A_00006H_END  . . . . . . . .  	L BYTE	182F	CSEG
$M_A_00006H_MSG  . . . . . . . .  	L BYTE	180F	CSEG
$M_A_00006H_STRUC  . . . . . . .  	L BYTE	175C	CSEG
$M_A_00007H_END  . . . . . . . .  	L BYTE	184D	CSEG
$M_A_00007H_MSG  . . . . . . . .  	L BYTE	182F	CSEG
$M_A_00007H_STRUC  . . . . . . .  	L BYTE	1760	CSEG
$M_A_00008H_END  . . . . . . . .  	L BYTE	1869	CSEG
$M_A_00008H_MSG  . . . . . . . .  	L BYTE	184D	CSEG
$M_A_00008H_STRUC  . . . . . . .  	L BYTE	1764	CSEG
$M_A_00009H_END  . . . . . . . .  	L BYTE	1887	CSEG
$M_A_00009H_MSG  . . . . . . . .  	L BYTE	1869	CSEG
$M_A_00009H_STRUC  . . . . . . .  	L BYTE	1768	CSEG
$M_A_0000AH_END  . . . . . . . .  	L BYTE	18A2	CSEG
$M_A_0000AH_MSG  . . . . . . . .  	L BYTE	1887	CSEG
$M_A_0000AH_STRUC  . . . . . . .  	L BYTE	176C	CSEG
$M_A_0000BH_END  . . . . . . . .  	L BYTE	18BD	CSEG
$M_A_0000BH_MSG  . . . . . . . .  	L BYTE	18A2	CSEG
$M_A_0000BH_STRUC  . . . . . . .  	L BYTE	1770	CSEG
$M_A_0000CH_END  . . . . . . . .  	L BYTE	18D4	CSEG
$M_A_0000CH_MSG  . . . . . . . .  	L BYTE	18BD	CSEG
$M_A_0000CH_STRUC  . . . . . . .  	L BYTE	1774	CSEG
$M_A_0000DH_END  . . . . . . . .  	L BYTE	18EB	CSEG
$M_A_0000DH_MSG  . . . . . . . .  	L BYTE	18D4	CSEG
$M_A_0000DH_STRUC  . . . . . . .  	L BYTE	1778	CSEG
$M_A_0000EH_END  . . . . . . . .  	L BYTE	192A	CSEG
$M_A_0000EH_MSG  . . . . . . . .  	L BYTE	18EB	CSEG
$M_A_0000EH_STRUC  . . . . . . .  	L BYTE	177C	CSEG
$M_BASE10  . . . . . . . . . . .  	NUMBER	000A	
$M_BASE16  . . . . . . . . . . .  	NUMBER	0010	
$M_BIN2ASC_REPLACE . . . . . . .  	N PROC	1597	CSEG	Length = 00A0
$M_BYTE  . . . . . . . . . . . .  	NUMBER	0010	
$M_CHAR_ONLY . . . . . . . . . .  	NUMBER	0000	
$M_CHAR_REPLACE  . . . . . . . .  	N PROC	156F	CSEG	Length = 0028
$M_CHECKSTDIN  . . . . . . . . .  	N PROC	0FF8	CSEG	Length = 0013
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-18


$M_CHECKSTDOUT . . . . . . . . .  	N PROC	100B	CSEG	Length = 0013
$M_CLASS_1_STRUC . . . . . . . .  	L BYTE	1637	CSEG
$M_CLASS_2_STRUC . . . . . . . .  	L BYTE	165B	CSEG
$M_CLASS_A_STRUC . . . . . . . .  	L BYTE	1744	CSEG
$M_CLASS_ID_SZ . . . . . . . . .  	NUMBER	0004	
$M_CLASS_NOT_EXIST . . . . . . .  	NUMBER	0000	
$M_CLS_1 . . . . . . . . . . . .  	N PROC	192A	CSEG	Global	Length = 000B
$M_COMMA . . . . . . . . . . . .  	NUMBER	002C	
$M_CONVERT2ASC . . . . . . . . .  	N PROC	11C1	CSEG	Length = 0071
$M_CON_INP . . . . . . . . . . .  	NUMBER	-0001	
$M_COUNT . . . . . . . . . . . .  	NUMBER	0001	
$M_CRIT_ERR_MASK . . . . . . . .  	NUMBER	0001	
$M_CRIT_HI . . . . . . . . . . .  	NUMBER	0027	
$M_CRIT_LO . . . . . . . . . . .  	NUMBER	0013	
$M_CRLF_SIZE . . . . . . . . . .  	NUMBER	0002	
$M_CR_LF . . . . . . . . . . . .  	NUMBER	0A0D	
$M_DATE_MASK . . . . . . . . . .  	NUMBER	0010	
$M_DBCS_TERM . . . . . . . . . .  	NUMBER	0000	
$M_DEF_DATE_FORM . . . . . . . .  	NUMBER	0000	
$M_DEF_DATE_SEP  . . . . . . . .  	NUMBER	002D	
$M_DEF_DECI_SEP  . . . . . . . .  	NUMBER	002E	
$M_DEF_TIME_FORM . . . . . . . .  	NUMBER	0001	
$M_DEF_TIME_SEP  . . . . . . . .  	NUMBER	003A	
$M_DISPLAY_$_STRING  . . . . . .  	N PROC	1119	CSEG	Length = 0035
$M_DISPLAY_H_STRING  . . . . . .  	N PROC	114E	CSEG	Length = 002E
$M_DISPLAY_MESSAGE . . . . . . .  	N PROC	1232	CSEG	Length = 00F8
$M_DISPLAY_REPLACE . . . . . . .  	N PROC	148D	CSEG	Length = 00C6
$M_DISPLAY_STRING  . . . . . . .  	N PROC	10DD	CSEG	Length = 003C
$M_DWORD . . . . . . . . . . . .  	NUMBER	0030	
$M_END . . . . . . . . . . . . .  	NUMBER	0000	
$M_EXTPAR_TYPE . . . . . . . . .  	NUMBER	0008	
$M_EXT_CLS . . . . . . . . . . .  	NUMBER	FFFF	
$M_EXT_ERR_FLAG  . . . . . . . .  	NUMBER	FFFF	
$M_EXT_PAR_REPLACE . . . . . . .  	N PROC	132A	CSEG	Length = 0031
$M_FIND_SPECIFIED_MSG  . . . . .  	N PROC	140F	CSEG	Length = 007E
$M_FIRST_THOU  . . . . . . . . .  	NUMBER	0003	
$M_FLUSH_BUF . . . . . . . . . .  	N PROC	1553	CSEG	Length = 001C
$M_GET_DBCS_VEC  . . . . . . . .  	N PROC	0FDE	CSEG	Length = 001A
$M_GET_EXT_ERR_39  . . . . . . .  	N PROC	117C	CSEG	Length = 0009
$M_GET_MSG_ADDRESS . . . . . . .  	N PROC	135B	CSEG	Length = 00A5
$M_ID_SZ . . . . . . . . . . . .  	NUMBER	0004	
$M_INCLUDE . . . . . . . . . . .  	NUMBER	FFFF	
$M_INDEX . . . . . . . . . . . .  	NUMBER	0004	
$M_IS_IT_DBCS  . . . . . . . . .  	N PROC	119C	CSEG	Length = 0025
$M_LOAD  . . . . . . . . . . . .  	NUMBER	FFFF	
$M_MAX_2_YEAR  . . . . . . . . .  	NUMBER	0063	
$M_MSGDATA_ONLY  . . . . . . . .  	NUMBER	0000	
$M_MSGSERV_1 . . . . . . . . . .  	N PROC	1651	CSEG	Global	Length = 000A
$M_MSGSERV_2 . . . . . . . . . .  	N PROC	1739	CSEG	Global	Length = 000B
$M_NEG_SIGN  . . . . . . . . . .  	NUMBER	002D	
$M_NEXT_DBCS_VECTOR  . . . . . .  	NUMBER	0002	
$M_NO_CRLF_MASK  . . . . . . . .  	NUMBER	0080	
$M_NO_HANDLE . . . . . . . . . .  	NUMBER	-0001	
$M_NULL  . . . . . . . . . . . .  	NUMBER	0000	
Microsoft (R) Macro Assembler Version 5.10                  8/26/25 23:16:31
VDISK - Virtual Disk Device Driver, Version 4.00            Symbols-19


$M_NUM_CLS . . . . . . . . . . .  	NUMBER	0001	
$M_ONE_REPLACE . . . . . . . . .  	NUMBER	0001	
$M_PARSE_FLAG  . . . . . . . . .  	NUMBER	FFFF	
$M_PAR_CLS . . . . . . . . . . .  	NUMBER	FFFF	
$M_PM  . . . . . . . . . . . . .  	NUMBER	0070	
$M_REPLACE . . . . . . . . . . .  	NUMBER	FFFF	
$M_REPL_DONE . . . . . . . . . .  	NUMBER	0000	
$M_RES_ADDRS_SZ  . . . . . . . .  	NUMBER	0085	
$M_RT  . . . . . . . . . . . . .  	L BYTE	0E37	CSEG
$M_SECOND_THOU . . . . . . . . .  	NUMBER	0006	
$M_SERVICE . . . . . . . . . . .  	NUMBER	0000	
$M_SET_LEN_IN_CX . . . . . . . .  	N PROC	1400	CSEG	Length = 000F
$M_SINGLE_CHAR . . . . . . . . .  	NUMBER	0001	
$M_SIZE_MASK . . . . . . . . . .  	NUMBER	0030	
$M_SL  . . . . . . . . . . . . .  	TEXT  DS:[SI]		
$M_SPACE . . . . . . . . . . . .  	NUMBER	0020	
$M_SPACE_HYP . . . . . . . . . .  	NUMBER	2D20	
$M_SPECIAL_CASE  . . . . . . . .  	NUMBER	0030	
$M_SPECIAL_MSG_NUM . . . . . . .  	NUMBER	FFFF	
$M_STRUC . . . . . . . . . . . .  	NUMBER	0000	
$M_SUBS  . . . . . . . . . . . .  	NUMBER	0000	
$M_TEMP_BUF_SZ . . . . . . . . .  	NUMBER	0040	
$M_TERMINATING_FLAG  . . . . . .  	NUMBER	-0001	
$M_THIRD_THOU  . . . . . . . . .  	NUMBER	0009	
$M_TIMEDATE_PAD  . . . . . . . .  	NUMBER	0030	
$M_TIME_MASK . . . . . . . . . .  	NUMBER	0001	
$M_TYPE_MASK . . . . . . . . . .  	NUMBER	000F	
$M_UNLIM_W . . . . . . . . . . .  	NUMBER	0000	
$M_VERSION_CHECK . . . . . . . .  	N PROC	1067	CSEG	Length = 002F
$M_WORD  . . . . . . . . . . . .  	NUMBER	0020	
??0000 . . . . . . . . . . . . .  	L NEAR	13F8	CSEG
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  vdisksys		
@VERSION . . . . . . . . . . . .  	TEXT  510		


  16663 Source  Lines
  19556 Total   Lines
    969 Symbols

  44978 + 145462 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
