home *** CD-ROM | disk | FTP | other *** search
- TITLE NFD - New File Date Utility 1.03 28 Oct 87
- page 62,132
-
- ;*************************************************************************
- ; This program is NOT copyrighted in any way and may be used in whole or
- ; in part in any manner. The author, as is usual, makes no claims about
- ; the suitability of this program for any purpose whatsoever and disclaims
- ; liability for any damages, actual or consequential, that may arise from
- ; use of this program.
- ;
- ; Don A. Williams
- ; 7 Mar 86
- ;*************************************************************************
-
- ;*************************************************************************
- ; The source for NFD, NFD.ASM, as issued is intended for use with
- ; SpeedWare's excellent assembler, Turbo Editasm. For use with Micrsoft's
- ; MASM, SEGMENT, ASSUME, and ENDS statements will have to be added.
- ;*************************************************************************
-
- ;*************************************************************************
- ; Source modified on 28 Oct 87 for use with MASM and added a conditional
- ; to GetArgs in order to allow the "Usage: . . ." output when no arguments
- ; are supplied. (Aside: the differences in the generated machine code,
- ; MASM vs. Turbo Editasm, are interesting to say the least. CISC cause
- ; no doubt.) -- Will Jordan
- ; Source modified again 25 Nov 87 -- flipped condition (jnz, was jz) 2
- ; lines before "GotDir:"; corrected "Could not find file" message when
- ; the filename is explicitly entered.
- ;*************************************************************************
-
- CODESEG segment para public 'code'
- assume cs:CODESEG,ds:CODESEG,es:CODESEG,ss:CODESEG
-
- LF EQU 0AH
- CR EQU 0DH
-
- DTA EQU 80H ; define (default) DTA of PSP
- FATTRD EQU byte ptr DTA[21] ; defining all parm's, even not used
- FTIMED EQU word ptr DTA[22]
- FDATED EQU word ptr DTA[24]
- FSIZLD EQU word ptr DTA[26]
- FSIZHD EQU word ptr DTA[28]
- FNAMED EQU byte ptr DTA[30]
-
- ARDONLY EQU 01H ; define file attribute (FATTR) bits
- AHIDDEN EQU 02H
- ASYSTEM EQU 04H
- AVOLLAB EQU 08H
- ASUBDIR EQU 10H
- AARCHIV EQU 20H
-
- ORG 0100H
-
- Start: jmp Begin
-
- DateSw dw 0
- TimeSw dw 0
-
- NFDate dw 0 ; New Date for file
- NFTime dw 0 ; New Time for file
-
- FDate dw 0 ; File Date From/To Function 57H
- FTime dw 0 ; File Time From/To Function 57H
-
- Hour dw 0
- Minute dw 0
- Second dw 0
-
- Day dw 0
- Month dw 0
- Year dw 0
-
- ArgSep db 0
-
- TmpCnt dw 0
- PtrOfs dw 0
-
- UseMsg db 'Usage is: NFD <filename> [mm/dd/yy] [hh:mm:ss]',CR,LF
- db ' /s for silent operation (no STDOUT)',CR,LF
- db ' /n for no query',CR,LF,'$'
-
- NFMsg db 'Could not find file',CR,LF,'$'
-
- BDMsg db 'Incorrect date',2CH,' format is mm/dd/yy or mm-dd-yy',CR,LF,'$'
-
- BTMsg db 'Incorrect time',2CH,' format is hh:mm:ss',CR,LF,'$'
-
- IntMsg db 'Internal error during file access',CR,LF,'$'
-
- SignOn db 'NFD Version: 1.04 - 25 Nov 87',CR,LF,LF,0
-
- From db CR,LF,' From: ',0
-
- To db ' To: ',0
-
- CrLfMs db CR,LF,0
-
- Query db ' Change? ',0
-
- Begin: mov SI,offset SignOn ; Display logon message
- call PrtStr ; ...
- call GetArgs ; Parse Command Line arguments
- cmp word ptr ARGC,0 ; Check for no arguments
- jz Usage ; ... Xfr - no arguments
- cmp word ptr ARGC,4 ; Check for more than 4 arguments
- ja Usage ; ... Xfr - more than 4
- call GetPath ; Extract Path from File Path Name
- call DateTime
- cmp word ptr DateSw,0 ; Check for Date argument
- jne CheckTime ; ... Xfr - Date on Command Line
- mov AH,2AH ; MS-DOS 'Get Date'
- int 21H ; ... DOS Entry Interrupt
- sub CX,1900 ; Make Year 1900 relative
- mov Year,CX ; ... and save it
- mov CL,DH ; Move Month to CX as 16-bit value
- mov CH,0 ; ...
- mov Month,CX ; ... and save it
- mov CL,DL ; Move Day to CX as 16-bit value
- mov Day,CX ; ... and save it
- CheckTime:
- cmp word ptr TimeSw,0 ; Check for Time on Command Line
- jne Here ; ... Xfr - Time on Command Line
- mov AH,2CH ; MS-DOS 'Get Time'
- int 21H ; ... DOS Entry Interrupt
- mov AX,0 ; Move Hour to AX as 16-bit value
- mov AL,CH ; ...
- mov Hour,AX ; ... and save it
- mov AL,CL ; Move Minute to AX as 16-bit value
- mov Minute,AX ; ... and save it
- mov AL,DH ; Move Second to AX as 16-bit value
- mov Second,AX ; ... and save it
- mov word ptr DateSw,0FFH
- mov word ptr TimeSw,0FFH
- Here: jmp Format
-
- Usage: mov DX,offset UseMsg ; Display 'Usage' message
- mov AH,9 ; ... MS-DOS 'Print String'
- int 21H ; ... DOS Entry Interrupt
- mov AL,1 ; Set error code
- jmp Term ; ... and terminate
-
- DateTime:
- mov AX,ARGC ; Initialize loop counter to ARGC
- mov TmpCnt,AX ; ...
- mov word ptr PtrOfs,0 ; Initialize Arg ptr offset to 0
-
- ArgLoop:
- add word ptr PtrOfs,2 ; Incr Arg ptr offset
- dec word ptr TmpCnt ; ... and decr loop count
- jnz DoArg ; ... Xfr - loop count not exhausted
- ret
-
- DoArg:
- mov BX,PtrOfs ; Get Arg ptr offset
- mov SI,[BX+ARGV] ; ... and Arg ptr
- mov AL,byte ptr [SI] ; Check for switch arg
- cmp AL,'/' ; ... primary switch char
- je Switch ; ... Xfr - got switch
- cmp AL,'-' ; ... secondary switch char
- je Switch ; ... Xfr - got switch
- call GetNumber ; Convert 1st arg field to binary
- cmp AL,'/' ; Check for Date field separator
- jz GotMonth ; ... Xfr - got separator
- cmp AL,'-' ; Check for Date field separator
- jz GotMonth ; ... Xfr - got separator
- cmp AL,':' ; Check for Time field spearator
- jnz Usage ; ... Xfr - bad format
- jmp GotHour ; Xfr - got separator
-
- Switch:
- inc SI ; Skip switch char
-
- SWLoop: lodsb ; Get byte
- cmp AL,0 ; Check for NULL terminator
- je ESW ; ... Xfr - NULL - end of Arg
- and AL,0DFH ; Force upper case
- cmp AL,'N' ; Check for 'No Query'
- je NQ ; ... Xfr - 'No Query
- cmp AL,'S' ; Check for 'Silent'
- je Silent ; ... Xfr - 'Silent'
- jmp Usage ; Xfr - invalid switch
-
- NQ: mov byte ptr QSwt,0FFH ; Turn on No Query Switch
- jmp short SWLoop ; Go try for another switch
-
- Silent: mov byte ptr SSwt,0FFH ; Turn on Silent Switch
- jmp short SWLoop ; Go try for another switch
-
- ESW: jmp ArgLoop ; Go try for another argument
-
-
- ErExit: mov AH,9 ; MS-DOS 'Print String'
- int 21H ; ... DOS Entry Interrupt
- mov AL,2
- jmp Term
-
- GotMonth:
- cmp word ptr DateSw,0 ; Check Date Arg Switch
- jz DoDate ; ... Xfr - OFF - okay
- jmp short Usage ; Go display Usage msg and term
-
- DoDate: mov word ptr DateSw,1 ; Set Date Arg Switch ON
- cmp CX,0 ; Check for zero field
- jbe BadDate ; ... Xfr - bad Date field
- cmp CX,12 ; Check Month upper limit
- ja BadDate ; ... Xfr - Month too high
- mov Month,CX ; Save binary month
- mov ArgSep,AL ; Save field separator
- inc SI ; Incr to next field of Date
- call GetNumber ; ... and convert to binary
- cmp AL,0 ; Check for NULL terminator
- jz EndDate ; ... Xfr - end of parameters
- cmp AL,ArgSep ; Was it the same as for Month?
- jnz BadDate ; ... Xfr - no - bad date format
- EndDate:
- cmp CX,0 ; Check field value for zero
- jbe BadDate ; ... Xfr - Day <= 0 - bad
- cmp CX,31 ; Check Day upper limit
- ja BadDate ; ... Xfr - too high - bad
- mov Day,CX ; Save binary Day
- cmp AL,0 ; Check for NULL terminator
- jnz DoYear ; ... Xfr - not end of parameters
- jmp ArgLoop ; Xfr - end of parameters
-
- DoYear: inc SI ; Incr to next Date field [Year]
- call GetNumber ; Convert to binary
- cmp AL,0 ; Check for NULL terminator
- jnz BadDate ; ... Xfr - not end - bad format
- cmp CX,80 ; Check lower limit of Year
- jb BadDate ; ... Xfr - < lower limit - bad
- cmp CX,99 ; Check upper limit of Year
- ja BadDate ; ... Xfr - > upper limit - bad
- mov Year,CX ; Save binary Year
- jmp ArgLoop
-
- BadDate:
- mov DX,offset BDMsg ; Display 'Bad Date' message
- jmp short ErExit ; ... and terminate
-
- GotHour:
- cmp word ptr TimeSw,0 ; Check Time Arg switch
- jz DoTime ; ... Xfr - OFF - okay
- jmp Usage ; Display 'Usage' msg and term
-
- DoTime: mov word ptr TimeSw,1 ; Turn ON Time Arg switch
- cmp CX,24 ; Check upper limit on Hour
- ja BadTime ; ... Xfr - too high - error
- mov Hour,CX ; Save binary Hour
- mov ArgSep,AL ; Save field separator
- inc SI ; incr ptr past separator
- call GetNumber ; Get Minute in binary
- cmp AL,0 ; Check for NULL terminator
- jz EndTime ; ... Xfr - NULL terminator
- cmp AL,' ' ; Check for blank terminator
- jz EndTime ; ... Xfr - Blank terminator
- cmp AL,ArgSep ; Compare separator to prior
- jnz BadTime ; ... Xfr - not same - error
- EndTime:
- cmp CX,59 ; Check upper limit on Minute
- ja BadTime ; ... Xfr - too high - error
- mov Minute,CX ; Save binary minute
- cmp AL,0 ; Check for NULL terminator
- jz NoSec ; ... Xfr - NULL - no seconds
- cmp AL,' ' ; Check for Blank terminator
- jnz DoSec ; ... Xfr - not Blank - get secs
- NoSec: mov word ptr Second,0 ; Zero-set binary Second
- jmp ArgLoop ; Go try for another argument
-
- DoSec: inc SI ; Incr ptr past separator
- call GetNumber ; Get Seconds in binary
- cmp AL,0 ; Check for NULL terminator
- jnz BadTime ; ... Xfr - not NULL - error
- cmp CX,59 ; Check upper limit on Seconds
- ja BadTime ; ... Xfr - too high - error
- mov Second,CX ; Save binary Seconds
- jmp ArgLoop ; Go try for another argument
-
- BadTime:
- mov DX,offset BTMsg ; Display 'Bad Time' message
- jmp ErExit ; ... and terminate
-
- Format: mov AX,Year ; Format today's date for Directory
- sub AX,80 ; ... entry Date format
- mov CX,4 ; ...
- shl AX,CL ; ...
- or AX,Month ; ...
- mov CX,5 ; ...
- shl AX,CL ; ...
- or AX,Day ; ...
- mov NFDate,AX ; Save formated New File Date
- mov AX,Hour ; Format current time for Directory
- mov CX,6 ; ... entry format
- shl AX,CL ; ...
- or AX,Minute ; ...
- mov CX,5 ; ...
- shl AX,CL ; ...
- mov BX,Second ; ...
- shr BX,1 ; ...
- or AX,BX ; ...
- mov NFTime,AX ; Save formated New File Time
-
- mov DX,offset Path
- mov CX,(AHIDDEN+AARCHIV) ; ... find ALL files
- mov AH,4EH ; ... MS-DOS 'Find First Match'
- int 21H ; ... DOS Entry Interrupt
- jnc DoFile ; ... Xfr - match
- jmp NoFile ; Xfr - no match
-
- DoFile: mov DI,FName ; Get ptr to File Name in Path
- mov SI,FNAMED ; ... and ptr to File Name in DTA
- mov CX,15 ; ... set CX for max length
-
- DFLoop: lodsb ; Move File Name from DTA to
- stosb ; ... Path
- cmp AL,0 ; Check for NULL terminator
- je DFEnd ; ... Xfr - NULL - end of name
- loop DFLoop
-
- DFend: mov DX,Offset PATH ; Get file Path name ptr for open
- mov AL,2 ; ... set access to Read/Write
- mov AH,3DH ; ... MS-DOS 'Open File Handle'
- int 21H ; ... DOS Entry Interrupt
- jnc OpenOK ; ... Xfr - no Open Error
- jmp NoFile ; ... Xfr - Open Error
- OpenOK:
- push AX
- cmp byte ptr SSwt,0 ; Check Silent switch
- jne Sil1 ; ... Xfr - Silent
- mov SI,offset Path ; Display file name
- call PrtStr ; ...
- mov SI,offset From ; Display 'From' message
- call PrtStr ; ...
- Sil1: pop AX
- mov BX,AX ; Move File Handle to BX
- mov AH,57H ; MS-DOS 'Get/Set File Date/Time'
- mov AL,0 ; ... make it Get
- int 21H ; ... DOS Entry Interrupt
- jnc GetOK ; ... Xfr - no error
- jmp IntErr ; ... Xfr - error - bad trouble
- GetOK:
- mov FDate,DX ; Save File Date
- mov FTime,CX ; Save File Time
- cmp byte ptr SSwt,0 ; Check Silent switch
- jne NewTime ; ... Xfr - Silent
- call PrtDate ; Display Old Date
- call PrtTime ; Display Old Time
- NewTime:
- cmp word ptr TimeSw,0 ; Was a Time argument supplied?
- jz NewDate ; ... Xfr - no
- mov AX,NFTime ; Move New Time to File Time
- mov FTime,AX ; ...
- NewDate:
- cmp word ptr DateSw,0 ; Was a Date argument supplied?
- jz SetFile ; ... Xfr - no
- mov AX,NFDate ; Move New Date to File Date
- mov FDate,AX ; ...
- SetFile:
- mov DX,FDate ; ... get Date
- mov CX,FTime ; ... get Time
- cmp byte ptr SSwt,0 ; Check for Silent
- jne Change ; ... Xfr - Silent
- mov SI,offset To ; Display 'To' message
- call PrtStr ; ...
- push CX
- push DX
- call PrtDate ; Display New Date
- call PrtTime ; Display New Time
- cmp byte ptr QSwt,0 ; Check No Query switch
- jne Change ; ... Xfr - No Query switch ON
- mov SI,offset Query ; Display Query message
- call PrtStr ; ...
- mov AH,1 ; Get user's response
- int 21H ; ... DOS Entry Interrupt
- and AL,0DFH ; Force upper case
- cmp AL,'Y' ; Check for YES
- pop DX
- pop CX
- je Change ; ... Xfr - YES - Change it
- jmp short NoChange ; ... Assume NO - No Change
- Change:
- mov AH,57H ; MS-DOS 'Get/Set File Date/Time'
- mov AL,1 ; ... make it Set
- int 21H ; ... DOS Entry Interrupt
- jb IntErr ; ... Xfr - error - bad trouble
- NoChange:
- cmp byte ptr SSwt,0 ; Check for Silent
- jne Sil2 ; ... Xfr - Silent
- call NewLine ; Advance display to new line
- Sil2: mov AH,3EH ; MS-DOS 'Close File Handle'
- int 21H ; ... DOS Entry Interrupt
- jb IntErr ; ... Xfr - error - bad trouble
- mov AH,4FH ; MS-DOS 'Find Next Match'
- int 21H ; ... DOS Entry Interrupt
- jb NormTerm ; Xfr - no more files - terminate
- jmp DoFile
-
- NormTerm:
- mov AL,0 ; Set return code for Good return
- Term: mov AH,4CH ; MS-DOS 'Terminate Process'
- int 21H ; ... DOS Entry Interrupt
- ret
-
- NoFile: mov DX,offset NFMsg ; Display 'Not Found' message
- jmp ErExit ; ... and terminate
-
- IntErr: mov DX,offset IntMsg ; Display 'Internal Error' message
- jmp ErExit ; ... and terminate
-
-
- GetArgs:
- cld ; Clear Direction Flag [forward]
- mov SI,DTA ; Get ptr to Command Tail length
- mov CL,[SI] ; Get length to CX as 16-bit value
- mov CH,0 ; ...
- push CX ; Save Command Tail length
- inc SI ; Incr ptr to 1st data byte
- mov DI,offset COMMND ; Get ptr to internal Command Tail
- rep movsb ; ... and move it
- mov byte ptr [DI],0 ; Store NULL terminator
- pop CX ; Restore Command Tail length
- mov SI,offset COMMND ; Get ptr to internal Command Tail
- mov word ptr ARGC,0 ; Initialize Arg Count to 0
- mov BX,offset ARGV ; Initialize ARGV to Path
- cmp CX,0 ; Test for no arguments
- jz GAExit ; ... and get out now if none
-
- NextArg:
- mov AL,' ' ; By pass leading blanks
- xchg SI,DI ; ...
- repz scasb ; ...
- dec DI ; Back up ptr
- inc CX ; ... and count
- xchg SI,DI ; ... and put back in Source Index
- jcxz GAExit ; Xfr - nothing but blanks
- mov [BX],SI ; Save ptr to file Path Name
- add BX,2 ; Incr Arg ptr offset to next
- inc word ptr ARGC ; Incr Arg Count
- mov AL,' ' ; Now scan for blank following path
- xchg SI,DI ; ...
- repnz scasb ; ...
- dec DI ; Back up ptr
- xchg SI,DI
- jcxz GAExit ; Xfr - end of Tail
- mov byte ptr [SI],0 ; Store NULL terminator at end of Path
- inc SI ; Incr ptr past NULL
- jmp short NextArg ; Go get next arg
-
- GAExit: ret
-
- GetNumber:
- push BX ; Save BX
- mov BX,10 ; ... and set BX to multiplier
- mov CX,0 ; Initialize result to 0
-
- GNLoop: mov AL,[SI] ; Get byte from argument
- cmp AL,'0' ; Check for numeric
- jb GNExit ; ... Xfr - not numeric - too low
- cmp AL,'9' ; ... no check upper limit
- ja GNExit ; ... Xfr - not numeric - too high
- sub AL,'0' ; Convert digit to binar
- cbw ; ... and make 16-bit value
- xchg CX,AX ; Put current digit in CX
- imul BX ; Multiply accum result by 10
- add AX,CX ; ... and add in current digit
- xchg CX,AX ; Move accumulated result to CX
- inc SI ; Incr arg ptr
- jmp short GNLoop ; ... and go get next digit
-
- GNExit: pop BX ; Restore user's BX
- ret
-
- GetPath:
- mov DI,offset Path ; Get ptr to Path storage area
- mov SI,ARGV ; ... and ptr to File path name
- mov CX,0 ; ... initialize length to zero
-
- GPL1: lodsb ; Move 1 byte from File path name
- stosb ; ... to Path
- cmp AL,0 ; Was it NULL terminator?
- je EGPL1 ; ... Xfr - NULL - no more
- inc CX ; Incr length
- jmp short GPL1 ; Go do another
-
- GotWild:
- pop DI ; Restore ptr to end of Path
- xchg SI,DI ; ... back to SI
- cmp byte ptr [SI],'\' ; Did Path end in a '\'?
- je Bump ; ... Xfr - Yes - move past
- cmp byte ptr [SI],'/' ; Dir it end in a '/'?
- je Bump ; ... Xfr - Yes - move past
- cmp byte ptr [SI],':' ; Did it end in a ':'?
- je Bump ; ... Xfr - Yes - move past
- jmp File ; Go process as a File
- Bump: inc SI ; Incr past terminal char
- jmp File ; ... and go process as File
-
- EGPL1: sub DI,2 ; Back up DI to last char
- mov PLen,CX ; ... and save length
- mov SI,DI ; Duplicate DI in SI
- std ; Set Direction Flag [reverse]
-
- GPL2: lodsb ; Scan for last Directory delimitor
- cmp AL,'\' ; ... normal delimitor
- je EGPL2 ; ... Xfr - normal delim
- cmp AL,'\' ; ... alternate delimitor
- je EGPL2 ; ... Xfr - alternate delimitor
- cmp AL,':' ; ... disk delimitor
- je EGPL2 ; ... Xfr - disk delimitor
- loop GPL2 ; Loop through entire name
-
- EGPL2: cld ; Clear Direction Flag [forward]
- inc SI ; Back up ptr
- cmp SI,DI ; Was the last char of name a delim?
- je GotDir ; ... Xfr - handle as Directory
- xchg SI,DI ; Scan final element for Wild Cards
- push DI ; ... save ptr
- mov CX,PLen ; ... set length to name length
- mov AL,'*' ; ... scan for '*'
- repnz scasb ; ...
- jz GotWild ; ... Xfr - had at least one '*'
- pop DI ; Restore ptr
- push DI ; ... and save again
- mov CX,PLen ; ... set length again
- mov AL,'?' ; ... scan for '?'
- repnz scasb ; ...
- jz GotWild ; ... Xfr - had at least one '?'
- pop DI ; Restore ptr
- xchg SI,DI ; ... back to SI
- mov DX,offset Path ; Get ptr to Path for Find 1st
- mov AH,4EH ; ... MS-DOS 'Find First Match'
- mov CX,ASUBDIR ; ... check for directories
- int 21H ; ... DOS Entry Interrupt
- jb NotFound ; ... Xfr - not found
- mov AL,FATTRD ; Get directory entry attribute (DTA)
- test AL,ASUBDIR ; ... and test for directory
- jnz File ; ... Xfr - not directory
- xchg SI,DI ; Move Path end ptr to SI
-
- GotDir:
- inc SI ; Incr to next char in Path
- xchg SI,DI ; ... and move ptr to DI
- mov AL,byte ptr [DI-1] ; Is final char a directory delim?
- cmp AL,'\' ; ... normal delimitor
- je Dont ; ... Xfr - Yes - final char delim
- cmp AL,'/' ; ... alternate delimitor
- je Dont ; ... Xfr - Yes - final char delim
- mov AL,'\' ; Store delimitor at end of Path
- stosb ; ...
- inc PLen ; ... and incr Path Length
- Dont: push DI ; Save ptr to 1st of element
- mov SI,offset Wild ; ... and move '*.*' as element
- mov CX,4 ; ... [include terminal NULL]
- rep movsb ; ...
- pop SI ; Restore ptr to element
-
- File: mov word ptr FName,SI ; Save ptr to File Name in Path
- ret
-
- NotFound:
- jmp NoFile ; Go display message and terminate
-
- PrtDate:
- push AX
- push CX
- push DX
- pop AX
- push AX
- mov CL,5
- shr AX,CL
- and AX,0FH
- call PrtDecimal
- mov DL,'-'
- int 21H
- pop AX
- push AX
- and AX,1FH
- call PrtDecimal
- mov DL,'-'
- int 21H
- pop AX
- push AX
- xchg AH,AL
- mov AH,0
- shr AX,1
- add AL,80
- call PrtDecimal
- mov DL,' '
- int 21H
- pop DX
- pop CX
- pop AX
- ret
-
- PrtTime:
- push AX
- push DX
- push CX
- mov AL,CH
- mov AH,0
- mov CL,3
- shr AX,CL
- call PrtDecimal
- mov DL,':'
- int 21H
- pop AX
- push AX
- mov CL,5
- shr AX,CL
- and AX,3FH
- call PrtDecimal
- mov DL,' '
- int 21H
- pop CX
- pop DX
- pop AX
- ret
-
- PrtDecimal:
- aam
- or AX,'00'
- push AX
- mov DL,AH
- mov AH,2
- int 21H
- pop AX
- mov DL,AL
- mov AH,2
- int 21H
- ret
-
- PrtStr: push AX
- push DX
-
- PSLoop: lodsb
- cmp AL,0
- jz PSExit
- mov DL,AL
- mov AH,2
- int 21H
- jmp short PSLoop
-
- PSExit: pop DX
- pop AX
- ret
-
- NewLine:
- mov SI,offset CrLfMs
- call PrtStr
- ret
-
- QSwt db 0 ; Query switch - default = OFF
- SSwt db 0 ; Silent switch - default = OFF
-
- FName dw 0 ; Ptr to File Name in Path
- PLen dw 0 ; Length of Path
-
- Wild db '*.*',0 ; Wild Card string
-
- PATH EQU byte ptr $ ; Storage for Path [64 bytes max]
- COMMND EQU byte ptr PATH+64 ; Internal Command Line [255(?) bytes]
- ARGC EQU word ptr COMMND+256 ; Count of Command Line agruments
- ARGV EQU word ptr ARGC+2 ; Vector of ptrs to Arguments
-
- CODESEG ends
- end Start