home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol116 / nzcpr206.dif < prev    next >
Encoding:
Text File  |  1984-04-29  |  6.7 KB  |  252 lines

  1. 1d 0
  2. 3c 17200
  3. *  N Z C P R 206- Z80-Based Command Processor Replacement, Version 2.06    *
  4. .
  5. 16c 24427
  6. *                                    *
  7. *  This is DIF file Mod 0.6 to be combined with mod 0.1 VERS of ZCPR2.  *
  8. *  To obtain the full file do:                             *
  9. *  SSED ZCPR2.ASM <NZCPR206.DIF >NZCPR206.ASM                    *
  10. *                                    *
  11. *  11 MAR 1983   = VERS 2.06 ; BY PETER PINCHIS, TORONTO, ONT.        *
  12. *           All mods from ZCPR22.ASM by Rich Conn included .    *
  13. *          BREAK routine futher changed to run proprely.        *
  14. *          ERROR routine has new features:            *
  15. *          -When DIR or TYPE is interrupted by ^C in the midle   *
  16. *           of a multiple cmd line ,the user is prompted to abort*
  17. *           or not the rest of the cmd line.            *
  18. *          -When ^C is typed during a submit file, the user is    *
  19. *           prompted to continue or not with the next cmd in the *
  20. *           submit file.                        *
  21. *          -When a file is not found during a submit file, the   *
  22. *           user is prompted to abort or not the submit file.    *
  23. *          -Note that in the last two cases when you answer 'Y', *
  24. *           to the 'Abort?' prompt the rest of the cmd line is   *
  25. *           ignored. In order to avoid that you should answer 'N'*
  26. *           and to type ^C after each cmd in the submit file.    *
  27. *          Use module NZCPRHDR.LIB ver 2.02 to compile this file.*
  28. *                                                                       *
  29. *  28 FEB 1983   = VERS 2.05 ; BY PETER PINCHIS, TORONTO, ONT.        *
  30. *        - Major bug fixed: in the original ZCPR2 mod 0.1 every  *
  31. *          time when a wrong command is issued in the multiple   *
  32. *          command line ( i.e : a file not found or a wild card  *
  33. *          in the save or ren cmd ) ,the ZCPR stops and the rest *
  34. *          of the command line is ignored.            *
  35. *            Example of cmd line before the change:        *
  36. *                  B1>type xxxxx.xxx;pip a:=b:yy.zz;dir      *
  37. *                  ; xxxxx.xxx not found.....        *
  38. *                      B1>XXXXX.XXX;PIP A:=B:YY.ZZ;DIR?            *
  39. *                  B1>                        *
  40. *          The present fix solves this problem : in the above    *
  41. *          example the execution continues with PIP and DIR...    *
  42. *           ERROR routine modified as follows:            *
  43. *          If a file is not found by the load,TYPE,REN,DIR,GET or*
  44. *          ERA command then the file name is printed after     *
  45. *          "No File" prompt.                    *
  46. *          If other commands follow the ofending one, then an    *
  47. *           other prompt "Abort?" is displayed.            *
  48. *          The user could abort or not the execution of the rest *
  49. *          of command line.                        *
  50. *          Example of cmd line after the change:            * 
  51. *                  B1>asmbl myprog a;type yyy;dir b5:xxx.com    *
  52. *                  ;...asmbl and yyy not present         *
  53. *                  ;...b5: empty                *
  54. *                  B1>No File ASMBL MYPROG A            *
  55. *                  B1>Abort?n                *
  56. *                  B1>No file YYY                *
  57. *                  B1>Abort?n                *
  58. *                  B1>No File B5:XXX.COM            *
  59. *                  B1>                    *
  60. *          Other example:                    *
  61. *                  B1>era qqq.com;ren pp.txt=rr.txt        *
  62. *                  ;..qqq.com not present; pp.txt exist'g    *
  63. *                  B1>No File QQQ.COM            *
  64. *                  B1>Abort?n                *
  65. *                  B1>Erase PP      .TXT?y            *
  66. *                  B1>No File RR.TXT                *
  67. *                  B1>                    *
  68. *          Use module NZCPRHDR.LIB ver 2.02 to compile this file.*
  69. *                                    *
  70. *  25 FEB 1983   = VERS 2.04 ; BY PETER PINCHIS, TORONTO, ONT.        *
  71. *          Included in vers 2.05                    *
  72. *                                    *
  73. *  23 FEB 1983  = VERS 2.03 ; BY PETER PINCHIS, TORONTO, ONT.        *
  74. *         Included in vers 2.05                    *
  75. *                                    *
  76. *  18 FEB 1983  = VERS 2.02 ; BY PETER PINCHIS, TORONTO, ONT.        *
  77. *         - DIR routine has been changed to provide user select-  *
  78. *          able number of columns for DIR and ERA display.    *
  79. *          DIR and ERA shall now page at each full screen.    *
  80. *        - CONOUT routine modified to ignore Form feeds.        *
  81. *               - ERAV has a new meaning : when FALSE the user is always*
  82. *          prompted except when ERDFLG is present in the command *
  83. *          line.                            *
  84. *        - The module ZCPRHDR.LIB has been changed and renamed   *
  85. *          NZCPRHDR.LIB.                            *
  86. *          Only this module shall be used to compile NZCPR202    *
  87. .
  88. 100,101c 41637
  89. ;  NZCPR206 -- CP/M Z80 Command Processor Replacement (ZCPR) Version 2.06
  90. .
  91. 169c 44423
  92.     MACLIB    NZCPRHDR
  93. .
  94. 173a 57200
  95. ff    equ    0ch            ;form feed
  96. .
  97. 662c 8582
  98.     call    prnnf        ;no file message
  99. .
  100. 666,668c 37082
  101.     MOV    A,M        ;GET CHAR from current token of cmd line
  102.     shld    nxtchr        ;set pointer
  103.  
  104.     if    multcmd
  105.     cpi    cmdsep        ;is a cmd separator ?
  106.     jrz    err3        ;yes , print abort msg
  107.     endif        ;multcmd
  108.  
  109.      cpi    ' '        ;is less than <sp> ?
  110.      jrc    err2         ;yes , is the end of cmd line
  111. .
  112. 679,691c 34419
  113. err2:
  114.     if    subon
  115.     lda    rngsub        ;is a submit file active ?
  116.     ora    a
  117.     jrz    rstcpr        ;if not goto next cmd, otherwise print prompt
  118.     else
  119.     jr    rstcpr        ;if not submit facility goto next cmd
  120.     endif        ;subon
  121. err3:
  122.     if    multcmd
  123.     call    printc        ;abort message
  124.     db    'Abort','?'+80H
  125.     exx            ;save regs
  126.     call    conin        ;get reply
  127.     exx            ;restore regs
  128.     cpi    'Y'        ;yes?
  129.     jrnz    rstcpr        ;if not, goto next cmd
  130.     endif        ;multcmd
  131.  
  132.     IF    SUBON        ;IF SUBMIT FACILITY IS ON
  133.     CALL    SUBKIL        ;TERMINATE ACTIVE $$$.SUB IF ANY
  134.     ENDIF        ;SUBON
  135.     
  136.     jmp    restrt        ;abort command line
  137. .
  138. 709c 10914
  139.     DB    'No File',' '+80H
  140. .
  141. 727,728c 44137
  142.     MVI    C,1    ;INPUT CHAR
  143.     CALL    BDOS    ;GET INPUT CHAR WITH ^S PROCESSING AND ECHO
  144.     JMP    UCASE    ;CAPITALIZE
  145. .
  146. 732,734c 58191
  147.     EXX        ;SAVE CHAR
  148.     cpi    ff    ;is a form feed ?
  149.     jrz    skipff  ;skip char
  150.     MVI    C,2
  151. .
  152. 739,740c 49989
  153. skipff:
  154.     EXX
  155. .
  156. 754,756c 33412
  157.     EXX        ;SAVE REGS
  158.     MVI    C,5
  159. .
  160. 790c 32648
  161.     PUSH    B        ;SAVE REG
  162. .
  163. 990,992c 11990
  164.     RNZ            ;IF NO ^C, RETURN TO CALLER AND RUN
  165. ;     CALL    SUBKIL        ;KILL $$$.SUB IF ABORT
  166.     JMP    rstcpr        ;RESTART CPR
  167. .
  168. 1016c 18213
  169. ; CHECK FOR ANY CHAR FROM USER CONSOLE; RET W/ZERO SET IF ^C TYPED
  170. .
  171. 1019,1025c 25191
  172.     exx            ;save regs
  173.      mvi    c,11        ;check con status
  174.      call    bdos
  175.     ora    a        ;set flags
  176.     cnz    conin        ;input char
  177.     exx            ;restore regs
  178.     cpi    'C'-'@'        ;is ^C ?
  179.     ret
  180. .
  181. 1493,1496d 63615
  182. 1544,1545c 45856
  183.     MVI    E,nrcol-1    ;SET COLUMN COUNTER TO ZERO
  184.     PUSH    D        ;SAVE COLUMN COUNTER (E)
  185.     mvi    a,nlines
  186.     sta    pagcnt
  187. .
  188. 1550,1553c 38718
  189. ;    CALL    PRNNF        ;PRINT NO FILE MSG; REG A NOT CHANGED
  190. ;    XRA    A        ;SET ZERO FLAG
  191.     POP    D        ;RESTORE DE
  192.     jmp    error
  193.  
  194. ;    RET
  195. .
  196. 1564,1566c 64924
  197.     INR    a
  198.     cpi    nrcol
  199.     jrnz    dir3a
  200.     xra    a
  201. dir3a:
  202.     mov    e,a
  203.     PUSH    D        ;SAVE IT
  204. ;    ANI    03H        ;OUTPUT <CRLF> IF all  ENTRIES PRINTED IN LINE
  205. .
  206. 1573a 13207
  207.     push    b
  208.     call    pager
  209.     pop    b
  210. .
  211. 1602c 24755
  212.     JRZ    dir8
  213. .
  214. 1609a 29946
  215. dir8:
  216.     pop    d
  217.     jmp    err3 
  218. .
  219. 1687,1689c 11390
  220. ;        If ERAV is FALSE, verification is always requested, except when
  221. ;            V flag is present in the command line ,in wich case
  222. ;                the user will not be prompted.
  223. .
  224. 1703c 12907
  225.     IF    ERAOK        ;OK? ENABLED?
  226. .
  227. 1712,1714d 21084
  228. 1714,1718c 9842
  229. ;    RZ            ;ABORT IF NO FILES
  230. .
  231. 1719,1720c 48582
  232.  
  233.     IF    ERAV        ;if ERAV is true then
  234.     JRNZ    ERA2        ;do not skip prompt if ERDFLG prezent 
  235.     else            ;if ERAV is false then
  236.     jrz    era2        ;skip prompt if ERDFLG prezent 
  237. .
  238. 1860,1868c 48640
  239.     CALL    BREAK        ;CHECK FOR ABORT
  240.     jz    err3        ;RESTART IF SO
  241.     JR      TYPE2
  242. .
  243. 1967c 52528
  244.     JNZ    rstcpr        ;RESTART AS ERROR IF NO
  245. .
  246. 2025,2026c 22671
  247. ;REN3:
  248. ;    CALL    PRNNF        ;PRINT NO FILE MSG
  249. .
  250. $a 6338
  251. .
  252.