CPR Modifications ================= This file describes the source code modifications to the ZCPR2 CPR program. Both features have been helpful in their own right. The graphics mask option has cleaned up a messy screen with some programs and the secure ZCPR2 modification has been helpful on RCPM systems. Perhaps these ideas can be helpful for others. John C. Smith Manlius, NY December 4, 1983 Graphics Mask ------------- This modification integrates another resident command called GRAF into the ZCPR system. Its purpose is to mask off the eighth bit from all CONOUT calls as a selectable option. This is accomplished by complementing the GRAPHICS BYTE which is located at 004F. When this byte is zero, the eighth bit is masked out, otherwise it is not. This prevents unwanted graphics displays on the Kaypro 10 screen. The changes are described below: ZCPRHDR.LIB ----------- Add the following code after WSAVE: ; WGRAF EQU TRUE ; Make GRAF a wheel oriented command ; Change the WHEEL equate as follows: ; WHEEL EQU WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP OR WJUMP OR WDU OR WGRAF ; Add after IF GETON... ENDIF in CTABLE: ; DB 'GRAF' DW GRAF ; TOGGLE GRAPHICS BYTE ; ZCPR2.ASM --------- Add the following code immediately ahead of Section 5J, the GET command: ;Section 5I-1 ;Command: GRAF ;Function: To toggle the GRAPHICS BYTE at 04FH on the Kaypro 10. ; This is used to optionally mask out the eighth bit of ; the character in the CONOUT BIOS routine to prevent ; unwanted graphics being displayed. ;Form: GRAF GRAF: IF WGRAF CALL WHLCHK ENDIF LDA 04FH CMA STA 04FH JMP RCPRNL ; This concludes the modifications. Secure ZCPR2 ------------ It is possible to modify the ZCPR-2 CCP to be more amenable to the security aspects required for RCPM applications by taking additional advantage of the WHEEL byte used by the resident commands in the CCP as well as some of the supplied utilities. This .DOC file desicribes the nature and effect of the CCP modofication. In an RCPM environment, it is desirable to limit the maximum user (and sometimes, the maximum disk) that can be accessed by a remote user. However, it would be nice to keep the full resident addressing facility to all disk/users for the SYSOP. I have added code to the ZCPR-2 CCP to accomplish this. This code does increase the size of the CCP by about 34 bytes, so be sure to take steps to limit CCP to 2K maximum. The changes are described below: ZCPRHDR.LIB ----------- The change to this file consists of adding the following code to the "Miscellaneous Equates" section of this file as follows: MAXUSR EQU 31 ;MAXIMUM USER NUMBER ACCESSABLE MAXDISK EQU 3 ;MAXIMUM NUMBER OF DISKS ACCESSABLE ; ;add the following code ; if wheel ;if wheel facility is enabled... limusr equ 5 ;max user number with wheel byte reset limdisk equ 2 ;max number of disks with wheel byte reset endif ; ;end of addition ; SYSFLG EQU 'S' ;etc. In the above listing, the normal capability to to go from A0: through C31: with the WHEEL byte set and from A0: through B5: with the WHEEL byte reset. ZCPR2.ASM --------- The following code is added to Section 4, ZCPR2 Utilities: ; ; SET DISK NUMBER (A=1) ; SUI 'A'-1 ;CONVERT DRIVE NUMBER TO 1-16 ; ;added code ; if wheel ;wheel byte enabled? push psw ;save disk number lda whladr ;get wheel byte ora a ;is it set? jrnz jcs1 ;go to jcs1 if it is... pop psw ;if not, get the disk number cpi limdisk+1 ;is it within range? jnc error ;invalid disk number jcs1: pop psw ;get the disk number endif ; ;end of added code ; CPI MAXDISK+1 ;WITHIN RANGE? More code addition... ; ; SET USER NUMBER ; SUD1: PUSH H ;(comments deleted) XCHG CALL NUM0A XCHG POP H ; ;added code ; if wheel push psw ;save user number lda whladr ;get wheel byte ora a ;is it set? jrnz jcs3 ;go to jcs3, if it is pop psw ;if not, get the user number cpi limusr+1 ;within range? jnc error ;invalid user number jcs3: pop psw ;get the user number endif ; ;end of added code ; IF USERON ;etc. The above code modification has been used on the Kaypro 10, running ZCPR2 and no problems have been noted. It is currently in use on the Tampa Bay Bandit Board. I would appreciate hearing of any problems with this modification. John C. Smith Manlius, NY December 4, 1983