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 / ZCPR33 / S-Z / SHOW14.LBR / SHOWOPT.ZZ0 / SHOWOPT.Z80
Text File  |  1988-05-02  |  13KB  |  714 lines

  1.  
  2. ; SHOWOPT.Z80
  3.  
  4. ; Display facilities information (ECP, SUBMIT, system addresses)
  5.  
  6. facility:
  7.     call    banner
  8.     call    copyopts
  9.     jp    nz,notz33
  10.  
  11. ; Main screen header
  12.  
  13.     call    gxymsg
  14.     defb    3,28
  15.     defb    highon
  16.     defb    ' Facilities & Addresses ',0
  17.  
  18. ; Main topics
  19.  
  20.     call    gxymsg
  21.     defb    6,5
  22.     defb    highon,' Command Processor          ',highoff,0
  23.  
  24.     call    gxymsg
  25.     defb    8,5
  26.     defb    highon,' Executable Object Files    ',highoff,0
  27.  
  28.     call    gxymsg
  29.     defb    13,5
  30.     defb    highon,' Extended Command Processor ',highoff,0
  31.  
  32.     call    gxymsg
  33.     defb    16,5
  34.     defb    highon,' SUBMIT/ZEX Facility        ',highoff,0
  35.  
  36. ; Subtopics
  37.  
  38.     ld    hl,6*100h+36
  39.     ld    (infoxy),hl
  40.  
  41.     call    vprxy
  42.     defb    'version number:',0
  43.     call    dispxy
  44.  
  45.     call    vprxy
  46.     defb    'file type:',0
  47.  
  48.     call    vprxy
  49.     defb    'check attributes:',0
  50.  
  51.     call    vprxy
  52.     defb    'accept DIR files:',0
  53.  
  54.     call    vprxy
  55.     defb    'accept SYS files:',0
  56.  
  57.     call    dispxy
  58.     call    vprxy
  59.     defb    'file name:',0
  60.  
  61.     call    vprxy
  62.     defb    'rootonly:',0
  63.  
  64.     call    dispxy
  65.     call    vprxy
  66.     defb    'SUBMIT available:',0
  67.  
  68.     call    vprxy
  69.     defb    'command filename:',0
  70.  
  71.     call    vprxy
  72.     defb    'LONGSUB option:',0
  73.  
  74.     call    vprxy
  75.     defb    'echo commands:',0
  76.  
  77.     call    vprxy
  78.     defb    'use DOS clue:',0
  79.  
  80.     call    vprxy
  81.     defb    'ZEX prompt:',0
  82.  
  83. ; Supply data
  84.  
  85.     ld    hl,6*100h+58
  86.     ld    (infoxy),hl
  87.  
  88.     call    vprxy
  89.     defb    '3.',0        ; We know the main version
  90.     ld    a,(versbyte)    ; Get CPR version byte
  91.     and    0fh
  92.     add    a,'0'
  93.     ld    (cprversion),a    ; Save for later
  94.     call    cout
  95.  
  96.     call    dispxy
  97.     call    dispxy
  98.     call    getecp        ; Set HL to ECP name
  99.     push    hl        ; Save it for later
  100.     ld    de,8        ; Offset to object file type
  101.     add    hl,de
  102.     ld    b,3        ; Three characters
  103.     call    prtstr
  104.  
  105.     ld    a,(opt4)
  106.     bit    4,a        ; Attribute checking
  107.     call    prynxy
  108.  
  109.     ld    a,(opt4)
  110.     bit    5,a        ; DIR files OK
  111.     call    prynxy
  112.  
  113.     ld    a,(opt4)
  114.     bit    6,a        ; SYSfiles OK
  115.     call    prynxy
  116.  
  117.     call    dispxy        ; Display ECP name
  118.     call    dispxy
  119.     pop    hl        ; Get back pointer to ECP name
  120.     ld    b,8        ; Characters to display
  121.     call    prtstr
  122.  
  123.     ld    a,(opt1)    ; Display rootonly
  124.     bit    6,a
  125.     call    prynxy
  126.  
  127.     ld    c,0ch        ; CP/M version call
  128.     call    bdosadr        ; ..CP/M-Plus handles things differently
  129.     ld    a,l
  130.     ld    (cpmversion),a    ; Save -- we'll need it again
  131.  
  132.     call    dispxy        ; SUBMIT available
  133.     ld    a,(opt4)
  134.     bit    0,a
  135.     push    af        ; Save test result
  136.     call    prynxy        ; Display answer
  137.  
  138. subname:
  139.     call    dispxy        ; Name of $$$.SUB file
  140.     pop    af        ; Submit supported?
  141.     jr    nz,subname1    ; Branch if so
  142.  
  143.                 ; SUBMIT not supported
  144.  
  145.     call    notappl        ; ..Put in dashes
  146. cpm3sub:
  147.     call    dispxy        ; LONGSUB question
  148.     call    notappl        ; ..Put in dashes
  149.     call    dispxy        ; Commmand echo question
  150.     call    notappl        ; ..Put in dashes
  151.     call    dispxy        ; Use clue question
  152.     call    notappl        ; ..Put in dashes
  153.     jr    zexnoise    ; On to ZEX question
  154.  
  155. subname1:
  156.     call    getsfcb        ; Get pointer to SUBMIT FCB
  157.     ex    de,hl        ; Move pointer to HL
  158.     ld    a,(hl)        ; Get drive
  159.     add    a,'A'-1
  160.     cp    '@'        ; See if current drive
  161.     jr    nz,showsub1
  162.     ld    a,'$'        ; If so, display '$'
  163. showsub1:
  164.     call    cout
  165.     ld    a,(cpmversion)
  166.     cp    30h        ; Set carry if 2.2
  167.     ld    a,'0'        ; For 2.2, always user 0
  168.     push    af        ; Save result of test
  169.     jr    c,showsub2
  170.     ld    a,'$'        ; For 3, current user
  171. showsub2:
  172.     call    cout
  173.     ld    a,':'
  174.     call    cout
  175.     inc    hl        ; Point to file name
  176.     ld    b,8        ; Characters in name
  177.     call    prtstr
  178.     ld    a,'.'
  179.     call    cout
  180.     ld    b,3        ; Characters in type
  181.     call    prtstr
  182.     pop    af        ; Get back result of CP/M version test
  183.     jr    nc,cpm3sub    ; If CP/M-3, dash out next answers
  184.  
  185. longsub:
  186.     ld    a,(cprversion)
  187.     cp    '4'
  188.     jr    nc,longsub1
  189.     call    dispxy
  190.     call    notappl        ; Put in dashes if Z33 or earlier
  191.     jr    subnoise
  192. longsub1:
  193.     ld    a,(opt7)
  194.     bit    7,a
  195.     call    prynxy
  196.  
  197. subnoise:
  198.     call    dispxy        ; Command echo
  199.     ld    a,(opt4)
  200.     ld    b,a        ; Save option bits in B
  201.     call    noisestat    ; Show command noise status
  202.  
  203. subclue:
  204.     ld    a,(opt4)
  205.     bit    1,a
  206.     call    prynxy
  207.  
  208. zexnoise:
  209.     call    dispxy
  210.     ld    a,(cprversion)    ; If before Z34, skip this answer
  211.     cp    '4'
  212.     jr    c,zexnoise0
  213.     ld    a,(cpmversion)    ; If CP/M-3, skip this answer
  214.     cp    30h
  215.     jr    c,zexnoise1
  216. zexnoise0:
  217.     call    notappl        ; Put in dashes if Z33
  218.     jr    cprdone
  219. zexnoise1:
  220.     ld    a,(opt7)    ; Get option with zexnoise
  221.     rra            ; Align with subnoise bits
  222.     rra
  223.     rra
  224.     ld    b,a        ; Save in B
  225.     call    noisestat
  226.  
  227. cprdone:
  228.     jp    getcmd
  229.  
  230.      if    usedseg
  231.     dseg
  232.      endif
  233.  
  234. cprversion:
  235.     ds    1
  236. cpmversion:
  237.     ds    1
  238.  
  239.      if    usedseg
  240.     cseg
  241.      endif
  242.  
  243. ;--------------------
  244.  
  245. noisestat:
  246.     bit    2,b
  247.     jr    z,cmdecho    ; Skip if not controlled by quiet flag
  248.     call    vprint
  249.     defb    'QUIET FLAG',0
  250.     ret
  251. cmdecho:
  252.     bit    3,b
  253.     jp    pryn
  254.  
  255. ;=============================================================================
  256.  
  257. ; Display environment controls and special options
  258.  
  259. special:
  260.     call    banner
  261.     call    copyopts
  262.     jp    nz,notz33
  263.  
  264. ; Main screen header
  265.  
  266.     call    gxymsg
  267.     defb    3,24
  268.     defb    highon
  269.     defb    ' Environment & Special Options ',highoff,0
  270.  
  271. ; Main topics
  272.  
  273.     call    gxymsg
  274.     defb    5,5
  275.     defb    highon,' Information from Environment ',highoff,0
  276.  
  277.     call    gxymsg
  278.     defb    13,5
  279.     defb    highon,' Special Processing Features  ',highoff,0
  280.  
  281. ; Subtopics
  282.  
  283.     ld    hl,6*100h+13
  284.     ld    (infoxy),hl
  285.  
  286.     call    vprxy
  287.     defb    'Maximum DU values:',0
  288.  
  289.     call    vprxy
  290.     defb    'Accept DU form:',0
  291.  
  292.     call    vprxy
  293.     defb    'Show DU in prompt:',0
  294.  
  295.     call    vprxy
  296.     defb    'Get RCP address:',0
  297.  
  298.     call    vprxy
  299.     defb    'Get FCP address:',0
  300.  
  301.     call    vprxy
  302.     defb    'Get NDR address:',0
  303.  
  304.     ld    hl,14*100h+13
  305.     ld    (infoxy),hl
  306.  
  307.     call    vprxy
  308.     defb    'Invoke ECP for bad DU/DIR change:',0
  309.  
  310.     call    vprxy
  311.     defb    'Invoke ECP for bad command form:',0
  312.  
  313.     call    vprxy
  314.     defb    'User areas 16..31 loggable:',0
  315.  
  316.     call    vprxy
  317.     defb    'Direct access to ECP:',0
  318.  
  319.     call    vprxy
  320.     defb    'Prefix for direct ECP access:',0
  321.  
  322.     call    vprxy
  323.     defb    'Prefix for current directory:',0
  324.  
  325.     call    vprxy
  326.     defb    'Skip path for explicit DU/DIR prefix:',0
  327.  
  328.     call    vprxy
  329.     defb    'Allow IF processing in shell aliases:',0
  330.  
  331. ; Supply data
  332.  
  333.     ld    hl,6*100h+55
  334.     ld    (infoxy),hl
  335.  
  336.     ld    a,(opt1)    ; Max du from env
  337.     bit    0,a    
  338.     call    prenv
  339.  
  340.     ld    a,(opt1)    ; Accept du from env
  341.     bit    1,a
  342.     call    prenv
  343.  
  344.     ld    a,(opt1)    ; Include du from env
  345.     bit    2,a
  346.     call    prenv
  347.  
  348.     ld    a,(opt1)    ; Get RCP from env
  349.     bit    3,a
  350.     call    prenv
  351.  
  352.     ld    a,(opt1)    ; Include FCP from ENV
  353.     bit    4,a
  354.     call    prenv
  355.  
  356.     ld    a,(opt1)    ; Include NDR from ENV
  357.     bit    5,a
  358.     call    prenv
  359.  
  360.     call    dispxy        ; BADDUECP
  361.     call    dispxy
  362.     ld    a,(opt1)
  363.     bit    7,a
  364.     call    prynxy
  365.  
  366.     ld    a,(opt3)    ; BADCMDECP
  367.     bit    7,a
  368.     call    prynxy
  369.  
  370.     ld    a,(opt2)
  371.     bit    7,a
  372.     call    prynxy
  373.  
  374.     ld    a,(opt3)
  375.     bit    1,a
  376.     push    af
  377.     call    prynxy
  378.  
  379.     call    dispxy        ; FASTECP prefixes
  380.     pop    af
  381.     jr    z,dircur    ; If FASTECP off, skip (no output)
  382.  
  383.     ld    a,'"'
  384.     call    cout
  385.  
  386.     ld    a,(opt6)
  387.     ld    b,a
  388.     and    7fh        ; Isolate alternate space character
  389.     jr    z,noalt
  390.     call    cout        ; Print alternate character
  391.     bit    7,b        ; See if alternate-only flag set
  392.     jr    nz,altonly
  393.     call    vprint
  394.     defb    '" or space',0
  395.     jr    dircur
  396. altonly:
  397.     call    vprint
  398.     defb    '" only',0
  399.     jr    dircur
  400. noalt:
  401.     call    vprint
  402.     defb    'space only',0
  403.  
  404. dircur:
  405.     call    dispxy        ; Current directory prefix
  406.     ld    a,'"'
  407.     call    cout
  408.     ld    a,(opt5)
  409.     and    7fh
  410.     jr    z,colonly
  411.     call    cout
  412.     call    vprint
  413.     defb    '" or ":"',0
  414.     jr    nopath
  415. colonly:
  416.     call    vprint
  417.     defb    ':" only',0
  418.  
  419. nopath:
  420.     ld    a,(opt3)    ; Skippath
  421.     bit    0,a
  422.     call    prynxy
  423.  
  424.     ld    a,(opt4)    ; shellif
  425.     bit    7,a
  426.     call    prynxy
  427.  
  428.     jp    getcmd
  429.  
  430. ;=============================================================================
  431.  
  432. ; Display access options (directories, paths, and security)
  433.  
  434. access:
  435.     call    banner
  436.     call    copyopts    ; Copy CCP options and check for ZCPR33
  437.     jp    nz,notz33    ; If not ZCPR33, display message
  438.  
  439. ; Main screen header
  440.  
  441.     call    gxymsg
  442.     defb    3,23
  443.     defb    highon
  444.     defb    ' Directories, Paths, and Security '
  445.     defb    highoff,0
  446.  
  447. ; Main topics
  448.  
  449.     call    gxymsg
  450.     defb    6,5
  451.     defb    highon,' Directory References  ',highoff,0
  452.  
  453.     call    gxymsg
  454.     defb    10,5
  455.     defb    highon,' Command Prompt        ',highoff,0
  456.  
  457.     call    gxymsg
  458.     defb    13,5
  459.     defb    highon,' Path Search           ',highoff,0
  460.  
  461.     call    gxymsg
  462.     defb    16,5
  463.     defb    highon,' Security Features     ',highoff,0
  464.  
  465. ; Subtopics
  466.  
  467.     ld    hl,6*100h+30
  468.     ld    (infoxy),hl
  469.  
  470.     call    vprxy
  471.     defb    'accept DU:',0
  472.  
  473.     call    dispxy
  474.     call    vprint
  475.     defb    'accept DIR:',0
  476.  
  477.     call    dispxy
  478.     call    vprint
  479.     defb    'DU before DIR:',0
  480.  
  481.     call    dispxy
  482.     call    vprxy
  483.     defb    'include DU:',0
  484.  
  485.     call    vprxy
  486.     defb    'include DIR:',0
  487.  
  488.     call    dispxy
  489.     call    vprxy
  490.     defb    'allow DU/DIR prefixes:',0
  491.  
  492.     call    vprxy
  493.     defb    'include current directory:',0
  494.  
  495.     call    dispxy
  496.     call    vprxy
  497.     defb    'password checking:',0
  498.  
  499.     call    vprxy
  500.     defb    'password echoing:',0
  501.  
  502.     call    vprxy
  503.     defb    'allow directory change:',0
  504.  
  505. ; Supply data
  506.  
  507.     ld    hl,6*100h+58
  508.     ld    (infoxy),hl
  509.  
  510.     ld    a,(opt2)    ; Accept DU
  511.     bit    0,a
  512.     call    duokmsg
  513.  
  514.     ld    a,(opt2)    ; Accept DIR
  515.     bit    1,a
  516.     call    prynxy
  517.  
  518.     ld    a,(opt2)    ; DU first
  519.     bit    2,a
  520.     call    prynxy
  521.  
  522.     call    dispxy
  523.     ld    a,(opt2)    ; Include DU
  524.     bit    3,a
  525.     call    duokmsg
  526.  
  527.     ld    a,(opt2)    ; Include DIR
  528.     bit    4,a
  529.     call    prynxy
  530.  
  531.     call    dispxy
  532.     ld    a,(opt2)    ; DRVPREFIX
  533.     bit    6,a
  534.     call    drvprmsg    ; Depends on WPREFIX
  535.  
  536.     ld    a,(opt2)    ; SCANCUR
  537.     bit    5,a
  538.     call    drvprmsg    ; Depends on WPREFIX
  539.  
  540.     call    dispxy
  541.     call    dispxy
  542.     ld    a,(opt3)
  543.     bit    6,a        ; Password checking
  544.     call    pwchkmsg
  545.  
  546.     ld    a,(opt3)
  547.     cpl            ; Reverse sense of bit
  548.     bit    5,a        ; Password echoing
  549.     call    prynxy
  550.  
  551.     call    dispxy
  552.     ld    a,(opt3)
  553.     cpl            ; Reverse sensing
  554.     bit    4,a        ; Directory change allowed
  555.     call    wdumsg
  556.  
  557.     jp    getcmd
  558.  
  559. ;-----------------------------------------------------------------------------
  560.  
  561. ; Print a string pointed to by HL, suppressing blank spaces
  562.  
  563. prtstr:
  564.     ld    a,(hl)
  565.     cp    ' '
  566.     call    nz,cout
  567.     inc    hl
  568.     djnz    prtstr
  569.     ret
  570.  
  571. ;-----------------------------------------------------------------------------
  572.  
  573. ; Routine to display 'YES' if NZ and DUOK message if Z
  574.  
  575. duokmsg:
  576.     call    dispxy
  577.     call    z,pryn        ; If not allowed at all, print 'NO'
  578.     ld    a,(opt1)    ; See if under control of DUOK flag
  579.     cpl            ; Reverse sense of bit
  580.     bit    2,a
  581.     jp    nz,pryn        ; If not controlled by DUOK, print 'YES'
  582.     call    vprint
  583.     defb    'follow ENV DUOK flag',0
  584.     ret
  585.  
  586. ;-----------------------------------------------------------------------------
  587.  
  588. drvprmsg:
  589.     call    dispxy
  590.     jp    z,pryn        ; If not allowed at all, print 'NO'
  591.     ld    a,(opt3)    ; See if under WPREFIX control
  592.     cpl            ; Reverse sense of bit
  593.     bit    2,a
  594.     jp    nz,pryn        ; If not WPREFIX, print 'YES'
  595.     call    vprint
  596.     defb    'ONLY IF WHEEL ON',0
  597.     ret
  598.  
  599. ;-----------------------------------------------------------------------------
  600.  
  601. pwchkmsg:
  602.     jp    z,pryn        ; If passwords never checked, print 'NO'
  603.     ld    a,(opt3)
  604.     cpl            ; Reverse sense of bit
  605.     bit    3,a        ; See if wheel suppresses password checking
  606.     jp    nz,pryn        ; If not WPASS, print 'YES'
  607.     call    vprint
  608.     defb    'ONLY IF WHEEL OFF',0
  609.     ret
  610.  
  611. ;-----------------------------------------------------------------------------
  612.  
  613. wdumsg:
  614.     jp    nz,pryn        ; If WDU not set, print 'YES'
  615.     call    vprint
  616.     defb    'ONLY IF WHEEL ON',0
  617.     ret
  618.  
  619. ;-----------------------------------------------------------------------------
  620.  
  621. prenv:
  622.     call    dispxy
  623.     jr    z,hardcode
  624.     call    vprint
  625.     defb    'FROM ENV',0
  626.     ret
  627. hardcode:
  628.     call    vprint
  629.     defb    'HARD CODED',0
  630.     ret
  631.  
  632. ;-----------------------------------------------------------------------------
  633.  
  634. ; Position cursor; then print yes or no
  635.  
  636. prynxy:
  637.     call    dispxy
  638.     jp    pryn
  639.  
  640. ;-----------------------------------------------------------------------------
  641.  
  642. ; Display two dashes as not-applicable message.
  643.  
  644. notappl:
  645.     call    vprint
  646.     defb    '--',0
  647.     ret
  648.  
  649. ;-----------------------------------------------------------------------------
  650.  
  651. ; Subroutine to give error message if ZCPR33 not running
  652.  
  653. notz33:
  654.     call    gxymsg
  655.     defb    8,14
  656.     defb    'Command Processor is not ZCPR33 or is not in memory',0
  657.     jp    getcmd
  658.  
  659. ;-----------------------------------------------------------------------------
  660.  
  661. ; Subroutine to copy option bytes from CCP.  This routine returns NZ if the
  662. ; ZCPR33 command processor is not in memory.
  663.  
  664. copyopts:
  665.     call    z33chk        ; Make sure ZCPR33 is running
  666.     ret    nz        ; If not, return now
  667.     call    getccp        ; Get pointer to beginning of CCP
  668.     ld    bc,offvers    ; Offset to version number
  669.     add    hl,bc
  670.     ld    de,versbyte    ; Destination of copy
  671.     ld    a,(hl)
  672.     ld    (de),a
  673.     inc    de
  674.     ld    bc,offopt-offvers ; Offset to first option byte
  675.     add    hl,bc
  676.     ld    bc,optend-optbytes
  677.     ldir
  678.     xor    a        ; Return Z
  679.     ret
  680.  
  681. ;-----------------------------------------------------------------------------
  682.  
  683. ; Local copy of option bytes from CCP
  684.  
  685.      if    usedseg
  686.     dseg
  687.      endif    ;usedseg
  688.  
  689. versbyte:
  690.     defs    1    ; ZCPR version byte
  691. optbytes:
  692. opt1:    defs    1    ; badduecp,rootonly,ndrenv,fcpenv,
  693.             ; rcpenv,inclenv,aduenv,duenv
  694. opt2:    defs    1    ; highuser,drvprefix,scancur,incldir,
  695.             ; incldu,dufirst,accptdir,accptdu
  696. opt3:    defs    1    ; no,pwcheck,pwnoecho,wdu,
  697.             ; wpass,wprefix,fastecp,skippath
  698. opt4:    defs    1    ; shellif,attsys,attdir,attchk,
  699.             ; subecho,subquiet,subclue,subon
  700. opt5:    defs    1    ; alternate colon byte
  701. opt6:    defs    1    ; alternate space (and space-only) byte
  702. opt7:    defs    1    ; longsub,zexprompt,zexquiet
  703. opt8:    defs    1    ; UNDEFINED
  704. opt9:    defs    1    ; UNDEFINED
  705. opt10:    defs    1    ; UNDEFINED
  706. optend:
  707.  
  708.      if    usedseg
  709.     cseg
  710.      endif    ;usedseg
  711.  
  712. ; End SHOWOPT.Z80
  713.  
  714.