home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR2 / PATH.MAC < prev    next >
Text File  |  2000-06-30  |  14KB  |  690 lines

  1. ;
  2. ;  PROGRAM:  PATH
  3. ;  VERSION:  1.0
  4. ;  AUTHOR:  RICHARD CONN
  5. ;  DATE:  12 JAN 83
  6. ;  PREVIOUS VERSIONS:  NONE
  7. ;
  8. VERS    EQU    10
  9.  
  10. ;
  11. ;    PATH allows the user to do two things -- display the current path
  12. ; and set a new path.  Named directories may be used in the definition of
  13. ; the new path.
  14. ;
  15. ;    PATH is invoked by the following forms:
  16. ;        PATH            <-- Display Path
  17. ;        PATH path-expression    <-- Set Path
  18. ;        PATH //            <-- Print Help
  19. ;
  20.  
  21. ;
  22. ;  CP/M Constants
  23. ;
  24. cpm    equ    0    ;base
  25. bdose    equ    cpm+5
  26. fcb    equ    cpm+5ch
  27. tbuff    equ    cpm+80h
  28. cr    equ    0dh
  29. lf    equ    0ah
  30.  
  31. ;
  32. ;  SYSLIB Routines
  33. ;
  34.     ext    cline,zgpins,zdname,print,codend,eval10
  35.     ext    cout,pstr,padc,retud
  36.  
  37. ;
  38. ;    This program is Copyright (c) 1982, 1983 by Richard Conn
  39. ;    All Rights Reserved
  40. ;
  41. ;    ZCPR2 and its utilities, including this one, are released
  42. ; to the public domain.  Anyone who wishes to USE them may do so with
  43. ; no strings attached.  The author assumes no responsibility or
  44. ; liability for the use of ZCPR2 and its utilities.
  45. ;
  46. ;    The author, Richard Conn, has sole rights to this program.
  47. ; ZCPR2 and its utilities may not be sold without the express,
  48. ; written permission of the author.
  49. ;
  50.  
  51. ;
  52. ;  Branch to Start of Program
  53. ;
  54.     jmp    start
  55.  
  56. ;
  57. ;******************************************************************
  58. ;
  59. ;  SINSFORM -- ZCPR2 Utility Standard General Purpose Initialization Format
  60. ;
  61. ;    This data block precisely defines the data format for
  62. ; initial features of a ZCPR2 system which are required for proper
  63. ; initialization of the ZCPR2-Specific Routines in SYSLIB.
  64. ;
  65.  
  66. ;
  67. ;  EXTERNAL PATH DATA
  68. ;
  69. EPAVAIL:
  70.     DB    0FFH    ; IS EXTERNAL PATH AVAILABLE? (0=NO, 0FFH=YES)
  71. EPADR:
  72.     DW    40H    ; ADDRESS OF EXTERNAL PATH IF AVAILABLE
  73.  
  74. ;
  75. ;  INTERNAL PATH DATA
  76. ;
  77. INTPATH:
  78.     DB    0,0    ; DISK, USER FOR FIRST PATH ELEMENT
  79.             ; DISK = 1 FOR A, '$' FOR CURRENT
  80.             ; USER = NUMBER, '$' FOR CURRENT
  81.     DB    0,0
  82.     DB    0,0
  83.     DB    0,0
  84.     DB    0,0
  85.     DB    0,0
  86.     DB    0,0
  87.     DB    0,0    ; DISK, USER FOR 8TH PATH ELEMENT
  88.     DB    0    ; END OF PATH
  89.  
  90. ;
  91. ;  MULTIPLE COMMAND LINE BUFFER DATA
  92. ;
  93. MCAVAIL:
  94.     DB    0FFH    ; IS MULTIPLE COMMAND LINE BUFFER AVAILABLE?
  95. MCADR:
  96.     DW    0FF00H    ; ADDRESS OF MULTIPLE COMMAND LINE BUFFER IF AVAILABLE
  97.  
  98. ;
  99. ;  DISK/USER LIMITS
  100. ;
  101. MDISK:
  102.     DB    4    ; MAXIMUM NUMBER OF DISKS
  103. MUSER:
  104.     DB    31    ; MAXIMUM USER NUMBER
  105.  
  106. ;
  107. ;  FLAGS TO PERMIT LOG IN FOR DIFFERENT USER AREA OR DISK
  108. ;
  109. DOK:
  110.     DB    0FFH    ; ALLOW DISK CHANGE? (0=NO, 0FFH=YES)
  111. UOK:
  112.     DB    0FFH    ; ALLOW USER CHANGE? (0=NO, 0FFH=YES)
  113.  
  114. ;
  115. ;  PRIVILEGED USER DATA
  116. ;
  117. PUSER:
  118.     DB    10    ; BEGINNING OF PRIVILEGED USER AREAS
  119. PPASS:
  120.     DB    'chdir',0    ; PASSWORD FOR MOVING INTO PRIV USER AREAS
  121.     DS    41-($-PPASS)    ; 40 CHARS MAX IN BUFFER + 1 for ending NULL
  122.  
  123. ;
  124. ;  CURRENT USER/DISK INDICATOR
  125. ;
  126. CINDIC:
  127.     DB    '$'    ; USUAL VALUE (FOR PATH EXPRESSIONS)
  128.  
  129. ;
  130. ;  DMA ADDRESS FOR DISK TRANSFERS
  131. ;
  132. DMADR:
  133.     DW    80H    ; TBUFF AREA
  134.  
  135. ;
  136. ;  NAMED DIRECTORY INFORMATION
  137. ;
  138. NDRADR:
  139.     DW    00000H    ; ADDRESS OF MEMORY-RESIDENT NAMED DIRECTORY
  140. NDNAMES:
  141.     DB    64    ; MAX NUMBER OF DIRECTORY NAMES
  142. DNFILE:
  143.     DB    'NAMES   '    ; NAME OF DISK NAME FILE
  144.     DB    'DIR'        ; TYPE OF DISK NAME FILE
  145.  
  146. ;
  147. ;  REQUIREMENTS FLAGS
  148. ;
  149. EPREQD:
  150.     DB    0FFH    ; EXTERNAL PATH?
  151. MCREQD:
  152.     DB    000H    ; MULTIPLE COMMAND LINE?
  153. MXREQD:
  154.     DB    0FFH    ; MAX USER/DISK?
  155. UDREQD:
  156.     DB    000H    ; ALLOW USER/DISK CHANGE?
  157. PUREQD:
  158.     DB    000H    ; PRIVILEGED USER?
  159. CDREQD:
  160.     DB    0FFH    ; CURRENT INDIC AND DMA?
  161. NDREQD:
  162.     DB    0FFH    ; NAMED DIRECTORIES?
  163. Z2CLASS:
  164.     DB    0    ; CLASS 0
  165.     DB    'ZCPR2'
  166.     DS    10    ; RESERVED
  167.  
  168. ;
  169. ;  END OF SINSFORM -- STANDARD DEFAULT PARAMETER DATA
  170. ;
  171. ;******************************************************************
  172. ;
  173.  
  174. ;
  175. ;  Start of Program
  176. ;
  177. start:
  178.     call    zgpins    ; init ZCPR2 buffers
  179.     lxi    h,tbuff    ; pt to buffer
  180.     call    cline    ; save it as string
  181.     shld    cmdline    ; save ptr to command line
  182.     call    retud    ; get current disk and user
  183.     mov    a,b
  184.     sta    cdisk    ; set disk
  185.     mov    a,c
  186.     sta    cuser    ; set user
  187. ;
  188. ;  Print Banner
  189. ;
  190.     call    print
  191.     db    'PATH  Version '
  192.     db    vers/10+'0','.',(vers mod 10)+'0',0
  193.  
  194. ;
  195. ;  Check for Help
  196. ;
  197.     lda    fcb+1    ; get first char
  198.     cpi    '/'    ; help?
  199.     jnz    start1
  200.     call    print
  201.     db    cr,lf,'    PATH allows the user to display his current path'
  202.     db    cr,lf,'and set a new path.  It is invoked by one of the forms:'
  203.     db    cr,lf
  204.     db    cr,lf,'        PATH            <-- Display Path'
  205.     db    cr,lf,'        PATH path-expression    <-- Set Path'
  206.     db    cr,lf,'        PATH //            <-- Print Help'
  207.     db    cr,lf,0
  208.     ret
  209.  
  210. ;
  211. ;  Check for Error and Continue if not:
  212. ;    Load NAMES.DIR and check for function
  213. ;
  214. start1:
  215.     lda    epavail    ; external path available?
  216.     ora    a    ; 0=no
  217.     jnz    start2
  218.     call    print
  219.     db    cr,lf,'Error -- External Path Not Defined -- Aborting',0
  220.     ret
  221. start2:
  222.     call    codend    ; pt to buffer
  223.     call    zdname    ; load NAMES.DIR
  224.     jnz    start3
  225.     mvi    c,0    ; if no NAMES.DIR or overflow, set no entries
  226. start3:
  227.     shld    ddir    ; save ptr to disk buffer
  228.     mov    a,c    ; set entry count
  229.     sta    dentry
  230.     lxi    h,tempath    ; pt to temporary path
  231.     shld    pathptr    ; set path ptr
  232.     lhld    cmdline    ; check command line for text
  233.     call    sblank    ; skip to non-blank
  234.     shld    cmdline    ; set ptr to next element
  235.     ora    a    ; EOL=display function
  236.     jz    pdisp
  237.  
  238. ;
  239. ;  **** Set New Path ****
  240. ;    HL pts to next element
  241. ;
  242. pbuild:
  243.     lhld    cmdline    ; pt to next element
  244.     call    sblank    ; skip to non-blank
  245.     mov    a,m    ; get first char of next element
  246.     ora    a    ; EOL?
  247.     jz    pbdone    ; done if so, store path and display
  248.     shld    token    ; save ptr to first byte
  249.     lda    cindic    ; get current disk indicator
  250.     cmp    m    ; is it current?
  251.     jz    pbdu    ; DU: form
  252.     mov    a,m    ; get first char again
  253.     sui    'A'    ; convert to number
  254.     jc    pbdir    ; DIR: form
  255.     mov    b,a    ; save number
  256.     lda    mdisk    ; compare to max disk number
  257.     mov    c,a
  258.     mov    a,b
  259.     cmp    c    ; in range?
  260.     jnc    pbdir    ; DIR: form if not
  261.     inx    h    ; pt to next char -- may be DU or DIR
  262.     lda    cindic    ; get current indicator
  263.     mov    b,a    ; ... in B
  264.     mov    a,m    ; get next part of element
  265.     cmp    b    ; current?
  266.     jz    pbdu    ; is a DU: form
  267. digtst:
  268.     cpi    ':'    ; colon ends it
  269.     jz    pbdu    ; is a DU: form
  270.     cpi    ' '    ; space ends it
  271.     jz    pbdu
  272.     ora    a    ; EOL ends it
  273.     jz    pbdu
  274.     cpi    '0'    ; must be a digit
  275.     jc    pbdir    ; DIR: form if not in range
  276.     cpi    '9'+1
  277.     jnc    pbdir
  278.     inx    h    ; pt to next
  279.     mov    a,m    ; get it
  280.     jmp    digtst
  281. ;
  282. ;  It is a DU: form
  283. ;
  284. pbdu:
  285.     lhld    pathptr    ; pt to path entry
  286.     xchg        ; ... in DE
  287.     lhld    token    ; pt to token
  288.     lda    cindic    ; get current indicator
  289.     mov    b,a
  290.     mov    a,m    ; current?
  291.     cmp    b
  292.     jz    pbdu1
  293.     sui    'A'-1    ; convert to number from 1 to n
  294. pbdu1:
  295.     stax    d    ; save disk element
  296.     inx    h    ; pt to next
  297.     inx    d
  298.     mov    a,m    ; current user?
  299.     inx    h    ; pt to after user in case of match to cindic
  300.     cmp    b    ; match cindic?
  301.     jz    pbdu2
  302.     dcx    h    ; pt to first digit
  303.     push    d    ; save ptr to path
  304.     call    eval10    ; convert to number
  305.     mov    a,d    ; range error?
  306.     ora    a
  307.     jnz    rangerr
  308.     lda    muser    ; check for max user
  309.     inr    a
  310.     mov    b,a
  311.     mov    a,e
  312.     cmp    b
  313.     jnc    rangerr
  314.     pop    d    ; get ptr to path
  315. pbdu2:
  316.     stax    d    ; store user number
  317.     inx    d
  318.     mov    a,m    ; ending with colon?
  319.     cpi    ':'
  320.     jnz    pbdu3
  321.     inx    h    ; skip over colon
  322. pbdu3:
  323.     shld    cmdline    ; save ptr to next command line entry
  324.     xchg
  325.     shld    pathptr    ; save ptr to next path entry
  326.     jmp    pbuild    ; continue processing
  327. ;
  328. ;  Build DIR: form
  329. ;
  330. pbdir:
  331.     lhld    ndradr    ; memory-based directory available?
  332.     mov    a,h
  333.     ora    l
  334.     jz    ddscan    ; scan disk dir if not
  335.     inx    h    ; pt to entry count
  336.     mov    c,m    ; get entry count in C
  337.     inx    h    ; pt to first entry
  338.     call    dirscan    ; scan directory
  339.     jnz    gotud    ; store disk/user
  340. ddscan:
  341.     lhld    ddir    ; pt to disk dir
  342.     lda    dentry    ; get entry count
  343.     mov    c,a    ; ... in C
  344.     call    dirscan    ; scan directory
  345.     jnz    gotud
  346. ;
  347. ;  Entry not found
  348. ;
  349. rangerr:
  350.     call    print
  351.     db    cr,lf
  352.     db    cr,lf,'Invalid Path Expression Element -- Error Flagged at:'
  353.     db    cr,lf,'    -->',0
  354.     lhld    token    ; print string starting at token
  355.     call    pstr
  356.     call    print
  357.     db    cr,lf,'This may be an invalid DU: form (disk or user out of '
  358.     db    'range)'
  359.     db    cr,lf,'or an undefined named directory.'
  360.     db    cr,lf
  361.     db    cr,lf,'Aborting to CP/M',0
  362.     jmp    cpm
  363. ;
  364. ;  Got User and Disk -- Store in Path
  365. ;
  366. gotud:
  367.     lhld    pathptr    ; get ptr to path
  368.     mov    m,b    ; store disk
  369.     inx    h
  370.     mov    m,c    ; store user
  371.     inx    h    ; pt to next
  372.     shld    pathptr
  373.     lhld    token    ; skip over token
  374. gotud1:
  375.     mov    a,m    ; skip to space or EOL
  376.     inx    h    ; pt to next
  377.     ora    a    ; EOL?
  378.     jz    gotud2
  379.     cpi    ' '    ; space?
  380.     jnz    gotud1
  381. gotud2:
  382.     dcx    h    ; pt to EOL or space
  383.     shld    cmdline    ; set ptr to next element
  384.     jmp    pbuild    ; continue building
  385. ;
  386. ;  Path Building is Done -- TEMPATH contains new path
  387. ;
  388. pbdone:
  389.     lhld    pathptr    ; store ending zero in path
  390.     mvi    m,0
  391.     lhld    epadr    ; pt to external path
  392.     xchg        ; ... in DE
  393.     lxi    h,tempath    ; copy tempath into external path
  394. pcopy:
  395.     mov    a,m    ; get disk
  396.     stax    d    ; put disk
  397.     ora    a    ; end of path?
  398.     jz    pdisp    ; done if so and display
  399.     inx    h    ; pt to user
  400.     inx    d
  401.     mov    a,m    ; get user
  402.     stax    d    ; put user
  403.     inx    h    ; pt to next disk
  404.     inx    d
  405.     jmp    pcopy
  406.  
  407. ;
  408. ;  **** Display Path Function ****
  409. ;
  410. pdisp:
  411.     call    print
  412.     db    cr,lf,'Current Path in Symbolic Form -- ',cr,lf,'    ',0
  413.     lhld    epadr    ; pt to external path
  414.     lda    cindic    ; get current indicator
  415.     mov    d,a    ; ... in D
  416. pdisp1:
  417.     mov    a,m    ; get disk
  418.     ora    a    ; done?
  419.     jz    adisp
  420.     cmp    d    ; current?
  421.     jz    pdisp2
  422.     adi    '@'    ; convert to letter
  423. pdisp2:
  424.     call    cout    ; print disk letter
  425.     inx    h    ; pt to user
  426.     mov    a,m    ; get user number
  427.     cmp    d    ; current?
  428.     jnz    pdisp3
  429.     call    cout    ; print cindic
  430.     jmp    pdisp4
  431. pdisp3:
  432.     call    padc    ; print user number
  433. pdisp4:
  434.     mvi    a,':'    ; print colon
  435.     call    cout
  436.     inx    h    ; pt to next element
  437.     mov    a,m    ; done?
  438.     ora    a    ; 0=yes
  439.     jz    adisp
  440.     call    print
  441.     db    ' --> ',0
  442.     jmp    pdisp1
  443. ;
  444. ;  Print Absolute Path
  445. ;
  446. adisp:
  447.     call    print
  448.     db    cr,lf,'Current Path in Absolute Form --',cr,lf,'    ',0
  449.     call    curud    ; get current user/disk
  450.     lda    cindic    ; get current indicator
  451.     mov    d,a    ; ... in D
  452.     lhld    epadr    ; pt to path
  453. adisp1:
  454.     mov    a,m    ; get disk
  455.     ora    a    ; done?
  456.     jz    ndisp
  457.     cmp    d    ; current?
  458.     jnz    adisp2
  459.     mov    a,b    ; get current disk
  460.     inr    a    ; adjust to 1 to n
  461. adisp2:
  462.     adi    '@'    ; convert to letter
  463.     call    cout    ; print disk letter
  464.     inx    h    ; pt to user
  465.     mov    a,m    ; get user
  466.     cmp    d    ; current?
  467.     jnz    adisp3
  468.     mov    a,c    ; get current user
  469. adisp3:
  470.     call    padc    ; print user
  471.     mvi    a,':'
  472.     call    cout
  473.     inx    h    ; pt to next
  474.     mov    a,m    ; done?
  475.     ora    a
  476.     jz    ndisp
  477.     call    print
  478.     db    ' --> ',0
  479.     jmp    adisp1
  480. ;
  481. ;  Print Named Path
  482. ;
  483. ndisp:
  484.     call    print
  485.     db    cr,lf,'Current Path in Named Directory Form --',cr,lf,'    ',0
  486.     lhld    epadr    ; pt to external path
  487. ndisp1:
  488.     lda    cindic    ; get current indicator
  489.     mov    d,a    ; ... in D
  490.     call    curud    ; get current user and disk in C and B
  491.     mov    a,m    ; get disk
  492.     ora    a    ; done?
  493.     rz
  494.     cmp    d    ; current?
  495.     jz    ndisp2
  496.     mov    b,a    ; disk in B
  497.     dcr    b    ; adjust to 0 to n-1
  498. ndisp2:
  499.     inx    h    ; pt to user
  500.     mov    a,m    ; get it
  501.     cmp    d    ; current?
  502.     jz    ndisp3
  503.     mov    c,a    ; user in C
  504. ndisp3:
  505.     inx    h    ; pt to next
  506.     push    h    ; save ptr
  507.     call    udscan    ; scan dirs for user/disk and print its name
  508.     pop    h    ; get ptr
  509.     mvi    a,':'
  510.     call    cout
  511.     mov    a,m    ; done?
  512.     ora    a
  513.     rz
  514.     call    print
  515.     db    ' --> ',0
  516.     jmp    ndisp1
  517.  
  518.  
  519. ;
  520. ;  Utilities
  521. ;
  522.  
  523. ;
  524. ;  Scan Memory-Based Directory for Name Pted to by TOKEN
  525. ;    On entry, HL pts to first entry and C=number of entries
  526. ;    On exit, return with NZ and BC=disk/user if found
  527. ;
  528. dirscan:
  529.     mov    a,c    ; any entries?
  530.     ora    a
  531.     rz        ; error return
  532. dirsl:
  533.     push    h    ; save ptr to entry
  534.     push    b    ; save char count
  535.     call    tokscan    ; check for token match
  536.     pop    b    ; get char count
  537.     pop    h    ; get entry ptr
  538.     jz    dirsfnd    ; found?
  539.     lxi    d,10    ; skip to next entry
  540.     dad    d
  541.     dcr    c    ; count down
  542.     jnz    dirsl
  543.     ret        ; return with Z if not found
  544. dirsfnd:
  545.     mov    b,m    ; entry found, so get disk number
  546.     inr    b    ; adjust to 1 to n
  547.     inx    h    ; pt to user
  548.     mov    c,m    ; get user
  549.     mvi    a,0ffh    ; OK return
  550.     ora    a
  551.     ret
  552. ;
  553. ;  Scan entry pted to by HL to see if it contains the TOKEN
  554. ;
  555. tokscan:
  556.     xchg        ; save ptr in DE
  557.     lhld    token    ; pt to token
  558.     xchg        ; HL pts to entry, DE pts to token
  559.     inx    h    ; pt to entry in dir
  560.     inx    h
  561.     mvi    b,8    ; up to 8 bytes
  562. toks1:
  563.     ldax    d    ; get token char
  564.     cpi    ':'    ; end of token?
  565.     jz    toks2
  566.     cpi    ' '    ; space?
  567.     jz    toks2
  568.     ora    a    ; EOL?
  569.     jz    toks2
  570.     cmp    m    ; match?
  571.     rnz        ; error abort if no match
  572.     inx    h    ; pt to next
  573.     inx    d
  574.     dcr    b    ; count down
  575.     jnz    toks1
  576.     ldax    d    ; full 8 chars, so token char must be a delim
  577.     cpi    ':'    ; ok?
  578.     rz
  579.     cpi    ' '    ; ok if space
  580.     rz
  581.     ora    a    ; ok if EOL
  582.     ret
  583. toks2:
  584.     mov    a,m    ; this must be a space for match
  585.     cpi    ' '
  586.     ret
  587. ;
  588. ;  Skip to non-blank
  589. ;
  590. sblank:
  591.     mov    a,m    ; get char
  592.     inx    h    ; pt to next
  593.     cpi    ' '    ; space?
  594.     jz    sblank
  595.     dcx    h    ; pt to non-blank
  596.     ret
  597. ;
  598. ;  Scan directories for user and disk in C and B
  599. ;    Print name if found or Noname if not
  600. ;
  601. udscan:
  602.     lhld    ndradr    ; check memory-based first
  603.     mov    a,h
  604.     ora    l
  605.     jz    udscan1    ; none
  606.     inx    h    ; get entry count
  607.     mov    d,m    ; ... in D
  608.     inx    h    ; pt to first element
  609.     call    udndscn    ; scan named dir
  610.     jz    udscan2    ; match
  611. udscan1:
  612.     lhld    ddir    ; pt to disk-based dir
  613.     lda    dentry    ; number of entries
  614.     mov    d,a    ; entry count in D
  615.     call    udndscn    ; scan named dir
  616.     jnz    udscan3    ; return no name
  617. udscan2:
  618.     mvi    b,8    ; 8 chars max
  619. udsprn:
  620.     mov    a,m    ; get name char
  621.     cpi    ' '    ; done?
  622.     rz
  623.     call    cout    ; print char
  624.     inx    h    ; pt to next
  625.     dcr    b    ; count down
  626.     jnz    udsprn
  627.     ret
  628. udscan3:
  629.     call    print
  630.     db    'Noname',0
  631.     ret
  632. ;
  633. ;  Scan dir pted to by HL for D elements
  634. ;    BC=Disk/User
  635. ;    Return with Z set and HL pting to name if found
  636. ;
  637. udndscn:
  638.     mov    a,m    ; get disk
  639.     inx    h    ; pt to user
  640.     cmp    b    ; match so far?
  641.     jnz    udnd1
  642.     mov    a,m    ; get user
  643.     cmp    c    ; match?
  644.     jnz    udnd1
  645.     inx    h    ; pt to name
  646.     xra    a    ; return with zero for found
  647.     ret
  648. udnd1:
  649.     push    d    ; save count
  650.     lxi    d,9    ; pt to next element
  651.     dad    d
  652.     pop    d    ; get count
  653.     dcr    d    ; count down
  654.     jnz    udndscn
  655.     mvi    a,0ffh    ; not found
  656.     ora    a
  657.     ret
  658.  
  659. ;
  660. ;  Return Current Disk and User (in B and C)
  661. ;
  662. curud:
  663.     lda    cdisk    ; get disk
  664.     mov    b,a    ; ... in B
  665.     lda    cuser    ; get user
  666.     mov    c,a    ; ... in C
  667.     ret
  668.  
  669. ;
  670. ;  Buffers
  671. ;
  672. cdisk:
  673.     ds    1    ; current disk
  674. cuser:
  675.     ds    1    ; current user
  676. cmdline:
  677.     ds    2    ; ptr to next char in command line
  678. token:
  679.     ds    2    ; ptr to current token
  680. pathptr:
  681.     ds    2    ; ptr to next path entry
  682. ddir:
  683.     ds    2    ; ptr to disk dir in memory
  684. dentry:
  685.     ds    1    ; number of entries in disk dir
  686. tempath:
  687.     ds    50    ; allow for 25 element path
  688.  
  689.     end
  690.