Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-1


					PAGE	90,132			;A2
					title	LABEL.SAL - DOS LABEL COMMAND
				;*****************************************************************************
				;*									     *
				;*  MODULE NAME:       LABEL						     *
				;*									     *
				;*  DESCRIPTIVE NAME:  LABEL a diskette or disk 			     *
				;*									     *
				;*  FUNCTION:	       Create, change or delete a volume label on a disk.    *
				;*									     *
				;*  ENTRY POINT:       Start						     *
				;*									     *
				;*  INPUT:	       (DOS command line parameters)			     *
				;*		       [d:][path]LABEL [d:][volume label]		     *
				;*    where:								     *
				;*	[d:][path] before LABEL specifies the drive and path that contains   *
				;*	the LABEL command file. 					     *
				;*									     *
				;*	[d:][volume label] specifies the volume label.	Volume labels are    *
				;*	used to identify a disk.  They can be up to 11 characters and are in *
				;*	the same format as volume labels created by FORMAT/V.		     *
				;*									     *
				;*  EXIT-NORMAL:  ERRORLEVEL 0 - Normal completion			     *
				;*									     *
				;*  EXIT-ERROR:   ERRORLEVEL 1 - Any error				     *
				;*									     *
				;*  EFFECTS: The volume label is set to the indicated string.  The volume    *
				;*	     serial number, if present, is also displayed.		     *
				;*									     *
				;*  INCLUDED FILES:  None						     *
				;*									     *
				;*  INTERNAL REFERENCES:						     *
				;*									     *
				;*    Routines: 							     *
				;*	CHARACTER_CHECK - See if char is valid for filename		     *
				;*	CHECK_DELETE - Get user Y/N if to delete old label		     *
				;*	CHECK_FOR_DRIVE_LETTER - Parse for drive in string		     *
				;*	CHECK_TRANSLATE_DRIVE - See if drive is SUBST or ASSIGN 	     *
				;*	CHK_DBCS -See if specified byte is a DBCS lead byte		     *
				;*	CHK_DBCS_BLANK - Process DBCS blank char			     *
				;*	CREATE_NEW_LABEL - Output new vol label 			     *
				;*	DATA AREAS - STACK, buffers, FCB'S, message sublists                 *
				;*	DELETE_OLD_LABEL - Delete original volume label 		     *
				;*	DISPLAY_MSG - Send msg to system message handler		     *
				;*	DRIVE_SETUP - Verify drive, get default, setup drive ID 	     *
				;*	ERROR_EXIT - Abnormal return to DOS				     *
				;*	FIND_FIRST_CHAR - Locate first non blank in input		     *
				;*	FIND_OLD_LABEL - Get the existing volume label			     *
				;*	GET_NEW_LABEL - Parse new vol label name into path		     *
				;*	GET_SERIAL_NUM - Get vol ser number from "GET_MEDIA_ID" 	     *
				;*	GET_USER_INPUT - Read from user new vol label			     *
				;*	MAIN CODE - PSP, entry point					     *
				;*	MAIN_BEGIN - High level function control			     *
				;*	OUTPUT_OLD_LABEL - Display the original vol label		     *
				;*	PRELOAD_MESSAGES - Set up sys msgs, DOS version check		     *
				;*	PROCESS_STRING - Mov string to buf, check bad chars		     *
				;*	SETUP_CRLF - Carriage return, line feed 			     *
				;*	SETUP_DELLABEL - "Delete current volume label (Y/N)?"		     *
				;*	SETUP_HASLABEL - "Volume in drive %1 is %2"			     *
				;*	SETUP_INVCHAR - "Invalid characters in volume label"		     *
				;*	SETUP_INVDRIVE - "Invalid drive specification"			     *
				;*	SETUP_NETDRIVE - "Cannot %1 a Network drive"			     *
				;*	SETUP_NEWLABEL - "Volume label (11 characters, ENTER for none)?"     *
				;*	SETUP_NOLABEL - "Volume in drive %1 has no label"		     *
				;*	SETUP_NOROOM - "Cannot make directory entry"			     *
				;*	SETUP_SERIALNUM - "Volume Serial Number is %1-%2"		     *
				;*	SETUP_SUBSTASGN - "Cannot %1 a SUBSTed or ASSIGNed drive"	     *
				;*	SETUP_TOOMANY - "Too many files open"				     *
				;*									     *
				;*    Data Areas:							     *
				;*	CONTROL BLOCKS - SUBLISTS for message parameters		     *
				;*	BUFFERS - For GET_MEDIA_ID, several FCB'S                            *
				;*	PSP - Contains the DOS command line parameters. 		     *
				;*	STACK - Temporary save area					     *
				;*									     *
				;*  EXTERNAL REFERENCES:						     *
				;*									     *
				;*    Routines: 							     *
				;*	SYSDISPMSG (NEAR)  - Message display routine			     *
				;*	SYSLOADMSG (NEAR)  - System message loader			     *
				;*									     *
				;*    Data Areas:							     *
				;*	DTA - defined for the DOS FINDFIRST function.			     *
				;*									     *
				;*  NOTES:  LABEL should not be used with SUBSTed drives. The root directory *
				;*	    of the actual drive will be the target of LABEL.  LABEL should   *
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-2


				;*	    not be used with ASSIGNed drives or to label network drives.     *			
					   *
				;*									     *
				;*	    This module should be processed with the SALUT pre-processor     *
				;*	    with the re-alignment not requested, as:			     *
				;*									     *
				;*		 SALUT LABEL,NUL					     *
				;*									     *
				;*	    To assemble these modules, the sequential or alphabetical	     *
				;*	    ordering of segments may be used.				     *
				;*									     *
				;*	    Sample LINK command:					     *
				;*									     *
				;*		 LINK @LABEL.ARF					     *
				;*									     *
				;*	    Where the LABEL.ARF is defined as:				     *
				;*									     *
				;*		 LABEL+ 						     *
				;*		 LABELM 						     *
				;*									     *
				;*	    These modules should be linked in this order. The load module is *
				;*	    a COM file.  It should be converted via EXE2BIN to a .COM file.  *
				;*									     *
				;*  REVISION HISTORY:							     *
				;*									     *
				;*    AN000;D  DBCS Support	       (New LOC)	  06/87  S. Maes     *
				;*    AN000;M  Message service routine (New LOC)	  06/87  S. Maes     *
				;*    AC000;M  Message service routine (Changed LOC)	  06/87  S. Maes     *
				;*    AN000;S  Serial Number	       (New LOC)	  06/87  S. Maes     *
				;*    AC000;K  SALUT					  08/87  E. Kiser    *
				;*    Ax001;   DCR0524 - enable deletion of labelID	  04/88  S. Maes     *
				;*    Ax002;   PTM4282 - parse complete line for invalids 04/88  S. Maes     *
				;*    AN003;   PTM4588 - scan entire line fails DBCS	  05/88  S. Maes     *
				;*									     *
				;*  COPYRIGHT: The following notice is found in the OBJ code generated	     *
				;*	       in the LABELM.SAL module.				     *
				;*									     *
				;*	       "Version 4.00 (C)Copyright 1988 Microsoft
				;*	       "Licensed Material - Program Property of Microsoft"		     *
				;*									     *
				;*****************************************************************************
					HEADER	<DEFINITIONS - LOCAL MACROS AND LOCAL EQUATES>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-3
DEFINITIONS - LOCAL MACROS AND LOCAL EQUATES                

				HEADER	MACRO	TEXT
				.XLIST
					SUBTTL	&TEXT
				.LIST
					PAGE
					ENDM
				;*****************************************************************************
				; Equate Area
				;*****************************************************************************
				;		   $SALUT (4,20,25,36) ;AN000;K
				;		DOS FUNCTION CALLS
 = 0011				FCB_SEARCH	   equ	11h
 = 0013				FCB_DELETE	   equ	13h
 = 0019				GET_DEFAULT	   equ	19h
 = 001A				SET_DTA 	   equ	1Ah
 = 003E				CLOSE		   equ	3Eh
 = 003F				READ		   equ	3Fh
 = 0044				IOCTL		   equ	44h
 = 0009				LOC_OR_NET	   equ	9h	   ;AN000;K Local or network, subfunc of IOCTL
 = 004C				EXIT		   equ	4Ch
 = 005B				CREATE_FILE	   equ	5Bh
 = 6523				YN_CHECK	   equ	6523h	   ;AN001; 65=GetExtCtry 23=Y/NCheck
 = 6900				GET_MEDIA_ID	   equ	6900h	   ;AN000;S Int 21 for Serial Number
 = 6300				GET_DBCS_ENV	   equ	6300h	   ;AN000;D DBCS support
 = 0060				XNAMETRANS	   equ	60h	   ;AN000;
				
				;		DBCS SPECIAL CHARACTER DEFINITIONS
				
 = 0081				DBCSBLK_BYTEONE    equ	81h	   ;AN000;D 1st byte of DBCS blank
 = 0040				DBCSBLK_BYTETWO    equ	40h	   ;AN000;D 2nd byte of DBCS blank
 = 2020				SBCSBLANKS	   equ	2020h	   ;AN000;D 2 SBCS blanks
				
				;		MISCELLANEOUS EQUATES
				
 = 0040				ASCII_DRV	   equ	"A"-1	   ;AN000;D Convert to Ascii drive
 = 0020				BLANK		   equ	" "
 = 0030				CHAR_ZERO	   equ	"0"	   ;AN000;K Padding for serial number
 = 003A				COLON		   equ	":"
 = 0000				DEFAULT_DRIVE	   equ	0
 = 0008				DOT_LOCATION	   equ	8
 = 00FF				DRIVE_INVALID	   equ	0FFh
 = 0000				END_OF_STRING	   equ	0
 = 000B				MAX_CHARS	   equ	11
 = 007F				MAX_INPUT	   equ	100h-81h   ;Size of input buffer
 = 0000				NO		   equ	0	   ;AN001; Compare for Y/N response
 = 002E				PERIOD		   equ	"."
 = 0001				YES		   equ	1	   ;AN001; Compare for Y/N response
 = 0000				ZERO		   equ	0
				
				;		ERROR LEVEL RETURN CODES
				
 = 0000				ERRORLEVEL_0	   equ	0
 = 0001				ERRORLEVEL_1	   equ	1
				
				;		ATTRIBUTE OF DIRECTORY ENTRY
				
 = 0008				VOL_ATTRIBUTE	   equ	8
				
				;		ERROR CODES FROM DOS FUNCTIONS
				
 = 00FF				VOL_NOT_FOUND	   equ	0FFh
 = 0004				TOO_MANY_FILES	   equ	4
				
				;		ID IF MESSAGES DISPLAYED BY "LABEL"
				
 = 0001				TOO_MANY_MSG	   equ	1	   ;AN000;M Too many files open
 = 0002				NO_ROOM_MSG	   equ	2	   ;AN000;M Cannot make directory entry
 = 0003				INV_CHAR_MSG	   equ	3	   ;AN000;M Invalid characters in volume label
 = 0004				NEW_LABEL_MSG	   equ	4	   ;AN000;M Vol label (11 chars, ENTER for none)?
 = 0005				INV_DRIVE_MSG	   equ	5	   ;AN000;M Invalid drive specification
 = 0006				NETWORKDRIVEMSG    equ	6	   ;AN000;M Cannot %1 a Network drive
 = 0007				SUBSTASSIGNMSG	   equ	7	   ;AN000;M Cannot %1 a SUBSTed or ASSIGNed drive
 = 0008				NO_LABEL_MSG	   equ	8	   ;AN000;M Volume in drive %1 has no label
 = 0009				SERIAL_NUM_MSG	   equ	9	   ;AN000;M Volume Serial Number is %1
 = 000A				HAS_LABEL_MSG	   equ	10	   ;AN000;M Volume in Drive %1 is %2
 = 000B				DEL_LABEL_MSG	   equ	11	   ;AN001;M Delete current volume label (Y/N)?
 = 000C				CRLF_MSG	   equ	12	   ;AN001;M CR,LF
				
				;		DEFINITIONS OF FIELDS WITHIN MSG SUBLISTS
				
 = 0000				MAXWIDTH	   equ	0	   ;AN000;M 0 will ensure no padding
 = 0001				MINWIDTH	   equ	1	   ;AN000;M At least 1 char to insert in msg
 = 0010				STR_INPUT	   equ	16	   ;AN000;M Byte definition for s?_flags
 = 000B				SUBLIST_LENGTH	   equ	11	   ;AN000;M Length of sublist structure
 = 0000				RESERVED	   equ	0	   ;AN000;M Reserved byte field
 = 000D				CR		   equ	0Dh	   ;Carriage Return
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-4
DEFINITIONS - LOCAL MACROS AND LOCAL EQUATES                

 = 0000				NO_INPUT	   equ	00h	   ;AN000;M No input characters
 = 00C8				DOS_CON_INPUT	   equ	00C8h	   ;AN000;M No input characters
 = 0001				EXT_ERR_CLASS	   equ	01h	   ;AN000;M DOS Extended error class
 = 00FF				UTILITY_MSG_CLASS  equ	0FFh	   ;AN000;M Utility message class
 = 0000				STDIN		   equ	0000h	   ;File handle
 = 0001				STDOUT		   equ	0001h	   ;Standard Output device handle
 = 0002				STDERR		   equ	0002h	   ;Standard Error Output device handle
 = 0023				BIN_HEX_WORD	   equ	23h	   ;AN000;M a0100011
 = 0080				RIGHT_ALIGN	   equ	80h	   ;AN000;M 10xxxxxx
 = 0000				CHAR_FIELD_CHAR    equ	0	   ;AN000;M a0000000
						   HEADER <MAIN CODE - PSP, ENTRY POINT>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-5
MAIN CODE - PSP, ENTRY POINT                                

 0000				CSEG		   segment public
				
						   ASSUME cs:CSEG,ds:CSEG,es:CSEG,ss:CSEG
				
						   EXTRN SYSDISPMSG:NEAR ;SYSTEM DISPLAY MESSAGE ROUTINE
						   EXTRN SYSLOADMSG:NEAR ;SYSTEM MESSAGE LOADER ROUTINE
				
 005C						   org	5Ch
 005C				FCB1		   label byte
				
 0080						   org	80h
 0080				Num_Parms	   label byte
				
 0081						   org	81h
 0081				Parm_Area	   label byte
				
 0100						   org	100h
 0100				Start:				   ;DOS ENTRY POINT
 0100  E9 03E4 R				   jmp	Main_Begin ;SKIP CONSTANTS
						   HEADER <DATA AREAS - STACK, BUFFERS, FCB'S, MESSAGE SUBLISTS>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-6
DATA AREAS - STACK, BUFFERS, FCB'S, MESSAGE SUBLISTS>       

 0103  90					   EVEN
 0104  0200[			Stack_Area	   db	512 dup ("S") ;Added in DOS 3.20 to support hardware requiring
	   53			
			 ]	
				
 0304  00			End_Stack_Area	   db	0	   ;large stacks. DO NOT PUT DATA ABOVE THIS !
 0305  20 3A 5C			New_Vol_Path	   db	" :\"	   ;Path for new vol label
 0308  20 20 20 20 20 20	New_Vol_Name	   db	"        " ;Where first 8 chars go
       20 20			
 0310  2E 20 20 20 00		New_Vol_Ext	   db	".   ",0   ;Dot and extension
 0315  0000			End_Parameters	   dw	0	   ;End of input string
				
 0317  00			Program_Flag	   db	0	   ;Status Flag
 = 0001				USER_INPUT	   equ	01h	   ;User has input already
 = 0002				LABEL_FND	   equ	02h	   ;Volume label found
 = 0004				NO_DELETE	   equ	04h	   ;No need for label delete
 = 0008				GET_INPUT	   equ	08h	   ;Need user input
 = 0010				CHAR_BAD	   equ	10h	   ;Invalid character in string
 = 0020				FOUND_DBCS	   equ	20h	   ;AN000;K in process of handling DBCS chars
				
 0318  FF			Vol_FCB 	   db	0FFh	   ;Extended FCB
 0319  00 00 00 00 00				   db	0,0,0,0,0
 031E  08					   db	VOL_ATTRIBUTE ;Attribute for vol label
 031F  00			FCB_Drive	   db	0	   ;Drive number
 0320  3F 3F 3F 3F 3F 3F	Vol_Name	   db	"???????????" ;Match any vol name found
       3F 3F 3F 3F 3F		
 032B  0019[					   db	25 dup (0) ;Rest of the opened FCB
	   00			
			 ]	
				
 0344  3F 3F 3F 3F 3F 3F	Label_Name	   db	"???????????",0 ;AN000;
       3F 3F 3F 3F 3F 00	
 0350  20			FCB_Drive_Char	   db	" "	   ;AN000;K printable version of FCB_Drive above
				
 0351  41 3A 43 4F 4E 00	TranSrc 	   db	"A:CON",0,0 ;AN000;A Device so we don't hit the drive
       00			
 0358  0040[			TranDst 	   db	64 dup(' ') ;AN000;A
	   20			
			 ]	
				
 0398  4C 41 42 45 4C 00	Label_Word	   db	"LABEL",0  ;AN000;M Message substitution parm
				
 039E  FF			Del_FCB 	   db	0FFh	   ;Extended FCB
 039F  00 00 00 00 00				   db	0,0,0,0,0
 03A4  08					   db	VOL_ATTRIBUTE ;Attribute for vol label
 03A5  00			Del_Drive	   db	0	   ;Drive number
 03A6  3F 3F 3F 3F 3F 3F	Del_Name	   db	"???????????" ;Match any vol name found
       3F 3F 3F 3F 3F		
				
				;		MESSAGE SUBLIST STRUCTURES
				
 03B1				Sublist1	   Label Dword	   ;AN000;M Substitution list
 03B1  0B			s1_nxtlst	   db	SUBLIST_LENGTH ;AN000;M (11)Ptr to next sublist
 03B2  00			s1_reserve	   db	RESERVED   ;AN000;M (0)Reserved
 03B3  0000			s1_offset	   dw	?	   ;AN000;M Time/date or data pointer
 03B5  0000			s1_segment	   dw	?	   ;AN000;M Time/date or data pointer
 03B7  01			s1_id		   db	1	   ;AN000;M N of %n
 03B8  00			s1_flags	   db	?	   ;AN000;M Data-type flags (a0sstttt)
 03B9  00			s1_maxwidth	   db	?	   ;AN000;M Maximum field width
 03BA  00			s1_minwidth	   db	?	   ;AN000;M Minimum field width
 03BB  00			s1_padchar	   db	?	   ;AN000;M Char to pad field
				
 03BC				Sublist2	   Label Dword	   ;AN000;M Substitution list
 03BC  0B			s2_nxtlst	   db	SUBLIST_LENGTH ;AN000;M (11)Ptr to next sublist
 03BD  00			s2_reserve	   db	RESERVED   ;AN000;M (0)Reserved
 03BE  0000			s2_offset	   dw	?	   ;AN000;M Time/date or data pointer
 03C0  0000			s2_segment	   dw	?	   ;AN000;M Time/date or data pointer
 03C2  02			s2_id		   db	2	   ;AN000;M N of %n
 03C3  00			s2_flags	   db	?	   ;AN000;M Data-type flags (a0sstttt)
 03C4  00			s2_maxwidth	   db	?	   ;AN000;M Maximum field width
 03C5  00			s2_minwidth	   db	?	   ;AN000;M Minimum field width
 03C6  00			s2_padchar	   db	?	   ;AN000;M Char to pad field
				
				;		GET_MEDIA_ID STRUCTURE
				
 03C7				SerNumBuf	   Label Byte	   ;AN000;S GET_MEDIA_ID buffer
 03C7  0000					   dw	0	   ;AN000;S Info level (set on input)
 03C9  00000000			SerNum		   dd	0	   ;AN000;S Serial #
 03CD  000B[					   db	11 DUP(' ') ;AN000;S Volume label
	   20			
			 ]	
				
 03D8  0008[					   db	8 DUP(' ') ;AN000;S File system type
	   20			
			 ]	
				
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-7
DATA AREAS - STACK, BUFFERS, FCB'S, MESSAGE SUBLISTS>       

				
				;		CHK_DBCS STRUCTURE
 03E0  0000			DBCSev_Off	   dw	0	   ;AC000;D offset of DBCS EV
 03E2  0000			DBCSev_Seg	   dw	0	   ;AC000;D segment of DBCS EV
				
						   HEADER <MAIN_BEGIN - HIGH LEVEL FUNCTION CONTROL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-8
MAIN_BEGIN - HIGH LEVEL FUNCTION CONTROL                    

				;  $SALUT (4,4,9,36)		   ;AN000;K
				;*****************************************************************************
				;*									     *
				;*  SUBROUTINE NAME:	  main_begin					     *
				;*									     *
				;*  SUBROUTINE FUNCTION:  Preload message file and check DOS version	     *
				;*			    by calling SYSLOADMSG			     *
				;*			  Get the command line parameters		     *
				;*			  Parse command line				     *
				;*			  Verify the correctness of the parameters	     *
				;*			  Get label if exists				     *
				;*			  Get serial number if exists			     *
				;*			  Get new volume name				     *
				;*			  Make new volume file				     *
				;*			  Print messages by calling SYSDISPMSG		     *
				;*									     *
				;*  EXTERNAL ROUTINES:	  SYSDISPMSG					     *
				;*			  SYSLOADMSG					     *
				;*									     *
				;*  INTERNAL ROUTINES:	  Character_Check	      Main_Begin	     *
				;*			  Check_Delete		      Output_Old_Label	     *
				;*			  Check_For_Drive_Letter      Preload_Messages	     *
				;*			  Check_Trans_Drive	      Process_String	     *
				;*			  Chk_DBCS		      Setup_CRLF	     *
				;*			  Chk_DBCS_Blank	      Setup_DelLabel	     *
				;*			  Create_New_Label	      Setup_HasLabel	     *
				;*			  Delete_Old_Label	      Setup_InvChar	     *
				;*			  Display_Msg		      Setup_InvDrive	     *
				;*			  Drive_Setup		      Setup_NetDrive	     *
				;*			  Error_Exit		      Setup_NewLabel	     *
				;*			  Find_First_Char	      Setup_NoLabel	     *
				;*			  Find_Old_Label	      Setup_NoRoom	     *
				;*			  Get_New_Label 	      Setup_SerialNum	     *
				;*			  Get_Serial_Num	      Setup_SubstAsgn	     *
				;*			  Get_User_Input	      Setup_TooMany	     *
				;*									     *
				;*****************************************************************************
				   PUBLIC MAIN_BEGIN
 03E4				Main_Begin Proc Near
 03E4  BC 0304 R		   mov	sp,offset End_Stack_Area   ;Move stack to user area(Added in DOS 3.20)
 03E7  FC			   cld
 03E8  E8 0725 R		   call Preload_Messages	   ;AN000;M Check DOS version & load msgs
 03EB  E8 0402 R		   call Drive_Setup		   ;Get Drive letters
 03EE  E8 047B R		   call Find_Old_Label		   ;Get label if exist
 03F1  E8 049E R		   call Get_New_Label		   ;Get New Name
 03F4  E8 0682 R		   call Check_Delete		   ;AN001; See if delete needed or wanted
 03F7  E8 06BB R		   call Delete_Old_Label	   ;Del the old label if it exists
 03FA  E8 06CB R		   call Create_New_Label	   ;Make new Vol file
 03FD  B8 4C00			   mov	ax,(EXIT shl 8)+ERRORLEVEL_0 ;all done, pass back zero ret code
 0400  CD 21			   INT	21H
 0402				Main_Begin ENDP
				
				   HEADER <DRIVE_SETUP - VERIFY DRIVE, GET DEFAULT, SETUP DRIVE ID>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-9
DRIVE_SETUP - VERIFY DRIVE, GET DEFAULT, SETUP DRIVE ID     

				;*****************************************************************************
				;  Verify specified drive, get default if needed, setup drive letters
				;*****************************************************************************
				
				   PUBLIC DRIVE_SETUP
 0402				Drive_Setup PROC NEAR
 0402  3C FF			   cmp	al,DRIVE_INVALID	   ;Was specified drive ok ?
				;  $if	e			   ;AN000;K No
 0404  75 0C			   JNE $$IF1
 0406  B8 0005			       mov  ax,INV_DRIVE_MSG	   ;Nope, tell & quit
 0409  E8 07A0 R		       call Setup_InvDrive	   ;AN000;M
 040C  E8 0743 R		       call Display_Msg 	   ;AN000;M Set up msg & display
 040F  E8 0918 R		       call Error_Exit
				;  $endif			   ;AN000;K
 0412				$$IF1:
				;			    Get_Drive:
 0412  A0 005C R		   mov	al,FCB1 		   ;Get specified drive
 0415  3C 00			   cmp	al,DEFAULT_DRIVE	   ;Was drive given ?
				;  $if	e			   ;AN000;K No
 0417  75 06			   JNE $$IF3
 0419  B4 19			       mov  ah,GET_DEFAULT	   ;No, get default drive
 041B  CD 21			       INT  21H
 041D  FE C0			       inc  al			   ;Get a: based on 1, not 0
				;  $endif			   ;AN000;K
 041F				$$IF3:
				;			    Drive_Letter:
 041F  A2 031F R		   mov	FCB_Drive,al		   ;Put drive number in FCB
 0422  A2 03A5 R		   mov	Del_Drive,al		   ;Put drive number in FCB
 0425  8A D8			   mov	bl,al
 0427  A0 031F R		   mov	al,FCB_Drive		   ;AN000;K get numeric value of drive letter
 042A  04 40			   add	al,ASCII_DRV		   ;AN000;M  ("A"-1)
 042C  A2 0350 R		   mov	FCB_Drive_Char,al	   ;AN000;K make drive printable
 042F  B8 4409			   mov	ax,(IOCTL SHL 8)+LOC_OR_NET ;(4409h)determine drive type
 0432  CD 21			   INT	21H
 0434  F7 C2 1000		   test dx,1000h		   ;bit 12 on means network drive
				;  $if	nz			   ;AN000;K
 0438  74 0C			   JZ $$IF5
 043A  B8 0006			       mov  ax,NETWORKDRIVEMSG
 043D  E8 07D0 R		       call Setup_NetDrive	   ;AN000;M
 0440  E8 0743 R		       call Display_Msg 	   ;AN000;M First display the msg
 0443  E8 0918 R		       call Error_Exit
				;  $endif			   ;AN000;K
 0446				$$IF5:
 0446  E8 0460 R		   call Check_Trans_Drive	   ;AN000;A Is drv SUBSTed/ASSIGNed?
				;  $if	nz			   ;AN000;K Yes
 0449  74 0C			   JZ $$IF7
 044B  B8 0007			       mov  ax,SUBSTASSIGNMSG	   ;AN000;A Prepare SUBST/ASSIGN msg
 044E  E8 0800 R		       call Setup_SubstAsgn	   ;AN000;M
 0451  E8 0743 R		       call Display_Msg 	   ;AN000;A Display the message
 0454  E8 0918 R		       call Error_Exit		   ;AN000;A Then exit
				;  $endif			   ;AN000;K
 0457				$$IF7:
 0457  A0 03A5 R		   mov	al,Del_Drive
 045A  04 40			   add	al,ASCII_DRV		   ;AN000;K ("A"-1) Convert to Ascii
 045C  A2 0305 R		   mov	New_Vol_Path,al 	   ;Put drive letter in path
 045F  C3			   ret
 0460				Drive_Setup ENDP
				
				   HEADER <CHECK_TRANSLATE_DRIVE - SEE IF DRIVE IS SUBST OR ASSIGN>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-10
CHECK_TRANSLATE_DRIVE - SEE IF DRIVE IS SUBST OR ASSIGN     

				;*****************************************************************************
				;  Routine name: Check_Translate_Drive
				;*****************************************************************************
				;  Descr:  Do a name translate call on the drive letter to see if it is
				;	   assigned by SUBST or ASSIGN
				;  Input:  Drive
				
				   PUBLIC CHECK_TRANS_DRIVE
 0460				Check_Trans_Drive PROC NEAR	   ;AN000;A
 0460  8A 1E 0350 R		   mov	bl,FCB_Drive_Char	   ;AN000;A Get drive
 0464  88 1E 0351 R		   mov	byte ptr [TranSrc],bl	   ;AN000;A Make string "x:\"
 0468  BE 0351 R		   mov	si,offset TranSrc	   ;AN000;A Point to translate string
 046B  BF 0358 R		   mov	di,offset TranDst	   ;AN000;A Point at output buffer
 046E  B4 60			   mov	ah,XNAMETRANS		   ;AN000;A (60H) Get real path
 0470  CD 21			   INT	21H			   ;AN000;A
 0472  8A 1E 0351 R		   mov	bl,byte ptr [TranSrc]	   ;AN000;A Get drive letter from path
 0476  3A 1E 0358 R		   cmp	bl,byte ptr [TranDst]	   ;AN000;A Did drive letter change?
 047A  C3			   ret				   ;AN000;A
 047B				Check_Trans_Drive ENDP		   ;AN000;A
				
				   HEADER <FIND_OLD_LABEL - GET THE EXISTING VOLUME LABEL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-11
FIND_OLD_LABEL - GET THE EXISTING VOLUME LABEL              

				;*****************************************************************************
				;  Find old volume label
				;*****************************************************************************
				;  Input:  VOL_FCB set to find any vol label
				;  Output: VOL_FCB has label name if one found
				;	   PROGRAM_FLAG = LABEL_FND if one is found
				;	   LABEL_NAME gets found label name
				
				   PUBLIC FIND_OLD_LABEL
 047B				Find_Old_Label PROC NEAR
 047B  BA 0318 R		   mov	dx,offset Vol_FCB	   ;Point at FCB to find vol
 047E  B4 1A			   mov	ah,SET_DTA		   ;(1AH)
 0480  CD 21			   INT	21H
 0482  BA 0318 R		   mov	dx,offset Vol_FCB	   ;Point at FCB to find vol
 0485  B4 11			   mov	ah,FCB_SEARCH		   ;(11H)
 0487  CD 21			   INT	21H			   ;Find vol label
 0489  3C FF			   cmp	al,VOL_NOT_FOUND	   ;Find one
				;  $if	ne			   ;AN000;K Yes
 048B  74 10			   JE $$IF9
 048D  80 0E 0317 R 02		       or   Program_Flag,LABEL_FND ;Yes, set flag
 0492  BE 0320 R		       mov  si,offset Vol_Name	   ;Found name
 0495  BF 0344 R		       mov  di,offset Label_Name   ;Where to put it
 0498  B9 000B			       mov  cx,MAX_CHARS	   ;How many characters
 049B  F3/ A4			       rep  movsb		   ;Move the string
				;  $endif			   ;AN000;K
 049D				$$IF9:
				;			     Find_Return:
 049D  C3			   ret
 049E				Find_Old_Label ENDP
				
				   HEADER <GET_NEW_LABEL - PARSE NEW VOL LABEL NAME INTO PATH>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-12
GET_NEW_LABEL - PARSE NEW VOL LABEL NAME INTO PATH          

				;*****************************************************************************
				;  Parse new volume label name into path.
				;*****************************************************************************
				;  Input:  PARM_AREA has input string
				;  Output: NEW_VOL_NAME has ASCIIZ string for new label, or an END_OF_STRING
				;	   if nothing entered
				
				   PUBLIC GET_NEW_LABEL
 049E				Get_New_Label PROC NEAR
				;  $do				   ;AN000;K
 049E				$$DO11:
 049E  33 C9			       xor  cx,cx		   ;Zero counter
 04A0  BE 0081 R		       mov  si,offset Parm_Area    ;Input buffer
 04A3  BF 0308 R		       mov  di,offset New_Vol_Name ;Target Buffer
 04A6  E8 04DB R		       call Find_First_Char	   ;Get first not blank char
 04A9  F6 06 0317 R 08		       test Program_Flag,GET_INPUT ;Find input?
 04AE  75 1B			       jnz  Need_User_Input	   ;No, go get it
 04B0  E8 0575 R		       call Process_String	   ;Scan string, move it
 04B3  F6 06 0317 R 10		       test Program_Flag,CHAR_BAD  ;Invalid characters?
 04B8  75 11			       jnz  Need_User_Input	   ;Yes, get user to input
 04BA  B0 00			       mov  al,END_OF_STRING	   ;Mark end of ASCIIZ string
 04BC  AA			       stosb
 04BD  80 3E 0308 R 00		       cmp  New_Vol_Name,END_OF_STRING ;Any chars entered?
				;  $leave ne			   ;Yes, all done here
 04C2  75 16			   JNE $$EN11
 04C4  F6 06 0317 R 01		       test Program_Flag,USER_INPUT ;See if command line parse
				;  $leave nz			   ;No, user had his chance
 04C9  75 0F			   JNZ $$EN11
 04CB				Need_User_Input:
 04CB  F6 06 0317 R 01		       test Program_Flag,USER_INPUT ;Is this the first time here?
				;      $if  z			   ;AN000;K Yes, label not already gone out
 04D0  75 03			       JNZ $$IF14
 04D2  E8 061C R			   call Output_Old_Label   ;Yes, print current vol label
				;      $endif			   ;AN000;K
 04D5				$$IF14:
 04D5				Input_New_Label:
 04D5  E8 0651 R		       call Get_User_Input	   ;Get new string
				;  $enddo			   ;AN000;K Go parse it again
 04D8  EB C4			   JMP SHORT $$DO11
 04DA				$$EN11:
 04DA  C3			   ret
 04DB				Get_New_Label ENDP
				
				   HEADER <FIND_FIRST_CHAR - LOCATE FIRST NON BLANK IN INPUT>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-13
FIND_FIRST_CHAR - LOCATE FIRST NON BLANK IN INPUT           

				;*****************************************************************************
				;  Find the first non blank character in input string
				;*****************************************************************************
				;  Input:  SI = pointer to next character
				;  Output: PROGRAM_FLAG = GET_INPUT if user input needed
				;	   AL = First not blank character
				;  Notes:  GET_INPUT set if nothing follows drive letter
				
				   PUBLIC FIND_FIRST_CHAR
 04DB				Find_First_Char PROC NEAR
				;  $do				   ;AN000;K
 04DB				$$DO17:
 04DB  80 26 0317 R F7		       and  Program_Flag,not GET_INPUT ;Clear flag
 04E0  AC			       lodsb			   ;Get char
 04E1  E8 0507 R		       call Chk_DBCS		   ;AN000;D Check DBCS env
				;      $if  c			   ;AN000;K
 04E4  73 03			       JNC $$IF18
 04E6  E8 054B R			   call Chk_DBCS_Blank	   ;AN000;D Is it a DBCS blank?
				;      $endif			   ;AN000;K
 04E9				$$IF18:
 04E9  3C 20			       cmp  al,BLANK		   ;Is it a blank?
				;  $enddo ne			   ;AN000;K No, quit
 04EB  74 EE			   JE $$DO17
 04ED  E8 055D R		   call Check_For_Drive_Letter	   ;Parse out drive letter
 04F0  E8 0507 R		   call Chk_DBCS		   ;AN000;D Check DBCS env
				;  $if	c			   ;AN000;K
 04F3  73 08			   JNC $$IF21
 04F5  E8 054B R		       call Chk_DBCS_Blank	   ;AN000;D Is it a DBCS blank?
 04F8  80 26 0317 R DF		       and  Program_Flag,not FOUND_DBCS ;AN000;K forget this was a dbcs for now
				;  $endif			   ;AN000;K
 04FD				$$IF21:
 04FD  3C 20			   cmp	al,BLANK		   ;Blank following drive letter?
				;  $if	e			   ;AN000;K
 04FF  75 05			   JNE $$IF23
 0501  80 0E 0317 R 08		       or   Program_Flag,GET_INPUT
				;  $endif			   ;AN000;K
 0506				$$IF23:
 0506  C3			   ret
 0507				Find_First_Char ENDP
				
				   HEADER <CHK_DBCS -SEE IF SPECIFIED BYTE IS A DBCS LEAD BYTE>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-14
CHK_DBCS -SEE IF SPECIFIED BYTE IS A DBCS LEAD BYTE         

				;*****************************************************************************
				;  Check DBCS environment
				;*****************************************************************************
				;  Function: Check if a specified byte is in ranges of the DBCS lead bytes
				;  Input:    AL = Code to be examined
				;  Output:   If CF is on then a lead byte of DBCS
				;  Register: FL is used for the output, others are unchanged.
				
				   PUBLIC CHK_DBCS
 0507				Chk_DBCS PROC			   ;AC000;D
 0507  1E			   push ds			   ;AC000;D save regs, about to be clobbered
 0508  56			   push si			   ;AC000;D
 0509  83 3E 03E2 R 00		   cmp	DBCSev_Seg,ZERO 	   ;AC000;D Already set ?
				;  $if	e			   ;AN000;K if the vector not yet found
 050E  75 11			   JNE $$IF25
 0510  50			       push ax			   ;AC000;D
 0511  B8 6300			       mov  ax,GET_DBCS_ENV	   ;AC000;D GET DBCS EV call
 0514  CD 21			       INT  21H 		   ;AC000;D ds:si points to the dbcs vector
				       ASSUME ds:NOTHING	   ;AN000;K that function clobbered old DS
 0516  36: 89 36 03E0 R		       mov  DBCSev_Off,si	   ;AC000;D remem where dbcs vector is so next
 051B  36: 8C 1E 03E2 R		       mov  DBCSev_Seg,ds	   ;AC000;D time don't have to look for it
 0520  58			       pop  ax			   ;AC000;D
				;  $endif			   ;AN000;K
 0521				$$IF25:
 0521  36: 8B 36 03E0 R		   mov	si,DBCSev_Off		   ;AC000;D set DS:SI to point to
 0526  36: 8E 1E 03E2 R		   mov	ds,DBCSev_Seg		   ;AC000;D  the dbcs vector
				;  $search			   ;AN000;K
 052B				$$DO27:
 052B  83 3C 00			       cmp  word ptr [si],ZERO	   ;AC000;D vec ends with nul terminator entry
				;  $leave e			   ;AN000;K if that was terminator entry, quit
 052E  74 17			   JE $$EN27
 0530  3A 04			       cmp  al,[si]		   ;AC000;D look at LOW value of vector
				;  $exitif nb,and		   ;AN000;K if this byte in range of LOW
 0532  72 0E			   JB $$IF27
 0534  3A 44 01			       cmp  al,[si+1]		   ;AC000;D look at HIGH value of vector
				;  $exitif na			   ;AN000;K if this byte is still in range
 0537  77 09			   JA $$IF27
 0539  36: 80 0E 0317 R 20	       or   Program_Flag,FOUND_DBCS ;AN000;K remember we found one of a pair
 053F  F9			       stc			   ;AC000;D set flag to say, found a DBCS char
				;  $orelse			   ;AN000;K since char not in this vector
 0540  EB 06			   JMP SHORT $$SR27
 0542				$$IF27:
 0542  83 C6 02			       add  si,2		   ;AC000;D go look at next vec in dbcs table
				;  $endloop			   ;AN000;K go back and ck out new vector entry
 0545  EB E4			   JMP SHORT $$DO27
 0547				$$EN27:
 0547  F8			       clc			   ;AC000;D set flag to say not a DBCS char
				;  $endsrch			   ;AN000;K
 0548				$$SR27:
 0548  5E			   pop	si			   ;AC000;D restore the regs
 0549  1F			   pop	ds			   ;AC000;D
				   ASSUME ds:CSEG		   ;AN000;K tell masm, DS back to normal
 054A  C3			   ret				   ;AC000;D
 054B				Chk_DBCS ENDP			   ;AC000;D
				
				   HEADER <CHK_DBCS_BLANK - PROCESS DBCS BLANK CHAR>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-15
CHK_DBCS_BLANK - PROCESS DBCS BLANK CHAR                    

				;*****************************************************************************
				;  Check DBCS char for a blank (8140)
				;*****************************************************************************
				;  Function: Check if a specified byte is a DBCS blank
				;  Input:    AL = Byte to be examined
				;	     SI = Points to next byte
				;  Output:   SI = UNchanged
				
				   PUBLIC CHK_DBCS_BLANK
 054B				Chk_DBCS_Blank PROC NEAR	   ;AN000;D
 054B  3C 81			   cmp	al,DBCSBLK_BYTEONE	   ;AN000;D Is the leading byte 81h?
				;  $if	e,and			   ;AN000;K
 054D  75 0D			   JNE $$IF33
 054F  80 3C 40			   cmp	byte ptr [si],DBCSBLK_BYTETWO ;AN000;D Is the 2nd byte 40h?
				;  $if	e			   ;AN000;K Yes, change to 2 SBCS blanks
 0552  75 08			   JNE $$IF33
				;		 Convert_DBCS_Blank: ;AN000;D
 0554  26: C7 44 FF 2020	       mov  word ptr es:[si]-1,SBCSBLANKS ;AN000;D Fill it up with blank-blank
 055A  B0 20			       mov  al,BLANK		   ;AN000;K pretend this char is a blank
				;  $endif			   ;AN000;K
 055C				$$IF33:
				;		  DBCS_Blank_Exit: ;AN000;D
 055C  C3			   ret				   ;AN000;D And leave
 055D				Chk_DBCS_Blank ENDP		   ;AN000;D
				
				   HEADER <CHECK_FOR_DRIVE_LETTER - PARSE FOR DRIVE IN STRING>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-16
CHECK_FOR_DRIVE_LETTER - PARSE FOR DRIVE IN STRING          

				;*****************************************************************************
				;  Parse a drive letter out of the string [Check_For_Drive_Letter]
				;*****************************************************************************
				;  Input:  SI = pointer to next character
				;	   CX = character count
				;  Output: SI = SI+1 if drive letter entered
				
				   PUBLIC CHECK_FOR_DRIVE_LETTER
 055D				Check_For_Drive_Letter PROC NEAR
 055D  F6 06 0317 R 01		   test Program_Flag,USER_INPUT    ;Input not from command line?
				;  $if	z			   ;AN000;K
 0562  75 10			   JNZ $$IF35
 0564  83 F9 00			       cmp  cx,END_OF_STRING	   ;Anything parsed yet
				;      $if  e			   ;AN000;
 0567  75 0B			       JNE $$IF36
 0569  3C 0D				   cmp	al,CR		   ;First char a CR ?
				;	   $if	ne
 056B  74 07				   JE $$IF37
 056D  80 3C 3A				       cmp  byte ptr [si],COLON ;Drive letter entered?
				;	       $if  e		   ;AN000;K
 0570  75 02				       JNE $$IF38
 0572  46					   inc	si	   ;Yes, point past the colon
 0573  AC					   lodsb	   ;And get next character
				;	       $endif		   ;AN000;K
 0574				$$IF38:
				;	   $endif		   ;AN000;K
 0574				$$IF37:
				;      $endif			   ;AN000;K
 0574				$$IF36:
				;  $endif			   ;AN000;K
 0574				$$IF35:
 0574				Drive_Letter_Ret:
 0574  C3			   ret
 0575				Check_For_Drive_Letter ENDP
				
				   HEADER <PROCESS_STRING - MOV STRING TO BUF, CHECK BAD CHARS>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-17
PROCESS_STRING - MOV STRING TO BUF, CHECK BAD CHARS         

				;*****************************************************************************
				;  Move the input string into buffer, checking for bad characters
				;*****************************************************************************
				;  Input:  SI = pointer to next character
				;	   DI = pointer to buffer
				;	   AL = current character in string
				;  Output: PROGRAM_FLAG = CHAR_BAD if invalid char in string (Flag set in
				;	   called Character_Check routine)
				;  Notes:  Insert a "." in string to seperate 8th and 9th characters so
				;	   ASCIIZ string is the result.
				
				   PUBLIC PROCESS_STRING
 0575				Process_String PROC NEAR
 0575  3C 0D			   cmp	al,CR			   ;is it an ENTER ?
				;  $if	e
 0577  75 11			   JNE $$IF43
 0579  F6 06 0317 R 01		       test Program_Flag,USER_INPUT ;has user been told to provide input?
				;      $if  nz			   ;If user has been prompted for input
 057E  74 08			       JZ $$IF44
 0580  83 F9 00				   cmp	cx,ZERO 	   ;And he said - nothing
				;	   $if	e
 0583  75 03				   JNE $$IF45
 0585  EB 45 90				       jmp  Process_String_Return ;AN001; ENTER is acceptable
				;	   $endif
 0588				$$IF45:
				;      $endif
 0588				$$IF44:
				;  $else			   ;Since got other than just ENTER
 0588  EB 42			   JMP SHORT $$EN43
 058A				$$IF43:
 058A  F6 06 0317 R 20		       test Program_Flag,FOUND_DBCS ;AN000;K If prev char not 1st of DBCS pair
 058F  74 0C			       jz   Do_More_Check	   ;AN000;K then go check it out
 0591  80 26 0317 R DF		       and  Program_Flag,not FOUND_DBCS ;AN000; Reset flag, found its partner
 0596  83 F9 0B			       cmp  cx,11		   ;AC003; Continue to check chars but don't
 0599  7D 22			       jge  Scan_Continue	   ;AC003; store anything more
 059B  EB 1F			       jmp  short Got_Ok_Character ;AN000; Partner is ok
 059D				Do_More_Check:
 059D  E8 0507 R		       call Chk_DBCS		   ;AN000;D Check DBCS env
 05A0  73 0B			       jnc  Check_Char		   ;AN000;D If carry, it's a DBCS char
 05A2  83 F9 0A			       cmp  cx,10		   ;AC003; If previous char was the 10th
 05A5  7D 16			       jge  Scan_Continue	   ;AC003; then there is no room for 11th DBCS
 05A7  E8 054B R		       call Chk_DBCS_Blank	   ;AN000;D Is it a DBCS blank?
 05AA  EB 10 90			       jmp  Got_Ok_Character	   ;AN000;D
 05AD				Check_Char:
 05AD  E8 05CD R		       call Character_Check	   ;Is it a valid char ?
 05B0  F6 06 0317 R 10		       test Program_Flag,CHAR_BAD
 05B5  75 15			       jnz  Process_String_Return  ;Flag was set, char was invalid
 05B7  83 F9 0B			       cmp  cx,11		   ;AN003; Continue to check chars but don't
 05BA  7D 01			       jge  Scan_Continue	   ;AN003; store anything more
 05BC				Got_Ok_Character:
 05BC  AA			       stosb			   ;Good char, store it
 05BD				Scan_Continue:			   ;AN003; Skip storing chars since past limit
 05BD  41			       inc  cx			   ;Inc character count
 05BE  83 F9 08			       cmp  cx,DOT_LOCATION	   ;Do we need "." for extension?
 05C1  75 03			       jne  Get_Next_Char	   ;No
 05C3  B0 2E			       mov  al,PERIOD		   ;Get a "." for extension
 05C5  AA			       stosb			   ;And save it
 05C6				Get_Next_Char:
 05C6  AC			       lodsb			   ;Get next character
 05C7  83 F9 7F			       cmp  cx,MAX_INPUT	   ;AN002; Have we reached end?
 05CA  75 A9			       jne  Process_String	   ;No, go diddle with it
				;  $endif
 05CC				$$EN43:
 05CC				Process_String_Return:
 05CC  C3			   ret
 05CD				Process_String ENDP
				
				   HEADER <CHARACTER_CHECK - SEE IF CHAR IS VALID FOR FILENAME>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-18
CHARACTER_CHECK - SEE IF CHAR IS VALID FOR FILENAME         

				;*****************************************************************************
				;  See if a character is valid for filename [Character_Check]
				;*****************************************************************************
				;  Input:  AL = character to be checked
				;  Output: AL = character
				;	   PROGRAM_FLAG = CHAR_BAD if invalid characters found
				
				   PUBLIC CHARACTER_CHECK
 05CD				Character_Check PROC NEAR
 05CD  80 0E 0317 R 10		   or	Program_Flag,CHAR_BAD	   ;Assume bad character
 05D2  3C 2A			   cmp	al,"*"
 05D4  74 45			   je	Char_Check_Done
 05D6  3C 3F			   cmp	al,"?"
 05D8  74 41			   je	Char_Check_Done
 05DA  3C 5B			   cmp	al,"["
 05DC  74 3D			   je	Char_Check_Done
 05DE  3C 5D			   cmp	al,"]"
 05E0  74 39			   je	Char_Check_Done
 05E2  3C 3A			   cmp	al,":"
 05E4  74 35			   je	Char_Check_Done
 05E6  3C 3C			   cmp	al,"<"
 05E8  74 31			   je	Char_Check_Done
 05EA  3C 7C			   cmp	al,"|"
 05EC  74 2D			   je	Char_Check_Done
 05EE  3C 3E			   cmp	al,">"
 05F0  74 29			   je	Char_Check_Done
 05F2  3C 2B			   cmp	al,"+"
 05F4  74 25			   je	Char_Check_Done
 05F6  3C 3D			   cmp	al,"="
 05F8  74 21			   je	Char_Check_Done
 05FA  3C 3B			   cmp	al,";"
 05FC  74 1D			   je	Char_Check_Done
 05FE  3C 2C			   cmp	al,","
 0600  74 19			   je	Char_Check_Done
 0602  3C 2F			   cmp	al,"/"
 0604  74 15			   je	Char_Check_Done
 0606  3C 5C			   cmp	al,"\"
 0608  74 11			   je	Char_Check_Done
 060A  3C 2E			   cmp	al,'.'
 060C  74 0D			   je	Char_Check_Done
 060E  3C 22			   cmp	al,'"'
 0610  74 09			   je	Char_Check_Done
 0612  3C 20			   cmp	al," "
 0614  72 05			   jb	Char_Check_Done
 0616  80 26 0317 R EF		   and	Program_Flag,not CHAR_BAD  ;Char is ok
 061B				Char_Check_Done:
 061B  C3			   ret
 061C				Character_Check ENDP
				
				   HEADER <OUTPUT_OLD_LABEL - DISPLAY THE ORIGINAL VOL LABEL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-19
OUTPUT_OLD_LABEL - DISPLAY THE ORIGINAL VOL LABEL           

				;*****************************************************************************
				;  Print the old volume label
				;*****************************************************************************
				;  Input:  PROGRAM_FLAG = LABEL_FND if there is a label
				;  Output: None
				;  Notes:  Print the volume label
				
				   PUBLIC OUTPUT_OLD_LABEL
 061C				Output_Old_Label PROC NEAR
 061C  B8 000A			   mov	ax,HAS_LABEL_MSG	   ;Assume label
 061F  E8 08AE R		   call Setup_HasLabel		   ;AN000;M
 0622  F6 06 0317 R 02		   test Program_Flag,LABEL_FND	   ;Is there one?
				;  $if	z			   ;AN000;K If no label found, then
 0627  75 06			   JNZ $$IF50
 0629  B8 0008			       mov  ax,NO_LABEL_MSG	   ;No, other message
 062C  E8 0830 R		       call Setup_NoLabel	   ;AN000;M
				;  $endif			   ;AN000;K
 062F				$$IF50:
 062F  E8 0743 R		   call Display_Msg		   ;AC000;M Set up msg and display
 0632  E8 0641 R		   call Get_Serial_Num		   ;AN000;S Since LABEL_FND, ck for SN
				;  $if	nc			   ;AN000;K SN must be known
 0635  72 09			   JC $$IF52
 0637  B8 0009			       mov  ax,SERIAL_NUM_MSG	   ;AN000;S Prepare for SN message
 063A  E8 0860 R		       call Setup_SerialNum	   ;AN000;M
 063D  E8 0743 R		       call Display_Msg 	   ;AC000;M Set up msg and display
				;  $endif			   ;AN000;K
 0640				$$IF52:
 0640  C3			   ret
 0641				Output_Old_Label ENDP
				
				   HEADER <GET_SERIAL_NUM - GET VOL SER NUMBER FROM "GET_MEDIA_ID">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-20
GET_SERIAL_NUM - GET VOL SER NUMBER FROM "GET_MEDIA_ID"     

				;*****************************************************************************
				;  Get the volume serial number
				;*****************************************************************************
				;  Input:  FCB_Drive
				;  Output: SerNum if no carry
				;  Notes:  Only DOS Version 4.0 and above will contain serial numbers
				
				   PUBLIC GET_SERIAL_NUM
 0641				Get_Serial_Num PROC NEAR	   ;AN000;S
 0641  B8 6900			   mov	ax,GET_MEDIA_ID 	   ;AN000;S
 0644  B7 00			   mov	bh,0			   ;AN000;S
 0646  8A 1E 031F R		   mov	bl,FCB_Drive		   ;AN000;S Which drive to check
 064A  8D 16 03C7 R		   lea	dx,SerNumBuf		   ;AN000;S Pt to the buffer
 064E  CD 21			   INT	21H			   ;AN000;S Make the call
 0650  C3			   ret				   ;AN000;S
 0651				Get_Serial_Num ENDP		   ;AN000;S
				
				   HEADER <GET_USER_INPUT - READ FROM USER NEW VOL LABEL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-21
GET_USER_INPUT - READ FROM USER NEW VOL LABEL               

				;*****************************************************************************
				;  Input from user a new volume label string
				;*****************************************************************************
				;  Input:  PROGRAM_FLAG = CHAR_BAD if there were invalid characters in string
				;  Output: New string placed in PARM_AREA
				;  Notes:  Print bad character message if needed and prompt and get user input
				
				   PUBLIC GET_USER_INPUT
 0651				Get_User_Input PROC NEAR
 0651  F6 06 0317 R 10		   test Program_Flag,CHAR_BAD	   ;Do we need bad char message
				;  $if	nz			   ;AN000;K
 0656  74 0E			   JZ $$IF54
 0658  B8 0003			       mov  ax,INV_CHAR_MSG	   ;Yes
 065B  E8 0784 R		       call Setup_InvChar	   ;AN000;M
 065E  E8 0743 R		       call Display_Msg 	   ;AC000;M Set up msg and display
 0661  80 26 0317 R EF		       and  Program_Flag,not CHAR_BAD ;Char is ok
				;  $endif			   ;AN000;K
 0666				$$IF54:
 0666  B8 0004			   mov	ax,NEW_LABEL_MSG	   ;Tell user to input new label
 0669  E8 0792 R		   call Setup_NewLabel		   ;AN000;M
 066C  E8 0743 R		   call Display_Msg		   ;AC000;M Set up msg and display
 066F  BA 0081 R		   mov	dx,offset Parm_Area	   ;Point where to put new name
 0672  B9 007F			   mov	cx,MAX_INPUT		   ;Number of characters to read
 0675  BB 0000			   mov	bx,STDIN		   ;Read from keyboard
 0678  B4 3F			   mov	ah,READ 		   ;(3FH)
 067A  CD 21			   INT	21H
 067C  80 0E 0317 R 01		   or	Program_Flag,USER_INPUT    ;Indicate user input has been received
 0681  C3			   ret
 0682				Get_User_Input ENDP
				
				   HEADER <CHECK_DELETE - SEE IF OLD LABEL SHOULD BE DELETED>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-22
CHECK_DELETE - SEE IF OLD LABEL SHOULD BE DELETED           

				;*****************************************************************************
				;  Check to see if old label should be deleted
				;*****************************************************************************
				;  Input:  PROGRAM_FLAG = LABEL_FND if there is a label
				;  Output: PROGRAM_FLAG = NO_DELETE if label should not be deleted
				;  Notes:  Get user Y/N if to delete previous label
				
				   PUBLIC CHECK_DELETE
 0682				Check_Delete PROC NEAR
 0682  F6 06 0317 R 02		   test Program_Flag,LABEL_FND	   ;AN001; Is there a vol label
 0687  74 28			   jz	Check_Delete_Return	   ;AN001; No, no need for prompt
 0689  80 3E 0308 R 00		   cmp	New_Vol_Name,END_OF_STRING ;AN001; Did user enter label
 068E  75 21			   jne	Check_Delete_Return	   ;AN001; Yes, no need for prompt
 0690				Delete_Prompt:			   ;AN001;
 0690  B8 000B			   mov	ax,DEL_LABEL_MSG	   ;AN001; Point at Y/N prompt
 0693  E8 08FC R		   call Setup_DelLabel		   ;AN001;M Prepare message
 0696  E8 0743 R		   call Display_Msg		   ;AN001;M Call to Sysdispmsg
 0699  8B D0			   mov	dx,ax			   ;AN001; Char ret'd, prep for ck
 069B  B8 6523			   mov	ax,YN_CHECK		   ;AN001; GetExtCtry,Y/NCheck
 069E  CD 21			   INT	21H			   ;AN001;
 06A0  3D 0001			   cmp	ax,YES			   ;AN001; Delete label ?
 06A3  74 0C			   je	Check_Delete_Return	   ;AN001; Yes
 06A5  3D 0000			   cmp	ax,NO			   ;AN001; Delete label ?
 06A8  74 02			   je	Delete_Label		   ;AN001; Yes
 06AA  75 E4			   jne	Delete_Prompt		   ;AN001; No, try again
 06AC				Delete_Label:			   ;AN001;
 06AC  80 0E 0317 R 04		   or	Program_Flag,NO_DELETE	   ;AN001; Yes, set flag
 06B1				Check_Delete_Return:		   ;AN001;
 06B1  B8 000C			   mov	ax,CRLF_MSG		   ;AN001; Point at CRLF message
 06B4  E8 090A R		   call Setup_CRLF		   ;AN001;M Prepare message
 06B7  E8 0743 R		   call Display_Msg		   ;AN001;M Call to Sysdispmsg
 06BA  C3			   ret				   ;AN001;
 06BB				Check_Delete ENDP
				
				   HEADER <DELETE_OLD_LABEL - DELETE ORIGINAL VOLUME LABEL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-23
DELETE_OLD_LABEL - DELETE ORIGINAL VOLUME LABEL             

				;*****************************************************************************
				;  Delete old volume label
				;*****************************************************************************
				;  Input:  VOL_FCB has name of label if one found
				;	   PROGRAM_FLAG = NO_DELETE if label doesn't need to be deleted
				;  Output: Vol label deleted if it exists and user say's it is okay
				;  Notes:  Ask user if old label should be deleted.
				
				   PUBLIC DELETE_OLD_LABEL
 06BB				Delete_Old_Label PROC NEAR
 06BB  F6 06 0317 R 04		   test Program_Flag,NO_DELETE	   ;Need to delete label ?
				;  $if	z			   ;AN000;K
 06C0  75 08			   JNZ $$IF56
 06C2  8D 16 039E R		       lea  dx,Del_FCB		   ;Point at FCB to delete vol
 06C6  B4 13			       mov  ah,FCB_DELETE	   ;(13H) label and delete it
 06C8  CD 21			       INT  21H 		   ;Can't use handle cause Chmod won't find it
				;  $endif			   ;AN000;K
 06CA				$$IF56:
 06CA  C3			   ret
 06CB				Delete_Old_Label ENDP
				
				   HEADER <CREATE_NEW_LABEL - OUTPUT NEW VOL LABEL>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-24
CREATE_NEW_LABEL - OUTPUT NEW VOL LABEL                     

				;*****************************************************************************
				;  Create new volume label file if user specified one
				;*****************************************************************************
				
				   PUBLIC CREATE_NEW_LABEL
 06CB				Create_New_Label PROC NEAR
 06CB  80 3E 0308 R 00		   cmp	New_Vol_Name,END_OF_STRING ;Did user enter a vol label
				;  $if	ne			   ;AN000;K
 06D0  74 52			   JE $$IF58
 06D2  BA 0305 R		       mov  dx,offset New_Vol_Path ;Point at path for file
 06D5  B9 0008			       mov  cx,VOL_ATTRIBUTE	   ;Set it as a volume label
 06D8  B4 5B			       mov  ah,CREATE_FILE	   ;(5BH) Go make it
 06DA  CD 21			       INT  21H
				;      $if  nc			   ;AN000;K
 06DC  72 08			       JC $$IF59
 06DE  8B D8				   mov	bx,ax		   ;shift file handle
 06E0  B4 3E				   mov	ah,CLOSE	   ;And close the file
 06E2  CD 21				   INT	21H
				;      $else			   ;AN000;K since there was creation error,
 06E4  EB 3E			       JMP SHORT $$EN59
 06E6				$$IF59:
 06E6  3D 0004				   cmp	ax,TOO_MANY_FILES  ;Is it
				;	   $if	ne		   ;AN000;K if not "too many files", then
 06E9  74 2D				   JE $$IF61
 06EB  B8 0002				       mov  ax,NO_ROOM_MSG ;AN000;M
 06EE  E8 0776 R			       call Setup_NoRoom   ;AN000;M
 06F1  E8 0743 R			       call Display_Msg    ;AN000;M
 06F4  F6 06 0317 R 02			       test Program_Flag,LABEL_FND ;AN000;K was an old label found?
				;	       $if  ne		   ;AN000;K if there was an old one,
 06F9  74 1B				       JE $$IF62
								   ;need to restore the previous label
								   ;because the new one did not stick
 06FB  BE 0344 R				   mov	si,offset Label_Name ;AN000;K where old name was kept
 06FE  BF 0308 R				   mov	di,offset New_Vol_Name ;AN000;K where to put old name
 0701  B9 0008					   mov	cx,8	   ;AN000;K count of filename up to "."
 0704  F3/ A4					   rep	movsb	   ;AN000;K
 0706  47					   inc	di	   ;AN000;K skip the "."
 0707  B9 0003					   mov	cx,3	   ;AN000;K length of extension
 070A  F3/ A4					   rep	movsb	   ;AN000;K
 070C  BA 0305 R				   mov	dx,offset New_Vol_Path ;AN000;K drive\path\filename
 070F  B9 0008					   mov	cx,VOL_ATTRIBUTE ;AN000;K make it a label
 0712  B4 5B					   mov	ah,CREATE_FILE ;AN000;K make a label
 0714  CD 21					   INT	21H	   ;AN000;K at least, try to, anyway...
				;	       $endif		   ;AN000;K old label?
 0716				$$IF62:
				;	   $else		   ;AN000;K since is "too many files", then...
 0716  EB 09				   JMP SHORT $$EN61
 0718				$$IF61:
 0718  B8 0001				       mov  ax,TOO_MANY_MSG ;AN000;M
 071B  E8 0768 R			       call Setup_TooMany  ;AN000;M
 071E  E8 0743 R			       call Display_Msg    ;AN000;M
				;	   $endif		   ;AN000;K
 0721				$$EN61:
 0721  E9 0918 R			   jmp	Error_Exit	   ;Tell user bad news and quit
				;      $endif			   ;AN000;K
 0724				$$EN59:
				;  $endif			   ;AN000;K
 0724				$$IF58:
 0724  C3			   ret
 0725				Create_New_Label ENDP
				
				   HEADER <PRELOAD_MESSAGES - SET UP SYS MSGS, DOS VERSION CHK>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-25
PRELOAD_MESSAGES - SET UP SYS MSGS, DOS VERSION CHK         

				;*****************************************************************************
				;  Preload utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				;  Notes:  Checks DOS version, if incorrect, or if error loading messages, will
				;	     display error message and terminate
				
				   PUBLIC PRELOAD_MESSAGES
 0725				Preload_Messages PROC NEAR	   ;AN000;M
 0725  50			   push ax			   ;AN000;M
 0726  55			   push bp			   ;AN000;M
 0727  8B EC			   mov	bp,sp			   ;AN000;M
 0729  57			   push di			   ;AN000;M
 072A  56			   push si			   ;AN000;M
 072B  E8 0000 E		   call SYSLOADMSG		   ;AN000;M Load msgs & chk DOS ver
				;  $if	c			   ;AN000;K
 072E  73 0C			   JNC $$IF68
 0730  E8 0000 E		       call SYSDISPMSG		   ;AN000;M
 0733  5E			       pop  si			   ;AN000;M
 0734  5F			       pop  di			   ;AN000;M
 0735  8B E5			       mov  sp,bp		   ;AN000;M
 0737  5D			       pop  bp			   ;AN000;M
 0738  58			       pop  ax			   ;AN000;M
 0739  E8 0918 R		       call Error_Exit		   ;AN000;M
				;  $endif			   ;AN000;K
 073C				$$IF68:
 073C  5E			   pop	si			   ;AN000;M
 073D  5F			   pop	di			   ;AN000;M
 073E  8B E5			   mov	sp,bp			   ;AN000;M
 0740  5D			   pop	bp			   ;AN000;M
 0741  58			   pop	ax			   ;AN000;M
 0742  C3			   ret				   ;AN000;M
 0743				Preload_Messages ENDP		   ;AN000;M
				
				   HEADER <DISPLAY_MSG - SEND MSG TO SYSTEM MESSAGE HANDLER>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-26
DISPLAY_MSG - SEND MSG TO SYSTEM MESSAGE HANDLER            

				;*****************************************************************************
				;  Display utility messages
				;*****************************************************************************
				;  Input:  dx contains the messsage to display
				;  Output: None
				;  Notes:  The message called is displayed to stdout/stderr unless AX returns
				;	     with error code (then setup for extended error to display)
				
				   PUBLIC DISPLAY_MSG
 0743				Display_Msg PROC NEAR		   ;AN000;M
 0743  55			   push bp			   ;AN000;M
 0744  8B EC			   mov	bp,sp			   ;AN000;M
 0746  57			   push di			   ;AN000;M
 0747  56			   push si			   ;AN000;M
 0748  E8 0000 E		   call SYSDISPMSG		   ;AN000;M Now display the message
				;  $if	c			   ;AN000;K if there was a problem, then...
 074B  73 15			   JNC $$IF70
 074D  BB 0002			       mov  bx,STDERR		   ;AN000;M Error msg, so stderr
 0750  B9 0000			       mov  cx,0		   ;AN000;M Substitution count
 0753  B2 00			       mov  dl,NO_INPUT 	   ;AN000;M No input characters
 0755  B6 01			       mov  dh,EXT_ERR_CLASS	   ;AN000;M DOS Extended error class
 0757  E8 0000 E		       call SYSDISPMSG		   ;AN000;M Now display the extended error
 075A  5E			       pop  si			   ;AN000;M
 075B  5F			       pop  di			   ;AN000;M
 075C  8B E5			       mov  sp,bp		   ;AN000;M
 075E  5D			       pop  bp			   ;AN000;M
 075F  E8 0918 R		       call Error_Exit		   ;AN000;M Nothing we can do so leave
				;  $endif			   ;AN000;K
 0762				$$IF70:
				;			     Done: ;AN000;M
 0762  5E			   pop	si			   ;AN000;M
 0763  5F			   pop	di			   ;AN000;M
 0764  8B E5			   mov	sp,bp			   ;AN000;M
 0766  5D			   pop	bp			   ;AN000;M
 0767  C3			   ret				   ;AN000;M Bye,bye
 0768				Display_Msg ENDP		   ;AN000;M
				
				   HEADER <SETUP_TOOMANY - "Too many files open">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-27
SETUP_TOOMANY - "Too many files open"                       

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_TOOMANY
 0768				Setup_TooMany PROC NEAR 	   ;AN000;M
 0768  B8 0004			   mov	ax,4			   ;AN000;M Utility's message number
 076B  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 076E  B9 0000			   mov	cx,0			   ;AN000;M Substitution count
 0771  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 0773  B6 01			   mov	dh,EXT_ERR_CLASS	   ;AN000;M DOS Extended error class
 0775  C3			   ret				   ;AN000;M Now display the message
 0776				Setup_TooMany ENDP		   ;AN000;M
				
				   HEADER <SETUP_NOROOM - "Cannot make directory entry">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-28
SETUP_NOROOM - "Cannot make directory entry"                

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_NOROOM
 0776				Setup_NoRoom PROC NEAR		   ;AN000;M
 0776  B8 0052			   mov	ax,82			   ;AN000;M Utility's message number
 0779  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 077C  B9 0000			   mov	cx,0			   ;AN000;M Substitution count
 077F  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 0781  B6 01			   mov	dh,EXT_ERR_CLASS	   ;AN000;M DOS Extended error class
 0783  C3			   ret				   ;AN000;M
 0784				Setup_NoRoom ENDP
				
				   HEADER <SETUP_INVCHAR - "Invalid characters in volume label">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-29
SETUP_INVCHAR - "Invalid characters in volume label"        

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_INVCHAR
 0784				Setup_InvChar PROC NEAR 	   ;AN000;M
 0784  B8 0003			   mov	ax,3			   ;AN000;M Utility's message number
 0787  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 078A  B9 0000			   mov	cx,0			   ;AN000;M Substitution count
 078D  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 078F  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 0791  C3			   ret				   ;AN000;M
 0792				Setup_InvChar ENDP		   ;AN000;M
				
				   HEADER <SETUP_NEWLABEL - "Volume label (11 characters, ENTER for none)?">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-30
SETUP_NEWLABEL - "Volume label (11 characters, ENTER for non

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_NEWLABEL
 0792				Setup_NewLabel PROC NEAR	   ;AN000;M
 0792  B8 0006			   mov	ax,6			   ;AN000;M Utility's message number
 0795  BB 0001			   mov	bx,STDOUT		   ;AN000;M Info msg, so stdout
 0798  B9 0000			   mov	cx,0			   ;AN000;M Substitution count
 079B  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 079D  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 079F  C3			   ret				   ;AN000;M
 07A0				Setup_NewLabel ENDP		   ;AN000;M
				
				   HEADER <SETUP_INVDRIVE - "Invalid drive specification">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-31
SETUP_INVDRIVE - "Invalid drive specification"              

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_INVDRIVE
 07A0				Setup_InvDrive PROC NEAR	   ;AN000;M
 07A0  C7 06 03B3 R 0350 R	   mov	s1_offset,offset FCB_Drive_Char ;AN000;M
 07A6  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 07AA  C6 06 03B8 R 00		   mov	s1_flags,CHAR_FIELD_CHAR   ;AN000;M Set up the parm formatting
 07AF  C6 06 03B9 R 00		   mov	s1_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 07B4  C6 06 03BA R 01		   mov	s1_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 07B9  C6 06 03BB R 20		   mov	s1_padchar,BLANK	   ;AN000;M In case, pad with blanks
 07BE  B8 000F			   mov	ax,15			   ;AN000;M Utility's message number
 07C1  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 07C4  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display invalid drive
 07C8  B9 0000			   mov	cx,0			   ;AN000;M Substitution count
 07CB  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 07CD  B6 01			   mov	dh,EXT_ERR_CLASS	   ;AN000;M DOS Extended error class
 07CF  C3			   ret				   ;AN000;M
 07D0				Setup_InvDrive ENDP		   ;AN000;M
				
				   HEADER <SETUP_NETDRIVE - "Cannot %1 a Network drive">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-32
SETUP_NETDRIVE - "Cannot %1 a Network drive"                

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_NETDRIVE
 07D0				Setup_NetDrive PROC NEAR	   ;AN000;M
 07D0  C7 06 03B3 R 0398 R	   mov	s1_offset,offset Label_Word ;AN000;M Cannot LABEL a network...
 07D6  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 07DA  C6 06 03B8 R 10		   mov	s1_flags,STR_INPUT	   ;AN000;M Set up the parm formatting
 07DF  C6 06 03B9 R 00		   mov	s1_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 07E4  C6 06 03BA R 01		   mov	s1_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 07E9  C6 06 03BB R 20		   mov	s1_padchar,BLANK	   ;AN000;M In case, pad with blanks
 07EE  B8 0008			   mov	ax,8			   ;AN000;M Utility's message number
 07F1  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 07F4  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display network drive msg
 07F8  B9 0001			   mov	cx,1			   ;AN000;M Substitution count
 07FB  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 07FD  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 07FF  C3			   ret				   ;AN000;M
 0800				Setup_NetDrive ENDP		   ;AN000;M
				
				   HEADER <SETUP_SUBSTASGN - "Cannot %1 a SUBSTed or ASSIGNed drive">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-33
SETUP_SUBSTASGN - "Cannot %1 a SUBSTed or ASSIGNed drive"   

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_SUBSTASGN
 0800				Setup_SubstAsgn PROC NEAR	   ;AN000;M
 0800  C7 06 03B3 R 0398 R	   mov	s1_offset,offset Label_Word ;AN000;M Cannot LABEL a SUBSTed...
 0806  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 080A  C6 06 03B8 R 10		   mov	s1_flags,STR_INPUT	   ;AN000;M Set up the parm formatting
 080F  C6 06 03B9 R 00		   mov	s1_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 0814  C6 06 03BA R 01		   mov	s1_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 0819  C6 06 03BB R 20		   mov	s1_padchar,BLANK	   ;AN000;M In case, pad with blanks
 081E  B8 0002			   mov	ax,2			   ;AN000;M Utility's message number
 0821  BB 0002			   mov	bx,STDERR		   ;AN000;M Error msg, so stderr
 0824  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display SUBST/ASSIGN drive ,dh
 0828  B9 0001			   mov	cx,1			   ;AN000;M Substitution count
 082B  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 082D  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 082F  C3			   ret				   ;AN000;M
 0830				Setup_SubstAsgn ENDP		   ;AN000;M
				
				   HEADER <SETUP_NOLABEL - "Volume in drive %1 has no label">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-34
SETUP_NOLABEL - "Volume in drive %1 has no label"           

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_NOLABEL
 0830				Setup_NoLabel PROC NEAR 	   ;AN000;M
 0830  C7 06 03B3 R 0350 R	   mov	s1_offset,offset FCB_Drive_Char ;AN000;M
 0836  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 083A  C6 06 03B8 R 00		   mov	s1_flags,CHAR_FIELD_CHAR   ;AN000;M Set up the parm formatting
 083F  C6 06 03B9 R 00		   mov	s1_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 0844  C6 06 03BA R 01		   mov	s1_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 0849  C6 06 03BB R 20		   mov	s1_padchar,BLANK	   ;AN000;M In case, pad with blanks
 084E  B8 0004			   mov	ax,4			   ;AN000;M Utility's message number
 0851  BB 0001			   mov	bx,STDOUT		   ;AN000;M Info msg, so stdout
 0854  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display drive
 0858  B9 0001			   mov	cx,1			   ;AN000;M Substitution count
 085B  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 085D  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 085F  C3			   ret				   ;AN000;M
 0860				Setup_NoLabel ENDP		   ;AN000;M
				
				   HEADER <SETUP_SERIALNUM - "Volume Serial Number is %1-%2">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-35
SETUP_SERIALNUM - "Volume Serial Number is %1-%2"           

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_SERIALNUM
 0860				Setup_SerialNum PROC NEAR	   ;AN000;M
 0860  C7 06 03B3 R 03CB R	   mov	s1_offset,offset SerNum+2  ;AN000;M
 0866  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 086A  C6 06 03B8 R A3		   mov	s1_flags,BIN_HEX_WORD+RIGHT_ALIGN ;AN000;M Set up the parm formatting
 086F  C6 06 03B9 R 04		   mov	s1_maxwidth,DWORD	   ;AN000;M 0 ensures no padding
 0874  C6 06 03BA R 04		   mov	s1_minwidth,DWORD	   ;AN000;M At least 1 char to insert
 0879  C6 06 03BB R 30		   mov	s1_padchar,CHAR_ZERO	   ;AN000;M In case, pad with ZERO CHAR
 087E  C7 06 03BE R 03C9 R	   mov	s2_offset,offset SerNum    ;AN000;M
 0884  8C 1E 03C0 R		   mov	s2_segment,ds		   ;AN000;M Setup segment
 0888  C6 06 03C3 R A3		   mov	s2_flags,BIN_HEX_WORD+RIGHT_ALIGN ;AN000;M Set up the parm formatting
 088D  C6 06 03C4 R 04		   mov	s2_maxwidth,DWORD	   ;AN000;M 0 ensures no padding
 0892  C6 06 03C5 R 04		   mov	s2_minwidth,DWORD	   ;AN000;M At least 1 char to insert
 0897  C6 06 03C6 R 30		   mov	s2_padchar,CHAR_ZERO	   ;AN000;M In case, pad with ZERO CHAR
 089C  B8 0007			   mov	ax,7			   ;AN000;M Utility's message number
 089F  BB 0001			   mov	bx,STDOUT		   ;AN000;M Info msg, so stdout
 08A2  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display serial number
 08A6  B9 0002			   mov	cx,2			   ;AN000;M Substitution count
 08A9  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 08AB  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 08AD  C3			   ret				   ;AN000;M
 08AE				Setup_SerialNum ENDP		   ;AN000;M
				
				   HEADER <SETUP_HASLABEL - "Volume in drive %1 is %2">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-36
SETUP_HASLABEL - "Volume in drive %1 is %2"                 

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_HASLABEL
 08AE				Setup_HasLabel PROC NEAR	   ;AN000;M
 08AE  C7 06 03B3 R 0350 R	   mov	s1_offset,offset FCB_Drive_Char ;AN000;M
 08B4  8C 1E 03B5 R		   mov	s1_segment,ds		   ;AN000;M Setup segment
 08B8  C6 06 03B8 R 00		   mov	s1_flags,CHAR_FIELD_CHAR   ;AN000;M Set up the parm formatting
 08BD  C6 06 03B9 R 00		   mov	s1_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 08C2  C6 06 03BA R 01		   mov	s1_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 08C7  C6 06 03BB R 20		   mov	s1_padchar,BLANK	   ;AN000;M In case, pad with blanks
 08CC  C7 06 03BE R 0344 R	   mov	s2_offset,offset Label_Name ;AN000;M
 08D2  8C 1E 03C0 R		   mov	s2_segment,ds		   ;AN000;M Setup segment
 08D6  C6 06 03C3 R 10		   mov	s2_flags,STR_INPUT	   ;AN000;M Set up the parm formatting
 08DB  C6 06 03C4 R 00		   mov	s2_maxwidth,MAXWIDTH	   ;AN000;M 0 ensures no padding
 08E0  C6 06 03C5 R 01		   mov	s2_minwidth,MINWIDTH	   ;AN000;M At least 1 char to insert
 08E5  C6 06 03C6 R 20		   mov	s2_padchar,BLANK	   ;AN000;M In case, pad with blanks
 08EA  B8 0005			   mov	ax,5			   ;AN000;M Utility's message number
 08ED  BB 0001			   mov	bx,STDOUT		   ;AN000;M Info msg, so stdout
 08F0  8D 36 03B1 R		   lea	si,sublist1		   ;AN000;M Display drive then label
 08F4  B9 0002			   mov	cx,2			   ;AN000;M Substitution count
 08F7  B2 00			   mov	dl,NO_INPUT		   ;AN000;M No input characters
 08F9  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN000;M Utility message class
 08FB  C3			   ret				   ;AN000;M
 08FC				Setup_HasLabel ENDP		   ;AN000;M
				
				   HEADER <SETUP_DELLABEL - "Delete current volume label (Y/N)?">
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-37
SETUP_DELLABEL - "Delete current volume label (Y/N)?"       

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_DELLABEL
 08FC				Setup_DelLabel PROC NEAR	   ;AN001;M
 08FC  B8 0009			   mov	ax,9			   ;AN001;M Utility's message number
 08FF  BB 0001			   mov	bx,STDOUT		   ;AN001;M Info msg, so stdout
 0902  B9 0000			   mov	cx,0			   ;AN001;M Substitution count
 0905  B2 C8			   mov	dl,DOS_CON_INPUT	   ;AN001;M Input Y/N character
 0907  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN001;M Utility message class
 0909  C3			   ret				   ;AN001;M
 090A				Setup_DelLabel ENDP		   ;AN001;M
				
				   HEADER <SETUP_CRLF - Carriage return, line feed>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-38
SETUP_CRLF - Carriage return, line feed                     

				;*****************************************************************************
				;  Setup for utility messages
				;*****************************************************************************
				;  Input:  None
				;  Output: None
				
				   PUBLIC SETUP_CRLF
 090A				Setup_CRLF PROC NEAR		   ;AN001;M
 090A  B8 000A			   mov	ax,10			   ;AN001;M Utility's message number
 090D  BB 0001			   mov	bx,STDOUT		   ;AN001;M Info msg, so stdout
 0910  B9 0000			   mov	cx,0			   ;AN001;M Substitution count
 0913  B2 00			   mov	dl,NO_INPUT		   ;AN001;M Input Y/N character
 0915  B6 FF			   mov	dh,UTILITY_MSG_CLASS	   ;AN001;M No input characters
 0917  C3			   ret				   ;AN001;M
 0918				Setup_CRLF ENDP 		   ;AN001;M
				
				   HEADER <ERROR_EXIT - ABNORMAL RETURN TO DOS>
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Page     1-39
ERROR_EXIT - ABNORMAL RETURN TO DOS                         

				;*****************************************************************************
				;  Error on exit
				;*****************************************************************************
				
				   PUBLIC ERROR_EXIT
 0918				Error_Exit PROC NEAR		   ;AC000;M
 0918  B8 4C01			   mov	ax,(EXIT SHL 8)+ERRORLEVEL_1 ;AN000;K Terminate, with ret code
 091B  CD 21			   INT	21H
 091D				Error_Exit ENDP 		   ;AN000;M
				
 091D				End_Of_Program label byte
				   Public End_Of_Program
				
 091D				CSEG ends
				   end	Start

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Symbols-1


Macros:

		N a m e			Lines

HEADER . . . . . . . . . . . . .  	   4

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CSEG . . . . . . . . . . . . . .  	091D	PARA	PUBLIC	

Symbols:            

                N a m e         	Type	 Value	 Attr

ASCII_DRV  . . . . . . . . . . .  	NUMBER	0040	

BIN_HEX_WORD . . . . . . . . . .  	NUMBER	0023	
BLANK  . . . . . . . . . . . . .  	NUMBER	0020	

CHARACTER_CHECK  . . . . . . . .  	N PROC	05CD	CSEG	Global	Length = 004F
CHAR_BAD . . . . . . . . . . . .  	NUMBER	0010	
CHAR_CHECK_DONE  . . . . . . . .  	L NEAR	061B	CSEG
CHAR_FIELD_CHAR  . . . . . . . .  	NUMBER	0000	
CHAR_ZERO  . . . . . . . . . . .  	NUMBER	0030	
CHECK_CHAR . . . . . . . . . . .  	L NEAR	05AD	CSEG
CHECK_DELETE . . . . . . . . . .  	N PROC	0682	CSEG	Global	Length = 0039
CHECK_DELETE_RETURN  . . . . . .  	L NEAR	06B1	CSEG
CHECK_FOR_DRIVE_LETTER . . . . .  	N PROC	055D	CSEG	Global	Length = 0018
CHECK_TRANS_DRIVE  . . . . . . .  	N PROC	0460	CSEG	Global	Length = 001B
CHK_DBCS . . . . . . . . . . . .  	N PROC	0507	CSEG	Global	Length = 0044
CHK_DBCS_BLANK . . . . . . . . .  	N PROC	054B	CSEG	Global	Length = 0012
CLOSE  . . . . . . . . . . . . .  	NUMBER	003E	
COLON  . . . . . . . . . . . . .  	NUMBER	003A	
CR . . . . . . . . . . . . . . .  	NUMBER	000D	
CREATE_FILE  . . . . . . . . . .  	NUMBER	005B	
CREATE_NEW_LABEL . . . . . . . .  	N PROC	06CB	CSEG	Global	Length = 005A
CRLF_MSG . . . . . . . . . . . .  	NUMBER	000C	

DBCSBLK_BYTEONE  . . . . . . . .  	NUMBER	0081	
DBCSBLK_BYTETWO  . . . . . . . .  	NUMBER	0040	
DBCSEV_OFF . . . . . . . . . . .  	L WORD	03E0	CSEG
DBCSEV_SEG . . . . . . . . . . .  	L WORD	03E2	CSEG
DEFAULT_DRIVE  . . . . . . . . .  	NUMBER	0000	
DELETE_LABEL . . . . . . . . . .  	L NEAR	06AC	CSEG
DELETE_OLD_LABEL . . . . . . . .  	N PROC	06BB	CSEG	Global	Length = 0010
DELETE_PROMPT  . . . . . . . . .  	L NEAR	0690	CSEG
DEL_DRIVE  . . . . . . . . . . .  	L BYTE	03A5	CSEG
DEL_FCB  . . . . . . . . . . . .  	L BYTE	039E	CSEG
DEL_LABEL_MSG  . . . . . . . . .  	NUMBER	000B	
DEL_NAME . . . . . . . . . . . .  	L BYTE	03A6	CSEG
DISPLAY_MSG  . . . . . . . . . .  	N PROC	0743	CSEG	Global	Length = 0025
DOS_CON_INPUT  . . . . . . . . .  	NUMBER	00C8	
DOT_LOCATION . . . . . . . . . .  	NUMBER	0008	
DO_MORE_CHECK  . . . . . . . . .  	L NEAR	059D	CSEG
DRIVE_INVALID  . . . . . . . . .  	NUMBER	00FF	
DRIVE_LETTER_RET . . . . . . . .  	L NEAR	0574	CSEG
DRIVE_SETUP  . . . . . . . . . .  	N PROC	0402	CSEG	Global	Length = 005E

End_Of_Program . . . . . . . . .  	L BYTE	091D	CSEG	Global
END_OF_STRING  . . . . . . . . .  	NUMBER	0000	
END_PARAMETERS . . . . . . . . .  	L WORD	0315	CSEG
END_STACK_AREA . . . . . . . . .  	L BYTE	0304	CSEG
ERRORLEVEL_0 . . . . . . . . . .  	NUMBER	0000	
ERRORLEVEL_1 . . . . . . . . . .  	NUMBER	0001	
ERROR_EXIT . . . . . . . . . . .  	N PROC	0918	CSEG	Global	Length = 0005
EXIT . . . . . . . . . . . . . .  	NUMBER	004C	
EXT_ERR_CLASS  . . . . . . . . .  	NUMBER	0001	

FCB1 . . . . . . . . . . . . . .  	L BYTE	005C	CSEG
FCB_DELETE . . . . . . . . . . .  	NUMBER	0013	
FCB_DRIVE  . . . . . . . . . . .  	L BYTE	031F	CSEG
FCB_DRIVE_CHAR . . . . . . . . .  	L BYTE	0350	CSEG
FCB_SEARCH . . . . . . . . . . .  	NUMBER	0011	
FIND_FIRST_CHAR  . . . . . . . .  	N PROC	04DB	CSEG	Global	Length = 002C
FIND_OLD_LABEL . . . . . . . . .  	N PROC	047B	CSEG	Global	Length = 0023
FOUND_DBCS . . . . . . . . . . .  	NUMBER	0020	

GET_DBCS_ENV . . . . . . . . . .  	NUMBER	6300	
GET_DEFAULT  . . . . . . . . . .  	NUMBER	0019	
GET_INPUT  . . . . . . . . . . .  	NUMBER	0008	
GET_MEDIA_ID . . . . . . . . . .  	NUMBER	6900	
GET_NEW_LABEL  . . . . . . . . .  	N PROC	049E	CSEG	Global	Length = 003D
GET_NEXT_CHAR  . . . . . . . . .  	L NEAR	05C6	CSEG
GET_SERIAL_NUM . . . . . . . . .  	N PROC	0641	CSEG	Global	Length = 0010
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Symbols-2


GET_USER_INPUT . . . . . . . . .  	N PROC	0651	CSEG	Global	Length = 0031
GOT_OK_CHARACTER . . . . . . . .  	L NEAR	05BC	CSEG

HAS_LABEL_MSG  . . . . . . . . .  	NUMBER	000A	

INPUT_NEW_LABEL  . . . . . . . .  	L NEAR	04D5	CSEG
INV_CHAR_MSG . . . . . . . . . .  	NUMBER	0003	
INV_DRIVE_MSG  . . . . . . . . .  	NUMBER	0005	
IOCTL  . . . . . . . . . . . . .  	NUMBER	0044	

LABEL_FND  . . . . . . . . . . .  	NUMBER	0002	
LABEL_NAME . . . . . . . . . . .  	L BYTE	0344	CSEG
LABEL_WORD . . . . . . . . . . .  	L BYTE	0398	CSEG
LOC_OR_NET . . . . . . . . . . .  	NUMBER	0009	

MAIN_BEGIN . . . . . . . . . . .  	N PROC	03E4	CSEG	Global	Length = 001E
MAXWIDTH . . . . . . . . . . . .  	NUMBER	0000	
MAX_CHARS  . . . . . . . . . . .  	NUMBER	000B	
MAX_INPUT  . . . . . . . . . . .  	NUMBER	007F	
MINWIDTH . . . . . . . . . . . .  	NUMBER	0001	

NEED_USER_INPUT  . . . . . . . .  	L NEAR	04CB	CSEG
NETWORKDRIVEMSG  . . . . . . . .  	NUMBER	0006	
NEW_LABEL_MSG  . . . . . . . . .  	NUMBER	0004	
NEW_VOL_EXT  . . . . . . . . . .  	L BYTE	0310	CSEG
NEW_VOL_NAME . . . . . . . . . .  	L BYTE	0308	CSEG
NEW_VOL_PATH . . . . . . . . . .  	L BYTE	0305	CSEG
NO . . . . . . . . . . . . . . .  	NUMBER	0000	
NO_DELETE  . . . . . . . . . . .  	NUMBER	0004	
NO_INPUT . . . . . . . . . . . .  	NUMBER	0000	
NO_LABEL_MSG . . . . . . . . . .  	NUMBER	0008	
NO_ROOM_MSG  . . . . . . . . . .  	NUMBER	0002	
NUM_PARMS  . . . . . . . . . . .  	L BYTE	0080	CSEG

OUTPUT_OLD_LABEL . . . . . . . .  	N PROC	061C	CSEG	Global	Length = 0025

PARM_AREA  . . . . . . . . . . .  	L BYTE	0081	CSEG
PERIOD . . . . . . . . . . . . .  	NUMBER	002E	
PRELOAD_MESSAGES . . . . . . . .  	N PROC	0725	CSEG	Global	Length = 001E
PROCESS_STRING . . . . . . . . .  	N PROC	0575	CSEG	Global	Length = 0058
PROCESS_STRING_RETURN  . . . . .  	L NEAR	05CC	CSEG
PROGRAM_FLAG . . . . . . . . . .  	L BYTE	0317	CSEG

READ . . . . . . . . . . . . . .  	NUMBER	003F	
RESERVED . . . . . . . . . . . .  	NUMBER	0000	
RIGHT_ALIGN  . . . . . . . . . .  	NUMBER	0080	

S1_FLAGS . . . . . . . . . . . .  	L BYTE	03B8	CSEG
S1_ID  . . . . . . . . . . . . .  	L BYTE	03B7	CSEG
S1_MAXWIDTH  . . . . . . . . . .  	L BYTE	03B9	CSEG
S1_MINWIDTH  . . . . . . . . . .  	L BYTE	03BA	CSEG
S1_NXTLST  . . . . . . . . . . .  	L BYTE	03B1	CSEG
S1_OFFSET  . . . . . . . . . . .  	L WORD	03B3	CSEG
S1_PADCHAR . . . . . . . . . . .  	L BYTE	03BB	CSEG
S1_RESERVE . . . . . . . . . . .  	L BYTE	03B2	CSEG
S1_SEGMENT . . . . . . . . . . .  	L WORD	03B5	CSEG
S2_FLAGS . . . . . . . . . . . .  	L BYTE	03C3	CSEG
S2_ID  . . . . . . . . . . . . .  	L BYTE	03C2	CSEG
S2_MAXWIDTH  . . . . . . . . . .  	L BYTE	03C4	CSEG
S2_MINWIDTH  . . . . . . . . . .  	L BYTE	03C5	CSEG
S2_NXTLST  . . . . . . . . . . .  	L BYTE	03BC	CSEG
S2_OFFSET  . . . . . . . . . . .  	L WORD	03BE	CSEG
S2_PADCHAR . . . . . . . . . . .  	L BYTE	03C6	CSEG
S2_RESERVE . . . . . . . . . . .  	L BYTE	03BD	CSEG
S2_SEGMENT . . . . . . . . . . .  	L WORD	03C0	CSEG
SBCSBLANKS . . . . . . . . . . .  	NUMBER	2020	
SCAN_CONTINUE  . . . . . . . . .  	L NEAR	05BD	CSEG
SERIAL_NUM_MSG . . . . . . . . .  	NUMBER	0009	
SERNUM . . . . . . . . . . . . .  	L DWORD	03C9	CSEG
SERNUMBUF  . . . . . . . . . . .  	L BYTE	03C7	CSEG
SETUP_CRLF . . . . . . . . . . .  	N PROC	090A	CSEG	Global	Length = 000E
SETUP_DELLABEL . . . . . . . . .  	N PROC	08FC	CSEG	Global	Length = 000E
SETUP_HASLABEL . . . . . . . . .  	N PROC	08AE	CSEG	Global	Length = 004E
SETUP_INVCHAR  . . . . . . . . .  	N PROC	0784	CSEG	Global	Length = 000E
SETUP_INVDRIVE . . . . . . . . .  	N PROC	07A0	CSEG	Global	Length = 0030
SETUP_NETDRIVE . . . . . . . . .  	N PROC	07D0	CSEG	Global	Length = 0030
SETUP_NEWLABEL . . . . . . . . .  	N PROC	0792	CSEG	Global	Length = 000E
SETUP_NOLABEL  . . . . . . . . .  	N PROC	0830	CSEG	Global	Length = 0030
SETUP_NOROOM . . . . . . . . . .  	N PROC	0776	CSEG	Global	Length = 000E
SETUP_SERIALNUM  . . . . . . . .  	N PROC	0860	CSEG	Global	Length = 004E
SETUP_SUBSTASGN  . . . . . . . .  	N PROC	0800	CSEG	Global	Length = 0030
SETUP_TOOMANY  . . . . . . . . .  	N PROC	0768	CSEG	Global	Length = 000E
SET_DTA  . . . . . . . . . . . .  	NUMBER	001A	
STACK_AREA . . . . . . . . . . .  	L BYTE	0104	CSEG	Length = 0200
START  . . . . . . . . . . . . .  	L NEAR	0100	CSEG
STDERR . . . . . . . . . . . . .  	NUMBER	0002	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:08
LABEL.SAL - DOS LABEL COMMAND                               Symbols-3


STDIN  . . . . . . . . . . . . .  	NUMBER	0000	
STDOUT . . . . . . . . . . . . .  	NUMBER	0001	
STR_INPUT  . . . . . . . . . . .  	NUMBER	0010	
SUBLIST1 . . . . . . . . . . . .  	L DWORD	03B1	CSEG
SUBLIST2 . . . . . . . . . . . .  	L DWORD	03BC	CSEG
SUBLIST_LENGTH . . . . . . . . .  	NUMBER	000B	
SUBSTASSIGNMSG . . . . . . . . .  	NUMBER	0007	
SYSDISPMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External
SYSLOADMSG . . . . . . . . . . .  	L NEAR	0000	CSEG	External

TOO_MANY_FILES . . . . . . . . .  	NUMBER	0004	
TOO_MANY_MSG . . . . . . . . . .  	NUMBER	0001	
TRANDST  . . . . . . . . . . . .  	L BYTE	0358	CSEG	Length = 0040
TRANSRC  . . . . . . . . . . . .  	L BYTE	0351	CSEG

USER_INPUT . . . . . . . . . . .  	NUMBER	0001	
UTILITY_MSG_CLASS  . . . . . . .  	NUMBER	00FF	

VOL_ATTRIBUTE  . . . . . . . . .  	NUMBER	0008	
VOL_FCB  . . . . . . . . . . . .  	L BYTE	0318	CSEG
VOL_NAME . . . . . . . . . . . .  	L BYTE	0320	CSEG
VOL_NOT_FOUND  . . . . . . . . .  	NUMBER	00FF	

XNAMETRANS . . . . . . . . . . .  	NUMBER	0060	

YES  . . . . . . . . . . . . . .  	NUMBER	0001	
YN_CHECK . . . . . . . . . . . .  	NUMBER	6523	

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

$$DO11 . . . . . . . . . . . . .  	L NEAR	049E	CSEG
$$DO17 . . . . . . . . . . . . .  	L NEAR	04DB	CSEG
$$DO27 . . . . . . . . . . . . .  	L NEAR	052B	CSEG
$$EN11 . . . . . . . . . . . . .  	L NEAR	04DA	CSEG
$$EN27 . . . . . . . . . . . . .  	L NEAR	0547	CSEG
$$EN43 . . . . . . . . . . . . .  	L NEAR	05CC	CSEG
$$EN59 . . . . . . . . . . . . .  	L NEAR	0724	CSEG
$$EN61 . . . . . . . . . . . . .  	L NEAR	0721	CSEG
$$IF1  . . . . . . . . . . . . .  	L NEAR	0412	CSEG
$$IF14 . . . . . . . . . . . . .  	L NEAR	04D5	CSEG
$$IF18 . . . . . . . . . . . . .  	L NEAR	04E9	CSEG
$$IF21 . . . . . . . . . . . . .  	L NEAR	04FD	CSEG
$$IF23 . . . . . . . . . . . . .  	L NEAR	0506	CSEG
$$IF25 . . . . . . . . . . . . .  	L NEAR	0521	CSEG
$$IF27 . . . . . . . . . . . . .  	L NEAR	0542	CSEG
$$IF3  . . . . . . . . . . . . .  	L NEAR	041F	CSEG
$$IF33 . . . . . . . . . . . . .  	L NEAR	055C	CSEG
$$IF35 . . . . . . . . . . . . .  	L NEAR	0574	CSEG
$$IF36 . . . . . . . . . . . . .  	L NEAR	0574	CSEG
$$IF37 . . . . . . . . . . . . .  	L NEAR	0574	CSEG
$$IF38 . . . . . . . . . . . . .  	L NEAR	0574	CSEG
$$IF43 . . . . . . . . . . . . .  	L NEAR	058A	CSEG
$$IF44 . . . . . . . . . . . . .  	L NEAR	0588	CSEG
$$IF45 . . . . . . . . . . . . .  	L NEAR	0588	CSEG
$$IF5  . . . . . . . . . . . . .  	L NEAR	0446	CSEG
$$IF50 . . . . . . . . . . . . .  	L NEAR	062F	CSEG
$$IF52 . . . . . . . . . . . . .  	L NEAR	0640	CSEG
$$IF54 . . . . . . . . . . . . .  	L NEAR	0666	CSEG
$$IF56 . . . . . . . . . . . . .  	L NEAR	06CA	CSEG
$$IF58 . . . . . . . . . . . . .  	L NEAR	0724	CSEG
$$IF59 . . . . . . . . . . . . .  	L NEAR	06E6	CSEG
$$IF61 . . . . . . . . . . . . .  	L NEAR	0718	CSEG
$$IF62 . . . . . . . . . . . . .  	L NEAR	0716	CSEG
$$IF68 . . . . . . . . . . . . .  	L NEAR	073C	CSEG
$$IF7  . . . . . . . . . . . . .  	L NEAR	0457	CSEG
$$IF70 . . . . . . . . . . . . .  	L NEAR	0762	CSEG
$$IF9  . . . . . . . . . . . . .  	L NEAR	049D	CSEG
$$SR27 . . . . . . . . . . . . .  	L NEAR	0548	CSEG
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  label		
@VERSION . . . . . . . . . . . .  	TEXT  510		


   1350 Source  Lines
   1490 Total   Lines
    209 Symbols

  46632 + 209583 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
