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 / ZCPR2 / KP10NZ2.LBR / ZCPR2PAT.DQC / ZCPR2PAT.DOC
Text File  |  2000-06-30  |  6KB  |  178 lines

  1.                         CPR Modifications
  2.                         =================
  3.  
  4. This  file  describes the source code modifications to the  ZCPR2 
  5. CPR program.  Both features have been helpful in their own right.  
  6. The graphics mask option has cleaned up a messy screen with  some 
  7. programs  and  the secure ZCPR2 modification has been helpful  on 
  8. RCPM systems.  Perhaps these ideas can be helpful for others.
  9.  
  10.  
  11.                                         John C. Smith
  12.                                         Manlius, NY 
  13.                                         December 4, 1983
  14.  
  15.  
  16.                           Graphics Mask
  17.                           -------------
  18.  
  19. This modification integrates another resident command called GRAF 
  20. into the ZCPR system.   Its purpose is to mask off the eighth bit 
  21. from  all  CONOUT  calls  as  a  selectable  option.    This   is 
  22. accomplished  by complementing the GRAPHICS BYTE which is located 
  23. at 004F.   When this byte is zero,  the eighth bit is masked out, 
  24. otherwise it is not.  This prevents unwanted graphics displays on 
  25. the Kaypro 10 screen.
  26.  
  27. The changes are described below:
  28.  
  29.                            ZCPRHDR.LIB
  30.                            -----------
  31.  
  32. Add the following code after WSAVE:
  33. ;
  34. WGRAF     EQU  TRUE ; Make GRAF a wheel oriented command
  35. ;
  36. Change the WHEEL equate as follows:
  37. ;
  38. WHEEL EQU WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP
  39.           OR WJUMP OR WDU OR WGRAF
  40. ;
  41. Add after IF GETON... ENDIF in CTABLE:
  42. ;
  43.           DB   'GRAF'    
  44.           DW   GRAF ; TOGGLE GRAPHICS BYTE
  45. ;
  46. .pa
  47.                             ZCPR2.ASM
  48.                             ---------
  49.  
  50. Add the following code immediately ahead of Section 5J,  the  GET 
  51. command:
  52. ;Section 5I-1
  53. ;Command: GRAF
  54. ;Function:  To toggle the GRAPHICS BYTE at 04FH on the Kaypro 10.  
  55. ;           This is used to optionally mask out the eighth bit of 
  56. ;           the  character in  the CONOUT BIOS routine to prevent 
  57. ;           unwanted graphics being displayed.
  58. ;Form:    GRAF <cr>
  59. GRAF:     IF   WGRAF
  60.           CALL WHLCHK
  61.           ENDIF
  62.           LDA  04FH
  63.           CMA
  64.           STA  04FH
  65.           JMP  RCPRNL
  66. ;
  67.  
  68. This concludes the modifications.
  69.  
  70.                           Secure ZCPR2 
  71.                           ------------
  72.  
  73. It  is possible to modify the ZCPR-2 CCP to be more  amenable  to 
  74. the  security  aspects required for RCPM applications  by  taking 
  75. additional  advantage  of  the WHEEL byte used  by  the  resident 
  76. commands  in  the CCP as well as some of the supplied  utilities.  
  77. This  .DOC  file  desicribes the nature and  effect  of  the  CCP 
  78. modofication.
  79.  
  80. In an RCPM environment, it is desirable to limit the maximum user 
  81. (and  sometimes,  the  maximum  disk) that can be accessed  by  a 
  82. remote  user.   However,  it  would  be nice  to  keep  the  full 
  83. resident addressing facility to all disk/users for the SYSOP.   I 
  84. have added code to the ZCPR-2 CCP to accomplish this.   This code 
  85. does  increase the size of the CCP by about 34 bytes,  so be sure 
  86. to  take  steps  to limit CCP to 2K  maximum.   The  changes  are 
  87. described below:
  88. .pa
  89.                            ZCPRHDR.LIB
  90.                            -----------
  91.  
  92. The change to this file consists of adding the following code  to 
  93. the "Miscellaneous Equates" section of this file as follows:
  94.  
  95. MAXUSR    EQU  31   ;MAXIMUM USER NUMBER ACCESSABLE
  96. MAXDISK   EQU  3    ;MAXIMUM NUMBER OF DISKS ACCESSABLE
  97. ;
  98. ;add the following code
  99. ;
  100. if        wheel     ;if wheel facility is enabled...
  101. limusr    equ  5    ;max user number with wheel byte reset
  102. limdisk   equ  2    ;max number of disks with wheel byte reset
  103. endif
  104. ;
  105. ;end of addition
  106. ;
  107. SYSFLG    EQU  'S'  ;etc.
  108.  
  109. In  the  above listing,  the normal capability to to go from  A0: 
  110. through  C31:  with the WHEEL byte set and from A0:  through  B5: 
  111. with the WHEEL byte reset.
  112.  
  113.                             ZCPR2.ASM
  114.                             ---------
  115.  
  116.  
  117. The following code is added to Section 4, ZCPR2 Utilities:
  118.  
  119. ;
  120. ;    SET DISK NUMBER (A=1)
  121. ;
  122.           SUI  'A'-1     ;CONVERT DRIVE NUMBER TO 1-16
  123. ;
  124. ;added code
  125. ;
  126.           if   wheel     ;wheel byte enabled?
  127.           push psw       ;save disk number
  128.           lda  whladr    ;get wheel byte
  129.           ora  a         ;is it set?
  130.           jrnz jcs1      ;go to jcs1 if it is...
  131.           pop  psw       ;if not, get the disk number
  132.           cpi  limdisk+1 ;is it within range?
  133.           jnc  error     ;invalid disk number
  134. jcs1:     pop  psw       ;get the disk number
  135.           endif
  136. ;
  137. ;end of added code
  138. ;
  139.           CPI  MAXDISK+1 ;WITHIN RANGE?
  140. .pa
  141.  More code addition...
  142.  
  143. ;
  144. ;    SET USER NUMBER
  145. ;
  146. SUD1:     PUSH H         ;(comments deleted)
  147.           XCHG
  148.           CALL NUM0A
  149.           XCHG
  150.           POP  H
  151. ;
  152. ;added code
  153. ;
  154.           if   wheel
  155.           push psw       ;save user number
  156.           lda  whladr    ;get wheel byte
  157.           ora  a         ;is it set?
  158.           jrnz jcs3      ;go to jcs3, if it is
  159.           pop  psw       ;if not, get the user number
  160.           cpi  limusr+1  ;within range?
  161.           jnc  error     ;invalid user number
  162. jcs3:     pop  psw       ;get the user number
  163.           endif
  164. ;
  165. ;end of added code
  166. ;
  167.           IF   USERON    ;etc.
  168.  
  169. The  above  code  modification has been used on  the  Kaypro  10, 
  170. running ZCPR2 and no problems have been noted.   It is  currently 
  171. in use on the Tampa Bay Bandit Board.  I would appreciate hearing 
  172. of  any problems with this modification.
  173.  
  174.                     John C. Smith
  175.                     Manlius, NY
  176.                     December 4, 1983
  177.  
  178.