home *** CD-ROM | disk | FTP | other *** search
- PAGE 58,132
- TITLE MDSECRET 11-2-85 [7-17-91]
-
- ;Create "secret" directory (untypeable first char in name).
- ;v1.1 Toad Hall disassembly, tweak
-
- LF EQU 0AH
- CR EQU 0DH
-
- CSEG SEGMENT
- ASSUME DS:CSEG, SS:CSEG ,CS:CSEG ,ES:CSEG
- ORG 100H
- MDSecret proc near
- ;v1.1 MOV AX,CS
- ;dumb MOV DS,AX
- ;dumb MOV ES,AX
-
- MOV AH,9 ;display msg
- MOV DX,OFFSET msg180 ;'Enter name of subdirectory'
- INT 21H
- MOV AH,0AH ;buffered kbd input
- MOV DX,OFFSET buff1B7 ;to this buffer
- INT 21H
- ;v1.1 MOV CH,0
- xor ch,ch ;clear msb
- MOV CL,len1B8 ;actual input length returned by DOS
- MOV SI,OFFSET buff1B9 ;actual user input or default
- MOV DI,OFFSET buff1E1 ;move to here
- REPZ MOVSB
- MOV DX,OFFSET dirname1E0 ;dir name begins with untypeable char
- MOV AH,39H ;make directory
- INT 21H
- JB L0140 ;failed
-
- MOV AX,4300H ;get file attribs from CX
- MOV DX,OFFSET dirname1E0 ;this directory
- INT 21H ;but discard the attrib
- MOV CX,2 ;new file attrib
- MOV AX,4301H ;set new dir attrib per CX
- ;noneed MOV DX,OFFSET dirname1E0 ;this directory
- INT 21H
- ;v1.1 INT 20H ;terminate
- xor ax,ax ;ERRORLEVEL 0 v1.1
- jmp short Terminate ; v1.1
-
- ;L0140 L0129 CJ
- L0140:
- push ax ;save create error v1.1
- ;v1.1 ADD AX,30H ;'0'
- mov al,30H ;'0' ;asciify error v1.1
- MOV err1F9,AL ;stuff in error msg
- MOV AH,9 ;display msg
- MOV DX,OFFSET errmsg1F0 ;'Error #n'
- INT 21H
- ;v1.1 INT 20H ;terminate
- pop ax ;restore error in AL v1.1
-
- Terminate: ; v1.1
- mov ah,4CH ;terminate v1.2
- int 21H
-
- ;v1.1 DB 31H DUP(0)
-
- msg180 DB 'Enter name of subdirectory (7 characters maximum) - $'
- ;v1.1 DB 0,0
-
- ;v1.1 Moving input buffer down to code end
-
- ;buff1B7 DB 7 ;max buffered kbd input
- ;len1B8 DB 3 ;actual input length (changed by DOS)
- ;buff1B9 DB 'abc',CR,' ' ;user input (changed by DOS)
- ; DB 20H DUP(0)
-
- dirname1E0 DB 7FH
- buff1E1 DB 'abc' ;directory name
- ;v1.1 DB 0CH DUP(0)
- db 4 dup(0) ;max 7 chars v1.1
-
- errmsg1F0 DB LF,'Error # '
- err1F9 DB ' .',CR,LF,'$'
-
- buff1B7 DB 7 ;max buffered kbd input
- len1B8 DB 3 ;actual input length (changed by DOS)
- buff1B9 DB 'abc',CR,' ' ;user input (changed by DOS)
-
- MDSecret ENDP
-
- CSEG ENDS
- END MDSecret