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 / NAMEDIR.CPR < prev    next >
Text File  |  2000-06-30  |  4KB  |  120 lines

  1.                      Named Directory Prompt for ZCPR23
  2.                               by Jay Denebeim
  3.                            SYSOP Ovation Network
  4.                               (606) 276-1957
  5.  
  6.      One of the most powerful features of ZCPR is the use of names  instead 
  7. of drive/user pairs.  Unfortunatly, these are not supported by ZCPR itself!  
  8. When  installing  ZCPR on my system I put patches in to print then name  in 
  9. the  command prompt.   The form is DU:DIRNAME> if DUPRMPT is  enabled,  and 
  10. DIRNAME> if its not.
  11.      This  patch should be able to be installed on any version of ZCPR.   I 
  12. am  unable  to include a .dif file because my source to  ZCPR  was  garbled 
  13. during transmission.   If anyone has the source to the utility programs,  I 
  14. would  appreciate  it  if you could up-load them onto my board,  so  I  can 
  15. install named directory support to them too.
  16.      If there are any problems please contact me at:
  17.  
  18.                            Ovation Network RCPM
  19.                               140 Moore Drive
  20.                            Lexington, KY  40503
  21.                               (606) 276-1957
  22.  
  23. .pa
  24.      The first step is to install switches into the header file:
  25.  
  26.      This  patch can be installed anywhere,  but i think the best place  to 
  27. put it is right after the DUPRMPT equate.   That is the only one associated 
  28. with command line prompt.
  29.  
  30. ;   The following equates enable the named directory options.
  31. ; NAMDIR enables the named directory buffer.
  32. ; NAMBUF specifies where in core the Buffer will reside.
  33. ; NAMDIR enables printing of the Dir's name on the command line.
  34. ;    set it to TRUE and the prompt will be dn:name>
  35. ;    set it to FALSE and the prompt will be dn>
  36. ;
  37. NAMDIR    equ    TRUE        ;ENABLE NAMED DIRS
  38. NAMBUF    equ    0F300H        ;LOCATION OF BUFFER
  39. NAMPMT    equ    TRUE        ;PRINT NAME ON COMMAND LINE
  40.  
  41.  
  42.      The other changes are made to the ZCPR.ASM file, pay careful attention 
  43. to the relative jumps in the file.
  44.  
  45.      If all the prompt options are enabled,  this jump command in the CONT: 
  46. routine in section 2 of ZCPR should be changed to the 3 byte form:
  47.      Change this line:
  48.  
  49.         JRNZ    RS1
  50.  
  51.      To this:
  52.  
  53.         JNZ    RS1
  54.  
  55.      The jump on no print of 0 while in user 0 should be changed.
  56.  
  57.      Change  this  line in the SUPRES conditional assembly section  of  the 
  58. RESTRT: routine from:
  59.  
  60.         JRZ     RS000
  61.  
  62.      To this:
  63.         JRZ     RSJ00
  64. .pa
  65.      Finally  insert the following routine between the DUPRMPT  conditional 
  66. assembly of the RESTRT routine, and the RS000: routine:
  67.  
  68. ; PRINT DIRECTORY NAME IF THERE
  69. ;
  70. RSJ00:
  71.     IF    NAMPMT AND NAMDIR
  72.     LXI    H,NAMBUF    ;POINT TO NAMED DIR BUFFER
  73.     INX    H        ;POINT TO NUMBER OF ENTRIES
  74.     MOV    B,M        ;GET IT
  75.     XRA    A        ;TEST NUMBER OF ENTRIES
  76.     CMP    B        ;TO SEE IF ZERO
  77.     JRZ    RS000        ;AND SKIP ROUTINE IF SO
  78.     LDA    CURDR        ;GET CURRENT DRIVE NUMBER
  79.     INX    H        ;POINT TO DRIVE OF FIRST ENTRY
  80.     LXI    D,10        ;SET UP ENTRY LENGTH
  81. RSJ01:
  82.     MOV    C,M        ;GET DISK FROM TABLE
  83.     CMP    C        ;IS THIS THE CURRENT ONE
  84.     JRZ    RSJ02        ;TEST USER ROUTINE
  85.     DAD    D        ;POINT TO NEXT ENTRY
  86.     DCR    B        ;REDUCE COUNTER
  87.     JRNZ    RSJ01        ;IF MORE, LOOP
  88.     JR    RS000        ;ELSE NO ENTRY FOR THIS DISK
  89. RSJ02:
  90.     LDA    CURUSR        ;GET CURRENT USER
  91.     INX    H        ;POINT TO USER IN THIS ENTRY
  92. RSJ020:
  93.     MOV    C,M        ;GET USER FROM TABLE
  94.     CMP    C        ;IS THIS THE CURRENT ONE
  95.     JRZ    RSJ03        ;PRINT NAME OUT
  96.     DAD    D        ;POINT TO NEXT ENTRY
  97.     DCR    B        ;REDUCE COUNTER
  98.     JRNZ    RSJ020        ;IF MORE, LOOP
  99.     JR    RS000        ;ELSE NO ENTRY FOR THIS USER
  100. RSJ03:
  101.     IF    DUPRMPT
  102.     MVI    A,':'        ;USE : AS SEPARATER
  103.     CALL    CONOUT
  104.     ENDIF    ;DUPRMPT
  105.     INX    H        ;POINT TO FIRST CHAR OF NAME
  106.     MVI    B,8
  107. RSJ030:
  108.     MOV    A,M        ;GET CHAR
  109.     CPI    ' '        ;END OF NAME?
  110.     JRZ    RS000        ;WE IS DONE
  111.     CALL    CONOUT        ;PUT CHAR ON SCREEN
  112.     INX    H        ;POINT TO NEXT
  113.     DCR    B        ;REDUCE CHAR COUNT
  114.     JRNZ    RSJ030        ;GO FOR MORE
  115.     ENDIF    ;NAMPMT
  116. ;
  117.  
  118.      I hope you enjoy these changes to ZCPR.
  119.  
  120.