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 / ENTERPRS / CPM / UTILS / F / FILT84.LBR / FILTCF.ZZ0 / FILTCF.Z80
Text File  |  1992-05-09  |  7KB  |  220 lines

  1. ; FILTCF.Z80
  2. ;
  3. ; ZCNFG configuration module for FILT.COM.  The assembled version of
  4. ; this file must be named FILTxx.CFG, where xx is the version number
  5. ; of FILT, to be automatically recognized by ZCNFG.
  6. ;
  7. ; Version 1.3 -- May 9, 1992 -- Gene Pizzetta
  8. ;    For FILT 8.4, added form feed option.
  9. ;
  10. ; Version 1.2 -- March 3, 1992 -- Gene Pizzetta
  11. ;    For FILT 8.2, changed tabbing option, and added abort error
  12. ;    option.
  13. ;
  14. ; Version 1.1 -- September 30, 1991 -- Gene Pizzetta
  15. ;    For FILT 8.1, added progress report selection.
  16. ;
  17. ; Version 1.0 -- September 12, 1991 -- Gene Pizzetta
  18. ;    For FILT 8.0.
  19. ;
  20. ; Patch locations . . .
  21. ;
  22. Mode    equ    015h        ; default mode
  23. TabFlg    equ    016h        ; tab expansion
  24. FFFlag    equ    017h        ; form feed flag
  25. QtFlag    equ    018h        ; quiet flag
  26. AbtFlg    equ    019h        ; error on abort
  27. LinFlg    equ    01Ah        ; progress reports
  28. ;
  29. ; ZCNFG function definitions . . .
  30. ;
  31. Switch    equ    0        ; toggle bit n in a byte (n is specified)
  32. Text    equ    1        ; edit text with UC conversion
  33. DUSpec    equ    2        ; replace a ZCPR style DU spec (NOT DIR:!)
  34. HexRad    equ    3        ; edit byte/word using HEX radix
  35. DecRad    equ    4        ; edit byte/word using DECIMAL radix
  36. TextLC    equ    5        ; edit text, both UC and LC
  37. FileSp    equ    6        ; edit a Z3 filespec or filespec fragment
  38. Togl3    equ    7        ; toggle one of three options: 001B, 010B, 100B
  39. ToglTF    equ    8        ; toggle a byte between 0ffh and 0
  40. ;
  41. ; ASCII characters . . .
  42. ;
  43. HON    equ    1        ; highlight on
  44. HOF    equ    2        ; highlight off
  45. TAB    equ    9        ; tab
  46. LF    equ    10        ; linefeed
  47. CR    equ    13        ; carriage return
  48. ;
  49. ; Macro definitions
  50. ;    C    = character to identify menu item
  51. ;    OFFSET    = offset in program's configuration block
  52. ;    FUNC    = ZCNFG function
  53. ;    SCRN    = screen location for data
  54. ;    DATA    = function data address (if required)
  55. ;
  56. CASE    macro    c,func,offset,bytes,scrn,data
  57.     db    '&C'
  58.     dw    func, offset
  59.     db    bytes
  60.     dw    scrn, data
  61.     endm
  62. ;
  63. ; Code . . .
  64. ;
  65.     rst    0        ; for safety, so .CFG file won't execute
  66. ;
  67.     dw    MenuA        ; for relocation of addresses, this
  68.                 ; ..points to the NEXT location.
  69. ;
  70. ; Menu list section . . .
  71. ;
  72. MenuA:    dw    MenuA, MenuA, ScrnA, CaseA, HelpA    ; single menu
  73. ;
  74. ; Case table section . . .
  75. ;
  76. CaseA:    db    (CaseAX-CaseA1)/(CaseA2-CaseA1)    ; number of cases
  77.     db    CaseA2-CaseA1    ; length of each record
  78. ;
  79. ;    Macro name
  80. ;    |    Single char menu selector
  81. ;    |    |    Function (see above)
  82. ;    |    |    |    Offset in config block
  83. ;    |    |    |    |    Number of bytes
  84. ;    |    |    |    |    |    Screen location
  85. ;    |    |    |    |    |    |
  86. ;Case1:    CASE    0,    ToglTF,    Loc1,    1,    ScrnA1,    NoYes
  87. ;                            |
  88. ;             Address of data used by function
  89. ;
  90. ; The first two entries in table are labeled for calculation at CaseA:.
  91. ;
  92. CaseA1:    CASE    M,    Togl3,    Mode,    00001111b,    ScrnA1,    SAWsD
  93. CaseA2:    CASE    T,    Togl3,    TabFlg,    00000111b,    ScrnA2,    TabTEK
  94.     CASE    F,    ToglTF,    FFFlag,    1        ScrnA3,    YesNo
  95.     CASE    Q,    ToglTF,    QtFlag,    1,        ScrnA4,    YesNo
  96.     CASE    C,    ToglTF,    AbtFlg,    1,        ScrnA5,    YesNo
  97.     CASE    P,    ToglTF,    LinFlg,    1,        ScrnA6,    NoYes
  98. CaseAX:                ; for calculation of list length
  99. ;
  100. ; Case table support . . .
  101. ;
  102. YesNo:    db    'Yes',0        ; displayed if value is FFh (ToglTF)
  103. NoYes:    db    ' No',0        ; displayed if value is 00h (ToglTF)
  104.     db    'Yes',0
  105. SAWsD:    db    'Source Code',0
  106.     db    ' ASCII Text',0
  107.     db    ' WordStar W',0
  108.     db    ' WordStar D',0
  109. TabTEK:    db    '  Re-Tab',0
  110.     db    'As Found',0
  111.     db    ' No Tabs',0
  112. ;
  113. ; Screen image section . . .
  114. ;
  115. ScrnA:    db    cr,lf,lf,tab,tab,tab,'    FILT Configuration Menu'
  116.     db    cr,lf,lf,lf
  117. ;
  118.     db    tab,tab,'(M) ',1,'Default operating mode? . . . ',2
  119. ScrnA1:    db    '           '        ; current value
  120.     db    cr,lf,lf
  121. ;
  122.     db    tab,tab,'(T) ',1,'Default tabbing mode? . . . . .  ',2
  123. ScrnA2:    db    '        '    ; current value
  124.     db    cr,lf,lf
  125. ;
  126.     db    tab,tab,'(F) ',1,'Retain form feeds in ASCII files? . . ',2
  127. ScrnA3:    db    '   '        ; current value
  128.     db    cr,lf,lf
  129. ;
  130.     db    tab,tab,'(Q) ',1,'Default to quiet mode?  . . . . . . . ',2
  131. ScrnA4:    db    '   '        ; current value
  132.     db    cr,lf,lf
  133. ;
  134.     db    tab,tab,'(C) ',1,'User abort (^C) is an error?  . . . . ',2
  135. ScrnA5:    db    '   '        ; current value
  136.     db    cr,lf,lf
  137. ;
  138.     db    tab,tab,'(P) ',1,'Show line count progress reports? . . ',2
  139. ScrnA6:    db    '   '        ; current value
  140.     db    cr,lf
  141. ;
  142.     db    lf,lf    ; fill rest of screen
  143. ;
  144.     db    0        ; terminator
  145. ;
  146. ; Help screen section . . .
  147. ;
  148. HelpA:    db    CR,LF
  149. ;
  150.     db    HON,'Option M -- File Mode.',HOF,'  FILT has  four  file '
  151.     db    'modes: "Source Code" for ASCII',CR,LF
  152.     db    'assembler  source  code;  "ASCII  Text"  for  ordinary '
  153.     db    ' ASCII  text  files;',CR,LF
  154.     db    '"WordStar W"  for  WordStar  document  files  (removes '
  155.     db    ' dot  commands); and',CR,LF
  156.     db    '"WordStar D" for WordStar document files  (retains  dot '
  157.     db    ' commands).  Any of',CR,LF
  158.     db    'these modes  can  be  made the default.  See the accompanying'
  159.     db    ' help file for',CR,LF
  160.     db    'details on the differences between these modes.  Whatever '
  161.     db    'mode is chosen as',CR,LF
  162.     db    'the default can be changed  with  the  "S",  "A",  "W", '
  163.     db    'or "D" command line',CR,LF
  164.     db    'options.'
  165.     db    CR,LF,LF
  166. ;
  167.     db    HON,'Option T -- Tabbing Mode.',HOF,'  If "As Found" is '
  168.     db    'chosen, tabs and spaces will be',CR,LF
  169.     db    'left as they are found by default.  Otherwise, tabs will '
  170.     db    'always be expanded',CR,LF
  171.     db    'to spaces on input.  If "Re-Tab" is  chosen, then FILT '
  172.     db    'will re-tab the file',CR,LF
  173.     db    'on output.  The chosen default can be overridden with '
  174.     db    'the "T", "E",  or "K"',CR,LF
  175.     db    'command line options.'
  176.     db    CR,LF,LF
  177. ;
  178.     db    HON,'Option F -- Retain form feeds.',HOF,'  FILT normally '
  179.     db    'removes form feeds from ASCII',CR,LF
  180.     db    'text and source code files by default.  Choosing "Yes" '
  181.     db    'causes form feeds to',CR,LF
  182.     db    'be retained.  The default selected  here  can  be  toggled '
  183.     db    'with the command',CR,LF
  184.     db    'line "F" option.  (Form feeds are never removed in the '
  185.     db    'WordStar modes.)'
  186.     db    CR,LF
  187. ;
  188.     db    ':',CR,LF    ; new page
  189. ;
  190.     db    HON,'Option Q -- Quiet  Mode.',HOF,'  This  option  determines'
  191.     db    '  whether FILT will be in',CR,LF
  192.     db    'verbose or quiet mode by default (except that FILT always '
  193.     db    'defaults to quiet',CR,LF
  194.     db    'mode if the ZCPR3 quiet flag is set).  The default may '
  195.     db    'be toggled  with the',CR,LF
  196.     db    'command line "Q" option.'
  197.     db    CR,LF,LF
  198. ;
  199.     db    HON,'Option C -- Error on user abort.',HOF,'  Pick  "Yes" '
  200.     db    'if you want the program error',CR,LF
  201.     db    'flag set when FILT is aborted via a ^C from the console. '
  202.     db    ' In that  case the',CR,LF
  203.     db    'error handler  will  be invoked (if one is installed), '
  204.     db    'allowing the user to',CR,LF
  205.     db    'also abort a running SUB  or  ZEX  batch job.  That can '
  206.     db    'be very useful.  If',CR,LF
  207.     db    'you would rather not have the  aggravation,  however, '
  208.     db    ' select  "No"  and an',CR,LF
  209.     db    'abort will not be considered an error.'
  210.     db    CR,LF,LF
  211. ;
  212.     db    HON,'Option P -- Progress Reports.',HOF,'  Normally  FILT '
  213.     db    'displays a running line count',CR,LF
  214.     db    'while it is working.  This report can be suppressed by '
  215.     db    'selecting "No".',CR,LF
  216. ;
  217.     db    0        ; Terminator
  218. ;
  219.     end
  220.