home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / zcpr33 / concat18.lbr / CONCATCF.ZZ0 / CONCATCF.Z80
Text File  |  1993-09-08  |  16KB  |  471 lines

  1. ; CONCATCF.Z80
  2. ;
  3. ; ZCNFG configuration module for CONCAT.COM.  The assembled version of
  4. ; this file must be named CONCATxx.CFG, where xx is the version number
  5. ; of CONCAT, to be automatically recognized by ZCNFG.
  6. ;
  7. ; Version 1.3 -- September 8, 1993 -- Gene Pizzetta
  8. ;    For CONCAT 1.7.  Changed DatFmt option to support three date
  9. ;    formats.  Also minor changes in menu and help screens.
  10. ;
  11. ; Version 1.2 -- November 3, 1991 -- Gene Pizzetta
  12. ;    For CONCAT 1.5.  Added FltFlg, PagFlg, LFFlag, and AbtErr
  13. ;    configuration options.  Added string configurations for
  14. ;    TmStr1, TmStr3, and DivStr.  Now requires ZCNFG 2.1 or higher.
  15. ;
  16. ; Version 1.1 -- February 23, 1991 -- Gene Pizzetta
  17. ;    For CONCAT 1.3
  18. ;
  19. ; Version 1.0 -- January 16, 1991 -- Gene Pizzetta
  20. ;    For CONCAT 1.1.
  21. ;
  22. ; Patch locations . . .
  23. ;
  24. QtFlag    equ    015h        ; quiet flag
  25. AppFlg    equ    016h        ; concat or append default
  26. ObjFlg    equ    017h        ; text or object file default
  27. SpcFlg    equ    018h        ; space checking default
  28. StpFlg    equ    019h        ; file stamping default
  29. FltFlg    equ    01Ah        ; filter
  30. PagFlg    equ    01Bh        ; screen and printer paging
  31. DatFmt    equ    01Ch        ; American, European, or Japanese date format
  32. TimFmt    equ    01Dh        ; civilian or military time format
  33. ECFlag    equ    01Eh        ; divider string case default
  34. LFFlag    equ    01Fh        ; line feed after carriage return
  35. AbtErr    equ    020h        ; abort error
  36. AuxEOF    equ    021h        ; AUX end-of-file character
  37. TmStr1    equ    022h        ; date/time prefix
  38. TmStr3    equ    037h        ; date/time suffix
  39. DivStr    equ    04Ch        ; divider string
  40. ;
  41. ; ZCNFG function definitions . . .
  42. ;
  43. Switch    equ    0        ; toggle bit n in a byte (n is specified)
  44. Text    equ    1        ; edit text with UC conversion
  45. DUSpec    equ    2        ; replace a ZCPR style DU spec (NOT DIR:!)
  46. HexRad    equ    3        ; edit byte/word using HEX radix
  47. DecRad    equ    4        ; edit byte/word using DECIMAL radix
  48. TextLC    equ    5        ; edit text, both UC and LC
  49. FileSp    equ    6        ; edit a Z3 filespec or filespec fragment
  50. Togl3    equ    7        ; toggle one of three options: 001B, 010B, 100B
  51. ToglTF    equ    8        ; toggle a byte between 0ffh and 0
  52. ;
  53. ; ASCII characters . . .
  54. ;
  55. HON    equ    1        ; highlight on
  56. HOF    equ    2        ; highlight off
  57. TAB    equ    9        ; tab
  58. LF    equ    10        ; linefeed
  59. CR    equ    13        ; carriage return
  60. ;
  61. ; Macro definitions
  62. ;    C    = character to identify menu item
  63. ;    OFFSET    = offset in program's configuration block
  64. ;    FUNC    = ZCNFG function
  65. ;    SCRN    = screen location for data
  66. ;    DATA    = function data address (if required)
  67. ;
  68. CASE    macro    c,func,offset,bytes,scrn,data
  69.     db    '&C'
  70.     dw    func, offset
  71.     db    bytes
  72.     dw    scrn, data
  73.     endm
  74. ;
  75. ; Code . . .
  76. ;
  77.     rst    0        ; for safety, so .CFG file won't execute
  78. ;
  79.     dw    MenuA        ; for relocation of addresses, this
  80.                 ; ..points to the NEXT location.
  81. ;
  82. ; Menu list section . . .
  83. ;
  84. MenuA:    dw    MenuB, MenuB, ScrnA, CaseA, HelpA    ; two menus
  85. MenuB:    dw    MenuA, MenuA, ScrnB, CaseB, HelpB
  86. ;
  87. ; Case table section . . .
  88. ;
  89. ; Case table for menu A
  90. ;
  91. CaseA:    db    (CaseAX-CaseA1)/(CaseA2-CaseA1)    ; number of cases
  92.     db    CaseA2-CaseA1    ; length of each record
  93. ;
  94. ;    Macro name
  95. ;    |    Single char menu selector
  96. ;    |    |    Function (see above)
  97. ;    |    |    |    Offset in config block
  98. ;    |    |    |    |    Number of bytes
  99. ;    |    |    |    |    |    Screen location
  100. ;    |    |    |    |    |    |
  101. ;Case1:    CASE    0,    ToglTF,    QtFlag,    1,    ScrnA1,    NoYes
  102. ;                            |
  103. ;             Address of data used by function
  104. ;
  105. ; The first two entries in table are labeled for calculation at CaseA:.
  106. ;
  107. CaseA1:    CASE    A,    ToglTF,    AppFlg,    1,    ScrnA1,    ConApp
  108. CaseA2:    CASE    O,    ToglTF,    ObjFlg,    1,    ScrnA2,    TxtBin
  109.     CASE    S,    ToglTF,    SpcFlg,    1,    ScrnA3,    NoYes
  110.     CASE    F,    ToglTF,    StpFlg,    1,    ScrnA4,    NoYes
  111.     CASE    H,    ToglTF,    FltFlg,    1,    ScrnA5,    YesNo
  112.     CASE    Q,    ToglTF,    QtFlag,    1,    ScrnA6,    YesNo
  113.     CASE    P,    ToglTF,    PagFlg,    1,    ScrnA7,    NoYes
  114.     CASE    D,    Togl3,    DatFmt,    7,    ScrnA8,    AmrEur
  115.     CASE    T,    ToglTF,    TimFmt,    1,    ScrnA9,    CivMil
  116.     CASE    C,    ToglTF,    ECFlag,    1,    ScrnAA,    UpLow
  117.     CASE    L,    ToglTF,    LFFlag,    1,    ScrnAB,    YesNo
  118.     CASE    E,    ToglTF,    AbtErr,    1,    ScrnAC,    YesNo
  119.     CASE    Z,    HexRad,    AuxEOF,    1,    ScrnAD,    AuxRge
  120. CaseAX:                ; for calculation of list length
  121. ;
  122. ; Case table for menu B
  123. ;
  124. CaseB:    db    (CaseBX-CaseB1)/(CaseB2-CaseB1)    ; number of cases
  125.     db    CaseB2-CaseB1    ; length of each record
  126. ;
  127. CaseB1:    CASE    P,    TextLC,    TmStr1,    20,    ScrnB1,    NulDlm
  128. CaseB2:    CASE    S,    TextLC,    TmStr3,    20,    ScrnB2,    NulDlm
  129.     CASE    I,    TextLC,    DivStr,    76,    ScrnB3,    NulDlm
  130. CaseBX:                ; for calculation of list length
  131. ;
  132. ; Case table support . . .
  133. ;
  134. YesNo:    db    'Yes',0        ; displayed if value is FFh (ToglTF)
  135. NoYes:    db    ' No',0        ; displayed if value is 00h (ToglTF)
  136.     db    'Yes',0
  137. ConApp:    db    'Append',0
  138.     db    'Concat',0
  139. TxtBin:    db    'Binary',0
  140.     db    '  Text',0
  141. AmrEur:    db    'American',0
  142.     db    'European',0
  143.     db    'Japanese',0
  144. CivMil:    db    'Military',0
  145.     db    'Civilian',0
  146. UpLow:    db    'Upper',0
  147.     db    'Lower',0
  148. AuxRge:    dw    0
  149.     dw    0FFh
  150. NulDlm:    db    0
  151. ;
  152. ; Screen image section . . .
  153. ;
  154. ; Screen for menu A
  155. ;
  156. ScrnA:    db    cr,lf,tab,tab,tab,'  CONCAT Configuration Menu'
  157.     db    cr,lf,tab,tab,tab,'       (Screen 1 of 2)'
  158.     db    cr,lf,lf
  159. ;
  160.     db    'Command line defaults:'
  161.     db    tab,'(A) ',1,'Default operating mode  . . . . . . .',2
  162. ScrnA1:    db    '      '    ; current value
  163.     db    cr,lf
  164. ;
  165.     db    tab,tab,tab
  166.     db    '(O) ',1,'Default file format . . . . . . . . .',2
  167. ScrnA2:    db    '      '    ; current value
  168.     db    cr,lf
  169. ;
  170.     db    tab,tab,tab
  171.     db    '(S) ',1,'Check for sufficient disk space?  . . . ',2
  172. ScrnA3:    db    '   '        ; current value
  173.     db    cr,lf
  174. ;
  175.     db    tab,tab,tab
  176.     db    '(F) ',1,'Transfer file stamps? . . . . . . . . . ',2
  177. ScrnA4:    db    '   '        ; current value
  178.     db    cr,lf
  179. ;
  180.     db    tab,tab,tab
  181.     db    '(H) ',1,'Filter high bits and controls . . . . . ',2
  182. ScrnA5:    db    '   '        ; current value
  183.     db    cr,lf
  184. ;
  185.     db    tab,tab,tab
  186.     db    '(Q) ',1,'Default to quiet mode?  . . . . . . . . ',2
  187. ScrnA6:    db    '   '        ; current value
  188.     db    cr,lf
  189. ;
  190.     db    tab,tab,tab
  191.     db    '(P) ',1,'Screen/printer paging (CON: or LST:)  . ',2
  192. ScrnA7:    db    '   '        ; current value
  193.     db    cr,lf
  194. ;
  195.     db    'Permanent options:',tab
  196.     db    '(D) ',1,'Date format . . . . . . . . . . . .',2
  197. ScrnA8:    db    '        '    ; current value
  198.     db    cr,lf
  199. ;
  200.     db    tab,tab,tab
  201.     db    '(T) ',1,'Time format . . . . . . . . . . . .',2
  202. ScrnA9:    db    '        '    ; current value
  203.     db    cr,lf
  204. ;
  205.     db    tab,tab,tab
  206.     db    '(C) ',1,'Divider string default case . . . . . ',2
  207. ScrnAA:    db    '     '        ; current value
  208.     db    cr,lf
  209. ;
  210.     db    tab,tab,tab
  211.     db    '(L) ',1,'Line feed after return (CON: input) . . ',2
  212. ScrnAB:    db    '   '        ; current value
  213.     db    cr,lf
  214. ;
  215.     db    tab,tab,tab
  216.     db    '(E) ',1,'Error on user abort (^C, ^K, ^X)  . . . ',2
  217. ScrnAC:    db    '   '        ; current value
  218.     db    cr,lf
  219. ;
  220.     db    tab,tab,tab
  221.     db    '(Z) ',1,'End-of-file character for AUX:  . . . . ',2
  222. ScrnAD:    db    '  h'        ; current value
  223.     db    cr,lf
  224. ;
  225.     db    lf        ; fill rest of screen
  226. ;
  227.     db    0        ; terminator
  228. ;
  229. ; Screen for menu B
  230. ;
  231. ScrnB:    db    cr,lf,tab,tab,tab,'  CONCAT Configuration Menu'
  232.     db    cr,lf,tab,tab,tab,'       (Screen 2 of 2)'
  233.     db    cr,lf,lf,tab,tab,tab,'     Configurable Strings'
  234.     db    cr,lf,lf
  235. ;
  236.     db    '(P) ',1,'Date and time prefix:',2,'  "'
  237. ScrnB1:    db    '                    "'    ; current value
  238.     db    cr,lf,lf
  239. ;
  240.     db    '(S) ',1,'Date and time suffix:',2,'  "'
  241. ScrnB2:    db    '                    "'    ; current value
  242.     db    cr,lf,lf
  243. ;
  244.     db    '(I) ',1,'Default divider insert:',2
  245.     db    cr,lf,lf,'"'
  246. ScrnB3:    db    '                                      '    ; current value
  247.     db    '                                      "'
  248.     db    cr,lf
  249. ;
  250.     db    lf,lf,lf    ; fill rest of screen
  251. ;
  252.     db    0        ; terminator
  253. ;
  254. ; Help screen section . . .
  255. ;
  256. ; Help for Menu A
  257. ;
  258. HelpA:    db    CR,LF
  259. ;
  260.     db    'COMMAND LINE DEFAULTS:  The command  line  option pairs '
  261.     db    '"A"/"C" and "O"/"T"',CR,LF
  262.     db    'can be configured to default when neither of a pair  '
  263.     db    'is  given.  Some other',CR,LF
  264.     db    'command line  options  are  toggles ("S", "F", "H", "Q", '
  265.     db    'and "P") which can',CR,LF
  266.     db    'turn a feature on or off depending on the defaults chosen.'
  267.     db    CR,LF,LF
  268. ;
  269.     db    HON,'Option A -- Operating mode.',HOF,'  The  two  operating '
  270.     db    'modes are concatenation of',CR,LF
  271.     db    'the source files into a new destination file, as the '
  272.     db    ' name  of  the program',CR,LF
  273.     db    'implies, and  appending the source files to an already '
  274.     db    'existing destination',CR,LF
  275.     db    'file.  As released the  default  is  "Concat".  You  '
  276.     db    'can  make "Append" the',CR,LF
  277.     db    'default, if you do more appending  than  concatenating. '
  278.     db    ' The  mode selected',CR,LF
  279.     db    'can be changed with the command line options "C" and '
  280.     db    '"A".'
  281.     db    CR,LF,LF
  282. ;
  283.     db    HON,'Option O -- File format mode.',HOF,'  This  option '
  284.     db    'determines how CONCAT joins the',CR,LF
  285.     db    'files.  In "Text" mode the files are joined wherever '
  286.     db    ' the  CP/M end-of-file',CR,LF
  287.     db    'character is  found,  even in the middle of a sector. '
  288.     db    ' In "Binary" (object)',CR,LF
  289.     db    'mode the files are  joined  only  on  record boundaries '
  290.     db    'and the end-of-file',CR,LF
  291.     db    'character is ignored.  "Text" is the correct setting '
  292.     db    'for most uses,  but if',CR,LF
  293.     db    'you use  CONCAT mostly for binary files (for some strange '
  294.     db    'reason!), you can',CR,LF
  295.     db    'make that the default here.  The  format  selected  can '
  296.     db    'be changed with the',CR,LF
  297.     db    'command line options "T" and "O".'
  298.     db    CR,LF
  299. ;
  300.     db    ':',CR,LF    ; page 2
  301.     db    HON,'Option S -- Disk space checking.',HOF,'  As distributed '
  302.     db    'CONCAT checks for adequate',CR,LF
  303.     db    'free space before doing any writing to disk.  If you''re '
  304.     db    'courageous, you can',CR,LF
  305.     db    'turn off this feature by toggling  it  to "No".  Space '
  306.     db    'checking can then be',CR,LF
  307.     db    'turned back on with the command line "S" option.'
  308.     db    CR,LF,LF
  309. ;
  310.     db    HON,'Option F -- File  stamp  transfer.',HOF,'  In  concatenat'
  311.     db    'ion mode CONCAT transfers',CR,LF
  312.     db    'the create date stamp of the first source file to  the '
  313.     db    ' new  file.  (If any',CR,LF
  314.     db    'source file  has the same name as the destination file, '
  315.     db    'its file stamp will',CR,LF
  316.     db    'be used instead.)  If you prefer, change  this  option '
  317.     db    'to "No" to turn this',CR,LF
  318.     db    'feature off by default.  It can then be turned  back '
  319.     db    ' on  with  the command',CR,LF
  320.     db    'line "F"  option.  Under Z3Plus the F option is not available'
  321.     db    ' (always off).'
  322.     db    CR,LF,LF
  323. ;
  324.     db    HON,'Option H -- Filter high bits and control characters.',HOF
  325.     db    '  If "Yes" is selected,',CR,LF
  326.     db    'CONCAT will, by default, reset high  bits  as they are '
  327.     db    'output and eliminate',CR,LF
  328.     db    'control characters other than carriage return, line  '
  329.     db    'feed,  form  feed, and',CR,LF
  330.     db    'horizontal tab.  This  feature  is  useful for redirected '
  331.     db    'output to CON: or',CR,LF
  332.     db    'LST:, but it is not  always  desirable otherwise.  The '
  333.     db    'default selected can',CR,LF
  334.     db    'be toggled with the command line "H" option.'
  335.     db    CR,LF
  336. ;
  337.     db    ':',CR,LF    ; page 3
  338.     db    HON,'Option Q -- Quiet  mode.',HOF,'  This  option  selects '
  339.     db    ' whether  CONCAT will be in',CR,LF
  340.     db    'verbose or quiet mode by default.  In quiet mode  only '
  341.     db    ' error  messages are',CR,LF
  342.     db    'displayed.  The default  may  be  toggled with the command '
  343.     db    'line "Q" option.'
  344.     db    CR,LF,LF
  345. ;
  346.     db    HON,'Option P -- Screen and printer paging.',HOF,'  During '
  347.     db    'redirected output to CON: or',CR,LF
  348.     db    'LST:, paging can be selected.  When paging  is in effect, '
  349.     db    'CON: output waits',CR,LF
  350.     db    'for a keypress each time the screen fills, while LST: '
  351.     db    'output  sends  a form',CR,LF
  352.     db    'feed at  the end of each page to skip over the perforations. '
  353.     db    ' Paging is not',CR,LF
  354.     db    'available for  disk  file  or  AUX:  output.  The  selected '
  355.     db    ' default can be',CR,LF
  356.     db    'toggled with the "P" option on the command line.'
  357.     db    CR,LF,LF
  358. ;
  359.     db    'PERMANENT OPTIONS:  The following options are permanent '
  360.     db    'configurations that',CR,LF
  361.     db    'cannot be changed from the command line.'
  362.     db    CR,LF,LF
  363. ;
  364.     db    HON,'Option D -- Date format.',HOF,'  If the "D"  command '
  365.     db    'line option is used to insert',CR,LF
  366.     db    'the current date and time into the destination file, '
  367.     db    ' the  date  can  be in',CR,LF
  368.     db    'either "American"  (December  13,  1990), "European" '
  369.     db    '(13 December 1990), or',CR,LF
  370.     db    '"Japanese" (1990 December 13) format.  It''s your choice.'
  371.     db    CR,LF
  372. ;
  373.     db    ':',CR,LF    ; page 4
  374.     db    HON,'Option T -- Time format.',HOF,'  If the "D"  command '
  375.     db    'line option is used to insert',CR,LF
  376.     db    'the current date and time into the destination file, '
  377.     db    ' the  time  can  be in',CR,LF
  378.     db    '"Civilian" format (12-hour time, e.g., "3:21 pm") or '
  379.     db    '"Military" format (24-',CR,LF
  380.     db    'hour time, e.g., "15:21"), whichever your prefer.'
  381.     db    CR,LF,LF
  382. ;
  383.     db    HON,'Option C -- Default  case.',HOF,'  This  option  '
  384.     db    'selects  the  default case of the',CR,LF
  385.     db    'divider string if it is entered from the command line. '
  386.     db    ' It does  not affect',CR,LF
  387.     db    'the operation of the "%<" and "%>" escape sequences, '
  388.     db    'nor does it affect the',CR,LF
  389.     db    'internally configured divider string.'
  390.     db    CR,LF,LF
  391. ;
  392.     db    HON,'Option L -- Line feed  after carriage return.',HOF
  393.     db    '  During redirected input from',CR,LF
  394.     db    'CON:, a line feed must ordinarily be typed after a carriage '
  395.     db    'return.  If you',CR,LF
  396.     db    'prefer that CONCAT output the line feed automatically, '
  397.     db    ' select  "Yes" here.'
  398.     db    CR,LF,LF
  399. ;
  400.     db    HON,'Option E  -- Error on user abort.',HOF,'  Choose '
  401.     db    'here whether you want the program',CR,LF
  402.     db    'error flag set and the error handler  invoked when CONCAT '
  403.     db    'is aborted with a',CR,LF
  404.     db    '^C, ^K, or ^X.  Calling the error handler is sometimes '
  405.     db    'advantageous because',CR,LF
  406.     db    'it allows cancelling a SUB or ZEX batch job, but some '
  407.     db    'people might not want',CR,LF
  408.     db    'the aggravation.'
  409.     db    CR,LF
  410. ;
  411.     db    ':',CR,LF
  412.     db    HON,'Option Z -- End-of-file character for AUX:.',HOF,' '
  413.     db    ' This byte tells CONCAT when it',CR,LF
  414.     db    'has reached the end of  auxiliary  input.  CONCAT also '
  415.     db    'sends this character',CR,LF
  416.     db    'at the end of redirected auxiliary output.  The default '
  417.     db    ' is  ^Z  (1Ah), the',CR,LF
  418.     db    'normal CP/M  end-of-file  character.  If you have a special '
  419.     db    'need, any other',CR,LF
  420.     db    'character from 00h to FFh can be entered here.'
  421.     db    CR,LF
  422. ;
  423.     db    0        ; terminator
  424. ;
  425. ; Help for menu B
  426. ;
  427. HelpB:    db    CR,LF
  428. ;
  429.     db    'CONFIGURABLE STRINGS:  When  changing  the  following '
  430.     db    ' strings,  a carriage',CR,LF
  431.     db    'return ends input.  To enter a carriage return and line '
  432.     db    'feed  sequence into',CR,LF
  433.     db    'the  string,  use  the  ECHO-type  escape  sequence  '
  434.     db    '"^M^J".  Other control',CR,LF
  435.     db    'characters can be entered the same way.  A delete character '
  436.     db    'can  be entered',CR,LF
  437.     db    'with "%D",  a  carat  with  "%^",  and a percent sign '
  438.     db    'with "%%".  It is not',CR,LF
  439.     db    'necessary to use the  "%<"  and  "%>"  sequences  for '
  440.     db    'upper- and lower-case',CR,LF
  441.     db    'because characters will be printed in the same case they '
  442.     db    'are entered.'
  443.     db    CR,LF,LF
  444. ;
  445.     db    HON,'Option P -- Date and time prefix.',HOF,'  If  the '
  446.     db    'command line "D" option is used,',CR,LF
  447.     db    'this string is output just before the date and time. '
  448.     db    ' Up  to  20 characters',CR,LF
  449.     db    'are accepted.'
  450.     db    CR,LF,LF
  451. ;
  452.     db    HON,'Option S -- Date and time suffix.',HOF,'  If  the '
  453.     db    'command line "D" option is used,',CR,LF
  454.     db    'this string is output just after the date and  time. '
  455.     db    ' Up  to  20 characters',CR,LF
  456.     db    'are accepted.'
  457.     db    CR,LF,LF
  458. ;
  459.     db    HON,'Option I -- Default  divider  insert.',HOF,'  If '
  460.     db    ' the  command  line "I" option is',CR,LF
  461.     db    'used, but it is not followed by a divider string, then '
  462.     db    'this default divider',CR,LF
  463.     db    'string is output between each  concatenated  or  appended '
  464.     db    ' file.  Up  to 76',CR,LF
  465.     db    'characters are accepted.'
  466.     db    CR,LF
  467. ;
  468.     db    0        ; terminator
  469. ;
  470.     end
  471.