home *** CD-ROM | disk | FTP | other *** search
- PAGE 58,132
- TITLE CDSECRET 11-2-85 [7-17-91]
-
- ;Change directory to "secret" (untypeable) directory
- ;v1.1 Toad Hall disassembly, slight tweak
-
- LF EQU 0AH
- CR EQU 0DH
-
- CSEG SEGMENT
- ASSUME DS:CSEG, SS:CSEG ,CS:CSEG ,ES:CSEG
- ORG 100H
-
- CDSecret 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 ;get buffered kbd response
- MOV DX,OFFSET buff1B7 ;input buffer (max 7 chars)
- INT 21H
- ;v1.1 MOV CH,0 ;clear msb
- xor cx,cx ;clear msb v1.1
- MOV CL,blen1B8 ;input length
- MOV SI,OFFSET dirname1B9 ;input string begins
- MOV DI,OFFSET dirname1E1 ;move it to here
- REPZ MOVSB
- MOV DX,OFFSET dirname1E0 ;first char is unreadable 7FH
- MOV AH,3BH ;change directory
- INT 21H
- ;v1.1 JB L012D ;CD failed
- ;v1.1 INT 20H ;ok, terminate
- jnb Terminate ;CD succeeded v1.1
- ;L012D:
- push ax ;save error v1.1
- ;v1.1 ADD AX,30H ;'0' ;asciify the error
- add al,30H ;'0' ;asciify the error v1.1
- MOV err1F9,AL ;stuff in msg
- MOV AH,9 ;display msg
- MOV DX,OFFSET errmsg1F0 ;'Error # x'
- INT 21H
- pop ax ;restore error v1.1
- Terminate: ;v1.1
- ;v1.1 INT 20H ;terminate
- mov ah,4CH ;terminate, error in AL v1.1
- int 21H ; v1.1
- ;v1.1 DB 44H DUP(0)
-
- msg180 DB 'Enter name of subdirectory (7 characters maximum) - $'
- ;v1.1 DB 0,0
-
- ;v1.1 Moved input buffer to code end
- ;buff1B7 DB 7 ;max buffered input length
- ;blen1B8 DB 0 ;actual buffered input length
- ;dirname1B9 DB ' ' ;directory name here
- ;noneed DB 20H DUP(0)
-
- dirname1E0 DB 7FH ;untypeable char in directory name
- dirname1E1 DB 8 dup(0) ;relocated directory name buff v1.1
- ;v1.1 db 7 dup(0) ;excess, unneeded
- errmsg1F0 DB LF,'Error # '
- err1F9 DB ' .',CR,LF,'$'
-
- buff1B7 DB 7 ;max buffered input length
- blen1B8 DB 0 ;actual buffered input length
- dirname1B9 DB ' ' ;directory name here
-
- CDSecret ENDP
-
- CSEG ENDS
- END CDSecret