home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z3util / cpd15.lbr / CPDCF.ZZ0 / CPDCF.Z80
Encoding:
Text File  |  1992-01-16  |  10.8 KB  |  328 lines

  1. ; CPDCF.Z80
  2. ;
  3. ; ZCNFG configuration module for CPD.COM.  The assembled version of
  4. ; this file must be named CPDxx.CFG, where xx is the version number
  5. ; of CPD, to be automatically recognized by ZCNFG.
  6. ;
  7. ; Version 1.3 -- January 12, 1992 -- Gene Pizzetta
  8. ;    For CPD 1.4.  Added FLdu and OutFn configuration options.
  9. ;
  10. ; Version 1.2 -- December 27, 1991 -- Gene Pizzetta
  11. ;    For CPD 1.2.  Added FLDir configuration option.
  12. ;
  13. ; Version 1.1 -- December 21, 1991 -- Gene Pizzetta
  14. ;    For CPD 1.1.  Added CasFlg, ConDiv, and LstDiv options.
  15. ;
  16. ; Version 1.0 -- August 10, 1991 -- Gene Pizzetta
  17. ;    For CPD 1.0.
  18. ;
  19. ; Patch locations . . .
  20. ;
  21. SysFlg    equ    015h        ; system files
  22. BthFlg    equ    016h        ; duplicated files
  23. NotFlg    equ    017h        ; missing files
  24. ArcFlg    equ    018h        ; archiving
  25. PagFlg    equ    019h        ; screen paging
  26. FFFlag    equ    01Ah        ; form feed
  27. FLdu    equ    01Bh        ; include DU's in file
  28. FLDir    equ    01Ch        ; file output directory
  29. CasFlg    equ    01Dh        ; case flag
  30. AbtFlg    equ    01Eh        ; abort error flag
  31. ConDiv    equ    01Fh        ; console column divider
  32. LstDiv    equ    020h        ; printer column divider
  33. OutFn    equ    022h        ; filename for listfile
  34. ;
  35. ; ZCNFG function definitions . . .
  36. ;
  37. Switch    equ    0        ; toggle bit n in a byte (n is specified)
  38. Text    equ    1        ; edit text with UC conversion
  39. DUSpec    equ    2        ; replace a ZCPR style DU spec (NOT DIR:!)
  40. HexRad    equ    3        ; edit byte/word using HEX radix
  41. DecRad    equ    4        ; edit byte/word using DECIMAL radix
  42. TextLC    equ    5        ; edit text, both UC and LC
  43. FileSp    equ    6        ; edit a Z3 filespec or filespec fragment
  44. Togl3    equ    7        ; toggle one of three options: 001B, 010B, 100B
  45. ToglTF    equ    8        ; toggle a byte between 0ffh and 0
  46. ASCIIC    equ    9        ; replace any ASCII byte with a keystroke
  47.  
  48. ;
  49. ; ASCII characters . . .
  50. ;
  51. HON    equ    1        ; highlight on
  52. HOF    equ    2        ; highlight off
  53. TAB    equ    9        ; tab
  54. LF    equ    10        ; linefeed
  55. CR    equ    13        ; carriage return
  56. ;
  57. ; Macro definitions
  58. ;    C    = character to identify menu item
  59. ;    OFFSET    = offset in program's configuration block
  60. ;    FUNC    = ZCNFG function
  61. ;    SCRN    = screen location for data
  62. ;    DATA    = function data address (if required)
  63. ;
  64. CASE    macro    c,func,offset,bytes,scrn,data
  65.     db    '&C'
  66.     dw    func, offset
  67.     db    bytes
  68.     dw    scrn, data
  69.     endm
  70. ;
  71. ; Code . . .
  72. ;
  73.     rst    0        ; for safety, so .CFG file won't execute
  74. ;
  75.     dw    MenuA        ; for relocation of addresses, this
  76.                 ; ..points to the NEXT location.
  77. ;
  78. ; Menu list section . . .
  79. ;
  80. MenuA:    dw    MenuA, MenuA, ScrnA, CaseA, HelpA    ; single menu
  81. ;
  82. ; Case table section . . .
  83. ;
  84. CaseA:    db    (CaseAX-CaseA1)/(CaseA2-CaseA1)    ; number of cases
  85.     db    CaseA2-CaseA1    ; length of each record
  86. ;
  87. ;    Macro name
  88. ;    |    Single char menu selector
  89. ;    |    |    Function (see above)
  90. ;    |    |    |    Offset in config block
  91. ;    |    |    |    |    Number of bytes
  92. ;    |    |    |    |    |    Screen location
  93. ;    |    |    |    |    |    |
  94. ;Case1:    CASE    0,    ToglTF,    Loc1,    1,    ScrnA1,    NoYes
  95. ;                            |
  96. ;             Address of data used by function
  97. ;
  98. ; The first two entries in table are labeled for calculation at CaseA:.
  99. ;
  100. CaseA1:    CASE    B,    ToglTF,    BthFlg,    1,    ScrnA1,    YesNo
  101. CaseA2:    CASE    N,    ToglTF,    NotFlg,    1,    ScrnA2,    YesNo
  102.     CASE    A,    ToglTF,    ArcFlg,    1,    ScrnA3,    YesNo
  103.     CASE    S,    ToglTF,    SysFlg,    1,    ScrnA4,    YesNo
  104.     CASE    P,    ToglTF,    PagFlg,    1,    ScrnA5,    NoYes
  105.     CASE    F,    ToglTF,    FFFlag,    1,    ScrnA6,    YesNo
  106.     CASE    D,    ToglTF,    FLdu,    1,    ScrnA7,    YesNo
  107.     CASE    O,    ToglTF,    FLDir,    1,    ScrnA8,    DftTgt
  108.     CASE    C,    ToglTF,    CasFlg,    1,    ScrnA9,    UpLow
  109.     CASE    X,    ToglTF,    AbtFlg,    1,    ScrnA0,    YesNo
  110.     CASE    1,    HexRad,    ConDiv,    1,    ScrnAA,    DivRge
  111.     CASE    2,    HexRad,    LstDiv,    1,    ScrnAB,    DivRge
  112.     CASE    3,    FileSp,    OutFn,    0,    ScrnAC,    0
  113. CaseAX:                ; for calculation of list length
  114. ;
  115. ; Case table support . . .
  116. ;
  117. YesNo:    db    'Yes',0        ; displayed if value is FFh (ToglTF)
  118. NoYes:    db    ' No',0        ; displayed if value is 00h (ToglTF)
  119.     db    'Yes',0
  120. DftTgt:    db    'Target',0
  121.     db    'Logged',0
  122. UpLow:    db    'Lower',0
  123.     db    'Upper',0
  124. DivRge:    dw    20h,0FFh
  125. ;
  126. ; Screen image section . . .
  127. ;
  128. ScrnA:    db    cr,lf,lf,tab,tab,tab,'  CPD Configuration Menu'
  129.     db    cr,lf,lf
  130. ;
  131.     db    tab,'     (B) ',1,'Show only duplicated files by default? . ',2
  132. ScrnA1:    db    '   '        ; current value
  133.     db    cr,lf
  134. ;
  135.     db    tab,'     (N) ',1,'Show only missing files by default?  . . ',2
  136. ScrnA2:    db    '   '        ; current value
  137.     db    cr,lf
  138. ;
  139.     db    tab,'     (A) ',1,'Archive duplicated files by default? . . ',2
  140. ScrnA3:    db    '   '        ; current value
  141.     db    cr,lf
  142. ;
  143.     db    tab,'     (S) ',1,'Include system files by default? . . . . ',2
  144. ScrnA4:    db    '   '        ; current value
  145.     db    cr,lf
  146. ;
  147.     db    tab,'     (P) ',1,'Page screen by default?  . . . . . . . . ',2
  148. ScrnA5:    db    '   '        ; current value
  149.     db    cr,lf
  150. ;
  151.     db    tab,'     (F) ',1,'Send final form feed by default? . . . . ',2
  152. ScrnA6:    db    '   '        ; current value
  153.     db    cr,lf
  154. ;
  155.     db    tab,'     (D) ',1,'Include DU''s in CPDLIST file?  . . . . . ',2
  156. ScrnA7:    db    '   '        ; current value
  157.     db    cr,lf
  158. ;
  159.     db    tab,'     (O) ',1,'Output directory for CPDLIST . . . .  ',2
  160. ScrnA8:    db    '       '    ; current value
  161.     db    cr,lf
  162. ;
  163.     db    tab,'     (C) ',1,'Case for filename display  . . . . . . ',2
  164. ScrnA9:    db    '     '        ; current value
  165.     db    cr,lf
  166. ;
  167.     db    tab,'     (X) ',1,'Invoke error handler for user abort? . . ',2
  168. ScrnA0:    db    '   '        ; current value
  169.     db    cr,lf
  170. ;
  171.     db    tab,'     (1) ',1,'Column divider character for console . . ',2
  172. ScrnAA:    db    '  h'        ; current value
  173.     db    cr,lf
  174. ;
  175.     db    tab,'     (2) ',1,'Column divider character for printer . . ',2
  176. ScrnAB:    db    '  h'        ; current value
  177.     db    cr,lf
  178. ;
  179.     db    tab,'     (3) ',1,'Filename for file list . . . . .',2
  180. ScrnAC:    db    '            '    ; current value
  181.     db    cr,lf
  182. ;
  183.     db    lf    ; fill rest of screen
  184. ;
  185.     db    0        ; terminator
  186. ;
  187. ; Help screen section . . .
  188. ;
  189. ; Sample help screen for Menu A.  The following, up to the terminating
  190. ;  binary 00, appears as-is when the user types "?" or "/" for help while
  191. ;  ZCNFG is displaying the initial patch menu.
  192. ;
  193. HelpA:    db    CR,LF
  194. ;
  195.     db    HON,'Option B -- Display only  duplicated  files.',HOF
  196.     db    '  With this option set to "Yes"',CR,LF
  197.     db    'CPD defaults to displaying only files which exist in '
  198.     db    'both directories.  The',CR,LF
  199.     db    'default may be toggled with the command line "B" option. '
  200.     db    ' If this option is',CR,LF
  201.     db    '"Yes", make sure the N option is "No"; otherwise,  you '
  202.     db    ' will  not  like the',CR,LF
  203.     db    'result.'
  204.     db    CR,LF,LF
  205. ;
  206.     db    HON,'Option N -- Display only missing  files.',HOF,'  '
  207.     db    'If this option is "Yes", CPD will',CR,LF
  208.     db    'by default display only files in the first directory '
  209.     db    'that do not  appear in',CR,LF
  210.     db    'the second directory.  The default may be toggled by '
  211.     db    'using the command line',CR,LF
  212.     db    '"N" option.  If  this option is "Yes", make sure option '
  213.     db    'B is "No".  Take my',CR,LF
  214.     db    'word for it.'
  215.     db    CR,LF,LF
  216. ;
  217.     db    HON,'Option A -- Set archive attribute.',HOF,'  "Yes" '
  218.     db    ' makes CPD default to setting the',CR,LF
  219.     db    'archive attribute of files in the first directory  that '
  220.     db    ' are  duplicated in',CR,LF
  221.     db    'the second  directory.  I  can''t  imagine  anyone  wanting '
  222.     db    'to make this the',CR,LF
  223.     db    'default mode of operation, but here it  is  if you have '
  224.     db    'a need for it.  The',CR,LF
  225.     db    'configured default can be toggled with the command line '
  226.     db    '"A" option.'
  227.     db    CR,LF
  228. ;
  229.     db    ':',CR,LF
  230.     db    HON,'Option S -- Include system  files.',HOF,'  As  distribute'
  231.     db    'd CPD defaults to finding',CR,LF
  232.     db    'only non-system (directory) files.  A "Yes" allows CPD '
  233.     db    'to  always  find all',CR,LF
  234.     db    'files, including  system  files.  The  default set here '
  235.     db    'can be toggled with',CR,LF
  236.     db    'the command line "S" option.'
  237.     db    CR,LF,LF
  238. ;
  239.     db    HON,'Option P -- Screen paging.',HOF,'  CPD  pauses,  '
  240.     db    'waiting for a keypress, each time',CR,LF
  241.     db    'the screen fills, if "Yes" is selected.  "No" makes the '
  242.     db    ' default continuous',CR,LF
  243.     db    'scrolling, which can be paused with ^S.  The number of '
  244.     db    'lines on the console',CR,LF
  245.     db    'screen is obtained from the environment.  The chosen '
  246.     db    'default can be toggled',CR,LF
  247.     db    'with the command line "P" option.'
  248.     db    CR,LF,LF
  249. ;
  250.     db    HON,'Option F -- Form feed printer.',HOF,'  Choose here '
  251.     db    ' whether you want CPD to send a',CR,LF
  252.     db    'form feed to the printer after it prints the file display. '
  253.     db    ' The  option has',CR,LF
  254.     db    'no effect  unless  the  command  line "L" (echo to printer) '
  255.     db    'option is used.',CR,LF
  256.     db    'The form feed default can be toggled with the command '
  257.     db    'line "F" option.'
  258.     db    CR,LF,LF
  259. ;
  260.     db    HON,'Option D -- Include  DU  specifications.',HOF,'  '
  261.     db    'CPD can include DU specifications',CR,LF
  262.     db    'in the CPDLIST file with each filename.  Choosing "Yes" '
  263.     db    'will make  that the',CR,LF
  264.     db    'default.  The default  here  can  be  toggled  with  '
  265.     db    'the  "D" option on the',CR,LF
  266.     db    'command line.'
  267.     db    CR,LF
  268. ;
  269.     db    ':',CR,LF
  270.     db    HON,'Option O -- File output directory.',HOF,'  CPD  will '
  271.     db    'write its CPDLIST file to the',CR,LF
  272.     db    'currently logged (default) directory or to the target '
  273.     db    'directory  (the first',CR,LF
  274.     db    'one given  on  the  command line), depending on what '
  275.     db    'you select here.  Make',CR,LF
  276.     db    'your choice based on your usual working habits.'
  277.     db    CR,LF,LF
  278. ;
  279.     db    HON,'Option C -- Case of filename  display.',HOF,'  CPD '
  280.     db    'can display filenames in upper-',CR,LF
  281.     db    'or lower-case, whichever you prefer.  (Actually, if  '
  282.     db    'lower-case  is chosen,',CR,LF
  283.     db    'the case of filenames is actually reversed and any lower-case'
  284.     db    ' filename will',CR,LF
  285.     db    'be displayed in upper-case.'
  286.     db    CR,LF,LF
  287. ;
  288.     db    HON,'Option X -- Error  for  user  abort.',HOF,'  Select '
  289.     db    ' "Yes"  if  you want the error',CR,LF
  290.     db    'handler invoked when CPD is aborted with ^C.  This will '
  291.     db    'allow also aborting',CR,LF
  292.     db    'a ZEX or SUB batch operation.  While that can be very '
  293.     db    ' useful,  some people',CR,LF
  294.     db    'might find the feature irritating.'
  295.     db    CR,LF,LF
  296. ;
  297.     db    HON,'Option 1 -- Console  column  divider.',HOF,'  By '
  298.     db    ' default  CPD uses a vertical bar',CR,LF
  299.     db    '("|", 7Ch) between each column of the filename display. '
  300.     db    ' You can change the',CR,LF
  301.     db    'column divider to any printable character, such as a '
  302.     db    'space (20h) or  even a',CR,LF
  303.     db    'graphic character if your terminal uses 8-bit business '
  304.     db    'graphics.'
  305.     db    CR,LF
  306. ;
  307.     db    ':',CR,LF
  308.     db    HON,'Option 2 -- Printer column divider.',HOF,'  A  vertical '
  309.     db    ' bar ("|", 7Ch) is used by',CR,LF
  310.     db    'default, but any other printable character can  be  chosen. '
  311.     db    ' This option is',CR,LF
  312.     db    'provided primarily  because  a character chosen for the '
  313.     db    'console display may',CR,LF
  314.     db    'not be appropriate for printer output.'
  315.     db    CR,LF,LF
  316. ;
  317.     db    HON,'Option 3 -- Filename  for  file  list.',HOF,'  As '
  318.     db    ' distributed, CPD names the file',CR,LF
  319.     db    'list CPDLIST (with no filetype, making  it  easy  to '
  320.     db    ' spot  in  a directory',CR,LF
  321.     db    'display).  If you would prefer another name, you can '
  322.     db    'enter it here.'
  323.     db    CR,LF
  324. ;
  325.     db    0        ; Terminator
  326. ;
  327.     end
  328.