Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-1


					PAGE	90,132			;A2
					TITLE	DISKCOMP.SAL - COPY COMPLETE DISKETTE
				;****************** START OF SPECIFICATIONS *****************************
				; MODULE NAME: DISKCOMP
				
				; DESCRIPTIVE NAME: Diskette to diskette complete compare Utility
				
				;FUNCTION: DISKCOMP is to compare the contents of the diskette in the
				;	   specified first drive to the diskette in the second
				;	   drive.  If the first drive has a vol serial number, that
				;	   field in both diskettes is ignored in the comparison
				;	   of that one sector, because DISKCOPY will create a unique
				;	   volume serial number when it duplicates a diskette.
				
				;	   Multiple compares may be performed with one load of DISKCOMP.
				;	   A prompt, "Compare another (Y/N)?" permits additional
				;	   executions, all with the same drive specifications.
				
				; ENTRY POINT: "DISKCOMP" at ORG 100h, jumps to "BEGIN".
				
				; INPUT: (DOS command line parameters)
				
				;	      [d:][path] DISKCOMP  [d: [d:]] [/1] [/8]
				
				;	 WHERE
				;	      [d:][path] - Path where the DISKCOMP command resides.
				
				;	      [d:] - To specify the First drive
				;
				;	      [d:] - To specify the Second drive
				;
				;	      [/1] - To compare only the first side of the diskette,
				;		     regardless of the diskette or drive type.
				
				;	      [/8] - To compare only the first 8 sectors per track,
				;		     even if the first diskette contains 9/15 sectors
				;		     per track.
				;
				; EXIT-NORMAL: Errorlevel = 0
				;	      Function completed successfully.
				
				; EXIT-ERROR: Errorlevel = 1
				;	      Abnormal termination due to error, wrong DOS,
				;	      invalid parameters, unrecoverable I/O errors on
				;	      the diskette.
				;	      Errorlevel = 2
				;	      Termination requested by CTRL-BREAK.
				
				; EFFECTS: The entire diskette is compared, including the unused
				;	   sectors.  There is no awareness of the separate files
				;	   involved.  A unique volume serial number is ignored
				;	   for the comparison of the first sector.
				
				; INCLUDED FILES:
				;	   PATHMAC.INC - PATHGEN MACRO
				;	   INCLUDE DCMPMACR.INC 	   ;(FORMERLY CALLED MACRO.DEF)
				;	   INCLUDE DISKCOMP.EQU 	   ;EQUATES
				
				; INTERNAL REFERENCES:
				;    ROUTINES:
				;	 BEGIN - entry point from DOS
				;	 SET_LOGICAL_DRIVE - set log. drive letter as owner of drive
				;	 COMP - compare the diskette image
				;	 TEST_REPEAT - see if user wants to compare another
				;	 READ_SOURCE - read from first drive as much as possible
				;	 CHECK_SOURCE - determine first diskette type
				;	 READ_A_SECTOR - use IOCTL read to get a sector
				;	 CALC_TRACK_SIZE - find mem size to hold one track
				;	 CHECK_MEMORY_SIZE - be sure enuf memory to compare 1 track
				;	 COMP_TARGET - compare memory data with secon diskette
				;	 CHECK_TARGET - compare second disk boot record
				;	 SET_DRV_PARM - request IOCTL to set device parm
				;	 COMP_TRACK - read and compare specified track
				;	 SWAP_DRIVE - setup for diskette swapping
				;	 READ_TRACK - read a track to memory
				;	 READ_OP - IOCTL to read a track
				;	 SET_FOR_THE_OLD - use pre 2.0 BPB
				;	 SET_TRACKLAYOUT - determine sectors per track
				;	 GENERIC_IOCTL - perform specified IOCTL function
				;	 EXTENDED_ERROR_HANDLER - determine and service extended errors
				;	 SET_DRV_PARM_DEF - set drive parms via IOCTL
				;
				;	 VOLSER - during compare of first sector, avoid vol ser #
				;	 SENDMSG - passes parms to regs and invokes the system message routine.
				
				;    DATA AREAS:
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-2


				;	PSP - Contains the DOS command line parameters.
				;	WORKAREA - Temporary storage
				
				; EXTERNAL REFERENCES:
				;    ROUTINES:
				;	SYSDISPMSG - Uses the MSG parm lists to construct the messages
				;		 on STDOUT.
				;	SYSLOADMSG - Loads messages, makes them accessable.
				;	SYSPARSE - Processes the DOS Command line, finds parms.
				
				;    DATA AREAS:
				;	 DCOMPSM.SAL - Defines the control blocks that describe the messages
				;	 DCOMPPAR.SAL - Defines the control blocks that describe the
				;		DOS Command line parameters.
				
				; NOTES:
				;	 This module should be processed with the SALUT preprocessor
				;	 with the re-alignment not requested, as:
				
				;		SALUT DISKCOMP,NUL
				
				;	 To assemble these modules, the alphabetical or sequential
				;	 ordering of segments may be used.
				
				;	 Sample LINK command:
				
				; LINK @DISKCOMP.ARF
				
				; Where the DISKCOMP.ARF is defined as:
				
				;	 DISKCOMP+
				;	 DCOMPSM+
				;	 DCOMPP+
				;	 DCOMPPAR+
				;	 COMPINIT
				
				;	 These modules must be linked in this order.  The load module is
				;	 a COM file, to be converted to COM with EXE2BIN.
				
				; REVISION HISTORY:
				;	     A000 Version 4.00: add PARSER, System Message Handler,
				;		  Ignore vol serial number differences.
				;	     A001 386 Support
				;	     A002 Avoid duplicate switches
				;	     A003 PTM 540 Show parm in error
				;	     A004 PTM 752 Add close door after drive not ready
				;	     A005 PTM 756 Add help msg after parm error message
				;	     A006 PTM1100 Clear keyboard buffer before input response
				;	     A007 PTM1464 Delete unused msgs: 22,23,24
				;	     A008 PTM1406 USE 69H INSTEAD OF IOCTL FOR GET/SET MEDIA ID
				;	     A009 PTM1605 PUT A BLANK LINE OUT BEFORE PRESS ANY KEY MSG
				;	     A010 PTM1821 move INCLUDE COPYRIGH.INC to MSG_SERVICE macro
				;	     A011 PTM3184 SUPPORT OS/2 1.0/1.1 TYPE BOOT RECORDS ALSO
				;			REMOVE USE OF GET/SET MEDIA ID
				;	     A012 PTM3262 Specify BASESW EQU 1 before PARSE.ASM
				;	     A013 PTM3512 PATHGEN
				;
				; COPYRIGHT: The following notice is found in the OBJ code generated from
				;	     the "DCOMPSM.SAL" module:
				
				;	     "Version 4.00 (C) Copyright 1988 Microsoft"
				;	     "Licensed Material - Property of Microsoft  "
				
				;PROGRAM AUTHOR: Original written by: Jin K.
				;		 4.00 modifications by: Edwin M. K.
				;****************** END OF SPECIFICATIONS *****************************
				;*****************************************************************************
				;									     *
				;			     D I S K C O M P				     *
				;									     *
				;  UPDATE HISTORY: 8-21, 8-22, 8-30, 9-4, 9-20, 9-21, 12-19		     *
				;		   2-15-84, 2-17, 4-29, 6-20,7-24,3-27-85		     *
				;									     *
				;*****************************************************************************
				
					INCLUDE PATHMAC.INC		;AN013;
			     C	;;***********************************************************************
			     C	;; NAME: pathlabl
			     C	;; DESC: creates a public label at the spot it is placed, using the name
			     C	;;       given.
			     C	;; INPUT: either module name or procedure name
			     C	;; OUTPUT: public label
			     C	;; LOGIC: LBL-parameter-name will have four values -
			     C	;;            - one for each pass (2)
			     C	;;            - one for start and one for stop
			     C	;;        if LBL is not defined, it is first pass, at beginning label
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-3


			     C	;;              - set it to 1 and create the start label
			     C	;;        if LBL = 1, it is first pass, at end label
			     C	;;              - set it to 2 and create stop label
			     C	;;        if LBL = 2, it is second pass, at beginning label
			     C	;;              - set it to 3 and create the start label
			     C	;;        if LBL = 3, it is second pass, at end label
			     C	;;              - set it to 4 and create stop label
			     C	;;        if LBL = 4, it is second pass,
			     C	;;              - this macro has been invoked more than twice with same parm
			     C	;;              - issue error message
			     C	;;***********************************************************************
			     C	
			     C	pathlabl MACRO pnam
			     C	IFNDEF LBL_&pnam                        ;;IF THIS IS THE FIRST TIME,
			     C	    LBL_&pnam = 0                       ;;DEFINE IT, INITIALLY ZERO
			     C	ELSE                                    ;;SINCE IT IS DEFINED
			     C	    IF (LBL_&pnam GT 3)                 ;;IF USED TOO MANY TIMES,
			     C	        .ERR NON-UNIQUE OPERAND ON PATHLABL
			     C	        EXITM                           ;;ABORT THIS GENERATION
			     C	    ENDIF
			     C	ENDIF
			     C	
			     C	IF (LBL_&pnam EQ 0) OR (LBL_&pnam EQ 2) ;;ready for START?
			     C	    $$A_START_&pnam:                    ;;create START label
			     C	    PUBLIC $$A_START_&pnam              ;;make it public
			     C	ELSE                                    ;;SINCE SWITCH MAY BE 1 OR 3,
			     C	    $$A_STOP_&pnam:                     ;;create STOP label
			     C	    PUBLIC $$A_STOP_&pnam               ;;make it public
			     C	ENDIF
			     C	LBL_&pnam = LBL_&pnam + 1               ;;INCREMENT SWITCH
			     C	ENDM
					INCLUDE DCMPMACR.INC		;(FORMERLY CALLED MACRO.DEF)
			     C		ELSE				;AN000;
			     C	;	    %OUT INCLUDING DCMPMACR.INC...
			     C		ENDIF				;AN000;
			     C	;***************************************************************************;
			     C	;			     MACRO DEFINITION				    ;
			     C	;***************************************************************************;
			     C	
			     C	HEADER	MACRO	TEXT		       ;;AN000;
			     C	.XLIST				       ;;AN000;
			     C		SUBTTL	&TEXT		       ;;AN000;
			     C	.LIST				       ;;AN000;
			     C		PAGE			       ;;AN000;
			     C		ENDM			       ;;AN000;
			     C	;  =  =  =  =  =  =  =	=  =
			     C	DOSCALL 			   MACRO FUNC,SUBFUNC  ;;AN000;
			     C					   IFNB <FUNC> ;;AN000;IS THERE ANY PARMS AT ALL?
			     C					   IFNB <SUBFUNC> ;;AN000;
			     C					   MOV AX,(FUNC SHL 8)+SUBFUNC ;;AN000;FUNC TO AH,SUBFUNC TO AL
			     C					   ELSE    ;;AN000;SINCE THERE IS NO SUBFUNC
			     C					   MOV AH,FUNC ;;AN000;
			     C					   ENDIF   ;;AN000;
			     C					   ENDIF   ;;AN000;
			     C					   INT 21H ;;AN000;
			     C					   ENDM    ;;AN000;
			     C	;  =  =  =  =  =  =  =	=  =
			     C	PRINT	MACRO	MESSAGE 		   ;;AN000;
			     C					   MOV	   DI,OFFSET MESSAGE ;;AC000;
			     C					   CALL    SENDMSG ;;AC000;
			     C		ENDM					   ;;AN000;
			     C	;  =  =  =  =  =  =  =	=  =
			     C	.list						   ;AN000;
			     C	;	       $SALUT (0,16,22,36)
			     C	MY_TRACKLAYOUT MACRO		   ;;AN000;
			     C		       LOCAL CSECT_F	   ;;AN000;
			     C	CSECT_F        DW    0		   ;;AN000;# OF SECTORS IN A TRACK. Currently 18 is max.
			     C					   ;;  THE REST IS FOR FUTURE MEDIA
			     C		       DW    1		   ;;AN000;1 ST SECTOR
			     C		       DW    512	   ;;AN000;# OF BYTES
			     C		       DW    2		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    3		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    4		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    5		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    6		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    7		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    8		   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    9		   ;;AN000;
			     C		       DW    512	   ;;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-4


			     C		       DW    10 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    11 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    12 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    13 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    14 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    15 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    16 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    17 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    18 	   ;;AN000;
			     C		       DW    512	   ;;AN000;CURRENTLY 18 SECTORS/TRACK IS MAXIMUM
			     C		       DW    19 	   ;;AN000;BELOW IS FOR THE FUTURE MEDIA.
			     C		       DW    512	   ;;AN000;
			     C		       DW    20 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    21 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    22 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    23 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    24 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    25 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    26 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    27 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    28 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    29 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    30 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    31 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    32 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    33 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    34 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    35 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    36 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    37 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    38 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    39 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    40 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    41 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    42 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    43 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    44 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    45 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    46 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    47 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    48 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    49 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    50 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    51 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    52 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-5


			     C		       DW    53 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    54 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    55 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    56 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    57 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    58 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    59 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    60 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    61 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    62 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       DW    63 	   ;;AN000;
			     C		       DW    512	   ;;AN000;
			     C		       ENDM								;AN000;
			     C	
					INCLUDE DISKCOMP.EQU		;EQUATES
			     C	
			     C		ELSE
			     C	;		%OUT INCLUDING DISKCOMP.EQU...
			     C		ENDIF
			     C	
			     C	;---------------------------------------------------------------------------;
			     C	;				 EQUATES				    ;
			     C	;---------------------------------------------------------------------------;
			     C	
			     C	;			   *** CONSTANTS ***
			     C	
 = 0000                      C	ZERO		EQU	0
 = 0001                      C	ONE		EQU	1
 = 0002                      C	TWO		EQU	2
 = 0003                      C	THREE		EQU	3
 = 0004                      C	FOUR		EQU	4
 = 0004                      C	TYPE_4		EQU	4
 = 0005                      C	FIVE		EQU	5
 = 0006                      C	SIX		EQU	6
 = 0007                      C	SEVEN		EQU	7
 = 0008                      C	EIGHT		EQU	8
 = 0009                      C	NINE		EQU	9
 = 000A                      C	TEN		EQU	0AH
 = 0001                      C	ON		EQU	1
 = 0000                      C	OFF		EQU	0
 = 0001                      C	TRUE		EQU	01
 = 0000                      C	FALSE		EQU	00
 = 0000                      C	GOOD		EQU	0
 = 0001                      C	BAD		EQU	1
 = 0001                      C	FIRST		EQU	1
 = 0002                      C	SECOND		EQU	2
 = 0002                      C	HARD_ERROR	EQU	02
 = 0001                      C	SOFT_ERROR	EQU	01
 = 0000                      C	NO_ERROR	EQU	0
			     C	;DOS_LEVEL	 EQU	 0314H	 ;DOS VERSION 3.20
 = 0020                      C	BLANK		EQU	20H	;BLANK IN ASCII (32 DEC)
 = 00E0                      C	CLEAR_SEGMENT	EQU	0E0H	;USED TO CLEAR SEGMENT BITS (ROUND UP
			     C					;TO NEXT SECTOR)
 = 0008                      C	SECTOR8 	EQU	8	;
 = 0009                      C	SECTOR9 	EQU	9	;
 = 000E                      C	SECTOR14	EQU	14	;
 = 000F                      C	SECTOR15	EQU	15	;
 = 0000                      C	DRV_48TPI	EQU	0	;48 TPI DRIVE
 = 0001                      C	DRV_96TPI	EQU	1	;96 TPI DRIVE
 = 0002                      C	DRV_720 	EQU	2	;3.5", 720 KB DRIVE (FOR CASHEW OR P14)
 = 5F02                      C	NRLFUNC 	EQU	5F02H	;GET NETWORK-REDIRECTION-LIST FUNTION
 = 001C                      C	NRLMAX		EQU	1CH	;(MAXIMUM # OF NAMES ON NRL) - 1
 = 0002                      C	DOS20		EQU	2	;DOS VERSION 2.0
			     C			PUBLIC	FINE	;						;AN000;
 =-0001                      C	FINE		EQU	-1	;"FINE AND DANDY", USED FOR RETURN CODE
			     C					;(-1 WAS USED TO AVOID CONFUSION WITH ERROR
			     C					;OFFSET WHICH CAN BE ZERO)
 =-0001                      C	LOCAL_DRV	EQU	-1	;DEVICE NOT DIRECTED
 = 1000                      C	REMOTE_DRV	EQU	1000H	;REMOTE DRIVE TEST BITS
 =-0001                      C	NO_OPTION	EQU	-1	;NO OPTION "/1" SPECIFIED
 = 0001                      C	OPTION_1	EQU	1	;OPTION "/1" SPECIFIED
 = 0000                      C	REMOVABLE	EQU	0000H	;REMOVABLE FILE
 =-0009                      C	INVAL_PARM	EQU	-9	;INVALID PARAMETER ENTERED
			     C	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-6


			     C	PAGE
			     C	;		    *** PROGRAM SEGMENT PREFIX ***
			     C	
 = 005C                      C	FCB1_DRV_ID	EQU	5CH	;DRIVE NUMBER ADDR IN FILE CONTROL BLOCK 1
 = 005D                      C	FCB1_FILENM	EQU	5DH	;FILE NAME ADDR IN FILE CONTROL BLOCK 1
 = 006C                      C	FCB2_DRV_ID	EQU	6CH	;DRIVE NUMBER ADDR IN FILE CONTROL BLOCK 2
 = 006D                      C	FCB2_FILENM	EQU	6DH	;FILE NAME ADDR IN FILE CONTROL BLOCK 2
 = 0080                      C	BEGIN_UNFORM_AREA  EQU	80H	;BEGINNING @ OF THE UNFORMATTED AREA
 = 0100                      C	END_UNFORM_AREA EQU	100H	;ENDING @ OF THE UNFORMATTED AREA
			     C	
			     C	
			     C	;			*** DOS FUNCTONS ***
			     C	
 = 004C                      C	RET_CD_EXIT	EQU	4CH	;EXIT TO DOS, PASSING RETURN CODE		;AN000;
 = 0002                      C	PUT_CHAR	EQU	02H	;DOS DISPLAY OUTPUT FUNCTION
 = 0009                      C	PRINT_FUNC	EQU	09H	;DOS PRINT STRING FUNCTION
 = 0009                      C	REDIRECTED_FUNC EQU	09H	;IOCTL SUB FUNCTION ****** TO BE CHECKED ****
 = 0C01                      C	KB_INPUT_FUNC	EQU	0C01H	;DOS KEYBOARD INPUT (CLEARS INPUT BUFF FIRST)
 = 0019                      C	CURRENTDRV_FUNC EQU	19H	;GET CURRENT DRIVE FUNCTION CALL
			     C	;DOSVER_FUNC	 EQU	 30H	 ;DOS VERSION FUNCTION CALL
 = 0044                      C	IOCTL_FUNC	EQU	44H	;IOCTL FUNCTION CALL
 = 4408                      C	DRIVE_CHECK	EQU	4408H	;DOS CHECK FOR REMOVABLE DRIVE IOCTL CALL
 = 0002                      C	STD_ERROR	EQU	0002H	;STANDARD ERROR FILE HANDLE
 = 0040                      C	WRITE_FILE	EQU	40H	;WRITE TO FILE OR DEVICE FUNCTION CALL
 = 5F00                      C	GET_ASSIGN_MODE EQU	5F00H	;SET ASSIGN MODE COMMAND
 = 5F01                      C	SET_ASSIGN_MODE EQU	5F01H	;SET ASSIGN MODE COMMAND
 = 002A                      C	SERVER		EQU	2AH	;NETWORK SERVER INTERUPT
 = 0003                      C	SHARED		EQU	03H	;DEVICE SHARED CHECK
 = 0065                      C	GET_EXT_CNTRY_INFO EQU	65H	;GET EXTENDED COUNTRY INFO			;AN000;
 = 0023                      C	YESNO_CHECK	EQU	23H	;REQUEST (Y/N) CHECK OF GET_EXT_CNTRY_INFO	;AN000;
 = 0001                      C	YES		EQU	1	;(Y/N) RESPONSE IS "YES"                        ;AN000;
 = 0002                      C	BAD_YESNO	EQU	2	;(Y/N) RESPONSE IS NEITHER "Y" NOR "N"          ;AN000;
			     C	
			     C	;IOCTL DISKETTE I/O FUNCTIONS
 = 000D                      C	GENERIC_IOCTL_CODE EQU	0DH	;GENERIC IOCTL REQUEST
 = 0008                      C	MAJOR_CODE	EQU	08H	;GENERIC IOCTL MAJOR CODE
 = 0061                      C	READ_FUNC	EQU	61H	;IOCTL DISKETTE RAED FUNCITON
 = 0041                      C	WRITE_FUNC	EQU	41H	;IOCTL DISKETTE WRITE FUNCTION
 = 0062                      C	VERIFY_FUNC	EQU	62H	;IOCTL DISKETTE VERIFY FUNCTION
 = 0042                      C	FORMAT_FUNC	EQU	42H	;IOCTL DISKETTE FORMAT FUNCITON
 = 0060                      C	GETDEVPARM	EQU	60H	;IOCTL GET DEVICE PARAMETER
 = 0040                      C	SETDEVPARM	EQU	40H	;IOCTL SET DEVICE PARAMETER
 = 000F                      C	SET_LOG_DRIVE	EQU	0FH	;SET LOGICAL DRIVE				;AN000;
 = 0069                      C	GSET_MEDIA_ID	EQU	69H	;GET/SET MEDIA ID				;AN008;
 = 0000                      C	GET_ID		EQU	0	;AL=0, GET MEDIA ID				;AN008;
 = 0001                      C	SET_ID		EQU	1	;AL=1, SET MEDIA ID				;AN008;
			     C	;
 = 0059                      C	COMPARE_FUNC	EQU	59H	;JUST USED TO IDENTIFY FOR ERROR MESSAGE
			     C	;
			     C	;specialFunctions
 = 0000                      C	GET_SP_FUNC_DEF  EQU	 00000000B		 ;GET DEVICE PARM. DEFAULT BPB
 = 0001                      C	GET_SP_FUNC_MED  EQU	 00000001B		 ;GET DEVICE PARM. media bpb
 = 0004                      C	SET_SP_FUNC_DEF  EQU	 00000100B		 ;SET DEFAULT DEVICE PARM
 = 0004                      C	SET_SP_FUNC_DOS  EQU	 00000100B		 ;SET DEVICE PARM BEFORE RETURN TO DOS
 = 0000                      C	R_W_SP_FUNC	 EQU	 00000000B		 ;READ, WRITE
			     C	
			     C	;	       *** BIOS DISKETTE I/O ERROR CODES ***
			     C	
			     C	;NOT_READY	 EQU	 80H	 ;DISKETTE I/O NOT READY ERROR
			     C	;CHANG_LINE	 EQU	 06H	 ;CHANGE LINE ERROR
			     C	;BAD_CONTROLLER  EQU	 20H	 ;BAD DISKETTE/DISK CONTOROLLER
			     C	;WRITE_PROTECT	 EQU	 03H	 ;DISKETTE I/O WRITE PROTECT ERROR
			     C	;BAD_ADDR_MARK	 EQU	 02H	 ;DISKETTE I/O BAD ADDRESS MARK ERROR
			     C	;REC_NOT_FOUND	 EQU	 04H	 ;DISETTTE I/O RECORD NOT FOUND ERROR
			     C	;BAD_CRC	 EQU	 10H	 ;DISKETTE I/O BAD CRC ERROR
			     C	;HARD_WR_ERROR	 EQU	 03H	 ;DISKETTE WRITE HARD ERROR COUNT
			     C	;HARD_FMT_ERROR  EQU	 02H	 ;DISKETTE FORMAT HARD ERROR COUNT
			     C	;SINGLE_SIDE_COPY EQU	 00H	 ;WHEN READING TRACK 0 SIDE 1 IF HARD ERROR
			     C					;OCCURS, WE WILL ASSUME IT WILL BE SINGLE
			     C					;SIDED COPY AND AL WILL BE SET TO 0, SO THAT
			     C					;BUFFER_PTR WILL NOT BE ADVANCED AND
			     C					;IF THE TRACK HAPPENS TO FALL INTO DMA BOUNDRY
			     C					;IT WILL SKIP THE SECOND PART OF READ_TRACK
			     C	
			     C	;		    *** COPY STATUS BYTE ***
			     C	
 = 0001                      C	FATAL		EQU	01H	;FATAL COPY ERROR, ABORT
 = 0000                      C	OK		EQU	00H	;OK, PROCEED
			     C	
			     C	;		    *** MESSAGES SUBLIST DESCRIPTOR ***
			     C	
			     C	SUBLIST 	  STRUC 							;AN000;
 0000  00                    C	SUB_SIZE	  DB	?      ;SUBLIST SIZE (POINTER TO NEXT SUBLIST)	       ;AN000;
 0001  00                    C	SUB_RES 	  DB	?	;RESERVED					;AN000;
			     C					;NEXT FIELD IS TO BE USED AS A DOUBLE WORD	;AN000;
 0002  0000                  C	SUB_VALUE	  DW	?	;TIME, DATE, OR PTR TO DATA ITEM		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-7


 0004  0000                  C	SUB_VALUE_SEG	  DW	?	;SEG ID OF PTR					;AN000;
			     C					;(ABOVE FIELD MUST BE FILLED AT EXECUTION TIME	;AN000;
			     C					; IF THIS IS A .COM FILE)			;AN000;
 0006  00                    C	SUB_ID		  DB	?	;N OF %N					;AN000;
 0007  00                    C	SUB_FLAGS	  DB	?	;DATA TYPE FLAGS				;AN000;
 0008  00                    C	SUB_MAX_WIDTH	  DB	?	;MAXIMUM FIELD WIDTH (0=UNLIMITED)		;AN000;
 0009  00                    C	SUB_MIN_WIDTH	  DB	?	;MINIMUM FIELD WIDTH				;AN000;
 000A  00                    C	SUB_PAD_CHAR	  DB	?	;CHARACTER FOR PAD FIELD			;AN000;
			     C					; CAN BE " ", "0" OR ",".                       ;AN000;
			     C					; "," CAUSES INSERTION OF THE ACTIVE            ;AN000;
			     C					; THOUSANDS SEPARATOR BETWEEN EVERY 3 DIGITS.	;AN000;
 000B                        C	SUBLIST 	  ENDS								;AN000;
			     C	
			     C	  ;BUFFER AREA FOR COMMUNICATION WITH GET/SET MEDIA ID FUNCTION CALL:
			     C	;(deleted ;AN011;) A_MEDIA_ID_INFO struc
			     C	;(deleted ;AN011;) MI_level	   dw	   0		   ;info level
			     C	;(deleted ;AN011;) MI_Serial	   dd	   0		   ;Serial #
			     C	;(deleted ;AN011;) MI_Label	   db	   11 dup (' ')    ;Volume Label
			     C	;(deleted ;AN011;) MI_System	   db	    8 dup (' ')    ;File System type
			     C	;(deleted ;AN011;) A_MEDIA_ID_INFO ends
			     C			INCLUDE BOOTFORM.INC	;GET DESCRIPTION OF BOOT RECORD
			     C		%OUT BOOTFORM.INC...
			     C	;****************************************************************************
			     C	;AN000; - Structure of the Extended IBMBOOT record for DOS -. J.K.
			     C	;AN001; - D304 Include PHYDRV, CURHD to the header structure	 11/09/87 J.K.
			     C	;****************************************************************************
			     C	
 = 0200                      C	BOOT_SIZE		 EQU	 512
 = 0029                      C	EXT_BOOT_SIGNATURE	 EQU	 41		;Extended boot signature
			     C	;
			     C	EXT_BPB_INFO		STRUC
 0000  0000                  C	EBPB_BYTESPERSECTOR	 DW	 ?
 0002  00                    C	EBPB_SECTORSPERCLUSTER	 DB	 ?
 0003  0000                  C	EBPB_RESERVEDSECTORS	 DW	 ?
 0005  00                    C	EBPB_NUMBEROFFATS	 DB	 ?
 0006  0000                  C	EBPB_ROOTENTRIES	 DW	 ?
 0008  0000                  C	EBPB_TOTALSECTORS	 DW	 ?
 000A  00                    C	EBPB_MEDIADESCRIPTOR	 DB	 ?
 000B  0000                  C	EBPB_SECTORSPERFAT	 DW	 ?
 000D  0000                  C	EBPB_SECTORSPERTRACK	 DW	 ?
 000F  0000                  C	EBPB_HEADS		 DW	 ?
 0011  00000000              C	EBPB_HIDDENSECTOR	 DD	 ?
 0015  00000000              C	EBPB_BIGTOTALSECTORS	 DD	 ?
 0019                        C	EXT_BPB_INFO		ENDS
			     C	;
			     C	;AN001; EXT_PHYDRV, EXT_CURHD included in the header for OS2.
			     C	EXT_IBMBOOT_HEADER	STRUC
 0000  0003[                 C	EXT_BOOT_JUMP		DB	3 DUP (?)
	   ??                C	
			 ]   C	
			     C	
 0003  0008[                 C	EXT_BOOT_OEM		DB	8 DUP (?)
	   ??                C	
			 ]   C	
			     C	
 000B  0019[                 C	EXT_BOOT_BPB		DB	type EXT_BPB_INFO dup (?)
	   ??                C	
			 ]   C	
			     C	
 0024  80                    C	EXT_PHYDRV		DB	80h
 0025  00                    C	EXT_CURHD		DB	0
 0026  29                    C	EXT_BOOT_SIG		DB	EXT_BOOT_SIGNATURE
 0027  00000000              C	EXT_BOOT_SERIAL 	DD	?
 002B  000B[                 C	EXT_BOOT_VOL_LABEL	DB	11 DUP (?)
	   ??                C	
			 ]   C	
			     C	
 0036  0008[                 C	EXT_SYSTEM_ID		DB	8  DUP (?)
	   ??                C	
			 ]   C	
			     C	
 003E                        C	EXT_IBMBOOT_HEADER	ENDS
			     C	;
 = 01FE                      C	BOOT_SIGNATURE	=     word ptr (BOOT_SIZE-2)
			     C	
			     C	;
			     C	;J.K. This is the number of sectors (of size 512 bytes) that will cover
			     C	;the size of IBMLOAD program.  IBMBOOT program has to at least read this
			     C	;many sectors, and these sectors should be the first cluster and consecutive.
			     C	;Make sure IBMBOOT program uses the same value as this.
 = 0003                      C	IBMLOADSIZE	equ	3	;Number of sectors IBMBOOT program should read in.
			     C	
			     C	
 =                           C	VOL_SERIAL	EQU	EXT_BOOT_SERIAL ;LOCATION IN BOOT RECORD OF VOLSER NUM	;AN000;
			     C	
				
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-8


				;	       $salut (4,16,22,36) ;						;AN000;
				;THIS MESSAGE DESCRIPTOR CONTROL BLOCK IS GENERATED, ONE PER MESSAGE,
				;TO DEFINE THE SEVERAL PARAMETERS THAT ARE EXPECTED TO BE PASSED IN
				;CERTAIN REGISTERS WHEN THE SYSDISPMSG FUNCTION IS TO BE INVOKED.
				
				MSG_DESC       STRUC		   ;						;AN000;
 0000  0000			MSG_NUM        DW    ?		   ;MESSAGE NUMBER (TO AX)			;AN000;
 0002  0000			MSG_HANDLE     DW    ?		   ;HANDLE OF OUTPUT DEVICE (TO BX)		;AN000;
 0004  0000			MSG_SUBLIST    DW    ?		   ;POINTER TO SUBLIST (TO SI)			;AN000;
 0006  0000			MSG_COUNT      DW    ?		   ;SUBSTITUTION COUNT (TO CX)			;AN000;
 0008  0000			MSG_CLASS      DW    ?		   ;MESSAGE CLASS (IN HIGH BYTE, TO DH) 	;AN000;
								   ;LOW BYTE HAS 0 (FUNCTION "NO INPUT", TO DL) ;AN000;
 000A				MSG_DESC       ENDS		   ;						;AN000;
				
				MY_BPB	       STRUC
 0000  0000			CBYTE_SECT     DW    0		   ; 200H  ;BYTES / SECTOR
 0002  00			CSECT_CLUSTER  DB    0		   ; 2h    ;SECTORS / CLUSTER
 0003  0000			CRESEV_SECT    DW    0		   ; 1h    ;RESERVED SECTORS
 0005  00			CFAT	       DB    0		   ; 2h    ;# OF FATS
 0006  0000			CROOTENTRY     DW    0		   ; 70h   ;# OF ROOT ENTRIES
 0008  0000			CTOTSECT       DW    0		   ; 02D0h ;TOTAL # OF SECTORS INCLUDING
								   ;	     BOOT SECT, DIRECTORIES
 000A  00			MEDIA_DESCRIP  DB    0		   ;0FDh   ;MEDIA DISCRIPTOR
 000B  0000			CSECT_FAT      DW    0		   ; 2h    ;SECTORS / FAT
 000D  0000			CSECT_TRACK    DW    0		   ;
 000F  0000			CHEAD	       DW    0		   ;
 0011  00000000			CHIDDEN_SECT   DD    0		   ;
 0015  00000000			BIG_TOT_SECT   DD    0		   ;
 0019  0006[				       DB    6 DUP (0)	   ;
	   00			
			 ]	
				
 001F				MY_BPB	       ENDS
				
 0000				CSEG	       SEGMENT PARA PUBLIC 'CODE' ;					;AN000;
					       ASSUME CS:CSEG, DS:CSEG, ES:CSEG, SS:CSEG
				
				;*****************************************************************************
				;									     *
				;			EXTERNAL VARIABLES				     *
				;									     *
				;*****************************************************************************
				;$salut (4,2,9,36)
				
				.LIST
				
				 EXTRN	SYSLOADMSG    :NEAR	   ;SYSTEM MSG HANDLER INTIALIZATION		;AN000;
				 EXTRN	SYSDISPMSG    :NEAR	   ;SYSTEM MSG HANDLER DISPLAY			;AN000;
				
				 EXTRN	INIT	      :NEAR	   ;INITIALIZATION ROUTINE
				
				 EXTRN	MSG_TRACKS	   :WORD   ;						;AN000;
				 EXTRN	MSG_SECTRK	   :WORD   ;						;AN000;
				 EXTRN	MSG_SIDES	   :WORD   ;						;AN000;
				
				 EXTRN	ASCII_DRV1_ID	   :BYTE   ;						;AN000;
				 EXTRN	ASCII_DRV2_ID	   :BYTE   ;						;AN000;
				
				 EXTRN	SUBLIST_78	   :WORD   ;						;AN000;
				 EXTRN	SUBLIST_17B	   :WORD   ;						;AN000;
				
				 EXTRN	MSGNUM_EXTERR	   :WORD   ;EXTENDED ERROR MSG DESCRIPTOR		;AN000;
				 EXTRN	MSGNUM_LOAD_FIRST  :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_LOAD_SECOND :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_NOT_COMPATIBLE:BYTE ;						;AC000;
				 EXTRN	MSGNUM_COMP_ANOTHER:BYTE   ;						;AC000;
				 EXTRN	MSGNUM_GET_READY   :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_CLOSE_DOOR  :BYTE   ;						;AN004;
				 EXTRN	MSGNUM_FATAL_ERROR :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_UNSUF_MEMORY:BYTE   ;						;AC000;
				 EXTRN	MSGNUM_BAD_FIRST   :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_BAD_SECOND  :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_HARD_ERROR_READ :BYTE ;						;AC000;
				 EXTRN	MSGNUM_HARD_ERROR_COMP :BYTE ;						;AC000;
				 EXTRN	MSGNUM_COMPARING   :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_STRIKE	   :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_WRITE_PROTECT:BYTE  ;						;AC000;
				 EXTRN	MSGNUM_COMP_OK	   :BYTE   ;						;AC000;
				 EXTRN	MSGNUM_NEWLINE	   :BYTE   ;
				 EXTRN	DRIVE_LETTER	   :BYTE   ;
				 EXTRN	SKIP_MSG	   :BYTE   ;NULL REPLACEMENT FOR DRIVE LETTER		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-9


				 PAGE
				;*****************************************************************************
				;									     *
				;			     PUBLIC VARIABLES				     *
				;									     *
				;*****************************************************************************
				
				 PUBLIC DISKCOMP_BEGIN
				 PUBLIC DISKCOMP_END
				 PUBLIC RECOMMENDED_BYTES_SECTOR
				 PUBLIC S_OWNER_SAVED
				 PUBLIC T_OWNER_SAVED
				 PUBLIC COMP
				 PUBLIC SOURCE_DRIVE
				 PUBLIC TARGET_DRIVE
				 PUBLIC S_DRV_SECT_TRACK
				 PUBLIC S_DRV_HEADS
				 PUBLIC S_DRV_TRACKS
				 PUBLIC T_DRV_SECT_TRACK
				 PUBLIC T_DRV_HEADS
				 PUBLIC T_DRV_TRACKS
				 PUBLIC USER_OPTION
				 PUBLIC COPY_TYPE
				 PUBLIC END_OF_TRACK
				 PUBLIC BUFFER_BEGIN
				 PUBLIC START_BUFFER
				 PUBLIC BUFFER_END
				 PUBLIC TRACK_TO_READ
				 PUBLIC TRACK_TO_COMP
				 PUBLIC SIDE
				 PUBLIC USER_INPUT
				 PUBLIC MAIN_EXIT
				
				 PUBLIC NO_OF_SIDES
				 PUBLIC USER_OPTION_8
				 PUBLIC ORG_SOURCE_DRIVE
				 PUBLIC ORG_TARGET_DRIVE
				 PUBLIC COMP_STATUS
				 PUBLIC OPERATION
				
				 PUBLIC IO_ERROR
				
				 PUBLIC DS_IOCTL_DRV_PARM	   ;PLACE HOLDER FOR DEFAULT SOURCE DRV PARM
				 PUBLIC DT_IOCTL_DRV_PARM	   ;PLACE HOLDER FOR DEFAULT TARGET DRV PARM
				 PUBLIC DS_specialFunctions	   ;AND THEIR CONTENTS
				 PUBLIC DT_specialFunctions
				 PUBLIC DS_deviceType
				 PUBLIC DT_deviceType
				 PUBLIC DS_deviceAttributes
				 PUBLIC DT_deviceAttributes
				 PUBLIC DS_numberOfCylinders
				 PUBLIC DT_numberOfCylinders
				 PUBLIC DS_mediaType
				 PUBLIC DT_mediaType
				 PUBLIC DS_BPB_PTR
				 PUBLIC DT_BPB_PTR
				
				 PUBLIC MS_IOCTL_DRV_PARM	   ;DRIVE PARM FROM SOURCE MEDIUM
				 PUBLIC MT_IOCTL_DRV_PARM	   ;DRIVE PARM FROM TARGET MEDIUM
				
				;*****************************************************************************
 0100				 ORG	100H			   ;PROGRAM ENTRY POINT 			       ;
				
 0100				DISKCOMP:
 0100  E9 0810 R		 JMP	BEGIN
				;*****************************************************************************
 0103  90			 EVEN				   ;PUT STACK ONTO A WORD ALIGNMENT BOUNDARY	;AN000;
				;INTERNAL STACK AREA
				
 0104  0040[			 DB	64 DUP	('STACK   ')	   ;512 BYTES
	   53 54 41 43 4B	
	   20 20 20		
			 ]	
				
				
 0304				MY_STACK_PTR LABEL WORD
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-10


				 PAGE
				;*****************************************************************************
				;									     *
				;			INTERNAL VARIABLES				     *
				;									     *
				;*****************************************************************************
				
				;		     $salut (4,22,26,36) ;					;AN000;
				;DEFAULT BPB FOR OLD MEDIA
				;5.25, 48 TPI BPB SINGLE SIDE (9 SECTORS/TRACK)
 0304  0200			BPB48_SINGLE	     DW  512	   ;BYTES/SECTOR
 0306  01					     DB  1	   ;SECTOR/CLUSTER
 0307  0001					     DW  1	   ;# OF RESERVED SECTORS
 0309  02					     DB  2	   ;# OF FATS
 030A  0040					     DW  40h	   ;# OF ROOT ENTRY
 030C  0168					     DW  168h	   ;TOTAL # OF SECTORS IN THE MEDIA
 030E  FC					     DB  0FCh	   ;MEDIA BYTE
 030F  0002					     DW  2	   ;SECTORS/FAT
				
				;5.25, 48 TPI BPB DOUBLE SIDE (9 SECTORS/TRACK)
 0311  0200			BPB48_DOUBLE	     DW  512	   ;BYTES/SECTOR
 0313  02					     DB  2	   ;SECTOR/CLUSTER
 0314  0001					     DW  1	   ;# OF RESERVED SECTORS
 0316  02					     DB  2	   ;# OF FATS
 0317  0070					     DW  70h	   ;# OF ROOT ENTRY
 0319  02D0					     DW  2D0h	   ;TOTAL # OF SECTORS IN THE MEDIA
 031B  FD					     DB  0FDh	   ;MEDIA BYTE
 031C  0002					     DW  2	   ;SECTORS/FAT
				
				;5.25, 96 TPI BPB DOUBLE SIDE (15 SECTORS/TRACK)
 031E  0200			BPB96		     DW  512	   ;BYTES/SECTOR
 0320  01					     DB  1	   ;SECTOR/CLUSTER
 0321  0001					     DW  1	   ;# OF RESERVED SECTORS
 0323  02					     DB  2	   ;# OF FATS
 0324  00E0					     DW  0E0h	   ;# OF ROOT ENTRY
 0326  0960					     DW  960h	   ;TOTAL # OF SECTORS IN THE MEDIA
 0328  F9					     DB  0F9h	   ;MEDIA BYTE
 0329  0007					     DW  7	   ;SECTORS/FAT
 = 000D				BPB96_LENG	     EQU $-BPB96   ;THIS LENGTH WILL BE USED FOR BPB48 ALSO.
				
				
				
				; INPUT PARMETERS FROM INIT SUBROUTINE:
				
 032B  00			S_OWNER_SAVED	     DB  0	   ;DRIVE LETTER THAT OWNED
								   ; SOURCE DRIVE OWNERSHIP
 032C  00			T_OWNER_SAVED	     DB  0
 032D  0000			RECOMMENDED_BYTES_SECTOR DW 0	   ;RECOMMENED BYTES/SECTOR FROM DEVICE PARA
				
				;IT IS ASSUMED THE NEXT TWO BYTES ARE CONSECUTIVE,
				;AND DEFINED IN SOURCE/TARGET ORDER, BY DCOMPPAR.SAL.
 032F  00			SOURCE_DRIVE	     DB  0	   ;1=A:, 2=B:,...
 0330  00			TARGET_DRIVE	     DB  0
				
 0331  00			ORG_SOURCE_DRIVE     DB  ?	   ;ORIGINAL SOURCE DRIVE
 0332  00			ORG_TARGET_DRIVE     DB  ?	   ;ORIGINAL TARGET DRIVE
				
 0333  00			USER_OPTION	     DB  0
 0334  01			COPY_TYPE	     DB  1
 0335  0000			START_BUFFER	     DW  0
 0337  1000			BUFFER_BEGIN	     DW  1000H	   ;BEGINNING OF BUFFER ADDR [IN SEGMENT]
 0339  3FF0			BUFFER_END	     DW  3FF0H	   ;END OF BUFFER ADDR [IN SEGMENT]
 033B  00			USER_OPTION_8	     DB  ?
 033C  0000			SECT_TRACK_LAYOUT    DW  0
				
 033E  00			S_DRV_SECT_TRACK     DB  ?	   ;SECT/TRACK, device informations.
 033F  00			S_DRV_HEADS	     DB  ?	   ;# OF HEADS
 0340  00			S_DRV_TRACKS	     DB  ?	   ;# OF TRACKS
 0341  00			T_DRV_SECT_TRACK     DB  ?
 0342  00			T_DRV_HEADS	     DB  ?
 0343  00			T_DRV_TRACKS	     DB  ?
				
				;LOCAL VARIABLES:
 0344  00			FIRST_TIME	     DB  0	   ;SWITCH TO ACTIVATE VOLSER CHECK		;AN000;
 0345  00			EXITFL		     DB  EXOK	   ;ERRORLEVEL VALUE				;AN000;
						     PUBLIC EXITFL ;						;AN000;
 = 0002				EXCBR		     EQU 2	   ;CONTROL-BREAK REQUESTED TERMINATION 	;AN000;
 = 0001				EXVER		     EQU 1	   ;BAD DOS VERSION ERRORLEVEL CODE		;AN000;
 = 0001				EXPAR		     EQU 1	   ;ERROR IN INPUT PARMS IN COMMAND LINE	;AN000;
 = 0000				EXOK		     EQU 0	   ;NORMAL ERRORLEVEL RET CODE			;AN000;
						     PUBLIC EXPAR  ;						;AN000;
				
 0346  0001			IOCTL_SECTOR	     DW  1	   ;used for READ_A_SECTOR routine.
 0348  0000			IOCTL_TRACK	     DW  0	   ;IN THE TRACK
 034A  0000			IOCTL_HEAD	     DW  0	   ;HEAD 0
 034C  0000			SAV_CSECT	     DW  0	   ;TEMPORARY SAVING PLACE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-11


				
 034E  0000			BOOT_SECT_TRACK      DW  0	   ;TEMP SAVING PLACE OF SECTOR/TRACK
 0350  0000			BOOT_TOT_TRACK	     DW  0	   ;FOUND FROM THE BOOT SECTOR. max # of tracks
 0352  0000			BOOT_NUM_HEAD	     DW  0	   ;NUMBER OF HEADS
 0354  0000			BOOT_BYTE_SECTOR     DW  0	   ;BYTES / SECTOR
				
 0356  00			READ_S_BPB_FAILURE   DB  0	   ;GET MEDIA BPB. SUCCESS=0, FAILURE=1
 0357  00			READ_T_BPB_FAILURE   DB  0
				
				;*** Informations gotten from CHECK_SOURCE.
				;*** These will be used as a basis for the comp process.
 0358  4F			LAST_TRACK	     DB  79	   ;LAST CYLINDER OF THE DASD (39 OR 79)
 0359  0F			END_OF_TRACK	     DB  15	   ;END OF TRACK
 035A  0200			bSECTOR_SIZE	     DW  512	   ;BYTES/SECTOR in bytes
 035C  00			NO_OF_SIDES	     DB  ?	   ;0=SINGLE SIDED, 1=DOUBLE SIDED
				
 035D  00			TRACK_TO_READ	     DB  0
 035E  00			TRACK_TO_COMP	     DB  0
 035F  0000			TRACK_SIZE	     DW  0	   ;BYTES/CYLINDER [IN SEGMENTS]
 0361  00			SECTOR_SIZE	     DB  0	   ;BYTES/SECTOR [IN SEGMENTS]
 0362  0000			BYTES_IN_TRACK	     DW  ?	   ;BYTES/ONE SIDE TRACK (USED IN COMP_TRACK)
 0364  0000			BUFFER_PTR	     DW  ?
 0366  00			COMP_ERROR	     DB  0
 0367  00			SIDE		     DB  ?
 0368  00			OPERATION	     DB  ?
 0369  00			COMP_STATUS	     DB  ?
 036A  00			USER_INPUT	     DB  ?	   ;DISKCOMP AGAIN?
 036B  0000			SEC_BUFFER	     DW  ?	   ;SECONDARY BUFFER SEG ADDR
 036D  0000			COMPARE_PTR	     DW  ?	   ;COMPARE POINTER
 036F  00			IO_ERROR	     DB  0	   ;USED TO INDICATE IF READ/WRITE ERROR MESSAGE
 0370  00			MSG_FLAG	     DB  ?
 0371  00			S_DRV_SET_FLAG	     DB  0	   ;SOURCE DEVICE PARM HAS BEEN SET?
 0372  00			T_DRV_SET_FLAG	     DB  0
				
				;---------------------------------------
				;DEVICE PARAMETER TABLE
				;the returned info. still has the following format.
				
 0373				DS_IOCTL_DRV_PARM    LABEL BYTE    ;PLACE HOLDER FOR DEFAULT TARGET DRV PARM
 0373  00			DS_specialFunctions  db  ?
 0374  00			DS_deviceType	     db  ?	   ;0=5.25, 1=5.25 96 TPI, 2=3.5" 720 KB
								   ;3=8" SINGLE, 4=8" DOUBLE, 5=HARD DISK
 0375  0000			DS_deviceAttributes  dw  ?	   ;0001h - NOT REMOVABLE, 0002h - CHANGE
								   ; LINE SUPPORTED
 0377  0000			DS_numberOfCylinders dw  ?
 0379  00			DS_mediaType	     db  ?
 037A				DS_BPB_PTR	     LABEL BYTE
 037A  0000			DS_deviceBPB	     my_bpb <>
 037C  00			
 037D  0000			
 037F  00			
 0380  0000			
 0382  0000			
 0384  00			
 0385  0000			
 0387  0000			
 0389  0000			
 038B  00000000			
 038F  00000000			
 0393  0006[			
	   00			
			 ]	
				
 0399				DS_trackLayout	     LABEL WORD    ;						;AC000;
						     my_trackLayout ;						;AC000;
 0399  0000                  1	??0000        DW    0		   ; 
 039B  0001                  1		       DW    1		   ; 
 039D  0200                  1		       DW    512	   ; 
 039F  0002                  1		       DW    2		   ; 
 03A1  0200                  1		       DW    512	   ; 
 03A3  0003                  1		       DW    3		   ; 
 03A5  0200                  1		       DW    512	   ; 
 03A7  0004                  1		       DW    4		   ; 
 03A9  0200                  1		       DW    512	   ; 
 03AB  0005                  1		       DW    5		   ; 
 03AD  0200                  1		       DW    512	   ; 
 03AF  0006                  1		       DW    6		   ; 
 03B1  0200                  1		       DW    512	   ; 
 03B3  0007                  1		       DW    7		   ; 
 03B5  0200                  1		       DW    512	   ; 
 03B7  0008                  1		       DW    8		   ; 
 03B9  0200                  1		       DW    512	   ; 
 03BB  0009                  1		       DW    9		   ; 
 03BD  0200                  1		       DW    512	   ; 
 03BF  000A                  1		       DW    10 	   ; 
 03C1  0200                  1		       DW    512	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-12


 03C3  000B                  1		       DW    11 	   ; 
 03C5  0200                  1		       DW    512	   ; 
 03C7  000C                  1		       DW    12 	   ; 
 03C9  0200                  1		       DW    512	   ; 
 03CB  000D                  1		       DW    13 	   ; 
 03CD  0200                  1		       DW    512	   ; 
 03CF  000E                  1		       DW    14 	   ; 
 03D1  0200                  1		       DW    512	   ; 
 03D3  000F                  1		       DW    15 	   ; 
 03D5  0200                  1		       DW    512	   ; 
 03D7  0010                  1		       DW    16 	   ; 
 03D9  0200                  1		       DW    512	   ; 
 03DB  0011                  1		       DW    17 	   ; 
 03DD  0200                  1		       DW    512	   ; 
 03DF  0012                  1		       DW    18 	   ; 
 03E1  0200                  1		       DW    512	   ; 
 03E3  0013                  1		       DW    19 	   ; 
 03E5  0200                  1		       DW    512	   ; 
 03E7  0014                  1		       DW    20 	   ; 
 03E9  0200                  1		       DW    512	   ; 
 03EB  0015                  1		       DW    21 	   ; 
 03ED  0200                  1		       DW    512	   ; 
 03EF  0016                  1		       DW    22 	   ; 
 03F1  0200                  1		       DW    512	   ; 
 03F3  0017                  1		       DW    23 	   ; 
 03F5  0200                  1		       DW    512	   ; 
 03F7  0018                  1		       DW    24 	   ; 
 03F9  0200                  1		       DW    512	   ; 
 03FB  0019                  1		       DW    25 	   ; 
 03FD  0200                  1		       DW    512	   ; 
 03FF  001A                  1		       DW    26 	   ; 
 0401  0200                  1		       DW    512	   ; 
 0403  001B                  1		       DW    27 	   ; 
 0405  0200                  1		       DW    512	   ; 
 0407  001C                  1		       DW    28 	   ; 
 0409  0200                  1		       DW    512	   ; 
 040B  001D                  1		       DW    29 	   ; 
 040D  0200                  1		       DW    512	   ; 
 040F  001E                  1		       DW    30 	   ; 
 0411  0200                  1		       DW    512	   ; 
 0413  001F                  1		       DW    31 	   ; 
 0415  0200                  1		       DW    512	   ; 
 0417  0020                  1		       DW    32 	   ; 
 0419  0200                  1		       DW    512	   ; 
 041B  0021                  1		       DW    33 	   ; 
 041D  0200                  1		       DW    512	   ; 
 041F  0022                  1		       DW    34 	   ; 
 0421  0200                  1		       DW    512	   ; 
 0423  0023                  1		       DW    35 	   ; 
 0425  0200                  1		       DW    512	   ; 
 0427  0024                  1		       DW    36 	   ; 
 0429  0200                  1		       DW    512	   ; 
 042B  0025                  1		       DW    37 	   ; 
 042D  0200                  1		       DW    512	   ; 
 042F  0026                  1		       DW    38 	   ; 
 0431  0200                  1		       DW    512	   ; 
 0433  0027                  1		       DW    39 	   ; 
 0435  0200                  1		       DW    512	   ; 
 0437  0028                  1		       DW    40 	   ; 
 0439  0200                  1		       DW    512	   ; 
 043B  0029                  1		       DW    41 	   ; 
 043D  0200                  1		       DW    512	   ; 
 043F  002A                  1		       DW    42 	   ; 
 0441  0200                  1		       DW    512	   ; 
 0443  002B                  1		       DW    43 	   ; 
 0445  0200                  1		       DW    512	   ; 
 0447  002C                  1		       DW    44 	   ; 
 0449  0200                  1		       DW    512	   ; 
 044B  002D                  1		       DW    45 	   ; 
 044D  0200                  1		       DW    512	   ; 
 044F  002E                  1		       DW    46 	   ; 
 0451  0200                  1		       DW    512	   ; 
 0453  002F                  1		       DW    47 	   ; 
 0455  0200                  1		       DW    512	   ; 
 0457  0030                  1		       DW    48 	   ; 
 0459  0200                  1		       DW    512	   ; 
 045B  0031                  1		       DW    49 	   ; 
 045D  0200                  1		       DW    512	   ; 
 045F  0032                  1		       DW    50 	   ; 
 0461  0200                  1		       DW    512	   ; 
 0463  0033                  1		       DW    51 	   ; 
 0465  0200                  1		       DW    512	   ; 
 0467  0034                  1		       DW    52 	   ; 
 0469  0200                  1		       DW    512	   ; 
 046B  0035                  1		       DW    53 	   ; 
 046D  0200                  1		       DW    512	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-13


 046F  0036                  1		       DW    54 	   ; 
 0471  0200                  1		       DW    512	   ; 
 0473  0037                  1		       DW    55 	   ; 
 0475  0200                  1		       DW    512	   ; 
 0477  0038                  1		       DW    56 	   ; 
 0479  0200                  1		       DW    512	   ; 
 047B  0039                  1		       DW    57 	   ; 
 047D  0200                  1		       DW    512	   ; 
 047F  003A                  1		       DW    58 	   ; 
 0481  0200                  1		       DW    512	   ; 
 0483  003B                  1		       DW    59 	   ; 
 0485  0200                  1		       DW    512	   ; 
 0487  003C                  1		       DW    60 	   ; 
 0489  0200                  1		       DW    512	   ; 
 048B  003D                  1		       DW    61 	   ; 
 048D  0200                  1		       DW    512	   ; 
 048F  003E                  1		       DW    62 	   ; 
 0491  0200                  1		       DW    512	   ; 
 0493  003F                  1		       DW    63 	   ; 
 0495  0200                  1		       DW    512	   ; 
				;---------------------------------------
				
 0497				DT_IOCTL_DRV_PARM    LABEL BYTE
 0497  00			DT_specialFunctions  db  ?
 0498  00			DT_deviceType	     db  ?	   ;0=5.25, 1=5.25 96 TPI, 2=3.5" 720 KB
								   ;3=8" SINGLE, 4=8" DOUBLE, 5=HARD DISK
 0499  0000			DT_deviceAttributes  dw  ?	   ;0001h - NOT REMOVABLE, 0002h - CHANGE
								   ; LINE SUPPORTED
 049B  0000			DT_numberOfCylinders dw  ?
 049D  00			DT_mediaType	     db  ?
 049E				DT_BPB_PTR	     LABEL BYTE
 049E  0000			DT_deviceBPB	     my_bpb <>
 04A0  00			
 04A1  0000			
 04A3  00			
 04A4  0000			
 04A6  0000			
 04A8  00			
 04A9  0000			
 04AB  0000			
 04AD  0000			
 04AF  00000000			
 04B3  00000000			
 04B7  0006[			
	   00			
			 ]	
				
 04BD				DT_trackLayout	     LABEL WORD    ;						;AC000;
						     my_trackLayout ;						;AC000;
 04BD  0000                  1	??0001        DW    0		   ; 
 04BF  0001                  1		       DW    1		   ; 
 04C1  0200                  1		       DW    512	   ; 
 04C3  0002                  1		       DW    2		   ; 
 04C5  0200                  1		       DW    512	   ; 
 04C7  0003                  1		       DW    3		   ; 
 04C9  0200                  1		       DW    512	   ; 
 04CB  0004                  1		       DW    4		   ; 
 04CD  0200                  1		       DW    512	   ; 
 04CF  0005                  1		       DW    5		   ; 
 04D1  0200                  1		       DW    512	   ; 
 04D3  0006                  1		       DW    6		   ; 
 04D5  0200                  1		       DW    512	   ; 
 04D7  0007                  1		       DW    7		   ; 
 04D9  0200                  1		       DW    512	   ; 
 04DB  0008                  1		       DW    8		   ; 
 04DD  0200                  1		       DW    512	   ; 
 04DF  0009                  1		       DW    9		   ; 
 04E1  0200                  1		       DW    512	   ; 
 04E3  000A                  1		       DW    10 	   ; 
 04E5  0200                  1		       DW    512	   ; 
 04E7  000B                  1		       DW    11 	   ; 
 04E9  0200                  1		       DW    512	   ; 
 04EB  000C                  1		       DW    12 	   ; 
 04ED  0200                  1		       DW    512	   ; 
 04EF  000D                  1		       DW    13 	   ; 
 04F1  0200                  1		       DW    512	   ; 
 04F3  000E                  1		       DW    14 	   ; 
 04F5  0200                  1		       DW    512	   ; 
 04F7  000F                  1		       DW    15 	   ; 
 04F9  0200                  1		       DW    512	   ; 
 04FB  0010                  1		       DW    16 	   ; 
 04FD  0200                  1		       DW    512	   ; 
 04FF  0011                  1		       DW    17 	   ; 
 0501  0200                  1		       DW    512	   ; 
 0503  0012                  1		       DW    18 	   ; 
 0505  0200                  1		       DW    512	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-14


 0507  0013                  1		       DW    19 	   ; 
 0509  0200                  1		       DW    512	   ; 
 050B  0014                  1		       DW    20 	   ; 
 050D  0200                  1		       DW    512	   ; 
 050F  0015                  1		       DW    21 	   ; 
 0511  0200                  1		       DW    512	   ; 
 0513  0016                  1		       DW    22 	   ; 
 0515  0200                  1		       DW    512	   ; 
 0517  0017                  1		       DW    23 	   ; 
 0519  0200                  1		       DW    512	   ; 
 051B  0018                  1		       DW    24 	   ; 
 051D  0200                  1		       DW    512	   ; 
 051F  0019                  1		       DW    25 	   ; 
 0521  0200                  1		       DW    512	   ; 
 0523  001A                  1		       DW    26 	   ; 
 0525  0200                  1		       DW    512	   ; 
 0527  001B                  1		       DW    27 	   ; 
 0529  0200                  1		       DW    512	   ; 
 052B  001C                  1		       DW    28 	   ; 
 052D  0200                  1		       DW    512	   ; 
 052F  001D                  1		       DW    29 	   ; 
 0531  0200                  1		       DW    512	   ; 
 0533  001E                  1		       DW    30 	   ; 
 0535  0200                  1		       DW    512	   ; 
 0537  001F                  1		       DW    31 	   ; 
 0539  0200                  1		       DW    512	   ; 
 053B  0020                  1		       DW    32 	   ; 
 053D  0200                  1		       DW    512	   ; 
 053F  0021                  1		       DW    33 	   ; 
 0541  0200                  1		       DW    512	   ; 
 0543  0022                  1		       DW    34 	   ; 
 0545  0200                  1		       DW    512	   ; 
 0547  0023                  1		       DW    35 	   ; 
 0549  0200                  1		       DW    512	   ; 
 054B  0024                  1		       DW    36 	   ; 
 054D  0200                  1		       DW    512	   ; 
 054F  0025                  1		       DW    37 	   ; 
 0551  0200                  1		       DW    512	   ; 
 0553  0026                  1		       DW    38 	   ; 
 0555  0200                  1		       DW    512	   ; 
 0557  0027                  1		       DW    39 	   ; 
 0559  0200                  1		       DW    512	   ; 
 055B  0028                  1		       DW    40 	   ; 
 055D  0200                  1		       DW    512	   ; 
 055F  0029                  1		       DW    41 	   ; 
 0561  0200                  1		       DW    512	   ; 
 0563  002A                  1		       DW    42 	   ; 
 0565  0200                  1		       DW    512	   ; 
 0567  002B                  1		       DW    43 	   ; 
 0569  0200                  1		       DW    512	   ; 
 056B  002C                  1		       DW    44 	   ; 
 056D  0200                  1		       DW    512	   ; 
 056F  002D                  1		       DW    45 	   ; 
 0571  0200                  1		       DW    512	   ; 
 0573  002E                  1		       DW    46 	   ; 
 0575  0200                  1		       DW    512	   ; 
 0577  002F                  1		       DW    47 	   ; 
 0579  0200                  1		       DW    512	   ; 
 057B  0030                  1		       DW    48 	   ; 
 057D  0200                  1		       DW    512	   ; 
 057F  0031                  1		       DW    49 	   ; 
 0581  0200                  1		       DW    512	   ; 
 0583  0032                  1		       DW    50 	   ; 
 0585  0200                  1		       DW    512	   ; 
 0587  0033                  1		       DW    51 	   ; 
 0589  0200                  1		       DW    512	   ; 
 058B  0034                  1		       DW    52 	   ; 
 058D  0200                  1		       DW    512	   ; 
 058F  0035                  1		       DW    53 	   ; 
 0591  0200                  1		       DW    512	   ; 
 0593  0036                  1		       DW    54 	   ; 
 0595  0200                  1		       DW    512	   ; 
 0597  0037                  1		       DW    55 	   ; 
 0599  0200                  1		       DW    512	   ; 
 059B  0038                  1		       DW    56 	   ; 
 059D  0200                  1		       DW    512	   ; 
 059F  0039                  1		       DW    57 	   ; 
 05A1  0200                  1		       DW    512	   ; 
 05A3  003A                  1		       DW    58 	   ; 
 05A5  0200                  1		       DW    512	   ; 
 05A7  003B                  1		       DW    59 	   ; 
 05A9  0200                  1		       DW    512	   ; 
 05AB  003C                  1		       DW    60 	   ; 
 05AD  0200                  1		       DW    512	   ; 
 05AF  003D                  1		       DW    61 	   ; 
 05B1  0200                  1		       DW    512	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-15


 05B3  003E                  1		       DW    62 	   ; 
 05B5  0200                  1		       DW    512	   ; 
 05B7  003F                  1		       DW    63 	   ; 
 05B9  0200                  1		       DW    512	   ; 
				
				;---------------------------------------
				
 05BB				MS_IOCTL_DRV_PARM    LABEL BYTE    ;DRIVE PARM FROM SOURCE MEDIUM
 05BB  00			MS_specialFunctions  db  ?
 05BC  00			MS_deviceType	     db  ?	   ;0=5.25, 1=5.25 96 TPI, 2=3.5" 720 KB
								   ;3=8" SINGLE, 4=8" DOUBLE, 5=HARD DISK
 05BD  0000			MS_deviceAttributes  dw  ?	   ;0001h - NOT REMOVABLE, 0002h - CHANGE
								   ; LINE SUPPORTED
 05BF  0000			MS_numberOfCylinders dw  ?
 05C1  00			MS_mediaType	     db  ?
 05C2				MS_BPB_PTR	     LABEL BYTE
 05C2  0000			MS_deviceBPB	     my_bpb <>
 05C4  00			
 05C5  0000			
 05C7  00			
 05C8  0000			
 05CA  0000			
 05CC  00			
 05CD  0000			
 05CF  0000			
 05D1  0000			
 05D3  00000000			
 05D7  00000000			
 05DB  0006[			
	   00			
			 ]	
				
 = 001F				MS_deviceBPB_leng    equ $-MS_deviceBPB
 05E1				MS_trackLayout	     LABEL WORD    ;						;AC000;
						     my_trackLayout ;						;AC000;
 05E1  0000                  1	??0002        DW    0		   ; 
 05E3  0001                  1		       DW    1		   ; 
 05E5  0200                  1		       DW    512	   ; 
 05E7  0002                  1		       DW    2		   ; 
 05E9  0200                  1		       DW    512	   ; 
 05EB  0003                  1		       DW    3		   ; 
 05ED  0200                  1		       DW    512	   ; 
 05EF  0004                  1		       DW    4		   ; 
 05F1  0200                  1		       DW    512	   ; 
 05F3  0005                  1		       DW    5		   ; 
 05F5  0200                  1		       DW    512	   ; 
 05F7  0006                  1		       DW    6		   ; 
 05F9  0200                  1		       DW    512	   ; 
 05FB  0007                  1		       DW    7		   ; 
 05FD  0200                  1		       DW    512	   ; 
 05FF  0008                  1		       DW    8		   ; 
 0601  0200                  1		       DW    512	   ; 
 0603  0009                  1		       DW    9		   ; 
 0605  0200                  1		       DW    512	   ; 
 0607  000A                  1		       DW    10 	   ; 
 0609  0200                  1		       DW    512	   ; 
 060B  000B                  1		       DW    11 	   ; 
 060D  0200                  1		       DW    512	   ; 
 060F  000C                  1		       DW    12 	   ; 
 0611  0200                  1		       DW    512	   ; 
 0613  000D                  1		       DW    13 	   ; 
 0615  0200                  1		       DW    512	   ; 
 0617  000E                  1		       DW    14 	   ; 
 0619  0200                  1		       DW    512	   ; 
 061B  000F                  1		       DW    15 	   ; 
 061D  0200                  1		       DW    512	   ; 
 061F  0010                  1		       DW    16 	   ; 
 0621  0200                  1		       DW    512	   ; 
 0623  0011                  1		       DW    17 	   ; 
 0625  0200                  1		       DW    512	   ; 
 0627  0012                  1		       DW    18 	   ; 
 0629  0200                  1		       DW    512	   ; 
 062B  0013                  1		       DW    19 	   ; 
 062D  0200                  1		       DW    512	   ; 
 062F  0014                  1		       DW    20 	   ; 
 0631  0200                  1		       DW    512	   ; 
 0633  0015                  1		       DW    21 	   ; 
 0635  0200                  1		       DW    512	   ; 
 0637  0016                  1		       DW    22 	   ; 
 0639  0200                  1		       DW    512	   ; 
 063B  0017                  1		       DW    23 	   ; 
 063D  0200                  1		       DW    512	   ; 
 063F  0018                  1		       DW    24 	   ; 
 0641  0200                  1		       DW    512	   ; 
 0643  0019                  1		       DW    25 	   ; 
 0645  0200                  1		       DW    512	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-16


 0647  001A                  1		       DW    26 	   ; 
 0649  0200                  1		       DW    512	   ; 
 064B  001B                  1		       DW    27 	   ; 
 064D  0200                  1		       DW    512	   ; 
 064F  001C                  1		       DW    28 	   ; 
 0651  0200                  1		       DW    512	   ; 
 0653  001D                  1		       DW    29 	   ; 
 0655  0200                  1		       DW    512	   ; 
 0657  001E                  1		       DW    30 	   ; 
 0659  0200                  1		       DW    512	   ; 
 065B  001F                  1		       DW    31 	   ; 
 065D  0200                  1		       DW    512	   ; 
 065F  0020                  1		       DW    32 	   ; 
 0661  0200                  1		       DW    512	   ; 
 0663  0021                  1		       DW    33 	   ; 
 0665  0200                  1		       DW    512	   ; 
 0667  0022                  1		       DW    34 	   ; 
 0669  0200                  1		       DW    512	   ; 
 066B  0023                  1		       DW    35 	   ; 
 066D  0200                  1		       DW    512	   ; 
 066F  0024                  1		       DW    36 	   ; 
 0671  0200                  1		       DW    512	   ; 
 0673  0025                  1		       DW    37 	   ; 
 0675  0200                  1		       DW    512	   ; 
 0677  0026                  1		       DW    38 	   ; 
 0679  0200                  1		       DW    512	   ; 
 067B  0027                  1		       DW    39 	   ; 
 067D  0200                  1		       DW    512	   ; 
 067F  0028                  1		       DW    40 	   ; 
 0681  0200                  1		       DW    512	   ; 
 0683  0029                  1		       DW    41 	   ; 
 0685  0200                  1		       DW    512	   ; 
 0687  002A                  1		       DW    42 	   ; 
 0689  0200                  1		       DW    512	   ; 
 068B  002B                  1		       DW    43 	   ; 
 068D  0200                  1		       DW    512	   ; 
 068F  002C                  1		       DW    44 	   ; 
 0691  0200                  1		       DW    512	   ; 
 0693  002D                  1		       DW    45 	   ; 
 0695  0200                  1		       DW    512	   ; 
 0697  002E                  1		       DW    46 	   ; 
 0699  0200                  1		       DW    512	   ; 
 069B  002F                  1		       DW    47 	   ; 
 069D  0200                  1		       DW    512	   ; 
 069F  0030                  1		       DW    48 	   ; 
 06A1  0200                  1		       DW    512	   ; 
 06A3  0031                  1		       DW    49 	   ; 
 06A5  0200                  1		       DW    512	   ; 
 06A7  0032                  1		       DW    50 	   ; 
 06A9  0200                  1		       DW    512	   ; 
 06AB  0033                  1		       DW    51 	   ; 
 06AD  0200                  1		       DW    512	   ; 
 06AF  0034                  1		       DW    52 	   ; 
 06B1  0200                  1		       DW    512	   ; 
 06B3  0035                  1		       DW    53 	   ; 
 06B5  0200                  1		       DW    512	   ; 
 06B7  0036                  1		       DW    54 	   ; 
 06B9  0200                  1		       DW    512	   ; 
 06BB  0037                  1		       DW    55 	   ; 
 06BD  0200                  1		       DW    512	   ; 
 06BF  0038                  1		       DW    56 	   ; 
 06C1  0200                  1		       DW    512	   ; 
 06C3  0039                  1		       DW    57 	   ; 
 06C5  0200                  1		       DW    512	   ; 
 06C7  003A                  1		       DW    58 	   ; 
 06C9  0200                  1		       DW    512	   ; 
 06CB  003B                  1		       DW    59 	   ; 
 06CD  0200                  1		       DW    512	   ; 
 06CF  003C                  1		       DW    60 	   ; 
 06D1  0200                  1		       DW    512	   ; 
 06D3  003D                  1		       DW    61 	   ; 
 06D5  0200                  1		       DW    512	   ; 
 06D7  003E                  1		       DW    62 	   ; 
 06D9  0200                  1		       DW    512	   ; 
 06DB  003F                  1		       DW    63 	   ; 
 06DD  0200                  1		       DW    512	   ; 
				;---------------------------------------
 06DF				MT_IOCTL_DRV_PARM    LABEL BYTE    ;DRIVE PARM FROM TARGET MEDIUM
 06DF  00			MT_specialFunctions  db  ?
 06E0  00			MT_deviceType	     db  ?	   ;0=5.25, 1=5.25 96 TPI, 2=3.5" 720 KB
								   ;3=8" SINGLE, 4=8" DOUBLE, 5=HARD DISK
 06E1  0000			MT_deviceAttributes  dw  ?	   ;0001h - NOT REMOVABLE, 0002h - CHANGE
								   ; LINE SUPPORTED
 06E3  0000			MT_numberOfCylinders dw  ?
 06E5  00			MT_mediaType	     db  ?
 06E6				MT_BPB_PTR	     LABEL BYTE
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-17


 06E6  0000			MT_deviceBPB	     my_bpb <>
 06E8  00			
 06E9  0000			
 06EB  00			
 06EC  0000			
 06EE  0000			
 06F0  00			
 06F1  0000			
 06F3  0000			
 06F5  0000			
 06F7  00000000			
 06FB  00000000			
 06FF  0006[			
	   00			
			 ]	
				
 0705				MT_trackLayout	     LABEL WORD    ;						;AC000;
						     my_trackLayout ;						;AC000;
 0705  0000                  1	??0003        DW    0		   ; 
 0707  0001                  1		       DW    1		   ; 
 0709  0200                  1		       DW    512	   ; 
 070B  0002                  1		       DW    2		   ; 
 070D  0200                  1		       DW    512	   ; 
 070F  0003                  1		       DW    3		   ; 
 0711  0200                  1		       DW    512	   ; 
 0713  0004                  1		       DW    4		   ; 
 0715  0200                  1		       DW    512	   ; 
 0717  0005                  1		       DW    5		   ; 
 0719  0200                  1		       DW    512	   ; 
 071B  0006                  1		       DW    6		   ; 
 071D  0200                  1		       DW    512	   ; 
 071F  0007                  1		       DW    7		   ; 
 0721  0200                  1		       DW    512	   ; 
 0723  0008                  1		       DW    8		   ; 
 0725  0200                  1		       DW    512	   ; 
 0727  0009                  1		       DW    9		   ; 
 0729  0200                  1		       DW    512	   ; 
 072B  000A                  1		       DW    10 	   ; 
 072D  0200                  1		       DW    512	   ; 
 072F  000B                  1		       DW    11 	   ; 
 0731  0200                  1		       DW    512	   ; 
 0733  000C                  1		       DW    12 	   ; 
 0735  0200                  1		       DW    512	   ; 
 0737  000D                  1		       DW    13 	   ; 
 0739  0200                  1		       DW    512	   ; 
 073B  000E                  1		       DW    14 	   ; 
 073D  0200                  1		       DW    512	   ; 
 073F  000F                  1		       DW    15 	   ; 
 0741  0200                  1		       DW    512	   ; 
 0743  0010                  1		       DW    16 	   ; 
 0745  0200                  1		       DW    512	   ; 
 0747  0011                  1		       DW    17 	   ; 
 0749  0200                  1		       DW    512	   ; 
 074B  0012                  1		       DW    18 	   ; 
 074D  0200                  1		       DW    512	   ; 
 074F  0013                  1		       DW    19 	   ; 
 0751  0200                  1		       DW    512	   ; 
 0753  0014                  1		       DW    20 	   ; 
 0755  0200                  1		       DW    512	   ; 
 0757  0015                  1		       DW    21 	   ; 
 0759  0200                  1		       DW    512	   ; 
 075B  0016                  1		       DW    22 	   ; 
 075D  0200                  1		       DW    512	   ; 
 075F  0017                  1		       DW    23 	   ; 
 0761  0200                  1		       DW    512	   ; 
 0763  0018                  1		       DW    24 	   ; 
 0765  0200                  1		       DW    512	   ; 
 0767  0019                  1		       DW    25 	   ; 
 0769  0200                  1		       DW    512	   ; 
 076B  001A                  1		       DW    26 	   ; 
 076D  0200                  1		       DW    512	   ; 
 076F  001B                  1		       DW    27 	   ; 
 0771  0200                  1		       DW    512	   ; 
 0773  001C                  1		       DW    28 	   ; 
 0775  0200                  1		       DW    512	   ; 
 0777  001D                  1		       DW    29 	   ; 
 0779  0200                  1		       DW    512	   ; 
 077B  001E                  1		       DW    30 	   ; 
 077D  0200                  1		       DW    512	   ; 
 077F  001F                  1		       DW    31 	   ; 
 0781  0200                  1		       DW    512	   ; 
 0783  0020                  1		       DW    32 	   ; 
 0785  0200                  1		       DW    512	   ; 
 0787  0021                  1		       DW    33 	   ; 
 0789  0200                  1		       DW    512	   ; 
 078B  0022                  1		       DW    34 	   ; 
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-18


 078D  0200                  1		       DW    512	   ; 
 078F  0023                  1		       DW    35 	   ; 
 0791  0200                  1		       DW    512	   ; 
 0793  0024                  1		       DW    36 	   ; 
 0795  0200                  1		       DW    512	   ; 
 0797  0025                  1		       DW    37 	   ; 
 0799  0200                  1		       DW    512	   ; 
 079B  0026                  1		       DW    38 	   ; 
 079D  0200                  1		       DW    512	   ; 
 079F  0027                  1		       DW    39 	   ; 
 07A1  0200                  1		       DW    512	   ; 
 07A3  0028                  1		       DW    40 	   ; 
 07A5  0200                  1		       DW    512	   ; 
 07A7  0029                  1		       DW    41 	   ; 
 07A9  0200                  1		       DW    512	   ; 
 07AB  002A                  1		       DW    42 	   ; 
 07AD  0200                  1		       DW    512	   ; 
 07AF  002B                  1		       DW    43 	   ; 
 07B1  0200                  1		       DW    512	   ; 
 07B3  002C                  1		       DW    44 	   ; 
 07B5  0200                  1		       DW    512	   ; 
 07B7  002D                  1		       DW    45 	   ; 
 07B9  0200                  1		       DW    512	   ; 
 07BB  002E                  1		       DW    46 	   ; 
 07BD  0200                  1		       DW    512	   ; 
 07BF  002F                  1		       DW    47 	   ; 
 07C1  0200                  1		       DW    512	   ; 
 07C3  0030                  1		       DW    48 	   ; 
 07C5  0200                  1		       DW    512	   ; 
 07C7  0031                  1		       DW    49 	   ; 
 07C9  0200                  1		       DW    512	   ; 
 07CB  0032                  1		       DW    50 	   ; 
 07CD  0200                  1		       DW    512	   ; 
 07CF  0033                  1		       DW    51 	   ; 
 07D1  0200                  1		       DW    512	   ; 
 07D3  0034                  1		       DW    52 	   ; 
 07D5  0200                  1		       DW    512	   ; 
 07D7  0035                  1		       DW    53 	   ; 
 07D9  0200                  1		       DW    512	   ; 
 07DB  0036                  1		       DW    54 	   ; 
 07DD  0200                  1		       DW    512	   ; 
 07DF  0037                  1		       DW    55 	   ; 
 07E1  0200                  1		       DW    512	   ; 
 07E3  0038                  1		       DW    56 	   ; 
 07E5  0200                  1		       DW    512	   ; 
 07E7  0039                  1		       DW    57 	   ; 
 07E9  0200                  1		       DW    512	   ; 
 07EB  003A                  1		       DW    58 	   ; 
 07ED  0200                  1		       DW    512	   ; 
 07EF  003B                  1		       DW    59 	   ; 
 07F1  0200                  1		       DW    512	   ; 
 07F3  003C                  1		       DW    60 	   ; 
 07F5  0200                  1		       DW    512	   ; 
 07F7  003D                  1		       DW    61 	   ; 
 07F9  0200                  1		       DW    512	   ; 
 07FB  003E                  1		       DW    62 	   ; 
 07FD  0200                  1		       DW    512	   ; 
 07FF  003F                  1		       DW    63 	   ; 
 0801  0200                  1		       DW    512	   ; 
				
				;IOCTL read/write a track.
 0803				IOCTL_R_W	     LABEL BYTE
 0803  00			specialFunctions     db  0
 0804  0000			Head		     dw  ?
 0806  0000			Cylinder	     dw  ?
 0808  0000			FirstSectors	     dw  ?
 080A  0000			numberOfSectors      dw  ?
 080C  0000			TAddress_off	     dw  ?
 080E  0000			TAddress_seg	     dw  ?
				
				;(deleted ;AN011;) MEDIA_ID_BUFFER A_MEDIA_ID_INFO <> ;BUFFER FOR GET/SET MEDIA ID ;AN000;
						     PATHLABL DISKCOMP ;AN013;
 0810                        1	    $$A_START_DISKCOMP:                    ; 
						     HEADER <BEGIN - VERSION CHECK, SYSMSG INIT, EXIT TO DOS> ; ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-19
BEGIN - VERSION CHECK, SYSMSG INIT, EXIT TO DOS		       ;   

						     PUBLIC DISKCOMP_BEGIN ;					;AN000;
 0810				DISKCOMP_BEGIN	     LABEL BYTE
				;*****************************************************************************
				;									     *
				;		 D I S K C O M P   M A I N   P R O G R A M		     *
				;									     *
				;*****************************************************************************
				
				;  $salut (4,4,10,36)		   ;						;AN000;
 0810				BEGIN PROC NEAR
				   PUBLIC BEGIN 		   ;						;AN000;
				;OUTPUT - "EXITFL" HAS ERRORLEVEL RETURN CODE
				
 0810  BC 0304 R		   MOV	 SP, OFFSET MY_STACK_PTR   ;MOVE SP TO MY STACK AREA
 0813  E8 0000 E		   CALL  SYSLOADMSG		   ;INIT SYSMSG HANDLER 			;AN000;
				
				;  $IF	 C			   ;IF THERE WAS A PROBLEM			;AN000;
 0816  73 0A			   JNC $$IF1
 0818  E8 0000 E		       CALL  SYSDISPMSG 	   ;LET HIM SAY WHY HE HAD A PROBLEM		;AN000;
				
 081B  C6 06 0345 R 01		       MOV   EXITFL,EXVER	   ;TELL ERRORLEVEL BAD DOS VERSION		;AN000;
				;  $ELSE			   ;SINCE SYSDISPMSG IS HAPPY			;AN000;
 0820  EB 62			   JMP SHORT $$EN1
 0822				$$IF1:
 0822  E8 0000 E		       CALL  INIT		   ;RUN INITIALIZATION ROUTINE
				
 0825  83 FA FF			       CMP   DX,FINE		   ;CHECK FOR ERROR DURING INIT
				;      $IF   E			   ;IF NO ERROR THEN PROCEED TO COMP
 0828  75 0A			       JNE $$IF3
				;	   $DO
 082A				$$DO4:
 082A  E8 0899 R			       CALL  COMP	   ;PERFORM DISKCOMP
				
 082D  E8 0937 R			       CALL  TEST_REPEAT   ;COMP ANOTHER ?
				
				;	   $ENDDO C
 0830  73 F8				   JNC $$DO4
								   ;NORMAL RETURN CODE ALREADY IN "EXITFL"
				;      $ELSE			   ;ELSE IF ERROR DETECTED IN INIT
 0832  EB 0A			       JMP SHORT $$EN3
 0834				$$IF3:
 0834  8B FA				   MOV	 DI,DX		   ;PASS NUMBER OF ERROR MSG, IF ANY		;AD000;
								   ;DI HAS OFFSET OF MESSAGE DESCRIPTOR
 0836  E8 0FC4 R			   CALL  SENDMSG	   ;DISPLAY THE ERROR MESSAGE			;AC000;
				
 0839  C6 06 0345 R 01			   MOV	 EXITFL,EXVER	   ;ERROR RETURN CODE				;AC000;
				;      $ENDIF
 083E				$$EN3:
 083E  EB 05			       JMP   SHORT EXIT_TO_DOS
				
 0840				MAIN_EXIT:			   ;COME HERE AFTER CONTROL-BREAK
 0840  C6 06 0345 R 02		       MOV   EXITFL,EXCBR	   ;  FOR CONTROL-BREAK EXIT			;AC000;
				
 0845				EXIT_TO_DOS:
 0845  33 DB			       XOR   BX, BX
				
 0847  8A 1E 032B R		       MOV   BL, S_OWNER_SAVED	   ;RESTORE ORIGINAL SOURCE,
								   ; TARGET DRIVE OWNER.
 084B  E8 088E R		       CALL  SET_LOGICAL_DRIVE
				
 084E  8A 1E 032C R		       MOV   BL, T_OWNER_SAVED
 0852  E8 088E R		       CALL  SET_LOGICAL_DRIVE
				
 0855  80 3E 0371 R 00		       CMP   S_DRV_SET_FLAG, 0
				;      $IF   NE 		   ;						;AN000;
 085A  74 0F			       JE $$IF8
 085C  8A 1E 032B R			   MOV	 BL, S_OWNER_SAVED
 0860  C6 06 0373 R 04			   MOV	 DS_specialFunctions, SET_SP_FUNC_DOS ;=0
 0865  BA 0373 R			   MOV	 DX, OFFSET DS_IOCTL_DRV_PARM
 0868  E8 0D7D R			   CALL  SET_DRV_PARM_DEF  ;RESTORE SOURCE DRIVE PARM
				
				;      $ENDIF			   ;						;AN000;
 086B				$$IF8:
				
 086B  80 3E 0372 R 00		       CMP   T_DRV_SET_FLAG, 0
				;      $IF   NE 		   ;						;AN000;
 0870  74 0F			       JE $$IF10
 0872  8A 1E 032C R			   MOV	 BL, T_OWNER_SAVED
 0876  C6 06 0497 R 04			   MOV	 DT_specialFunctions, SET_SP_FUNC_DOS ;=0
 087B  BA 0497 R			   MOV	 DX, OFFSET DT_IOCTL_DRV_PARM
 087E  E8 0D7D R			   CALL  SET_DRV_PARM_DEF  ;RESTORE TARGET DRIVE PARM
				
				;      $ENDIF			   ;						;AN000;
 0881				$$IF10:
 0881				EXIT_PROGRAM:
 0881  A0 0345 R		       MOV   AL,EXITFL		   ;PASS ERRORLEVEL RET CODE			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-20
BEGIN - VERSION CHECK, SYSMSG INIT, EXIT TO DOS		       ;   

				;  $ENDIF			   ;OK WITH SYSDISPMSG? 			;AN000;
 0884				$$EN1:
 0884  A0 0345 R		   MOV	 AL,EXITFL		   ;PASS BACK ERRORLEVEL RET CODE		;AN000;
				   DOSCALL RET_CD_EXIT		   ;RETURN TO DOS WITH RET CODE 		;AN000;
 0887  B4 4C                 1					   MOV AH,RET_CD_EXIT ; 
 0889  CD 21                 1					   INT 21H ; 
				
 088B  CD 20			   INT	 20H			   ;IF ABOVE NOT WORK,				;AN000;
 088D				BEGIN ENDP			   ;						;AN000;
				; = = = = = = = = = = = = = = = = =
				   HEADER <MORE_INIT - FINISH INIT, DO COMP> ;					;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-21
MORE_INIT - FINISH INIT, DO COMP		       ;                  

 088D				MORE_INIT PROC NEAR		   ;						;AN000;
 088D  C3			   RET				   ;RETURN TO CALLER				;AN000;
 088E				MORE_INIT ENDP			   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SET_LOGICAL_DRIVE - SET LOG. DRV LETTER THAT OWNS DRIVE> ;		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-22
SET_LOGICAL_DRIVE - SET LOG. DRV LETTER THAT OWNS DRIVE		   

				   PUBLIC SET_LOGICAL_DRIVE
				;*****************************************************************************
 088E				SET_LOGICAL_DRIVE PROC NEAR
				;	*** SET THE LOGICAL DRIVE LETTER THAT WILL BE THE OWNER OF THE DRIVE
				;	INPUT: BL - DRIVE LETTER
				;	OUTPUT: OWNER WILL BE SET ACCORDINGLY.
				;*****************************************************************************
 088E  80 FB 00			   CMP	 BL, 0			   ;IS THIS DRIVE ZERO?
								   ;IF BL = 0, THEN JUST RETURN
				;  $IF	 NE
 0891  74 05			   JE $$IF13
				       DOSCALL IOCTL_FUNC,SET_LOG_DRIVE ;					;AC000;
 0893  B8 440F               1					   MOV AX,(IOCTL_FUNC SHL 8)+SET_LOG_DRIVE ; 
 0896  CD 21                 1					   INT 21H ; 
								   ;SET BL AS AN OWNER OF THAT DRIVE
				;  $ENDIF
 0898				$$IF13:
 0898  C3			   RET
 0899				SET_LOGICAL_DRIVE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <COMP - PERFORM THE OVERALL COMPARISON> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-23
COMP - PERFORM THE OVERALL COMPARISON		       ;             

				;*****************************************************************************
 0899				COMP PROC NEAR
				;*****************************************************************************
 0899  A0 0331 R		   MOV	 AL,ORG_SOURCE_DRIVE	   ;INITIALIZE THE FIRST AND SECOND
 089C  A2 032F R		   MOV	 SOURCE_DRIVE,AL	   ;DRIVE IN THE ORDER THE USER
 089F  A0 0332 R		   MOV	 AL,ORG_TARGET_DRIVE	   ;ENTERED ON THE COMMAND LINE
 08A2  A2 0330 R		   MOV	 TARGET_DRIVE,AL
 08A5  A1 032D R		   MOV	 AX, RECOMMENDED_BYTES_SECTOR
 08A8  A3 035A R		   MOV	 bSECTOR_SIZE, AX	   ;USE RECOMMENDED SECTOR SIZE
								   ; TO READ A SECTOR
 08AB  C6 06 0356 R 00		   MOV	 READ_S_BPB_FAILURE, 0	   ;RESET GET BPB FAILURE FLAG
 08B0  C6 06 0357 R 00		   MOV	 READ_T_BPB_FAILURE, 0
 08B5  C6 06 0366 R 00		   MOV	 COMP_ERROR,0		   ;RESET COMPARE ERROR COUNT
 08BA  C6 06 0369 R 00		   MOV	 COMP_STATUS,OK 	   ;RESET COMP STATUS BYTE
 08BF  80 3E 0334 R 02		   CMP	 COPY_TYPE,2		   ;IF TWO DRIVE COMP
				;  $IF	 E
 08C4  75 09			   JNE $$IF15
 08C6  E8 0913 R		       CALL  DISPLAY_LOAD_FIRST    ;"Insert FIRST diskette in drive %1:"	;AN000;
				
 08C9  E8 0925 R		       CALL  DISPLAY_LOAD_SECOND   ;"Insert SECOND diskette in drive %1:"	;AN000;
				
 08CC  E8 0FB7 R		       CALL  PRESS_ANY_KEY	   ;"Press any key to continue . . ."		;AC009;
				
				;  $ENDIF
 08CF				$$IF15:
 08CF  C6 06 035D R 00		   MOV	 TRACK_TO_READ,0	   ;INITIALIZE TRACK NUMBERS
 08D4  C6 06 035E R 00		   MOV	 TRACK_TO_COMP,0
				
 08D9				COMP_TEST_END:
 08D9  A0 035E R		   MOV	 AL,TRACK_TO_COMP	   ;WHILE TRACK_TO_COMP<=LAST_TRACK
 08DC  3A 06 0358 R		   CMP	 AL,LAST_TRACK
 08E0  77 16			   JA	 COMP_END
				
 08E2  E8 095C R		   CALL  READ_SOURCE
				
 08E5  80 3E 0369 R 01		   CMP	 COMP_STATUS,FATAL	   ;MAKE SURE DRIVES WERE COMPATIBLE
 08EA  74 19			   JE	 COMP_EXIT
				
 08EC  E8 0BF9 R		   CALL  COMP_TARGET
				
 08EF  80 3E 0369 R 01		   CMP	 COMP_STATUS,FATAL	   ;MAKE SURE TARGET AND SOURCE
 08F4  74 0F			   JE	 COMP_EXIT		   ;DISKETTES ARE COMPATIBLE
				
 08F6  EB E1			   JMP	 COMP_TEST_END
				
 08F8				COMP_END:
 08F8  80 3E 0366 R 00		   CMP	 COMP_ERROR,0		   ;IF ERROR IN COMP
				;  $IF	 E			   ;WARN USER
 08FD  75 06			   JNE $$IF17
				       PRINT MSGNUM_COMP_OK	   ;"Compare OK"				;AC000;
 08FF  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_COMP_OK ; 
 0902  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
				;kiser note: this is a warning????
				
				;  $ENDIF
 0905				$$IF17:
				
 0905				COMP_EXIT:
 0905  80 3E 0369 R 01		   CMP	 COMP_STATUS,FATAL	   ;WAS COMP ABORTED ?
				;  $IF	 E
 090A  75 06			   JNE $$IF19
								   ;"Compare process ended"
				       PRINT MSGNUM_FATAL_ERROR    ;IF SO THEN TELL USER			;AC000;
 090C  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_FATAL_ERROR ; 
 090F  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
				;  $ENDIF
 0912				$$IF19:
 0912  C3			   RET
				
 0913				COMP ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <DISPLAY_LOAD_FIRST - MOUNT FIRST DISKETTE> ; 			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-24
DISPLAY_LOAD_FIRST - MOUNT FIRST DISKETTE		       ;         

 0913				DISPLAY_LOAD_FIRST PROC NEAR	   ;						;AN000;
				   PUBLIC DISPLAY_LOAD_FIRST	   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0913  C7 06 0002 E 0000 E	   MOV	 SUBLIST_78.SUB_VALUE,OFFSET ASCII_DRV1_ID ;PASS CHAR DRIVE ID		;AN000;
								   ;"Insert FIRST diskette in drive %1:"
				   PRINT MSGNUM_LOAD_FIRST	   ;OUTPUT LOAD FIRST DISKETTE MESSAGE		;AC000;
 0919  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_LOAD_FIRST ; 
 091C  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 091F  C6 06 0370 R 02		   MOV	 MSG_FLAG,SECOND
 0924  C3			   RET				   ;RETURN TO CALLER				;AN000;
 0925				DISPLAY_LOAD_FIRST ENDP 	   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <DISPLAY_SECOND  - MOUNT FIRST DISKETTE> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-25
DISPLAY_SECOND  - MOUNT FIRST DISKETTE		       ;            

 0925				DISPLAY_LOAD_SECOND PROC NEAR	   ;						;AN000;
				   PUBLIC DISPLAY_LOAD_SECOND	   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0925  C7 06 0002 E 0000 E	   MOV	 SUBLIST_78.SUB_VALUE,OFFSET ASCII_DRV2_ID ;PASS CHAR DRIVE ID		;AN000;
								   ;CR,LF,"Insert SECOND diskette in drive %1:",CR,LF
				   PRINT MSGNUM_LOAD_SECOND	   ;OUTPUT LOAD SECOND DISKETTE MESSAGE 	;AC000;
 092B  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_LOAD_SECOND ; 
 092E  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0931  C6 06 0370 R 01		   MOV	 MSG_FLAG,FIRST
 0936  C3			   RET				   ;RETURN TO CALLER				;AN000;
 0937				DISPLAY_LOAD_SECOND ENDP	   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <TEST_REPEAT - PROMPT FOR ANOTHER COMPARE> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-26
TEST_REPEAT - PROMPT FOR ANOTHER COMPARE		       ;          

				;*****************************************************************************
				;									     *
				   PUBLIC TEST_REPEAT		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0937				TEST_REPEAT PROC NEAR		   ;TEST IF USER WANTS TO COMP ANOTHER	     *
				;				 DISKETTE				     *
				; INPUT : USER_INPUT ("Y" OR "N")
				; OUTPUT: NC = COMP AGAIN						     *
				;	  CY = EXIT TO DOS						     *
				;*****************************************************************************
				;  $SEARCH			   ;REPEAT THIS PROMPT UNTIL (Y/N) RESPONDED	;AC000;
 0937				$$DO21:
								   ;"Compare another diskette (Y/N)?"
				       PRINT MSGNUM_COMP_ANOTHER   ;SEE IF USER WANTS TO COMPARE ANOTHER	;AC000;
 0937  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_COMP_ANOTHER ; 
 093A  E8 0FC4 R             1					   CALL    SENDMSG ; 
								   ; AND READ RESPONSE TO AL
 093D  50			       PUSH  AX 		   ;SAVE THE RESPONSE				;AN000;
				       PRINT MSGNUM_NEWLINE	   ;CR,LF,LF					;AC000;
 093E  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_NEWLINE ; 
 0941  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0944  5A			       POP   DX 		   ;RESTORE THE REPONSE CHAR TO DL		;AN000;
 0945  E8 0FF4 R		       CALL  YESNO		   ;CHECK FOR (Y/N)				;AN000;
				
				;  $EXITIF C,NUL		   ;QUIT IF OK ANSWER				;AN000;
 0948  72 11			   JC $$SR21
 094A  3C 02			       CMP   AL,BAD_YESNO	   ;WAS THE RESPONSE INVALID?			;AN000;
				;  $ENDLOOP B			   ;QUIT IF OK ANSWER (AX=0 OR 1)		;AN000;
 094C  73 E9			   JNB $$DO21
 094E  3C 01			       CMP   AL,YES		   ;WAS "YES" SPECIFIED 			;AN000;
				;      $IF   E			   ;IF "YES"					;AN000;
 0950  75 08			       JNE $$IF24
 0952  C6 06 0344 R 00			   MOV	 FIRST_TIME,ZERO   ;SET UP TO DO ANOTHER VOLSER CHECK		;AN000;
 0957  F8				   CLC			   ;CLEAR CARRY TO INDICATE COMPARE AGAIN	;AN000;
				;      $ELSE			   ;SINCE NOT "YES"				;AN000;
 0958  EB 01			       JMP SHORT $$EN24
 095A				$$IF24:
 095A  F9				   STC			   ;SET CARRY TO INDICATE NO REPEAT		;AN000;
				;      $ENDIF			   ;						;AN000;
 095B				$$EN24:
				;  $ENDSRCH			   ;						;AN000;
 095B				$$SR21:
 095B  C3			   RET
				
 095C				TEST_REPEAT ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <READ_SOURCE - FILL AVAIL MEM WITH FIRST DISKETTE> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-27
READ_SOURCE - FILL AVAIL MEM WITH FIRST DISKETTE		       ;  

				;*****************************************************************************
				;									     *
				   PUBLIC READ_SOURCE		   ;MAKE ENTRY IN LINK MAP			;AN000;
 095C				READ_SOURCE PROC NEAR		   ;FILL ALL AVAILABLE MOMORY WITH SOURCE DATA
				;									     *
				;*****************************************************************************
				
 095C  80 3E 035D R 00		   CMP	 TRACK_TO_READ,0	   ;1ST TRACK ?
				;  $IF	 E			   ;IF SO
 0961  75 1D			   JNE $$IF28
 0963  80 3E 0334 R 01		       CMP   COPY_TYPE,1	   ;IF SINGLE DRIVE COMP
				;      $IF   E			   ;PROMPT MSG
 0968  75 06			       JNE $$IF29
 096A  E8 0913 R			   CALL  DISPLAY_LOAD_FIRST ;"Insert FIRST diskette in drive %1:"	;AN000;
				
 096D  E8 0FB7 R			   CALL  PRESS_ANY_KEY	   ;"Press any key to continue . . ."		;AC000;
				
				;      $ENDIF
 0970				$$IF29:
 0970  E8 09A8 R		       CALL  CHECK_SOURCE	   ;DO NECESSARY CHECKING
				
 0973  E8 0B98 R		       CALL  CALC_TRACK_SIZE
				
 0976  E8 0BE0 R		       CALL  CHECK_MEMORY_SIZE
				
 0979  80 3E 0369 R 01		       CMP   COMP_STATUS,FATAL
 097E  74 27			       JE    RS_EXIT
				
				;  $ENDIF
 0980				$$IF28:
 0980  8B 1E 0337 R		   MOV	 BX,BUFFER_BEGIN
 0984  89 1E 0364 R		   MOV	 BUFFER_PTR,BX		   ;INITIALIZE BUFFER POINTER
				
				;  $DO
 0988				$$DO32:
 0988  A0 035D R		       MOV   AL,TRACK_TO_READ	   ;DID WE FINISH READING ALL TRACKS?
 098B  3A 06 0358 R		       CMP   AL,LAST_TRACK
				;  $LEAVE A
 098F  77 16			   JA $$EN32
				
 0991  A1 0364 R		       MOV   AX,BUFFER_PTR	   ;DID WE RUN OUT OF BUFFER SPACE
 0994  03 06 035F R		       ADD   AX,TRACK_SIZE
 0998  3B 06 0339 R		       CMP   AX,BUFFER_END
				;  $LEAVE A
 099C  77 09			   JA $$EN32
				
 099E  E8 0E25 R		       CALL  READ_TRACK 	   ;NO, GO READ ANOTHER TRACK
				
 09A1  FE 06 035D R		       INC   TRACK_TO_READ
				;  $ENDDO
 09A5  EB E1			   JMP SHORT $$DO32
 09A7				$$EN32:
				
 09A7				RS_EXIT:
 09A7  C3			   RET
				
 09A8				READ_SOURCE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <CHECK_SOURCE - DETERMINE FIRST DISKETTE TYPE> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-28
CHECK_SOURCE - DETERMINE FIRST DISKETTE TYPE		       ;      

				;*****************************************************************************
				;									     *
				   PUBLIC CHECK_SOURCE		   ;MAKE ENTRY IN LINK MAP			;AN000;
 09A8				CHECK_SOURCE PROC NEAR		   ;CHECK SOURCE DISKETTE TYPE		     *
				;				   SET END_OF_TRACK, LAST_TRACK 	     *
				;				   NO_OF_SIDES, bSECTOR_SIZE		     *
				; ** this routine will call "Get dev parm" with "BUILD BPB BIT" on.  If it   *
				; ** fails to get that info, then the source medium must be bad(vergin) or   *
				; ** below DOS 2.0 level diskette, and will jmp to the old logic.	     *
				; ** For compatibility reasons (in case of non IBM formatted media), this    *
				; ** routine covers old diskcopy routines.  But this will only supports
				; ** 5.25" 48 tpi 8, 9 sectors, 40 tracks and 5.25" 96 tpi, 15 sectors, 80 tracks
				; ** media.  Other non IBM formatted media which are formatted differenty
				; ** from those values will result in unpreditable copy process.
				;*****************************************************************************
				
 09A8				CS_AGAIN:
 09A8  33 DB			   XOR	 BX, BX
 09AA  8A 1E 032F R		   MOV	 BL, SOURCE_DRIVE
 09AE  C6 06 05BB R 01		   MOV	 MS_specialFunctions, GET_SP_FUNC_MED ;=00000001b
 09B3  B1 60			   MOV	 CL, GETDEVPARM 	   ;=60h
 09B5  BA 05BB R		   MOV	 DX, OFFSET MS_IOCTL_DRV_PARM
 09B8  E8 0F08 R		   CALL  GENERIC_IOCTL		   ;TRY TO GET MEDIA BPB INFO TOGETHER
								   ;WITH DEFAULT DEVICE INFO.
 09BB  80 3E 036F R 01		   CMP	 IO_ERROR, SOFT_ERROR	   ;TRY AGAIN?
 09C0  74 E6			   JE	 CS_AGAIN
				
 09C2  80 3E 036F R 02		   CMP	 IO_ERROR, HARD_ERROR	   ;CANNOT GET MEDIA BPB?
 09C7  75 03			   JNE	 CS_NEW 		   ;						;AC000;
 09C9				CS_OLD_BRIDGE:
 09C9  EB 7C 90			   JMP	 CS_OLD 		   ;ASSUME OLD FORMATTED DISKETTE, FIRST.	;AC000;
 09CC				CS_NEW: 			   ;						;AN000;
 09CC  83 3E 05CF R 00		   cmp	 ms_deviceBPB.csect_track,0 ;patch 1/16/86 J.K.
 09D1  74 F6			   je	 cs_old_BRIDGE
				
 09D3  83 3E 05D1 R 00		   cmp	 ms_deviceBPB.chead,0	   ;cannot trust the info. from DOS.
 09D8  74 6D			   je	 cs_old 		   ;sanity check for devide by 0.
				
 09DA  A1 05CA R		   MOV	 AX, MS_deviceBPB.CTOTSECT
 09DD  99			   CWD				   ;CONVERT IT TO A DOUBLE WORD
 09DE  F7 36 05CF R		   DIV	 MS_deviceBPB.CSECT_TRACK
 09E2  F7 36 05D1 R		   DIV	 MS_deviceBPB.CHEAD	   ;(TOTAL SECTORS / # OF TRACKS) / # OF HEADS
 09E6  3A 06 0343 R		   CMP	 AL, T_DRV_TRACKS	   ;IF # OF TRACKS FOR SOURCE MEDIA > # OF
								   ; TRACKS FOR TARGET DEVICE
 09EA  77 3F			   JA	 CS_FATAL		   ;THEN, NOT COMPATIBLE
				
 09EC  48			   DEC	 AX			   ;DECREASE BY 1 FOR THIS PROGRAM'S USE.
 09ED  A2 0358 R		   MOV	 LAST_TRACK, AL 	   ;SET LAST_TRACK
 09F0  A1 05CF R		   MOV	 AX, MS_deviceBPB.CSECT_TRACK
 09F3  A3 033C R		   MOV	 SECT_TRACK_LAYOUT, AX	   ;VARIABLE FOR MS, MT_trackLayout.CSECT_F
 09F6  80 3E 033B R 01		   CMP	 USER_OPTION_8, ON	   ;/8 OPTION SPECIFIED?
 09FB  75 08			   JNE	 CS_GO_ON
				
 09FD  3D 0008			   CMP	 AX, 8			   ;SOURCE MEDIA # OF SECTORS/TRACK < 8 ?
 0A00  72 29			   JB	 CS_FATAL		   ;IF IT IS, THEN FATAL ERROR.
				
 0A02  B8 0008			   MOV	 AX, 8			   ;ELSE SET IT TO 8
 0A05				CS_GO_ON:
 0A05  3A 06 0341 R		   CMP	 AL, T_DRV_SECT_TRACK
 0A09  77 20			   JA	 CS_FATAL
				
 0A0B  A2 0359 R		   MOV	 END_OF_TRACK, AL	   ;SET END_OF_TRACK
 0A0E  A1 05C2 R		   MOV	 AX, MS_deviceBPB.CBYTE_SECT
 0A11  A3 035A R		   MOV	 bSECTOR_SIZE, AX	   ;set the sector size in bytes.
 0A14  80 3E 0333 R 01		   CMP	 USER_OPTION, 1
 0A19  74 6D			   JE	 CS_OPTION_1
				
 0A1B  A1 05D1 R		   MOV	 AX, MS_deviceBPB.CHEAD    ;HEAD=1, 2
 0A1E  3A 06 0342 R		   CMP	 AL, T_DRV_HEADS	   ;COMPARE SOURCE MEDIA SIDE WITH TARGET
								   ; DRIVE HEAD NUMBER
 0A22  77 07			   JA	 CS_FATAL		   ;SOURCE MEDIUM IS DOUBLE SIDED AND
								   ; TARGET DRIVE IS SINGLE SIDED.
				
 0A24  48			   DEC	 AX
 0A25  A2 035C R		   MOV	 NO_OF_SIDES, AL	   ;NO_OF_SIDES=0, 1
 0A28  E9 0AFB R		   JMP	 CS_SET_TABLE
				
 0A2B				CS_FATAL:
 0A2B  C6 06 0369 R 01		   MOV	 COMP_STATUS, FATAL
								   ;"Drive types or diskette types"
								   ;"not compatible"
				   PRINT MSGNUM_NOT_COMPATIBLE	   ;						;AC000;
 0A30  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_NOT_COMPATIBLE ; 
 0A33  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0A36  E9 0B45 R		   JMP	 CS_EXIT
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-29
CHECK_SOURCE - DETERMINE FIRST DISKETTE TYPE		       ;      

				
 0A39				CS_BAD:
 0A39  C6 06 0369 R 01		   MOV	 COMP_STATUS, FATAL
				   PRINT MSGNUM_BAD_FIRST	   ;"FIRST diskette bad or incompatible"	;AC000;
 0A3E  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_BAD_FIRST ; 
 0A41  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0A44  E9 0B45 R		   JMP	 CS_EXIT
				
 0A47				CS_OLD:
				
 0A47  C6 06 0356 R 01		   MOV	 READ_S_BPB_FAILURE, 1	   ;SET FLAG
 0A4C  C7 06 035A R 0200	   MOV	 bSECTOR_SIZE, 512	   ;OLD SECTOR SIZE MUST BE 512 BYTES
 0A52  33 DB			   XOR	 BX, BX
 0A54  8A 1E 032F R		   MOV	 BL, SOURCE_DRIVE
 0A58  C7 06 0348 R 0000	   MOV	 IOCTL_TRACK, 0 	   ;TRACK=0
 0A5E  C7 06 0346 R 0008	   MOV	 IOCTL_SECTOR, 8	   ;SECTOR=8
 0A64  C7 06 034A R 0000	   MOV	 IOCTL_HEAD, 0		   ;HEAD = 0
 0A6A  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0A6D  72 CA			   JC	 CS_BAD 		   ;SOURCE BAD
				
 0A6F  C7 06 0346 R 0009	   MOV	 IOCTL_SECTOR, 9	   ;TRY TO READ SECTOR=9
 0A75  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0A78  72 29			   JC	 CS_SECT8		   ;YES, 8 SECTORS. ASSUME 40 TRACKS
				
 0A7A  C7 06 0346 R 000F	   MOV	 IOCTL_SECTOR, 15	   ;try to read sector=15
 0A80  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0A83  72 31			   JC	 CS_SECT9		   ;**REMEMBER THIS ROUTINE DOES NOT COVER 3.5" MEDIA
				
 0A85  EB 09 90			   JMP	 CS_SECT15
				
 0A88				CS_OPTION_1:
 0A88  C6 06 035C R 00		   MOV	 NO_OF_SIDES, 0 	   ;1 SIDE COPY
 0A8D  EB 6C 90			   JMP	 CS_SET_TABLE
				
 0A90				CS_SECT15:
 0A90  C7 06 033C R 000F	   MOV	 SECT_TRACK_LAYOUT, 15	   ;VARIABLE FOR MS, MT_trackLayout.CSECT_F
 0A96  C6 06 0359 R 0F		   MOV	 END_OF_TRACK, 15	   ;ELSE END_OF_TRACK = 15
 0A9B  C6 06 0358 R 4F		   MOV	 LAST_TRACK, 79
 0AA0  EB 24 90			   JMP	 CS_OPTIONS
				
 0AA3				CS_SECT8:
 0AA3  C7 06 033C R 0008	   MOV	 SECT_TRACK_LAYOUT, 8	   ;VARIABLE FOR MS, MT_trackLayout.CSECT_F
 0AA9  C6 06 0359 R 08		   MOV	 END_OF_TRACK, 8	   ;SOURCE 8 SECTORS
 0AAE  C6 06 0358 R 27		   MOV	 LAST_TRACK,  39	   ;ASSUME 40 TRACKS.
 0AB3  EB 11 90			   JMP	 CS_OPTIONS
				
 0AB6				CS_SECT9:
 0AB6  C7 06 033C R 0009	   MOV	 SECT_TRACK_LAYOUT, 9	   ;VARIABLE FOR MS, MT_trackLayout.CSECT_F
 0ABC  C6 06 0359 R 09		   MOV	 END_OF_TRACK, 9
 0AC1  C6 06 0358 R 27		   MOV	 LAST_TRACK, 39 	   ;ASSUME 5.25 DISKETTE
 0AC6				CS_OPTIONS:
 0AC6  80 3E 033B R 01		   CMP	 USER_OPTION_8, ON
 0ACB  75 05			   JNE	 CS_CHK_SIDE
				
 0ACD  C6 06 0359 R 08		   MOV	 END_OF_TRACK, 8
 0AD2				CS_CHK_SIDE:
 0AD2  80 3E 0333 R 01		   CMP	 USER_OPTION, 1
 0AD7  74 AF			   JE	 CS_OPTION_1
				
 0AD9  C7 06 034A R 0001	   MOV	 IOCTL_HEAD, 1		   ;HEAD 1
 0ADF  33 C0			   XOR	 AX, AX
 0AE1  A0 0359 R		   MOV	 AL, END_OF_TRACK	   ;READ MATCHING END_OF_TRACK
								   ; OF THE OTHER SURFACE.
 0AE4  A3 0346 R		   MOV	 IOCTL_SECTOR, AX
 0AE7  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0AEA  72 9C			   JC	 CS_OPTION_1		   ;1 SIDED SOURCE
				
 0AEC  C6 06 035C R 01		   MOV	 NO_OF_SIDES, 1 	   ;2 SIDED SOURCE
 0AF1  80 3E 0342 R 02		   CMP	 T_DRV_HEADS, 2 	   ;SOUCE=2 SIDED MEDIUM. IS TARGET
								   ; DOUBLE SIDED DRV?
 0AF6  74 03			   JE	 CS_SET_TABLE
				
 0AF8  E9 0A2B R		   JMP	 CS_FATAL		   ;NOT COMPATIBLE
				
 0AFB				CS_SET_TABLE:
 0AFB  80 3E 0356 R 01		   CMP	 READ_S_BPB_FAILURE, 1	   ;diskette without BPB info?
 0B00  75 03			   JNE	 CS_SET_TABLE_NEXT
				
 0B02  E8 0EA0 R		   CALL  SET_FOR_THE_OLD	   ;set deviceBPB info for before 2.0 level
				
 0B05				CS_SET_TABLE_NEXT:
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-30
CHECK_SOURCE - DETERMINE FIRST DISKETTE TYPE		       ;      

 0B05  BB 05E1 R		   MOV	 BX, OFFSET MS_trackLayout ;SET TRACKLAYOUT OF SOURCE
 0B08  E8 0EE7 R		   CALL  SET_TRACKLAYOUT
				
 0B0B  C6 06 0371 R 01		   MOV	 S_DRV_SET_FLAG, 1	   ;indicate SOURCE DRIVE
								   ; PARAMETER HAS BEEN SET
 0B10  33 DB			   XOR	 BX, BX
 0B12  8A 1E 032F R		   MOV	 BL, SOURCE_DRIVE
 0B16  BA 05BB R		   MOV	 DX, OFFSET MS_IOCTL_DRV_PARM
 0B19  C6 06 05BB R 04		   MOV	 MS_specialFunctions, SET_SP_FUNC_DEF
 0B1E  E8 0D7D R		   CALL  SET_DRV_PARM_DEF	   ;set device parameter for read
				
 0B21  33 C0			   XOR	 AX, AX
 0B23  A0 0359 R		   MOV	 AL, END_OF_TRACK
 0B26  A3 080A R		   MOV	 numberOfSectors, AX	   ;SET NUMBEROFSECTORS IN IOCTL_R_W TABLE
				
 0B29  A0 0358 R		   MOV	 AL, LAST_TRACK 	   ;NOW, SHOW THE MESSAGE "COMPARING ..."
 0B2C  FE C0			   INC	 AL
 0B2E  A2 0000 E		   MOV	 BYTE PTR MSG_TRACKS,AL    ;HOW MANY TRACKS?				;AC000;
				
 0B31  A0 0359 R		   MOV	 AL, END_OF_TRACK
 0B34  A2 0000 E		   MOV	 BYTE PTR MSG_SECTRK,AL    ;HOW MANY SECTORS?				;AC000;
				
 0B37  A0 035C R		   MOV	 AL, NO_OF_SIDES	   ;TELL USER HOW MANY SIDE TO COPY
 0B3A  FE C0			   INC	 AL
 0B3C  A2 0000 E		   MOV	 BYTE PTR MSG_SIDES,AL	   ;						;AC000;
								   ;CR,LF,"Comparing %1 tracks",CR,LF
								   ;"%2 Sectors/Track, %3 Side(s)",CR,LF
				   PRINT MSGNUM_COMPARING	   ;						;AC000;
 0B3F  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_COMPARING ; 
 0B42  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0B45				CS_EXIT:
 0B45  C3			   RET
				
 0B46				CHECK_SOURCE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <READ_A_SECTOR - USE IOCTL READ TO GET A SECTOR> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-31
READ_A_SECTOR - USE IOCTL READ TO GET A SECTOR		       ;    

				;*****************************************************************************
				   PUBLIC READ_A_SECTOR 	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0B46				READ_A_SECTOR PROC NEAR
				;
				;TRY TO READ A SECTOR USING IOCTL READ FUNCTION CALL.
				;THIS ROUTINE WILL STEAL "IOCTL_R_W" TABLE TEMPORARILY.
				;INPUT: BX - LOGICAL DRIVE NUMBER
				;	IOCTL_SECTOR - SECTOR TO READ
				;	IOCTL_TRACK - TRACK
				;	IOCTL_HEAD - HEAD TO READ
				;	bSECTOR_SIZE - SECTOR SIZE IN BYTES
				;OUTPUT:
				;	IF NOT A SUCCESS, CARRY WILL BE SET
				;	ALL REGISTORS SAVED
				;*****************************************************************************
 0B46  50			   PUSH  AX
 0B47  53			   PUSH  BX
 0B48  51			   PUSH  CX
 0B49  52			   PUSH  DX
				
 0B4A  A1 080A R		   MOV	 AX, numberOfSectors	   ;SAVE IOCTL_R_W TABLE VALUES
 0B4D  A3 034C R		   MOV	 SAV_CSECT, AX
				
				;  $DO
 0B50				$$DO36:
 0B50  A1 034A R		       MOV   AX, IOCTL_HEAD
 0B53  A3 0804 R		       MOV   Head, AX		   ;SURFACE TO READ
 0B56  A1 0348 R		       MOV   AX, IOCTL_TRACK
 0B59  A3 0806 R		       MOV   Cylinder, AX	   ;TRACK TO READ
 0B5C  A1 0346 R		       MOV   AX, IOCTL_SECTOR
 0B5F  48			       dec   ax 		   ;????? currently firstsector=0 =>
								   ; 1st sector ????
 0B60  A3 0808 R		       MOV   FirstSectors, AX	   ;SECTOR TO READ
 0B63  C7 06 080A R 0001	       MOV   numberOfSectors, 1    ;read just one sector
 0B69  B8 0000 E		       MOV   AX, offset INIT	   ;READ IT INTO INIT (CURRELTLY, MAX 1K)
 0B6C  A3 080C R		       MOV   TAddress_off, AX
 0B6F  8C 1E 080E R		       MOV   TAddress_seg, DS
 0B73  B1 61			       MOV   CL, READ_FUNC
 0B75  BA 0803 R		       MOV   DX, OFFSET IOCTL_R_W  ;POINTS TO CONTROL TABLE
 0B78  E8 0F08 R		       call  generic_ioctl
				
 0B7B  80 3E 036F R 01		       CMP   IO_ERROR, SOFT_ERROR  ;TRY ONCE MORE?
				;  $ENDDO NE
 0B80  74 CE			   JE $$DO36
				
 0B82  80 3E 036F R 02		   CMP	 IO_ERROR, HARD_ERROR	   ;HARD ERROR?
				;  $IF	 NE
 0B87  74 03			   JE $$IF38
				
 0B89  F8			       CLC			   ;READ SUCCESS
				;  $ELSE
 0B8A  EB 01			   JMP SHORT $$EN38
 0B8C				$$IF38:
				
 0B8C  F9			       STC			   ;READ FAILURE, SET CARRY
				;  $ENDIF
 0B8D				$$EN38:
 0B8D  A1 034C R		   MOV	 AX, SAV_CSECT		   ;RESTORE ORIGINAL IOCTL_R_W TABLE
 0B90  A3 080A R		   MOV	 numberOfSectors, AX
 0B93  5A			   POP	 DX
 0B94  59			   POP	 CX
 0B95  5B			   POP	 BX
 0B96  58			   POP	 AX
 0B97  C3			   RET
 0B98				READ_A_SECTOR ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <CALC_TRACK_SIZE - FIND MEM SIZE TO HOLD ONE TRACK> ; 		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-32
CALC_TRACK_SIZE - FIND MEM SIZE TO HOLD ONE TRACK		       ; 

				;*****************************************************************************
				;									     *
				   PUBLIC CALC_TRACK_SIZE	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0B98				CALC_TRACK_SIZE PROC NEAR	   ;CALCULATE MEMORY SIZE REQUIRED TO STORE ONE
				;				   TRACK (IN SEGMENTS)			     *
				;CALCULATE SECTOR_SIZE IN PARA FROM bSECTOR_SIZE.  IF bSECTOR_SIZE CANNOT BE
				;CHANGED TO SECTOR_SIZE IN PARA EXACTLY, THEN ADD 1 TO THE SECTOR_SIZE.
				;SECTOR_SIZE IS USED FOR MEMORY MANAGEMANT ONLY.  THE ACTUAL COPY OR FORMAT
				;SHOULD BE DEPENDS ON bSECTOR_SIZE TO FIGURE OUT HOW BIG A SECTOR IS.
				;ALSO, CURRENTLY, THIS ROUTINE ASSUME A BSECTOR SIZE BE LESS THAN 0FFFh.
				;*****************************************************************************
				
 0B98  50			   PUSH  AX
 0B99  53			   PUSH  BX
 0B9A  51			   PUSH  CX
				
 0B9B  A1 035A R		   MOV	 AX, bSECTOR_SIZE
 0B9E  33 D2			   XOR	 DX, DX
 0BA0  33 DB			   XOR	 BX, BX
 0BA2  8A 1E 0359 R		   MOV	 BL, END_OF_TRACK
 0BA6  F7 E3			   MUL	 BX			   ;ASSUME DX=0
 0BA8  A3 0362 R		   MOV	 BYTES_IN_TRACK,AX	   ;BYTES/TRACK ON A SIDE OF THE DISKETTE
				
 0BAB  A1 035A R		   MOV	 AX, bSECTOR_SIZE
 0BAE  B1 10			   MOV	 CL, 16
 0BB0  F6 F1			   DIV	 CL			   ;AX / 16 = AL ... AH
 0BB2  80 FC 00			   CMP	 AH, 0			   ;NO REMAINER?
				;  $IF	 NE
 0BB5  74 02			   JE $$IF41
				
 0BB7  FE C0			       INC   AL 		   ;THERE REMAINER IS.	INC AL
				;  $ENDIF
 0BB9				$$IF41:
 0BB9  A2 0361 R		   MOV	 SECTOR_SIZE, AL	   ;SECTOR_SIZE+ IN PARA.
 0BBC  A0 035C R		   MOV	 AL,NO_OF_SIDES 	   ;TRACK_SIZE = (NO OF SIDES
 0BBF  FE C0			   INC	 AL			   ;		  + 1)
 0BC1  F6 26 0359 R		   MUL	 END_OF_TRACK		   ;		  * END_OF_TRACK
 0BC5  8A 1E 0361 R		   MOV	 BL,SECTOR_SIZE 	   ;		  * SECTPR_SIZE
 0BC9  F6 E3			   MUL	 BL			   ;AMOUNT OF MEMORY REQUIRED (IN SEG)
 0BCB  A3 035F R		   MOV	 TRACK_SIZE,AX		   ;TO STORE A TRACK
				
 0BCE  8B 1E 0335 R		   MOV	 BX,START_BUFFER	   ;SET SECONDARY AT START OF BUFFER SPACE
 0BD2  89 1E 036B R		   MOV	 SEC_BUFFER,BX		   ;SET THE SECONDARY BUFFER SEG ADDR
 0BD6  03 D8			   ADD	 BX,AX			   ;MOVE THE PRIMARY BUFFER BELOW THE
 0BD8  89 1E 0337 R		   MOV	 BUFFER_BEGIN,BX	   ;SECONDARY BUFFER
 0BDC  59			   POP	 CX
 0BDD  5B			   POP	 BX
 0BDE  58			   POP	 AX
				
 0BDF  C3			   RET
				
 0BE0				CALC_TRACK_SIZE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <CHECK_MEMORY_SIZE - BE SURE ENUF ME TO COMPARE 1 TRACK> ;		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-33
CHECK_MEMORY_SIZE - BE SURE ENUF ME TO COMPARE 1 TRACK		    

				;*****************************************************************************
				;									     *
				   PUBLIC CHECK_MEMORY_SIZE	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0BE0				CHECK_MEMORY_SIZE PROC NEAR	   ;MAKE SURE WE HAVE ENOUGH TO COMP 1 TRACK INTO
				;			      TO BUFFER ELSE ABORT COMP 		     *
				;*****************************************************************************
 0BE0  A1 0339 R		   MOV	 AX,BUFFER_END
 0BE3  2B 06 0337 R		   SUB	 AX,BUFFER_BEGIN
 0BE7  3B 06 035F R		   CMP	 AX,TRACK_SIZE
				;  $IF	 B
 0BEB  73 0B			   JNB $$IF43
 0BED  C6 06 0369 R 01		       MOV   COMP_STATUS,FATAL
								   ;"Insufficient memory"
				       PRINT MSGNUM_UNSUF_MEMORY   ;						;AC000;
 0BF2  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_UNSUF_MEMORY ; 
 0BF5  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
				;  $ENDIF
 0BF8				$$IF43:
 0BF8  C3			   RET
				
 0BF9				CHECK_MEMORY_SIZE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <COMP_TARGET - COMPARE MEM DATA WITH SECOND DISKETTE> ;		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-34
COMP_TARGET - COMPARE MEM DATA WITH SECOND DISKETTE		       

				;*****************************************************************************
				;									     *
				   PUBLIC COMP_TARGET		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0BF9				COMP_TARGET PROC NEAR		   ;COMPARE DATA FROM MEMORY TO TARGET DISKETTE
				;									     *
				;*****************************************************************************
				
 0BF9  80 3E 0334 R 01		   CMP	 COPY_TYPE,1		   ;IF SINGLE DRIVE COMP
				;  $IF	 E			   ;PROMPT MSG
 0BFE  75 12			   JNE $$IF45
 0C00  80 3E 0370 R 02		       CMP   MSG_FLAG,SECOND
				;      $IF   E
 0C05  75 05			       JNE $$IF46
 0C07  E8 0925 R			   CALL  DISPLAY_LOAD_SECOND ;"Insert SECOND diskette in drive %1:"	;AN000;
				
				;      $ELSE
 0C0A  EB 03			       JMP SHORT $$EN46
 0C0C				$$IF46:
 0C0C  E8 0913 R			   CALL  DISPLAY_LOAD_FIRST ;"Insert FIRST diskette in drive %1:"	 ;AN000;
				
				;      $ENDIF
 0C0F				$$EN46:
 0C0F  E8 0FB7 R		       CALL  PRESS_ANY_KEY	   ;"Press any key to continue . . ."		;AC009;
				
				;  $ENDIF
 0C12				$$IF45:
 0C12  8B 1E 0337 R		   MOV	 BX,BUFFER_BEGIN
 0C16  89 1E 036D R		   MOV	 COMPARE_PTR,BX 	   ;INITIALIZE BUFFER POINTER
 0C1A  80 3E 035E R 00		   CMP	 TRACK_TO_COMP,0	   ;IF TRK 0, CHECK COMPATIBILITY
				;  $IF	 E
 0C1F  75 0A			   JNE $$IF50
 0C21  E8 0C4C R		       CALL  CHECK_TARGET
				
 0C24  80 3E 0369 R 01		       CMP   COMP_STATUS,FATAL	   ;IF INCOMPATIBLE, THEN EXIT
 0C29  74 20			       JE    CT_EXIT
				
				;  $ENDIF
 0C2B				$$IF50:
				
 0C2B  E8 0E10 R		   CALL  SWAP_DRIVE
				
				;  $DO
 0C2E				$$DO52:
 0C2E  E8 0D83 R		       CALL  COMP_TRACK 	   ;NO, GO READ ANOTHER TRACK
				
 0C31  FE 06 035D R		       INC   TRACK_TO_READ
 0C35  A0 035D R		       MOV   AL,TRACK_TO_READ	   ;DID WE FINISH READING ALL TRACKS?
 0C38  3A 06 0358 R		       CMP   AL,LAST_TRACK
				;  $LEAVE A
 0C3C  77 0D			   JA $$EN52
				
 0C3E  A1 036D R		       MOV   AX,COMPARE_PTR	   ;DID WE RUN OUT OF BUFFER SPACE
 0C41  03 06 035F R		       ADD   AX,TRACK_SIZE
 0C45  3B 06 0339 R		       CMP   AX,BUFFER_END
				;  $ENDDO A
 0C49  76 E3			   JNA $$DO52
 0C4B				$$EN52:
				
 0C4B				CT_EXIT:
 0C4B  C3			   RET
 0C4C				COMP_TARGET ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <CHECK_TARGET - COMPARE SECOND DISK BOOT RECORD> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-35
CHECK_TARGET - COMPARE SECOND DISK BOOT RECORD		       ;    

				;*****************************************************************************
				   PUBLIC CHECK_TARGET		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0C4C				CHECK_TARGET PROC NEAR		   ;					*
				;   ** CHECK_SOURCE PROCEDURE ALREADY CHECKS OUT THE INCOMPATIBILITY BETWEEN *
				;   ** SOURCE MEDIA AND TARGET DRIVE.  (CHECKING SOURCE MEDIA SECTOR/TRACK   *
				;   ** EXCEEDS TARGET DRV SECTOR/TRACK, AND SOURCE MEDIA # OF TRACKS WITH    *
				;   ** THAT OF TARGET DRV.)						     *
				;   ** THIS ROUTINE WILL TRY TO READ TARGET MEDIA BOOT RECORD.		     *
				;   ** IF A SUCCESS,THEN COMPARE BPB INFO WITH THAT OF SOURCE MEDIA.	     *
				;   ** IF THEY ARE DIFFERENT, THEN ERROR - NOT COMPATIBLE		     *
				;   ** IF FAILED TO READ A BOOT, THEN TRY OLD LOGICS BEFORE DOS 3.2 FOR      *
				;   ** COMPATIBILITY REASONS.						     *
				;*****************************************************************************
				;  $DO
 0C4C				$$DO55:
 0C4C  33 DB			       XOR   BX, BX
 0C4E  8A 1E 0330 R		       MOV   BL, TARGET_DRIVE
 0C52  C6 06 06DF R 01		       MOV   MT_specialFunctions, GET_SP_FUNC_MED ;=00000001b
 0C57  B1 60			       MOV   CL, GETDEVPARM
 0C59  BA 06DF R		       MOV   DX, OFFSET MT_IOCTL_DRV_PARM
 0C5C  E8 0F08 R		       CALL  GENERIC_IOCTL	   ;TRY TO GET MEDIA BPB INFO TOGETHER
								   ;WITH THE DEFAULT DEVICE INFO.
 0C5F  80 3E 036F R 01		       CMP   IO_ERROR, SOFT_ERROR  ;TRY AGAIN?
				;  $ENDDO NE
 0C64  74 E6			   JE $$DO55
				
 0C66  80 3E 036F R 02		   CMP	 IO_ERROR, HARD_ERROR	   ;ASSUME OLD DISKTETTE. OR DISKETTE BAD
 0C6B  74 5B			   JE	 CHT_OLD
				
 0C6D  83 3E 06F3 R 00		   cmp	 mt_deviceBPB.csect_track,0 ;patch 1/16/86, J.K.
 0C72  74 54			   je	 cht_old
				
 0C74  83 3E 06F5 R 00		   cmp	 mt_deviceBPB.chead,0	   ;cannot trust the info from DOS.
 0C79  74 4D			   je	 cht_old		   ;sanity check for devide by 0
				
 0C7B  A1 06EE R		   MOV	 AX, MT_deviceBPB.CTOTSECT
 0C7E  99			   CWD				   ;CONVERT IT TO A DOUBLE WORD
 0C7F  F7 36 06F3 R		   DIV	 MT_deviceBPB.CSECT_TRACK
 0C83  F7 36 06F5 R		   DIV	 MT_deviceBPB.CHEAD	   ;(TOTAL SECTORS / # OF TRACKS) / # OF HEADS
 0C87  48			   DEC	 AX			   ;DECREASE BY 1 FOR THIS PROGRAM
 0C88  38 06 0358 R		   CMP	 LAST_TRACK, AL 	   ;COMPARE WITH SOURCE LAST TRACK
 0C8C  75 29			   JNE	 CHT_FATAL_BRIDGE	   ;IF LAST_TRACK IS DIFFERENT,
								   ; THEN INCOMPATIBLE.
				
 0C8E  A1 06F3 R		   MOV	 AX, MT_deviceBPB.CSECT_TRACK
 0C91  A3 033C R		   MOV	 SECT_TRACK_LAYOUT, AX	   ;VARIBLE FOR MT_trackLayout.CSECT_F
 0C94				CHT_GO_ON:
 0C94  38 06 0359 R		   CMP	 END_OF_TRACK, AL
 0C98  77 1D			   JA	 CHT_FATAL_BRIDGE	   ;IF SOURCE END_OF_TRACK > TARGET
								   ; END_OF_TRACK, THEN ERROR
				
								   ;8 SECTORED SOURCE AND 9 SECTORED TARGET
								   ; IS OK AS FAR AS THE COMPATIBILITY GOES.
 0C9A  A1 06E6 R		   MOV	 AX, MT_deviceBPB.CBYTE_SECT
 0C9D  3B 06 035A R		   CMP	 AX, bSECTOR_SIZE	   ;IF SECTOR SIZE ARE DIFFERENT, THEN
								   ; NOT COMPATIBLE
 0CA1  75 14			   JNE	 CHT_FATAL_BRIDGE
				
 0CA3  80 3E 035C R 01		   CMP	 NO_OF_SIDES, 1 	   ;TWO SIDED COPY?
 0CA8  75 0A			   JNE	 CHT_SET_BRIDGE 	   ;NO, ONE SIDED. DON'T
								   ; CARE ABOUT TARGET SIDES.
				
 0CAA  83 3E 06F5 R 02		   CMP	 MT_deviceBPB.CHEAD, 2	   ;TARGET FORMATTED INTO TWO SIDES?
 0CAF  75 06			   JNE	 CHT_FATAL_BRIDGE	   ;NO, NOT COMPATIBLE
				
 0CB1  E9 0D54 R		   JMP	 CHT_SET_DRV		   ;OK. SOURCE, TARGET MEDIA ARE MATCHING. SET
								   ; DRV PARM FOR READING
				
 0CB4				CHT_SET_BRIDGE:
 0CB4  E9 0D54 R		   JMP	 CHT_SET_DRV
				
 0CB7				CHT_FATAL_BRIDGE:
 0CB7  E9 0D4C R		   JMP	 CHT_FATAL
				
 0CBA				CHT_SECOND_BAD:
 0CBA  C6 06 0369 R 01		   MOV	 COMP_STATUS, FATAL
				   PRINT MSGNUM_BAD_SECOND	   ;"SECOND diskette bad or incompatible"	 ;AC000;
 0CBF  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_BAD_SECOND ; 
 0CC2  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0CC5  E9 0D7C R		   JMP	 CHT_EXIT
				
 0CC8				CHT_OLD:			   ;SAME OLD. ;AGAIN, THIS DOES
								   ; NOT RECOGNIZE 3.5 MEDIA
 0CC8  C6 06 0357 R 01		   MOV	 READ_T_BPB_FAILURE, 1	   ;SET THE FLAG.
 0CCD  33 DB			   XOR	 BX, BX
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-36
CHECK_TARGET - COMPARE SECOND DISK BOOT RECORD		       ;    

 0CCF  8A 1E 0330 R		   MOV	 BL, TARGET_DRIVE
 0CD3  C7 06 0348 R 0000	   MOV	 IOCTL_TRACK, 0
 0CD9  C7 06 0346 R 0008	   MOV	 IOCTL_SECTOR, 8
 0CDF  C7 06 034A R 0000	   MOV	 IOCTL_HEAD, 0		   ;TRY TO READ HEAD 0, TRACK 0, SECTOR 8
 0CE5  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0CE8  72 D0			   JC	 CHT_SECOND_BAD 	   ;ASSUME TARGET MEDIA NOT FORMATTED.
				
 0CEA  C7 06 0346 R 0009	   MOV	 IOCTL_SECTOR, 9	   ;TRY TO READ SECTOR 9
 0CF0  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0CF3  72 1A			   JC	 CHT_8_SECTOR		   ;TARGET IS 8 SECTOR MEDIA
				
 0CF5  C7 06 0346 R 000F	   MOV	 IOCTL_SECTOR, 15
 0CFB  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0CFE  72 25			   JC	 CHT_9_SECTOR		   ;TARGET IS 9 SECTOR MEDIA
				
				;CHT_15_SECTOR: 			 ;TARGET IS 15 SECTOR MEDIA
 0D00  C7 06 033C R 000F	   MOV	 SECT_TRACK_LAYOUT, 15
 0D06  80 3E 0359 R 0F		   CMP	 END_OF_TRACK, 15	   ;IS SOUCE ALSO 96 TPI?
 0D0B  75 3F			   JNE	 CHT_FATAL		   ;NO, FATAL ERROR
				
 0D0D  EB 23			   JMP	 SHORT CHT_CHK_SIDE	   ;YES, OK.
				
 0D0F				CHT_8_SECTOR:
 0D0F  C7 06 033C R 0008	   MOV	 SECT_TRACK_LAYOUT, 8
 0D15  80 3E 0359 R 0F		   CMP	 END_OF_TRACK, 15
 0D1A  74 30			   JE	 CHT_FATAL		   ;IF SOURCE IS 96 TPI, THEN FATAL ERROR
				
 0D1C  80 3E 0359 R 09		   CMP	 END_OF_TRACK, 9
 0D21  74 29			   JE	 CHT_FATAL		   ;IF SOURCE IS 9 SECTOR, THEN
								   ; SHOULD FORMAT TARGET
				
 0D23  EB 0D			   JMP	 SHORT CHT_CHK_SIDE	   ;ELSE ASSUME SOURCE IS 8 SECTOR.
				
 0D25				CHT_9_SECTOR:
 0D25  C7 06 033C R 0009	   MOV	 SECT_TRACK_LAYOUT, 9
 0D2B  80 3E 0359 R 0F		   CMP	 END_OF_TRACK, 15	   ;IS SOURCE 96 TPI? THEN ERROR
 0D30  74 1A			   JE	 CHT_FATAL		   ;ELSE SOUCE IS 8 OR 9 SECTORED
								   ; 48 TPI DISKETTE
				
 0D32				CHT_CHK_SIDE:			   ;CHECK THE TARGET DISKETTE # OF SIDES
 0D32  80 3E 035C R 00		   CMP	 NO_OF_SIDES, 0 	   ;1 SIDE COMP?
 0D37  74 18			   JE	 CHT_EXIT_OLD		   ;
				
 0D39  C7 06 034A R 0001	   MOV	 IOCTL_HEAD, 1		   ;ELSE TWO SIDE COMP
 0D3F  33 C0			   XOR	 AX, AX
 0D41  A0 0359 R		   MOV	 AL, END_OF_TRACK	   ;TRY TO READ MATCHING TARGET SECTOR
 0D44  A3 0346 R		   MOV	 IOCTL_SECTOR, AX	   ;OF THE OTHERSIDE
 0D47  E8 0B46 R		   CALL  READ_A_SECTOR
				
 0D4A  73 05			   JNC	 CHT_EXIT_OLD		   ;SUCCESS? OK
				
 0D4C				CHT_FATAL:
 0D4C  E8 0FAB R		   CALL  COMPAT_ERROR
				
 0D4F  EB 2B			   JMP	 SHORT	 CHT_EXIT
				
 0D51				CHT_EXIT_OLD:
 0D51  E8 0EA0 R		   CALL  SET_FOR_THE_OLD	   ;SET MT_deviceBPB INFO.
				
 0D54				CHT_SET_DRV:
 0D54  BB 0705 R		   MOV	 BX, OFFSET MT_trackLayout ;SET TARGET TRACK LAYOUT
 0D57  E8 0EE7 R		   CALL  SET_TRACKLAYOUT
				
 0D5A  72 F0			   JC	 CHT_FATAL		   ;IF FAILED, THEN, NOT COMPATIBLE
				
 0D5C  C6 06 0372 R 01		   MOV	 T_DRV_SET_FLAG, 1	   ;INDICATES THE TARGET DEFAULT
								   ; DEVICE PARM HAS BEEN SET
 0D61  33 DB			   XOR	 BX, BX
 0D63  8A 1E 0358 R		   mov	 bl, last_track 	   ;To make sure the number of
								   ; cyl. of target. 3/27/86,J.K.
 0D67  FE C3			   inc	 bl
 0D69  89 1E 06E3 R		   mov	 MT_numberOfCylinders, bx
 0D6D  8A 1E 0330 R		   MOV	 BL, TARGET_DRIVE
 0D71  BA 06DF R		   MOV	 DX, OFFSET MT_IOCTL_DRV_PARM
 0D74  C6 06 06DF R 04		   MOV	 MT_specialFunctions, SET_SP_FUNC_DEF
 0D79  E8 0D7D R		   CALL  SET_DRV_PARM_DEF
				
 0D7C				CHT_EXIT:
 0D7C  C3			   RET
				
 0D7D				CHECK_TARGET ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SET_DRV_PARM - REQUEST IOCTL TO SET DEVICE PARM> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-37
SET_DRV_PARM - REQUEST IOCTL TO SET DEVICE PARM		       ;   

				;*****************************************************************************
				   PUBLIC SET_DRV_PARM_DEF	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0D7D				SET_DRV_PARM_DEF PROC NEAR
				;INPUT: BL - DRIVE NUMBER
				;	DX - POINTER TO THE PARAMETER TABLE
				;	specialFunction should be set before this call
				;*****************************************************************************
				
 0D7D  B1 40			   MOV	 CL, SETDEVPARM 	   ;=40H
 0D7F  E8 0F08 R		   CALL  GENERIC_IOCTL
				
 0D82  C3			   RET
				
 0D83				SET_DRV_PARM_DEF ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <COMP_TRACK - READ AND COMPARE SPECIFIED TRACK> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-38
COMP_TRACK - READ AND COMPARE SPECIFIED TRACK		       ;     

				;*****************************************************************************
				;									     *
				   PUBLIC COMP_TRACK		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0D83				COMP_TRACK PROC NEAR		   ;COMPARE TRACK SPECIFIED IN TRACK_TO_COMP
				;									     *
				;*****************************************************************************
 0D83  A1 036B R		   MOV	 AX,SEC_BUFFER		   ;READ IN THE TRACK TO BE COMPARED
 0D86  A3 0364 R		   MOV	 BUFFER_PTR,AX		   ;INTO THE SECONDARY BUFFER
 0D89  E8 0E25 R		   CALL  READ_TRACK
				
 0D8C  C6 06 0367 R 00		   MOV	 SIDE,0 		   ;START ON SIDE ZERO
 0D91  8B 0E 0362 R		   MOV	 CX,BYTES_IN_TRACK	   ;GET NUMBER TO COMPARE
 0D95  1E			   PUSH  DS
 0D96  06			   PUSH  ES
 0D97  8E 06 036D R		   MOV	 ES,COMPARE_PTR 	   ;SET DESTINATION SEG ADDR
 0D9B  8E 1E 036B R		   MOV	 DS,SEC_BUFFER		   ;SET SOURCE SEG ADDR
				
				   ASSUME ES:NOTHING
				   ASSUME DS:NOTHING
				
 0D9F  33 FF			   XOR	 DI,DI			   ;SET TO START OF TRACK
 0DA1  33 F6			   XOR	 SI,SI
 0DA3  36: 80 3E 0344 R 00	   CMP	 FIRST_TIME,ZERO	   ;IF THIS IS THE FIRST SECTOR TO BE COMPARED	;AN000;
				;  $IF	 E			   ;						;AN000;
 0DA9  75 09			   JNE $$IF57
 0DAB  E8 0FFA R		       CALL  VOLSER		   ;SPECIAL HANDLING FOR VOL SER #		;AN000;
				
 0DAE  36: C6 06 0344 R 01	       MOV   FIRST_TIME,ONE	   ;FLAG FIRST TIME AS "DONE"			;AN000;
				;  $ENDIF			   ;						;AN000;
 0DB4				$$IF57:
 0DB4  E8 0E08 R		   CALL  DO_COMPARE		   ;COMPARE STRING				;AN000;
				
 0DB7  07			   POP	 ES
 0DB8  1F			   POP	 DS
				
				   ASSUME ES:CSEG
				   ASSUME DS:CSEG
				
				;  $IF	 NZ
 0DB9  74 0E			   JZ $$IF59
 0DBB  50			       PUSH  AX 		   ;SAVE AX SINCE ERROR_MESSAGE WILL DESTROY IT
 0DBC  C6 06 0368 R 59		       MOV   OPERATION,COMPARE_FUNC
 0DC1  E8 0F73 R		       CALL  ERROR_MESSAGE
				
 0DC4  FE 06 0366 R		       INC   COMP_ERROR
 0DC8  58			       POP   AX
				;  $ENDIF
 0DC9				$$IF59:
 0DC9  80 3E 035C R 01		   CMP	 NO_OF_SIDES,1		   ;TWO SIDED COMPARE?
				;  $IF	 E			   ;YES
 0DCE  75 30			   JNE $$IF61
 0DD0  C6 06 0367 R 01		       MOV   SIDE,1		   ;MARK IT AS SUCH
 0DD5  8B 36 0362 R		       MOV   SI,BYTES_IN_TRACK	   ;BUMP UP BUFFER POINTERS
 0DD9  8B 3E 0362 R		       MOV   DI,BYTES_IN_TRACK	   ;TO START OF SECOND SIDE
 0DDD  8B 0E 0362 R		       MOV   CX,BYTES_IN_TRACK	   ;GET NUMBER TO COMPARE
 0DE1  1E			       PUSH  DS
 0DE2  06			       PUSH  ES
 0DE3  8E 06 036D R		       MOV   ES,COMPARE_PTR	   ;SET DESTINATION SEG ADDR
 0DE7  8E 1E 036B R		       MOV   DS,SEC_BUFFER	   ;SET SOURCE SEG ADDR
 0DEB  E8 0E08 R		       CALL  DO_COMPARE 	   ;COMPARE STRING				;AN000;
				
 0DEE  07			       POP   ES
 0DEF  1F			       POP   DS
				;      $IF   NZ
 0DF0  74 0E			       JZ $$IF62
 0DF2  50				   PUSH  AX		   ;SAVE AX SINCE ERROR_MESSAGE WILL DESTROY IT
 0DF3  C6 06 0368 R 59			   MOV	 OPERATION,COMPARE_FUNC
 0DF8  E8 0F73 R			   CALL  ERROR_MESSAGE
				
 0DFB  FE 06 0366 R			   INC	 COMP_ERROR
 0DFF  58				   POP	 AX
				;      $ENDIF
 0E00				$$IF62:
				;  $ENDIF
 0E00				$$IF61:
 0E00  A1 035F R		   MOV	 AX,TRACK_SIZE		   ;ADVANCE COMPARE POINTER
 0E03  01 06 036D R		   ADD	 COMPARE_PTR,AX
 0E07  C3			   RET
 0E08				COMP_TRACK ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <DO_COMPARE - PERFORM THE COMPARISON> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-39
DO_COMPARE - PERFORM THE COMPARISON		       ;               

 0E08				DO_COMPARE PROC NEAR		   ;						;AN000;
				   PUBLIC DO_COMPARE		   ;ADD ENTRY TO LINK MAP			;AN000;
				;INPUT: DS:[SI] POINTS TO ONE BUFFER, ES:[DI] POINTS TO THE OTHER
				;	CX HAS THE BYTE COUNT
				;OUTPUT:CONDITION CODE IN CONDITION FLAGS REFLECT RESULT OF COMPARISON
				;  =  =  =  =  =  =  =	=  =  =  =  =
 0E08  D1 E9			   SHR	 CX,1			   ;DIVIDE BY TWO, CHANGE TO WORD COUNT 	;AN000;
				
				   PUBLIC PATCH_386		   ;SO INIT CAN DO FIXUP			;AN001;
 0E0A				PATCH_386 LABEL BYTE
 0E0A  D1 E9			   SHR	 CX,1			   ;CONVERT WORD COUNT TO DWORD COUNT		;AN001;
 0E0C  66			   DB	 66H			   ;PREFIX FOR A DWORD COMPARE			;AN001;
				; END OF PATCH AREA.  IF THIS IS NOT A 386, THE ABOVE 3 BYTES ARE CHANGED
				; TO NOP BY DISKINIT.SAL DURING INITIALIZATION.
				
 0E0D  F3/ A7			   REPE  CMPSW			   ;PERFORM THE COMPARISON			;AN000;
				
 0E0F  C3			   RET				   ;RETURN TO CALLER				;AN000;
 0E10				DO_COMPARE ENDP 		   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SWAP_DRIVE - SETUP FOR DISKETTE SWAPPING> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-40
SWAP_DRIVE - SETUP FOR DISKETTE SWAPPING		       ;          

				;*****************************************************************************
				   PUBLIC SWAP_DRIVE		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0E10				SWAP_DRIVE PROC NEAR		   ;SWAP SOURCE, TARGET DRIVE
				;*****************************************************************************
 0E10  A0 032F R		   MOV	 AL,SOURCE_DRIVE
 0E13  86 06 0330 R		   XCHG  AL,TARGET_DRIVE
 0E17  A2 032F R		   MOV	 SOURCE_DRIVE,AL
 0E1A  A0 035E R		   MOV	 AL,TRACK_TO_COMP
 0E1D  86 06 035D R		   XCHG  AL,TRACK_TO_READ
 0E21  A2 035E R		   MOV	 TRACK_TO_COMP,AL
 0E24  C3			   RET
				
 0E25				SWAP_DRIVE ENDP
				   HEADER <READ_TRACK - READ A TRACK TO MEMORY> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-41
READ_TRACK - READ A TRACK TO MEMORY		       ;               

				;*****************************************************************************
				;									     *
				   PUBLIC READ_TRACK		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0E25				READ_TRACK PROC NEAR		   ;READ A TRACK AND STORE IT INTO MEMORY
				;									     *
				;*****************************************************************************
				
 0E25  C6 06 0367 R 00		   MOV	 SIDE, 0
				;  $DO
 0E2A				$$DO65:
 0E2A  E8 0E55 R		       CALL  READ_OP
				
 0E2D  80 3E 035C R 00		       CMP   NO_OF_SIDES, 0	   ;SINGLE SIDE COPY?
				;      $IF   E			   ;YES
 0E32  75 05			       JNE $$IF66
 0E34  A1 035F R			   MOV	 AX, TRACK_SIZE
				;      $ELSE			   ;NO, DOUBLE SIDE
 0E37  EB 0A			       JMP SHORT $$EN66
 0E39				$$IF66:
 0E39  33 D2				   XOR	 DX, DX
 0E3B  A1 035F R			   MOV	 AX, TRACK_SIZE
 0E3E  B9 0002				   MOV	 CX, 2
 0E41  F7 F1				   DIV	 CX		   ;AX / 2
				;      $ENDIF
 0E43				$$EN66:
 0E43  01 06 0364 R		       ADD   BUFFER_PTR, AX
 0E47  FE 06 0367 R		       INC   SIDE		   ;NEXT SIDE
 0E4B  A0 0367 R		       MOV   AL, SIDE
 0E4E  3A 06 035C R		       CMP   AL, NO_OF_SIDES	   ;FINISHED WITH THE LAST SIDE?
				;  $ENDDO G
 0E52  7E D6			   JNG $$DO65
 0E54  C3			   RET
				
 0E55				READ_TRACK ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <READ_OP - IOCTL TO READ A TRACK> ;					;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-42
READ_OP - IOCTL TO READ A TRACK		       ;                   

				;*****************************************************************************
				;									     *
				   PUBLIC READ_OP		   ;MAKE ENTRY IN LINK MAP			;AN000;
 0E55				READ_OP PROC NEAR		   ;IOCTL READ A TRACK OPERATION
				;									     *
				;*****************************************************************************
				;  $SEARCH
 0E55				$$DO70:
 0E55				RO_AGAIN:
 0E55  33 C0			       XOR   AX, AX
 0E57  A0 0367 R		       MOV   AL, SIDE
 0E5A  A3 0804 R		       MOV   Head, AX		   ;HEAD TO READ
 0E5D  A0 035D R		       MOV   AL, TRACK_TO_READ
 0E60  A3 0806 R		       MOV   Cylinder, AX	   ;TRACK TO READ
 0E63  C7 06 0808 R 0000	       MOV   FirstSectors, 0	   ;???? SHOULD BE 1 BUT CURRENTLY 0 ???
 0E69  A1 0364 R		       MOV   AX, BUFFER_PTR
 0E6C  A3 080E R		       MOV   Taddress_seg, AX	   ;BUFFER ADDRESS
 0E6F  C7 06 080C R 0000	       MOV   Taddress_off, 0
 0E75  33 DB			       XOR   BX, BX
 0E77  8A 1E 032F R		       MOV   BL, SOURCE_DRIVE
 0E7B  B1 61			       MOV   CL, READ_FUNC	   ;=61h
 0E7D  BA 0803 R		       MOV   DX, OFFSET IOCTL_R_W
 0E80  E8 0F08 R		       CALL  GENERIC_IOCTL
				
 0E83  80 3E 036F R 00		       CMP   IO_ERROR, NO_ERROR    ;OK?
				;  $EXITIF E,NUL
 0E88  74 15			   JE $$SR70
				
 0E8A  80 3E 036F R 01		       CMP   IO_ERROR, SOFT_ERROR  ;TRY AGAIN?
				;  $ENDLOOP NE
 0E8F  74 C4			   JE $$DO70
				
 0E91  C6 06 0368 R 61		       MOV   OPERATION, READ_FUNC
 0E96  50			       PUSH  AX
 0E97  E8 0F73 R		       CALL  ERROR_MESSAGE
				
 0E9A  58			       POP   AX
 0E9B  FE 06 0366 R		       INC   COMP_ERROR 	   ;INCREASE COPY_ERROR COUNT
				;  $ENDSRCH
 0E9F				$$SR70:
 0E9F  C3			   RET
 0EA0				READ_OP ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SET_FOR_THE_OLD - USE PRE 2.0 BPB> ; 				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-43
SET_FOR_THE_OLD - USE PRE 2.0 BPB		       ;                 

				;*****************************************************************************
				   PUBLIC SET_FOR_THE_OLD	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0EA0				SET_FOR_THE_OLD PROC NEAR
				;set MS_deviceBPB or MT_deviceBPB for before-2.0 formatted media.
				;*****************************************************************************
 0EA0  50			   PUSH  AX
				
 0EA1  83 3E 033C R 09		   CMP	 SECT_TRACK_LAYOUT,9	   ;IF SECTORS/TRACK <= 9, THEN CHECK
								   ;NO_OF_SIDES. IF SINGLE SIDE COPY
								   ; THEN USE BPB48_SINGLE
								   ;ELSE USE BPB48_DOUBLE.
				;  $IF	 A			   ;SECTORS/TRACK > 9 THEN USE BPB96 TABLE
 0EA6  76 05			   JNA $$IF74
 0EA8  BE 031E R		       MOV   SI, OFFSET BPB96
				;  $ELSE
 0EAB  EB 0F			   JMP SHORT $$EN74
 0EAD				$$IF74:
 0EAD  80 3E 035C R 00		       CMP   NO_OF_SIDES, 0	   ;SINGLE SIDE COPY?
				;      $IF   NE
 0EB2  74 05			       JE $$IF76
 0EB4  BE 0311 R			   MOV	 SI, OFFSET BPB48_DOUBLE ;ELSE USE BPB48 DOUBLE
				;      $ELSE
 0EB7  EB 03			       JMP SHORT $$EN76
 0EB9				$$IF76:
 0EB9  BE 0304 R			   MOV	 SI, OFFSET BPB48_SINGLE
				;      $ENDIF
 0EBC				$$EN76:
				;  $ENDIF
 0EBC				$$EN74:
 0EBC  A1 033C R		   MOV	 AX, SECT_TRACK_LAYOUT
 0EBF  80 3E 0356 R 01		   CMP	 READ_S_BPB_FAILURE, 1	   ;FAILURE ON THE SOURCE?
				;  $IF	 E
 0EC4  75 0D			   JNE $$IF80
 0EC6  A3 05CF R		       MOV   MS_deviceBPB.CSECT_TRACK,AX ;SET # OF SECTORS IN IOCTL_DRV_PARM
 0EC9  BF 05C2 R		       MOV   DI, OFFSET MS_deviceBPB
 0ECC  B9 000D			       MOV   CX, BPB96_LENG
 0ECF  F3/ A4			       REP   MOVSB		   ;OLD DEFAULT BPB INFO => MS_deviceBPB
				;  $ELSE
 0ED1  EB 12			   JMP SHORT $$EN80
 0ED3				$$IF80:
 0ED3  80 3E 0357 R 01		       CMP   READ_T_BPB_FAILURE, 1 ;FAILURE ON THE TARGET?
				;      $IF   E
 0ED8  75 0B			       JNE $$IF82
 0EDA  A3 06F3 R			   MOV	 MT_deviceBPB.CSECT_TRACK,AX
 0EDD  BF 06E6 R			   MOV	 DI, OFFSET MT_deviceBPB
 0EE0  B9 000D				   MOV	 CX, BPB96_LENG
 0EE3  F3/ A4				   REP	 MOVSB		   ;OLD DEFAULT BPB INTO => MT_deviceBPB
				;      $ENDIF
 0EE5				$$IF82:
				;  $ENDIF
 0EE5				$$EN80:
 0EE5  58			   POP	 AX
 0EE6  C3			   RET
 0EE7				SET_FOR_THE_OLD ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SET_TRACKLAYOUT - DETERMINE SECTORS PER TRACK> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-44
SET_TRACKLAYOUT - DETERMINE SECTORS PER TRACK		       ;     

				;*****************************************************************************
				   PUBLIC SET_TRACKLAYOUT	   ;MAKE ENTRY IN LINK MAP			;AN000;
 0EE7				SET_TRACKLAYOUT PROC NEAR
				;INPUT: BX - POINTER TO DESTINATION
				;	SECT_TRACK_LAYOUT
				;*****************************************************************************
 0EE7  8B 0E 033C R		   MOV	 CX, SECT_TRACK_LAYOUT	   ;MEDIA SECTORS/TRACK
 0EEB  89 0F			   MOV	 WORD PTR [BX], CX	   ;SET CSECT_F TO THE NUMBER OF SECTORS
								   ; IN A TRACK
 0EED  83 C3 02			   ADD	 BX, 2			   ;NOW BX POINTS TO THE FIRST SECTORNUMBER
 0EF0  B9 0001			   MOV	 CX, 1
 0EF3  A1 035A R		   MOV	 AX, bSECTOR_SIZE
				
				;  $DO
 0EF6				$$DO85:
 0EF6  3B 0E 033C R		       CMP   CX, SECT_TRACK_LAYOUT
				;  $LEAVE A
 0EFA  77 0B			   JA $$EN85
				
 0EFC  89 0F			       MOV   WORD PTR [BX], CX
 0EFE  43			       INC   BX
 0EFF  43			       INC   BX
 0F00  89 07			       MOV   WORD PTR [BX], AX
 0F02  43			       INC   BX
 0F03  43			       INC   BX
				
 0F04  41			       INC   CX
				;  $ENDDO
 0F05  EB EF			   JMP SHORT $$DO85
 0F07				$$EN85:
				
 0F07  C3			   RET
 0F08				SET_TRACKLAYOUT ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <GENERIC_IOCTL - PERFORM SPECIFIED IOCTL FUNCTION> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-45
GENERIC_IOCTL - PERFORM SPECIFIED IOCTL FUNCTION		       ;  

				PUBLIC GENERIC_IOCTL
				;******************************************************************************
 0F08				GENERIC_IOCTL PROC NEAR
				;INPUT: CL - MINOR CODE; 60 - GET DEVICE PARM, 40 - SET DEVICE PARM
				;			 61 - READ TRACK, 41 - WRITE TRACK,
				;			 42 - FORMAT AND VERIFY TRACK
				;			 62 - VERIFY TRACK
				;	BL - LOGICAL DRIVE LETTER
				;	DS:DX - POINTER TO PARAMETERS
				;******************************************************************************
				
 0F08  C6 06 036F R 00		   MOV	 IO_ERROR, NO_ERROR	   ;reset io_error
 0F0D  B4 44			   MOV	 AH, IOCTL_FUNC 	   ;IOCTL FUNC = 44H
 0F0F  B0 0D			   MOV	 AL, GENERIC_IOCTL_CODE    ;GENERIC IOCTL REQUEST = 0DH
 0F11  B5 08			   MOV	 CH, MAJOR_CODE 	   ;MAJOR CODE=08H, REMOVABLE
 0F13  CD 21			   INT	 21H
				;  $IF	 C
 0F15  73 03			   JNC $$IF88
 0F17  E8 0F1B R		       CALL  EXTENDED_ERROR_HANDLER ;ERROR, SEE WHAT IT IS!
				
				;  $ENDIF
 0F1A				$$IF88:
 0F1A  C3			   RET
 0F1B				GENERIC_IOCTL ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <EXTENDED_ERROR - DETERMINE AND SERVICE EXTENDED ERRORS> ;		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-46
EXTENDED_ERROR - DETERMINE AND SERVICE EXTENDED ERRORS		    

				;******************************************************************************
				   PUBLIC EXTENDED_ERROR_HANDLER   ;MAKE ENTRY IN LINK MAP			;AN000;
 0F1B				EXTENDED_ERROR_HANDLER PROC NEAR
				;INPUT: BL - LOGICAL DRIVE LETTER
				;******************************************************************************
 0F1B  9C			   PUSHF
 0F1C  50			   PUSH  AX
 0F1D  53			   PUSH  BX
 0F1E  51			   PUSH  CX
 0F1F  52			   PUSH  DX
 0F20  56			   PUSH  SI
 0F21  57			   PUSH  DI
 0F22  06			   PUSH  ES
 0F23  1E			   PUSH  DS
 0F24  53			   PUSH  BX
				
 0F25  B4 59			   MOV	 AH, 59H
 0F27  BB 0000			   MOV	 BX, 0
 0F2A  CD 21			   INT	 21H
				
				;	 CMP	 BL, 5			 ;ACTION=IMMEDIATE EXIT?
				;	 JE	 EEH_JUST_EXIT
				
 0F2C  5B			   POP	 BX			   ;RESTORE BL FOR DRIVE LETTER
 0F2D  1F			   POP	 DS
 0F2E  07			   POP	 ES
				
 0F2F  3D 0015			   CMP	 AX, 21 		   ;DRIVE NOT READY?
 0F32  74 08			   JE	 WARN_USER_1
				
 0F34  3D 0013			   CMP	 AX, 19 		   ;ATTEMP TO WRITE ON WRITE_PROTECTED?
 0F37  74 1D			   JE	 WARN_USER_2
				
 0F39  EB 2B 90			   JMP	 EEH_HARD_ERROR 	   ;OTHERWISE, HARD_ERROR
				
 0F3C				WARN_USER_1:
 0F3C  C6 06 0000 E 41		   MOV	 DRIVE_LETTER, 'A'
 0F41  FE CB			   DEC	 BL			   ;CHANGE LOGICAL TO PHYSICAL
 0F43  00 1E 0000 E		   ADD	 DRIVE_LETTER, BL
								   ;"Drive not ready - X:"
				   PRINT MSGNUM_GET_READY	   ;						;AC000;
 0F47  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_GET_READY ; 
 0F4A  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
				   PRINT MSGNUM_CLOSE_DOOR	   ;"Make sure a diskette is inserted into      ;AN004;
 0F4D  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_CLOSE_DOOR ; 
 0F50  E8 0FC4 R             1					   CALL    SENDMSG ; 
								   ; the drive and the door is closed"
 0F53  EB 07 90			   JMP	 WAIT_FOR_USER
				
 0F56				WARN_USER_2:
								   ;"Attempt to write to write-protected diskette"
				   PRINT MSGNUM_WRITE_PROTECT	   ;						;AC000;
 0F56  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_WRITE_PROTECT ; 
 0F59  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0F5C				WAIT_FOR_USER:
 0F5C  E8 0FB7 R		   CALL  PRESS_ANY_KEY		   ;"Press any key to continue . . ."		;AC009;
				
 0F5F				EEH_SOFT_ERROR:
 0F5F  C6 06 036F R 01		   MOV	 IO_ERROR, SOFT_ERROR	   ;INDICATE THE CALLER TO TRY AGAIN
 0F64  EB 05			   JMP	 SHORT EEH_EXIT
				
 0F66				EEH_HARD_ERROR:
 0F66  C6 06 036F R 02		   MOV	 IO_ERROR, HARD_ERROR
				
 0F6B				EEH_EXIT:
 0F6B  5F			   POP	 DI
 0F6C  5E			   POP	 SI
 0F6D  5A			   POP	 DX
 0F6E  59			   POP	 CX
 0F6F  5B			   POP	 BX
 0F70  58			   POP	 AX
 0F71  9D			   POPF
 0F72  C3			   RET
				
				;EEH_JUST_EXIT:
				;   JMP   EXIT_PROGRAM		    ;UNCONDITIONAL EXIT
				
 0F73				EXTENDED_ERROR_HANDLER ENDP
				.LIST
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <ERROR_MESSAGE - DISPLAY THE ERROR MESSAGE> ; 			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-47
ERROR_MESSAGE - DISPLAY THE ERROR MESSAGE		       ;         

 0F73				ERROR_MESSAGE PROC NEAR 	   ;DISPLAY ERROR MESSAGE
				   PUBLIC ERROR_MESSAGE
				;
				;  FUNCTION: THIS SUBROUTINE DISPLAYS WHAT OPERATION FAILED (READ OR WRITE)
				;	     AND WHERE IT FAILED (TRACK NO. AND SIDE).
				;
				;  INPUT: OPERATION = IOCTL DISKETTE READ(=61H) OR COMPARE_FUNC(59H)
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0F73  80 3E 0368 R 61		   CMP	 OPERATION,READ_FUNC	   ;ERROR DURING READ ?
				;  $IF	 E
 0F78  75 1C			   JNE $$IF90
				.LIST
 0F7A  8A 16 032F R		       MOV   DL,SOURCE_DRIVE	   ;WHICH DRIVE IS BAD
 0F7E  FE CA			       dec   dl 		   ;change logical letter to phisical
 0F80  80 C2 41			       ADD   DL,"A"		   ;CORRESPONDANT ALPHABET
 0F83  88 16 0000 E		       MOV   DRIVE_LETTER,DL
 0F87  C7 06 0002 E 0000 E	       MOV   SUBLIST_17B.SUB_VALUE,OFFSET DRIVE_LETTER ;
				
 0F8D  8A 1E 035D R		       MOV   BL,TRACK_TO_READ	   ;SAVE BAD TRACK NUMBER FOR READ
								   ;CR,LF,"Unrecoverable read error on drive %2",CR,LF
								   ;"side %3, track %4",CR,LF
								   ;%2 IS "DRIVE_LETTER", AND
								   ;"MSG_SIDES" AND "MSG_TRACKS" ARE %3 AND %4.
 0F91  BF 0000 E		       MOV   DI,OFFSET MSGNUM_HARD_ERROR_READ ; 				;AN000;
				;  $ELSE
 0F94  EB 07			   JMP SHORT $$EN90
 0F96				$$IF90:
				.LIST
 0F96  8A 1E 035D R		       MOV   BL,TRACK_TO_READ	   ;SAVE BAD TRACK NUMBER FOR WRITE
								   ;CR,LF,"Compare error on",CR,LF
								   ;"side %3, track %4",CR,LF
								   ;"MSG_SIDES" AND "MSG_TRACKS" ARE %3 AND %4.
 0F9A  BF 0000 E		       MOV   DI,OFFSET MSGNUM_HARD_ERROR_COMP ; 				;AN000;
				;  $ENDIF
 0F9D				$$EN90:
				
 0F9D  A0 0367 R		   MOV	 AL,SIDE
 0FA0  A2 0000 E		   MOV	 BYTE PTR MSG_SIDES,AL
 0FA3  88 1E 0000 E		   MOV	 BYTE PTR MSG_TRACKS,BL
 0FA7  E8 0FC4 R		   CALL  SENDMSG		   ;PRINT MSG SELECTED ABOVE			;AN000;
				
 0FAA  C3			   RET
 0FAB				ERROR_MESSAGE ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <COMBAT_ERROR - DISPLAY INCOMPATIBLE MSG> ;				;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-48
COMBAT_ERROR - DISPLAY INCOMPATIBLE MSG		       ;           

 0FAB				COMPAT_ERROR PROC NEAR		   ;DISPLAY COMPAT MSG
				   PUBLIC COMPAT_ERROR
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0FAB  C6 06 0369 R 01		   MOV	 COMP_STATUS,FATAL	   ;INCOMPATIBLE, ABORT
								   ;"Drive types or diskette types"
								   ;"not compatible"
				   PRINT MSGNUM_NOT_COMPATIBLE
 0FB0  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_NOT_COMPATIBLE ; 
 0FB3  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0FB6  C3			   RET
 0FB7				COMPAT_ERROR ENDP
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <PRESS_ANY_KEY - PUTS A BLANK LINE BEFORE PROMPT> ;			  ;AN009;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-49
PRESS_ANY_KEY - PUTS A BLANK LINE BEFORE PROMPT		       ;   

 0FB7				PRESS_ANY_KEY PROC NEAR 	   ;
				;THE CANNED MESSAGE "PRESS ANY KEY..." DOES NOT START WITH CR,LF.
				;THIS PUTS OUT THE CR LF TO CAUSE SEPARATION OF THIS PROMP FROM
				;PRECEEDING MESSAGES.
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   PRINT MSGNUM_NEWLINE 	   ;SKIP A SPACE			       ;AN009;
 0FB7  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_NEWLINE ; 
 0FBA  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
				   PRINT MSGNUM_STRIKE		   ;"Press any key when ready..."	       ;AN009;
 0FBD  BF 0000 E             1					   MOV	   DI,OFFSET MSGNUM_STRIKE ; 
 0FC0  E8 0FC4 R             1					   CALL    SENDMSG ; 
				
 0FC3  C3			   RET				   ;RETURN TO CALLER			       ;AN009;
 0FC4				PRESS_ANY_KEY ENDP		   ;					       ;AN009;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <SENDMSG - PASS IN REGS DATA FROM MSG DESCRIPTOR TO DISP MSG> ;	;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-50
SENDMSG - PASS IN REGS DATA FROM MSG DESCRIPTOR TO DISP MSG	

 0FC4				SENDMSG PROC NEAR		   ;						;AN000;
				   PUBLIC SENDMSG		   ;						;AN000;
				; INPUT - DI=POINTER TO MSG_DESC STRUC FOR THIS MESSAGE
				; OUTPUT - IF CARRY SET, EXTENDED ERROR MSG ATTEMPTED DISPLAYED
				;	   IF CARRY CLEAR, ALL OK
				;	   IN EITHER CASE, DI AND AX ALTERED, OTHERS OK
				
				;  =  =  =  =  =  =  =	=  =  =  =  =
				
 0FC4  53			   PUSH  BX			   ; SAVE CALLER'S REGS                         ;AN000;
 0FC5  51			   PUSH  CX			   ;						;AN000;
 0FC6  52			   PUSH  DX			   ;						;AN000;
 0FC7  56			   PUSH  SI			   ;						;AN000;
				
				;		 PASS PARMS TO MESSAGE HANDLER IN
				;		 THE APPROPRIATE REGISTERS IT NEEDS.
 0FC8  8B 05			   MOV	 AX,[DI].MSG_NUM	   ;MESSAGE NUMBER				;AN000;
 0FCA  8B 5D 02			   MOV	 BX,[DI].MSG_HANDLE	   ;HANDLE TO DISPLAY TO			;AN000;
 0FCD  8B 75 04			   MOV	 SI,[DI].MSG_SUBLIST	   ;OFFSET IN ES: OF SUBLIST, OR 0 IF NONE	;AN000;
 0FD0  8B 4D 06			   MOV	 CX,[DI].MSG_COUNT	   ;NUMBER OF %PARMS, 0 IF NONE 		;AN000;
 0FD3  8B 55 08			   MOV	 DX,[DI].MSG_CLASS	   ;CLASS IN HIGH BYTE, INPUT FUNCTION IN LOW	;AN000;
 0FD6  E8 0000 E		   CALL  SYSDISPMSG		   ;DISPLAY THE MESSAGE 			;AN000;
				
				;  $IF	 C			   ;IF THERE IS A PROBLEM			;AN000;
 0FD9  73 14			   JNC $$IF93
								   ;AX=EXTENDED ERROR NUMBER			;AN000;
 0FDB  8D 3E 0000 E		       LEA   DI,MSGNUM_EXTERR	   ;GET REST OF ERROR DESCRIPTOR		;AN000;
 0FDF  8B 5D 02			       MOV   BX,[DI].MSG_HANDLE    ;HANDLE TO DISPLAY TO			;AN000;
 0FE2  8B 75 04			       MOV   SI,[DI].MSG_SUBLIST   ;OFFSET IN ES: OF SUBLIST, OR 0 IF NONE	;AN000;
 0FE5  8B 4D 06			       MOV   CX,[DI].MSG_COUNT	   ;NUMBER OF %PARMS, 0 IF NONE 		;AN000;
 0FE8  8B 55 08			       MOV   DX,[DI].MSG_CLASS	   ;CLASS IN HIGH BYTE, INPUT FUNCTION IN LOW	;AN000;
 0FEB  E8 0000 E		       CALL  SYSDISPMSG 	   ;TRY TO SAY WHAT HAPPENED			;AN000;
				
 0FEE  F9			       STC			   ;REPORT PROBLEM				;AN000;
				;  $ENDIF			   ;PROBLEM WITH DISPLAY?			;AN000;
 0FEF				$$IF93:
				
 0FEF  5E			   POP	 SI			   ;RESTORE CALLER'S REGISTERS                  ;AN000;
 0FF0  5A			   POP	 DX			   ;						;AN000;
 0FF1  59			   POP	 CX			   ;						;AN000;
 0FF2  5B			   POP	 BX			   ;						;AN000;
				
 0FF3  C3			   RET				   ;RETURN TO CALLER				;AN000;
 0FF4				SENDMSG ENDP			   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <YESNO - DETERMINE IF A RESPONSE IS YES OR NO> ;			;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-51
YESNO - DETERMINE IF A RESPONSE IS YES OR NO		       ;      

 0FF4				YESNO PROC NEAR 		   ;						;AN000;
				   PUBLIC YESNO 		   ;MAKE ENTRY IN LINK MAP			;AN000;
				;INPUT: DL=CHAR WITH Y OR N EQUIVALENT CHAR TO BE TESTED
				;OUTPUT: AX=0=NO; AX=1=YES ; AX=2=INVALID RESPONSE, NEITHER Y NOR N
				;	IF CARRY SET, PROBLEM WITH THE FUNCTION, CALLER SHOULD ASSUME "NO"
				;  =  =  =  =  =  =  =	=  =  =  =  =
								   ;AL=SUBFUNCTION, AS:
								   ;  20H=CAPITALIZE SINGLE CHAR
								   ;  21H=CAPITALIZE STRING
								   ;  22H=CAPITALIZE ASCIIZ STRING
								   ;  23H=YES/NO CHECK
								   ;  80H BIT 0=USE NORMAL UPPER CASE TABLE
								   ;  80H BIT 1=USE FILE UPPER CASE TABLE
								   ;DL=CHAR TO CAP (FUNCTION 23H)		;AN000;
 0FF4  B8 6523			   MOV	 AX,(GET_EXT_CNTRY_INFO SHL 8) + YESNO_CHECK ;(6523H) GET EXTENDED	;AN000;
								   ; COUNTRY INFORMATION, (Y/N)
 0FF7  CD 21			   INT	 21H			   ;SEE IF Y OR N				;AN000;
				
 0FF9  C3			   RET				   ;RETURN TO CALLER				;AN000;
 0FFA				YESNO ENDP			   ;						;AN000;
				;  =  =  =  =  =  =  =	=  =  =  =  =
				   HEADER <VOLSER - VERIFY FIRST SECTOR, IGNORE VOL SER #> ;			 ;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-52
VOLSER - VERIFY FIRST SECTOR, IGNORE VOL SER #		       ;    

 0FFA				VOLSER PROC NEAR		   ;VERIFY FIRST SECTOR, IGNORING VOL SER #	;AN000;
				   PUBLIC VOLSER		   ;						;AN000;
				;IF THE FIRST DISKETTE SUPPORTED A VOL SERIAL NUMBER, THEN
				;COPY IT TO THE SECOND DISKETTE BUFFER AREA (NOT THE DISKETTE).
				;INPUT: FIRST DRIVE NUMBER
				;	DS:=SEGID OF BUFFER OF FIRST DISKETTE, FIRST SECTOR, SIDE 0
				;	ES:=SEGID OF BUFFER OF SECOND DISKETTE, FIRST SECTOR, SIDE 0
				;	SI AND DI = 0, INDEX OF WHERE IN BUFFERS TO START LOOKING
				;	CX="BYTES_IN_TRACK"; NUMBER OF BYTES TO BE EVENTUALLY COMPARED
				;OUTPUT: BUFFER OF 2ND DISKETTE ALTERED TO MATCH THE VOL SERIAL NUMBER OF 1ST.
				; = = = = = = = = = = = = = = = = = =
				
				   ASSUME DS:NOTHING		   ;BUFFER OF FIRST DISKETTE			;AN000;
				   ASSUME ES:NOTHING		   ;BUFFER OF SECOND DISKETTE			;AN000;
				
 0FFA  51			   PUSH  CX			   ;SAVE CALLER'S REGS                          ;AN000;
 0FFB  56			   PUSH  SI			   ;						;AN000;
 0FFC  57			   PUSH  DI			   ;						;AN000;
				;(deleted ;AN011;)   PUSH  DS			     ;SAVE BUFFER OF FIRST DISKETTE		  ;A
				N000;
				
				;(deleted ;AN011;)   PUSH  CS			     ;RESTORE ADDRESSABILITY TO COMMON SEG	  ;A
				N000;
				;(deleted ;AN011;)   POP   DS			     ; TO ACCESS GET MEDIA ID BUFFER AREA	  ;A
				N000;
				;(deleted ;AN011;)   ASSUME DS:CSEG		     ;AN000;
				
				;(deleted ;AN011;);		 ISSUE GET MEDIA ID FROM SOURCE
				;(deleted ;AN011;)   MOV   BH,0 		     ;BH=0, RES 				  ;A
				N000;
				;(deleted ;AN011;)   MOV   BL,SOURCE_DRIVE	     ;BL=DRIVE NUM (A:=1, B:=2, ETC.)		  ;A
				N000;
				;(deleted ;AN011;)   MOV   DX,OFFSET MEDIA_ID_BUFFER ;DS:DX=BUFFER
				;(deleted ;AN011;)   DOSCALL GSET_MEDIA_ID,GET_ID    ;(6900H) GET MEDIA ID			  ;A
				C008;
				;(deleted ;AN011;)				     ;CARRY SET ON ERROR (OLD STYLE BOOT RECORD)
				;(deleted ;AN011;)   POP   DS			     ;RESTORE THIS BACK TO BUFFER OF FIRST DISKETTE;
				AN000;
				;(deleted ;AN011;)   ASSUME DS:NOTHING		     ; LIKE IT WAS AT ENTRY TO THIS PROC	  ;A
				N000;
				
				;(deleted ;AN011;)   $IF   NC			     ;IF THERE IS NO PROBLEM			  ;A
				N000;
				;(deleted ;AN011;)				     ; THEN THIS DISKETTE HAS A VOL SER #
				
 0FFD  53			   PUSH  BX			   ;AN011;
 0FFE  8D 5D 0B			   LEA	 BX,DS:[DI].EXT_BOOT_BPB   ;AN011;POINT TO BPB PORTION OF BOOT RECORD
 1001  8A 47 0A			   MOV	 AL,DS:[BX].EBPB_MEDIADESCRIPTOR ;AN011;GET TYPE OF MEDIA
 1004  24 F0			   AND	 AL,0F0H		   ;AN011;SAVE LEFT NIBBLE ONLY
 1006  3C F0			   CMP	 AL,0F0H		   ;AN011;IF DISKETTE HAS PROPER DESCRIPTOR
				;  $IF	 E			   ;AN011;
 1008  75 16			   JNE $$IF95
 100A  8A 45 26			       MOV   AL,DS:[DI].EXT_BOOT_SIG ;AN011;GET "SIGNATURE" OF BOOT RECORD
 100D  3C 28			       CMP   AL,28H		   ;AN011;IS THIS BOOT STYLE OF OS/2 1.0 OR 1.1?
				;      $IF   E,OR		   ;AN011;YES, IS A BOOT WITH A SERIAL IN IT
 100F  74 04			       JE $$LL96
 1011  3C 29			       CMP   AL,29H		   ;AN011;IS THIS A BOOT STYLE OF OS/S 1.2?
				;      $IF   E			   ;AN011;YES, IS A BOOT WITH A SERIAL IN IT
 1013  75 0B			       JNE $$IF96
 1015				$$LL96:
				
				;THE PURPOSE HERE IS TO CAUSE DISKCOMP TO IGNORE ANY DIFFERENCES IN THE
				;VOL SERIAL NUMBER FIELD.  THIS IS DONE BY TAKING ONE VOL SERIAL NUMBER
				;FROM ONE BUFFER, ALREADY LOADED WITH THE FIRST TRACK OF ONE DISKETTE,
				;AND MOVING THAT SERIAL NUMBER TO THE CORRESPONDING POSITION IN THE OTHER
				;BUFFER, ALREADY LOADED WITH THE SIMILAR TRACK FROM THE OTHER DISKETTE.
				;WHEN THIS RETURNS TO THE MAIN ROUTINE, THE ENTIRE TRACK (INCUDING THIS
				;VOL SERIAL NUMBER FIELD) WILL BE COMPARED.  IF THERE ARE ANY DIFFERENCES,
				;THEY WILL BE OTHER THAN IN THE VOL SERIAL NUMBERS.
				
 1015  BE 0027				   MOV	 SI,OFFSET VOL_SERIAL ;GET WHERE VOL SERIAL NUMBER IS
 1018  BF 0027				   MOV	 DI,OFFSET VOL_SERIAL ;GET WHERE VOL SERIAL NUMBER IS
 101B  B9 0004				   MOV	 CX,TYPE VOL_SERIAL ;GET NUMBER BYTES IN VOL SER FIELD
 101E  F3/ A4				   REP	 MOVSB		   ;FORCE THE SERIAL NUMBERS TO BE ALIKE
				
				;      $ENDIF			   ;						;AN000;
 1020				$$IF96:
				;  $ENDIF			   ;AN011;
 1020				$$IF95:
 1020  5B			   POP	 BX			   ;AN011;
 1021  5F			   POP	 DI
 1022  5E			   POP	 SI
 1023  59			   POP	 CX			   ;RESTORE COUNT
 1024  C3			   RET				   ;RETURN TO CALLER				;AN000;
 1025				VOLSER ENDP			   ;AN000;
				; = = = = = = = = = = = = = = = = = = =
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Page     1-53
VOLSER - VERIFY FIRST SECTOR, IGNORE VOL SER #		       ;    

 1025				DISKCOMP_END LABEL BYTE
				   PATHLABL DISKCOMP		   ;AN013;
 1025                        1	    $$A_STOP_DISKCOMP:                     ; 
 1025				CSEG ENDS
				   END	 DISKCOMP

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-1


Macros:

		N a m e			Lines

DOSCALL  . . . . . . . . . . . .  	   8
HEADER . . . . . . . . . . . . .  	   4
MY_TRACKLAYOUT . . . . . . . . .  	 128
PATHLABL . . . . . . . . . . . .  	  16
PRINT  . . . . . . . . . . . . .  	   2

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

EXT_BPB_INFO . . . . . . . . . .  	0019	000C
  EBPB_BYTESPERSECTOR  . . . . .  	0000
  EBPB_SECTORSPERCLUSTER . . . .  	0002
  EBPB_RESERVEDSECTORS . . . . .  	0003
  EBPB_NUMBEROFFATS  . . . . . .  	0005
  EBPB_ROOTENTRIES . . . . . . .  	0006
  EBPB_TOTALSECTORS  . . . . . .  	0008
  EBPB_MEDIADESCRIPTOR . . . . .  	000A
  EBPB_SECTORSPERFAT . . . . . .  	000B
  EBPB_SECTORSPERTRACK . . . . .  	000D
  EBPB_HEADS . . . . . . . . . .  	000F
  EBPB_HIDDENSECTOR  . . . . . .  	0011
  EBPB_BIGTOTALSECTORS . . . . .  	0015
EXT_IBMBOOT_HEADER . . . . . . .  	003E	0009
  EXT_BOOT_JUMP  . . . . . . . .  	0000
  EXT_BOOT_OEM . . . . . . . . .  	0003
  EXT_BOOT_BPB . . . . . . . . .  	000B
  EXT_PHYDRV . . . . . . . . . .  	0024
  EXT_CURHD  . . . . . . . . . .  	0025
  EXT_BOOT_SIG . . . . . . . . .  	0026
  EXT_BOOT_SERIAL  . . . . . . .  	0027
  EXT_BOOT_VOL_LABEL . . . . . .  	002B
  EXT_SYSTEM_ID  . . . . . . . .  	0036
MSG_DESC . . . . . . . . . . . .  	000A	0005
  MSG_NUM  . . . . . . . . . . .  	0000
  MSG_HANDLE . . . . . . . . . .  	0002
  MSG_SUBLIST  . . . . . . . . .  	0004
  MSG_COUNT  . . . . . . . . . .  	0006
  MSG_CLASS  . . . . . . . . . .  	0008
MY_BPB . . . . . . . . . . . . .  	001F	000D
  CBYTE_SECT . . . . . . . . . .  	0000
  CSECT_CLUSTER  . . . . . . . .  	0002
  CRESEV_SECT  . . . . . . . . .  	0003
  CFAT . . . . . . . . . . . . .  	0005
  CROOTENTRY . . . . . . . . . .  	0006
  CTOTSECT . . . . . . . . . . .  	0008
  MEDIA_DESCRIP  . . . . . . . .  	000A
  CSECT_FAT  . . . . . . . . . .  	000B
  CSECT_TRACK  . . . . . . . . .  	000D
  CHEAD  . . . . . . . . . . . .  	000F
  CHIDDEN_SECT . . . . . . . . .  	0011
  BIG_TOT_SECT . . . . . . . . .  	0015
SUBLIST  . . . . . . . . . . . .  	000B	0009
  SUB_SIZE . . . . . . . . . . .  	0000
  SUB_RES  . . . . . . . . . . .  	0001
  SUB_VALUE  . . . . . . . . . .  	0002
  SUB_VALUE_SEG  . . . . . . . .  	0004
  SUB_ID . . . . . . . . . . . .  	0006
  SUB_FLAGS  . . . . . . . . . .  	0007
  SUB_MAX_WIDTH  . . . . . . . .  	0008
  SUB_MIN_WIDTH  . . . . . . . .  	0009
  SUB_PAD_CHAR . . . . . . . . .  	000A

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CSEG . . . . . . . . . . . . . .  	1025	PARA	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

ASCII_DRV1_ID  . . . . . . . . .  	V BYTE	0000	CSEG	External
ASCII_DRV2_ID  . . . . . . . . .  	V BYTE	0000	CSEG	External

BAD  . . . . . . . . . . . . . .  	NUMBER	0001	
BAD_YESNO  . . . . . . . . . . .  	NUMBER	0002	
BEGIN  . . . . . . . . . . . . .  	N PROC	0810	CSEG	Global	Length = 007D
BEGIN_UNFORM_AREA  . . . . . . .  	NUMBER	0080	
BLANK  . . . . . . . . . . . . .  	NUMBER	0020	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-2


BOOT_BYTE_SECTOR . . . . . . . .  	L WORD	0354	CSEG
BOOT_NUM_HEAD  . . . . . . . . .  	L WORD	0352	CSEG
BOOT_SECT_TRACK  . . . . . . . .  	L WORD	034E	CSEG
BOOT_SIGNATURE . . . . . . . . .  	WORD	01FE	
BOOT_SIZE  . . . . . . . . . . .  	NUMBER	0200	
BOOT_TOT_TRACK . . . . . . . . .  	L WORD	0350	CSEG
BPB48_DOUBLE . . . . . . . . . .  	L WORD	0311	CSEG
BPB48_SINGLE . . . . . . . . . .  	L WORD	0304	CSEG
BPB96  . . . . . . . . . . . . .  	L WORD	031E	CSEG
BPB96_LENG . . . . . . . . . . .  	NUMBER	000D	
BSECTOR_SIZE . . . . . . . . . .  	L WORD	035A	CSEG
BUFFER_BEGIN . . . . . . . . . .  	L WORD	0337	CSEG	Global
BUFFER_END . . . . . . . . . . .  	L WORD	0339	CSEG	Global
BUFFER_PTR . . . . . . . . . . .  	L WORD	0364	CSEG
BYTES_IN_TRACK . . . . . . . . .  	L WORD	0362	CSEG

CALC_TRACK_SIZE  . . . . . . . .  	N PROC	0B98	CSEG	Global	Length = 0048
CHECK_MEMORY_SIZE  . . . . . . .  	N PROC	0BE0	CSEG	Global	Length = 0019
CHECK_SOURCE . . . . . . . . . .  	N PROC	09A8	CSEG	Global	Length = 019E
CHECK_TARGET . . . . . . . . . .  	N PROC	0C4C	CSEG	Global	Length = 0131
CHT_8_SECTOR . . . . . . . . . .  	L NEAR	0D0F	CSEG
CHT_9_SECTOR . . . . . . . . . .  	L NEAR	0D25	CSEG
CHT_CHK_SIDE . . . . . . . . . .  	L NEAR	0D32	CSEG
CHT_EXIT . . . . . . . . . . . .  	L NEAR	0D7C	CSEG
CHT_EXIT_OLD . . . . . . . . . .  	L NEAR	0D51	CSEG
CHT_FATAL  . . . . . . . . . . .  	L NEAR	0D4C	CSEG
CHT_FATAL_BRIDGE . . . . . . . .  	L NEAR	0CB7	CSEG
CHT_GO_ON  . . . . . . . . . . .  	L NEAR	0C94	CSEG
CHT_OLD  . . . . . . . . . . . .  	L NEAR	0CC8	CSEG
CHT_SECOND_BAD . . . . . . . . .  	L NEAR	0CBA	CSEG
CHT_SET_BRIDGE . . . . . . . . .  	L NEAR	0CB4	CSEG
CHT_SET_DRV  . . . . . . . . . .  	L NEAR	0D54	CSEG
CLEAR_SEGMENT  . . . . . . . . .  	NUMBER	00E0	
COMP . . . . . . . . . . . . . .  	N PROC	0899	CSEG	Global	Length = 007A
COMPARE_FUNC . . . . . . . . . .  	NUMBER	0059	
COMPARE_PTR  . . . . . . . . . .  	L WORD	036D	CSEG
COMPAT_ERROR . . . . . . . . . .  	N PROC	0FAB	CSEG	Global	Length = 000C
COMP_END . . . . . . . . . . . .  	L NEAR	08F8	CSEG
COMP_ERROR . . . . . . . . . . .  	L BYTE	0366	CSEG
COMP_EXIT  . . . . . . . . . . .  	L NEAR	0905	CSEG
COMP_STATUS  . . . . . . . . . .  	L BYTE	0369	CSEG	Global
COMP_TARGET  . . . . . . . . . .  	N PROC	0BF9	CSEG	Global	Length = 0053
COMP_TEST_END  . . . . . . . . .  	L NEAR	08D9	CSEG
COMP_TRACK . . . . . . . . . . .  	N PROC	0D83	CSEG	Global	Length = 0085
COPY_TYPE  . . . . . . . . . . .  	L BYTE	0334	CSEG	Global
CS_AGAIN . . . . . . . . . . . .  	L NEAR	09A8	CSEG
CS_BAD . . . . . . . . . . . . .  	L NEAR	0A39	CSEG
CS_CHK_SIDE  . . . . . . . . . .  	L NEAR	0AD2	CSEG
CS_EXIT  . . . . . . . . . . . .  	L NEAR	0B45	CSEG
CS_FATAL . . . . . . . . . . . .  	L NEAR	0A2B	CSEG
CS_GO_ON . . . . . . . . . . . .  	L NEAR	0A05	CSEG
CS_NEW . . . . . . . . . . . . .  	L NEAR	09CC	CSEG
CS_OLD . . . . . . . . . . . . .  	L NEAR	0A47	CSEG
CS_OLD_BRIDGE  . . . . . . . . .  	L NEAR	09C9	CSEG
CS_OPTIONS . . . . . . . . . . .  	L NEAR	0AC6	CSEG
CS_OPTION_1  . . . . . . . . . .  	L NEAR	0A88	CSEG
CS_SECT15  . . . . . . . . . . .  	L NEAR	0A90	CSEG
CS_SECT8 . . . . . . . . . . . .  	L NEAR	0AA3	CSEG
CS_SECT9 . . . . . . . . . . . .  	L NEAR	0AB6	CSEG
CS_SET_TABLE . . . . . . . . . .  	L NEAR	0AFB	CSEG
CS_SET_TABLE_NEXT  . . . . . . .  	L NEAR	0B05	CSEG
CT_EXIT  . . . . . . . . . . . .  	L NEAR	0C4B	CSEG
CURRENTDRV_FUNC  . . . . . . . .  	NUMBER	0019	
CYLINDER . . . . . . . . . . . .  	L WORD	0806	CSEG

DISKCOMP . . . . . . . . . . . .  	L NEAR	0100	CSEG
DISKCOMP_BEGIN . . . . . . . . .  	L BYTE	0810	CSEG	Global
DISKCOMP_END . . . . . . . . . .  	L BYTE	1025	CSEG	Global
DISPLAY_LOAD_FIRST . . . . . . .  	N PROC	0913	CSEG	Global	Length = 0012
DISPLAY_LOAD_SECOND  . . . . . .  	N PROC	0925	CSEG	Global	Length = 0012
DOS20  . . . . . . . . . . . . .  	NUMBER	0002	
DO_COMPARE . . . . . . . . . . .  	N PROC	0E08	CSEG	Global	Length = 0008
DRIVE_CHECK  . . . . . . . . . .  	NUMBER	4408	
DRIVE_LETTER . . . . . . . . . .  	V BYTE	0000	CSEG	External
DRV_48TPI  . . . . . . . . . . .  	NUMBER	0000	
DRV_720  . . . . . . . . . . . .  	NUMBER	0002	
DRV_96TPI  . . . . . . . . . . .  	NUMBER	0001	
DS_BPB_PTR . . . . . . . . . . .  	L BYTE	037A	CSEG	Global
DS_deviceAttributes  . . . . . .  	L WORD	0375	CSEG	Global
DS_DEVICEBPB . . . . . . . . . .  	L 	037A	CSEG
DS_deviceType  . . . . . . . . .  	L BYTE	0374	CSEG	Global
DS_IOCTL_DRV_PARM  . . . . . . .  	L BYTE	0373	CSEG	Global
DS_mediaType . . . . . . . . . .  	L BYTE	0379	CSEG	Global
DS_numberOfCylinders . . . . . .  	L WORD	0377	CSEG	Global
DS_specialFunctions  . . . . . .  	L BYTE	0373	CSEG	Global
DS_TRACKLAYOUT . . . . . . . . .  	L WORD	0399	CSEG
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-3


DT_BPB_PTR . . . . . . . . . . .  	L BYTE	049E	CSEG	Global
DT_deviceAttributes  . . . . . .  	L WORD	0499	CSEG	Global
DT_DEVICEBPB . . . . . . . . . .  	L 	049E	CSEG
DT_deviceType  . . . . . . . . .  	L BYTE	0498	CSEG	Global
DT_IOCTL_DRV_PARM  . . . . . . .  	L BYTE	0497	CSEG	Global
DT_mediaType . . . . . . . . . .  	L BYTE	049D	CSEG	Global
DT_numberOfCylinders . . . . . .  	L WORD	049B	CSEG	Global
DT_specialFunctions  . . . . . .  	L BYTE	0497	CSEG	Global
DT_TRACKLAYOUT . . . . . . . . .  	L WORD	04BD	CSEG

EEH_EXIT . . . . . . . . . . . .  	L NEAR	0F6B	CSEG
EEH_HARD_ERROR . . . . . . . . .  	L NEAR	0F66	CSEG
EEH_SOFT_ERROR . . . . . . . . .  	L NEAR	0F5F	CSEG
EIGHT  . . . . . . . . . . . . .  	NUMBER	0008	
END_OF_TRACK . . . . . . . . . .  	L BYTE	0359	CSEG	Global
END_UNFORM_AREA  . . . . . . . .  	NUMBER	0100	
ERROR_MESSAGE  . . . . . . . . .  	N PROC	0F73	CSEG	Global	Length = 0038
EXCBR  . . . . . . . . . . . . .  	NUMBER	0002	
EXITFL . . . . . . . . . . . . .  	L BYTE	0345	CSEG	Global
EXIT_PROGRAM . . . . . . . . . .  	L NEAR	0881	CSEG
EXIT_TO_DOS  . . . . . . . . . .  	L NEAR	0845	CSEG
EXOK . . . . . . . . . . . . . .  	NUMBER	0000	
EXPAR  . . . . . . . . . . . . .  	NUMBER	0001		Global
EXTENDED_ERROR_HANDLER . . . . .  	N PROC	0F1B	CSEG	Global	Length = 0058
EXT_BOOT_SIGNATURE . . . . . . .  	NUMBER	0029	
EXVER  . . . . . . . . . . . . .  	NUMBER	0001	

FALSE  . . . . . . . . . . . . .  	NUMBER	0000	
FATAL  . . . . . . . . . . . . .  	NUMBER	0001	
FCB1_DRV_ID  . . . . . . . . . .  	NUMBER	005C	
FCB1_FILENM  . . . . . . . . . .  	NUMBER	005D	
FCB2_DRV_ID  . . . . . . . . . .  	NUMBER	006C	
FCB2_FILENM  . . . . . . . . . .  	NUMBER	006D	
FINE . . . . . . . . . . . . . .  	NUMBER	-0001		Global
FIRST  . . . . . . . . . . . . .  	NUMBER	0001	
FIRSTSECTORS . . . . . . . . . .  	L WORD	0808	CSEG
FIRST_TIME . . . . . . . . . . .  	L BYTE	0344	CSEG
FIVE . . . . . . . . . . . . . .  	NUMBER	0005	
FORMAT_FUNC  . . . . . . . . . .  	NUMBER	0042	
FOUR . . . . . . . . . . . . . .  	NUMBER	0004	

GENERIC_IOCTL  . . . . . . . . .  	N PROC	0F08	CSEG	Global	Length = 0013
GENERIC_IOCTL_CODE . . . . . . .  	NUMBER	000D	
GETDEVPARM . . . . . . . . . . .  	NUMBER	0060	
GET_ASSIGN_MODE  . . . . . . . .  	NUMBER	5F00	
GET_EXT_CNTRY_INFO . . . . . . .  	NUMBER	0065	
GET_ID . . . . . . . . . . . . .  	NUMBER	0000	
GET_SP_FUNC_DEF  . . . . . . . .  	NUMBER	0000	
GET_SP_FUNC_MED  . . . . . . . .  	NUMBER	0001	
GOOD . . . . . . . . . . . . . .  	NUMBER	0000	
GSET_MEDIA_ID  . . . . . . . . .  	NUMBER	0069	

HARD_ERROR . . . . . . . . . . .  	NUMBER	0002	
HEAD . . . . . . . . . . . . . .  	L WORD	0804	CSEG

IBMLOADSIZE  . . . . . . . . . .  	NUMBER	0003	
INIT . . . . . . . . . . . . . .  	L NEAR	0000	CSEG	External
INVAL_PARM . . . . . . . . . . .  	NUMBER	-0009	
IOCTL_FUNC . . . . . . . . . . .  	NUMBER	0044	
IOCTL_HEAD . . . . . . . . . . .  	L WORD	034A	CSEG
IOCTL_R_W  . . . . . . . . . . .  	L BYTE	0803	CSEG
IOCTL_SECTOR . . . . . . . . . .  	L WORD	0346	CSEG
IOCTL_TRACK  . . . . . . . . . .  	L WORD	0348	CSEG
IO_ERROR . . . . . . . . . . . .  	L BYTE	036F	CSEG	Global

KB_INPUT_FUNC  . . . . . . . . .  	NUMBER	0C01	

LAST_TRACK . . . . . . . . . . .  	L BYTE	0358	CSEG
LBL_DISKCOMP . . . . . . . . . .  	NUMBER	0004	
LOCAL_DRV  . . . . . . . . . . .  	NUMBER	-0001	

MAIN_EXIT  . . . . . . . . . . .  	L NEAR	0840	CSEG	Global
MAJOR_CODE . . . . . . . . . . .  	NUMBER	0008	
MORE_INIT  . . . . . . . . . . .  	N PROC	088D	CSEG	Length = 0001
MSGNUM_BAD_FIRST . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_BAD_SECOND  . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_CLOSE_DOOR  . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_COMPARING . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_COMP_ANOTHER  . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_COMP_OK . . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_EXTERR  . . . . . . . . .  	V WORD	0000	CSEG	External
MSGNUM_FATAL_ERROR . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_GET_READY . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_HARD_ERROR_COMP . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_HARD_ERROR_READ . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_LOAD_FIRST  . . . . . . .  	V BYTE	0000	CSEG	External
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-4


MSGNUM_LOAD_SECOND . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_NEWLINE . . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_NOT_COMPATIBLE  . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_STRIKE  . . . . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_UNSUF_MEMORY  . . . . . .  	V BYTE	0000	CSEG	External
MSGNUM_WRITE_PROTECT . . . . . .  	V BYTE	0000	CSEG	External
MSG_FLAG . . . . . . . . . . . .  	L BYTE	0370	CSEG
MSG_SECTRK . . . . . . . . . . .  	V WORD	0000	CSEG	External
MSG_SIDES  . . . . . . . . . . .  	V WORD	0000	CSEG	External
MSG_TRACKS . . . . . . . . . . .  	V WORD	0000	CSEG	External
MS_BPB_PTR . . . . . . . . . . .  	L BYTE	05C2	CSEG
MS_DEVICEATTRIBUTES  . . . . . .  	L WORD	05BD	CSEG
MS_DEVICEBPB . . . . . . . . . .  	L 	05C2	CSEG
MS_DEVICEBPB_LENG  . . . . . . .  	NUMBER	001F	
MS_DEVICETYPE  . . . . . . . . .  	L BYTE	05BC	CSEG
MS_IOCTL_DRV_PARM  . . . . . . .  	L BYTE	05BB	CSEG	Global
MS_MEDIATYPE . . . . . . . . . .  	L BYTE	05C1	CSEG
MS_NUMBEROFCYLINDERS . . . . . .  	L WORD	05BF	CSEG
MS_SPECIALFUNCTIONS  . . . . . .  	L BYTE	05BB	CSEG
MS_TRACKLAYOUT . . . . . . . . .  	L WORD	05E1	CSEG
MT_BPB_PTR . . . . . . . . . . .  	L BYTE	06E6	CSEG
MT_DEVICEATTRIBUTES  . . . . . .  	L WORD	06E1	CSEG
MT_DEVICEBPB . . . . . . . . . .  	L 	06E6	CSEG
MT_DEVICETYPE  . . . . . . . . .  	L BYTE	06E0	CSEG
MT_IOCTL_DRV_PARM  . . . . . . .  	L BYTE	06DF	CSEG	Global
MT_MEDIATYPE . . . . . . . . . .  	L BYTE	06E5	CSEG
MT_NUMBEROFCYLINDERS . . . . . .  	L WORD	06E3	CSEG
MT_SPECIALFUNCTIONS  . . . . . .  	L BYTE	06DF	CSEG
MT_TRACKLAYOUT . . . . . . . . .  	L WORD	0705	CSEG
MY_STACK_PTR . . . . . . . . . .  	L WORD	0304	CSEG

NINE . . . . . . . . . . . . . .  	NUMBER	0009	
NO_ERROR . . . . . . . . . . . .  	NUMBER	0000	
NO_OF_SIDES  . . . . . . . . . .  	L BYTE	035C	CSEG	Global
NO_OPTION  . . . . . . . . . . .  	NUMBER	-0001	
NRLFUNC  . . . . . . . . . . . .  	NUMBER	5F02	
NRLMAX . . . . . . . . . . . . .  	NUMBER	001C	
NUMBEROFSECTORS  . . . . . . . .  	L WORD	080A	CSEG

OFF  . . . . . . . . . . . . . .  	NUMBER	0000	
OK . . . . . . . . . . . . . . .  	NUMBER	0000	
ON . . . . . . . . . . . . . . .  	NUMBER	0001	
ONE  . . . . . . . . . . . . . .  	NUMBER	0001	
OPERATION  . . . . . . . . . . .  	L BYTE	0368	CSEG	Global
OPTION_1 . . . . . . . . . . . .  	NUMBER	0001	
ORG_SOURCE_DRIVE . . . . . . . .  	L BYTE	0331	CSEG	Global
ORG_TARGET_DRIVE . . . . . . . .  	L BYTE	0332	CSEG	Global

PATCH_386  . . . . . . . . . . .  	L BYTE	0E0A	CSEG	Global
PRESS_ANY_KEY  . . . . . . . . .  	N PROC	0FB7	CSEG	Length = 000D
PRINT_FUNC . . . . . . . . . . .  	NUMBER	0009	
PUT_CHAR . . . . . . . . . . . .  	NUMBER	0002	

READ_A_SECTOR  . . . . . . . . .  	N PROC	0B46	CSEG	Global	Length = 0052
READ_FUNC  . . . . . . . . . . .  	NUMBER	0061	
READ_OP  . . . . . . . . . . . .  	N PROC	0E55	CSEG	Global	Length = 004B
READ_SOURCE  . . . . . . . . . .  	N PROC	095C	CSEG	Global	Length = 004C
READ_S_BPB_FAILURE . . . . . . .  	L BYTE	0356	CSEG
READ_TRACK . . . . . . . . . . .  	N PROC	0E25	CSEG	Global	Length = 0030
READ_T_BPB_FAILURE . . . . . . .  	L BYTE	0357	CSEG
RECOMMENDED_BYTES_SECTOR . . . .  	L WORD	032D	CSEG	Global
REDIRECTED_FUNC  . . . . . . . .  	NUMBER	0009	
REMOTE_DRV . . . . . . . . . . .  	NUMBER	1000	
REMOVABLE  . . . . . . . . . . .  	NUMBER	0000	
RET_CD_EXIT  . . . . . . . . . .  	NUMBER	004C	
RO_AGAIN . . . . . . . . . . . .  	L NEAR	0E55	CSEG
RS_EXIT  . . . . . . . . . . . .  	L NEAR	09A7	CSEG
R_W_SP_FUNC  . . . . . . . . . .  	NUMBER	0000	

SAV_CSECT  . . . . . . . . . . .  	L WORD	034C	CSEG
SECOND . . . . . . . . . . . . .  	NUMBER	0002	
SECTOR14 . . . . . . . . . . . .  	NUMBER	000E	
SECTOR15 . . . . . . . . . . . .  	NUMBER	000F	
SECTOR8  . . . . . . . . . . . .  	NUMBER	0008	
SECTOR9  . . . . . . . . . . . .  	NUMBER	0009	
SECTOR_SIZE  . . . . . . . . . .  	L BYTE	0361	CSEG
SECT_TRACK_LAYOUT  . . . . . . .  	L WORD	033C	CSEG
SEC_BUFFER . . . . . . . . . . .  	L WORD	036B	CSEG
SENDMSG  . . . . . . . . . . . .  	N PROC	0FC4	CSEG	Global	Length = 0030
SERVER . . . . . . . . . . . . .  	NUMBER	002A	
SETDEVPARM . . . . . . . . . . .  	NUMBER	0040	
SET_ASSIGN_MODE  . . . . . . . .  	NUMBER	5F01	
SET_DRV_PARM_DEF . . . . . . . .  	N PROC	0D7D	CSEG	Global	Length = 0006
SET_FOR_THE_OLD  . . . . . . . .  	N PROC	0EA0	CSEG	Global	Length = 0047
SET_ID . . . . . . . . . . . . .  	NUMBER	0001	
SET_LOGICAL_DRIVE  . . . . . . .  	N PROC	088E	CSEG	Global	Length = 000B
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-5


SET_LOG_DRIVE  . . . . . . . . .  	NUMBER	000F	
SET_SP_FUNC_DEF  . . . . . . . .  	NUMBER	0004	
SET_SP_FUNC_DOS  . . . . . . . .  	NUMBER	0004	
SET_TRACKLAYOUT  . . . . . . . .  	N PROC	0EE7	CSEG	Global	Length = 0021
SEVEN  . . . . . . . . . . . . .  	NUMBER	0007	
SHARED . . . . . . . . . . . . .  	NUMBER	0003	
SIDE . . . . . . . . . . . . . .  	L BYTE	0367	CSEG	Global
SIX  . . . . . . . . . . . . . .  	NUMBER	0006	
SKIP_MSG . . . . . . . . . . . .  	V BYTE	0000	CSEG	External
SOFT_ERROR . . . . . . . . . . .  	NUMBER	0001	
SOURCE_DRIVE . . . . . . . . . .  	L BYTE	032F	CSEG	Global
SPECIALFUNCTIONS . . . . . . . .  	L BYTE	0803	CSEG
START_BUFFER . . . . . . . . . .  	L WORD	0335	CSEG	Global
STD_ERROR  . . . . . . . . . . .  	NUMBER	0002	
SUBLIST_17B  . . . . . . . . . .  	V WORD	0000	CSEG	External
SUBLIST_78 . . . . . . . . . . .  	V WORD	0000	CSEG	External
SWAP_DRIVE . . . . . . . . . . .  	N PROC	0E10	CSEG	Global	Length = 0015
SYSDISPMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External
SYSLOADMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External
S_DRV_HEADS  . . . . . . . . . .  	L BYTE	033F	CSEG	Global
S_DRV_SECT_TRACK . . . . . . . .  	L BYTE	033E	CSEG	Global
S_DRV_SET_FLAG . . . . . . . . .  	L BYTE	0371	CSEG
S_DRV_TRACKS . . . . . . . . . .  	L BYTE	0340	CSEG	Global
S_OWNER_SAVED  . . . . . . . . .  	L BYTE	032B	CSEG	Global

TADDRESS_OFF . . . . . . . . . .  	L WORD	080C	CSEG
TADDRESS_SEG . . . . . . . . . .  	L WORD	080E	CSEG
TARGET_DRIVE . . . . . . . . . .  	L BYTE	0330	CSEG	Global
TEN  . . . . . . . . . . . . . .  	NUMBER	000A	
TEST_REPEAT  . . . . . . . . . .  	N PROC	0937	CSEG	Global	Length = 0025
THREE  . . . . . . . . . . . . .  	NUMBER	0003	
TRACK_SIZE . . . . . . . . . . .  	L WORD	035F	CSEG
TRACK_TO_COMP  . . . . . . . . .  	L BYTE	035E	CSEG	Global
TRACK_TO_READ  . . . . . . . . .  	L BYTE	035D	CSEG	Global
TRUE . . . . . . . . . . . . . .  	NUMBER	0001	
TWO  . . . . . . . . . . . . . .  	NUMBER	0002	
TYPE_4 . . . . . . . . . . . . .  	NUMBER	0004	
T_DRV_HEADS  . . . . . . . . . .  	L BYTE	0342	CSEG	Global
T_DRV_SECT_TRACK . . . . . . . .  	L BYTE	0341	CSEG	Global
T_DRV_SET_FLAG . . . . . . . . .  	L BYTE	0372	CSEG
T_DRV_TRACKS . . . . . . . . . .  	L BYTE	0343	CSEG	Global
T_OWNER_SAVED  . . . . . . . . .  	L BYTE	032C	CSEG	Global

USER_INPUT . . . . . . . . . . .  	L BYTE	036A	CSEG	Global
USER_OPTION  . . . . . . . . . .  	L BYTE	0333	CSEG	Global
USER_OPTION_8  . . . . . . . . .  	L BYTE	033B	CSEG	Global

VERIFY_FUNC  . . . . . . . . . .  	NUMBER	0062	
VOLSER . . . . . . . . . . . . .  	N PROC	0FFA	CSEG	Global	Length = 002B
VOL_SERIAL . . . . . . . . . . .  	ALIAS	 EXT_BOOT_SERIAL		

WAIT_FOR_USER  . . . . . . . . .  	L NEAR	0F5C	CSEG
WARN_USER_1  . . . . . . . . . .  	L NEAR	0F3C	CSEG
WARN_USER_2  . . . . . . . . . .  	L NEAR	0F56	CSEG
WRITE_FILE . . . . . . . . . . .  	NUMBER	0040	
WRITE_FUNC . . . . . . . . . . .  	NUMBER	0041	

YES  . . . . . . . . . . . . . .  	NUMBER	0001	
YESNO  . . . . . . . . . . . . .  	N PROC	0FF4	CSEG	Global	Length = 0006
YESNO_CHECK  . . . . . . . . . .  	NUMBER	0023	

ZERO . . . . . . . . . . . . . .  	NUMBER	0000	

$$A_START_DISKCOMP . . . . . . .  	L NEAR	0810	CSEG	Global
$$A_STOP_DISKCOMP  . . . . . . .  	L NEAR	1025	CSEG	Global
$$DO21 . . . . . . . . . . . . .  	L NEAR	0937	CSEG
$$DO32 . . . . . . . . . . . . .  	L NEAR	0988	CSEG
$$DO36 . . . . . . . . . . . . .  	L NEAR	0B50	CSEG
$$DO4  . . . . . . . . . . . . .  	L NEAR	082A	CSEG
$$DO52 . . . . . . . . . . . . .  	L NEAR	0C2E	CSEG
$$DO55 . . . . . . . . . . . . .  	L NEAR	0C4C	CSEG
$$DO65 . . . . . . . . . . . . .  	L NEAR	0E2A	CSEG
$$DO70 . . . . . . . . . . . . .  	L NEAR	0E55	CSEG
$$DO85 . . . . . . . . . . . . .  	L NEAR	0EF6	CSEG
$$EN1  . . . . . . . . . . . . .  	L NEAR	0884	CSEG
$$EN24 . . . . . . . . . . . . .  	L NEAR	095B	CSEG
$$EN3  . . . . . . . . . . . . .  	L NEAR	083E	CSEG
$$EN32 . . . . . . . . . . . . .  	L NEAR	09A7	CSEG
$$EN38 . . . . . . . . . . . . .  	L NEAR	0B8D	CSEG
$$EN46 . . . . . . . . . . . . .  	L NEAR	0C0F	CSEG
$$EN52 . . . . . . . . . . . . .  	L NEAR	0C4B	CSEG
$$EN66 . . . . . . . . . . . . .  	L NEAR	0E43	CSEG
$$EN74 . . . . . . . . . . . . .  	L NEAR	0EBC	CSEG
$$EN76 . . . . . . . . . . . . .  	L NEAR	0EBC	CSEG
$$EN80 . . . . . . . . . . . . .  	L NEAR	0EE5	CSEG
$$EN85 . . . . . . . . . . . . .  	L NEAR	0F07	CSEG
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:44:54
DISKCOMP.SAL - COPY COMPLETE DISKETTE                       Symbols-6


$$EN90 . . . . . . . . . . . . .  	L NEAR	0F9D	CSEG
$$IF1  . . . . . . . . . . . . .  	L NEAR	0822	CSEG
$$IF10 . . . . . . . . . . . . .  	L NEAR	0881	CSEG
$$IF13 . . . . . . . . . . . . .  	L NEAR	0898	CSEG
$$IF15 . . . . . . . . . . . . .  	L NEAR	08CF	CSEG
$$IF17 . . . . . . . . . . . . .  	L NEAR	0905	CSEG
$$IF19 . . . . . . . . . . . . .  	L NEAR	0912	CSEG
$$IF24 . . . . . . . . . . . . .  	L NEAR	095A	CSEG
$$IF28 . . . . . . . . . . . . .  	L NEAR	0980	CSEG
$$IF29 . . . . . . . . . . . . .  	L NEAR	0970	CSEG
$$IF3  . . . . . . . . . . . . .  	L NEAR	0834	CSEG
$$IF38 . . . . . . . . . . . . .  	L NEAR	0B8C	CSEG
$$IF41 . . . . . . . . . . . . .  	L NEAR	0BB9	CSEG
$$IF43 . . . . . . . . . . . . .  	L NEAR	0BF8	CSEG
$$IF45 . . . . . . . . . . . . .  	L NEAR	0C12	CSEG
$$IF46 . . . . . . . . . . . . .  	L NEAR	0C0C	CSEG
$$IF50 . . . . . . . . . . . . .  	L NEAR	0C2B	CSEG
$$IF57 . . . . . . . . . . . . .  	L NEAR	0DB4	CSEG
$$IF59 . . . . . . . . . . . . .  	L NEAR	0DC9	CSEG
$$IF61 . . . . . . . . . . . . .  	L NEAR	0E00	CSEG
$$IF62 . . . . . . . . . . . . .  	L NEAR	0E00	CSEG
$$IF66 . . . . . . . . . . . . .  	L NEAR	0E39	CSEG
$$IF74 . . . . . . . . . . . . .  	L NEAR	0EAD	CSEG
$$IF76 . . . . . . . . . . . . .  	L NEAR	0EB9	CSEG
$$IF8  . . . . . . . . . . . . .  	L NEAR	086B	CSEG
$$IF80 . . . . . . . . . . . . .  	L NEAR	0ED3	CSEG
$$IF82 . . . . . . . . . . . . .  	L NEAR	0EE5	CSEG
$$IF88 . . . . . . . . . . . . .  	L NEAR	0F1A	CSEG
$$IF90 . . . . . . . . . . . . .  	L NEAR	0F96	CSEG
$$IF93 . . . . . . . . . . . . .  	L NEAR	0FEF	CSEG
$$IF95 . . . . . . . . . . . . .  	L NEAR	1020	CSEG
$$IF96 . . . . . . . . . . . . .  	L NEAR	1020	CSEG
$$LL96 . . . . . . . . . . . . .  	L NEAR	1015	CSEG
$$SR21 . . . . . . . . . . . . .  	L NEAR	095B	CSEG
$$SR70 . . . . . . . . . . . . .  	L NEAR	0E9F	CSEG
??0000 . . . . . . . . . . . . .  	L WORD	0399	CSEG
??0001 . . . . . . . . . . . . .  	L WORD	04BD	CSEG
??0002 . . . . . . . . . . . . .  	L WORD	05E1	CSEG
??0003 . . . . . . . . . . . . .  	L WORD	0705	CSEG
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  diskcomp		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   2491 Source  Lines
   3205 Total   Lines
    432 Symbols

  44608 + 204417 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
