home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DIR / DIRHIDE1.ZIP / CDSECRET.ASM next >
Encoding:
Assembly Source File  |  1991-07-17  |  1.9 KB  |  75 lines

  1. PAGE    58,132
  2. TITLE    CDSECRET    11-2-85    [7-17-91]
  3.  
  4. ;Change directory to "secret" (untypeable) directory
  5. ;v1.1    Toad Hall disassembly, slight tweak
  6.  
  7. LF    EQU    0AH
  8. CR    EQU    0DH
  9.  
  10. CSEG    SEGMENT
  11.     ASSUME DS:CSEG, SS:CSEG ,CS:CSEG ,ES:CSEG
  12.     ORG    100H
  13.  
  14. CDSecret    proc    near
  15. ;v1.1    MOV    AX,CS
  16. ;dumb    MOV    DS,AX
  17. ;dumb    MOV    ES,AX
  18.  
  19.     MOV    AH,9            ;display msg
  20.     MOV    DX,OFFSET msg180    ;'Enter name of subdirectory'
  21.     INT    21H
  22.     MOV    AH,0AH            ;get buffered kbd response
  23.     MOV    DX,OFFSET buff1B7    ;input buffer (max 7 chars)
  24.     INT    21H
  25. ;v1.1    MOV    CH,0            ;clear msb
  26.     xor    cx,cx            ;clear msb            v1.1
  27.     MOV    CL,blen1B8        ;input length
  28.     MOV    SI,OFFSET dirname1B9    ;input string begins
  29.     MOV    DI,OFFSET dirname1E1    ;move it to here
  30.     REPZ    MOVSB
  31.     MOV    DX,OFFSET dirname1E0    ;first char is unreadable 7FH
  32.     MOV    AH,3BH            ;change directory
  33.     INT    21H
  34. ;v1.1    JB    L012D            ;CD failed
  35. ;v1.1     INT    20H            ;ok, terminate
  36.     jnb    Terminate        ;CD succeeded            v1.1
  37. ;L012D:
  38.     push    ax            ;save error            v1.1
  39. ;v1.1    ADD    AX,30H    ;'0'        ;asciify the error
  40.     add    al,30H    ;'0'        ;asciify the error        v1.1
  41.     MOV    err1F9,AL        ;stuff in msg
  42.     MOV    AH,9            ;display msg
  43.     MOV    DX,OFFSET errmsg1F0    ;'Error # x'
  44.     INT    21H
  45.     pop    ax            ;restore error            v1.1
  46. Terminate:                ;v1.1
  47. ;v1.1    INT    20H            ;terminate
  48.     mov    ah,4CH            ;terminate, error in AL        v1.1
  49.     int    21H            ;                v1.1
  50. ;v1.1    DB    44H DUP(0)
  51.  
  52. msg180    DB    'Enter name of subdirectory (7 characters maximum) - $'
  53. ;v1.1    DB    0,0
  54.  
  55. ;v1.1    Moved input buffer to code end
  56. ;buff1B7    DB    7        ;max buffered input length
  57. ;blen1B8    DB    0        ;actual buffered input length
  58. ;dirname1B9    DB    '       '    ;directory name here
  59. ;noneed        DB    20H DUP(0)
  60.  
  61. dirname1E0    DB    7FH        ;untypeable char in directory name
  62. dirname1E1    DB    8 dup(0)    ;relocated directory name buff    v1.1
  63. ;v1.1        db    7 dup(0)    ;excess, unneeded
  64. errmsg1F0    DB    LF,'Error # '
  65. err1F9        DB    ' .',CR,LF,'$'
  66.  
  67. buff1B7        DB    7        ;max buffered input length
  68. blen1B8        DB    0        ;actual buffered input length
  69. dirname1B9    DB    '       '    ;directory name here
  70.  
  71. CDSecret    ENDP
  72.  
  73. CSEG    ENDS
  74.     END    CDSecret
  75.