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

  1. PAGE    58,132
  2. TITLE    RDSECRET    11-2-85    [7-17-91]
  3.  
  4. ;Remove secret directory (e.g., dir name has untypeable char)
  5. ;v1.1    Toad Hall Disassembly, 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. RDSecret    proc    near
  15. ;v1.1    MOV    AX,CS
  16. ;dumb    MOV    DS,AX
  17. ;dumb    MOV    ES,AX
  18.  
  19.     MOV    AH,9
  20.     MOV    DX,OFFSET msg180    ;'Enter name of directory
  21.     INT    21H
  22.     MOV    AH,0AH            ;buffered kbd input
  23.     MOV    DX,OFFSET buff1B7    ;to here
  24.     INT    21H
  25. ;v1.1    MOV    CH,0
  26.     xor    cx,cx            ;clear msb            v1.1
  27.     MOV    CL,len1B8        ;actual input length
  28.     MOV    SI,OFFSET buff1B9    ;move input from here
  29.     MOV    DI,OFFSET dirname1E0+1    ;to here
  30.     REPZ    MOVSB
  31.  
  32.     MOV    DX,OFFSET dirname1E0    ;directory name
  33.     MOV    AH,3AH            ;remove directory
  34.     INT    21H
  35. ;v1.1    JB    L012D            ;failed
  36. ;v1.1    INT    20H
  37.     jnb    Terminate        ;succeeded            v1.1
  38.  
  39. ;L012D:
  40. ;v1.1    ADD    AX,30H    ;'0'
  41.     push    ax            ;save error            v1.1
  42.     add    al,30H    ;'0'        ;asciify error nr        v1.1
  43.     MOV    err1F9,AL        ;stuff in error msg
  44.     MOV    AH,9            ;display msg
  45.     MOV    DX,OFFSET errmsg1F0    ;'Error #'
  46.     INT    21H
  47. ;v1.1    INT    20H
  48.     pop    ax            ;restore error            v1.1
  49. Terminate:
  50.     mov    ah,4CH            ;terminate, errorlevel in AL    v1.1
  51.     int    21H
  52.  
  53. ;v1.1    DB    44H DUP(0)
  54.  
  55. msg180    DB    'Enter name of subdirectory (7 characters maximum) - $'
  56. ;v1.1    DB    0,0
  57.  
  58. buff1B7    DB    7        ;max buffered kbd input
  59. len1B8    DB    0        ;actual returned input length
  60. buff1B9    DB    '       '
  61. ;v1.1    DB    20H DUP(0)
  62.  
  63. dirname1E0    DB    7FH        ;first char is untypeable
  64.         DB    8 dup(0)    ;rest of directory name        v1.1
  65. ;v1.1        db    7 dup(0)    ;unneeded
  66.  
  67. errmsg1F0    DB    LF,'Error # '
  68. err1F9        DB    ' .',CR,LF,'$'
  69.  
  70. RDSecret    ENDP
  71.  
  72. CSEG    ENDS
  73.     END    RDSecret
  74.