; Z40-1.Z80 ;============================================================================= ; E N T R Y P O I N T S A N D H E A D E R S T R U C T U R E ;============================================================================= ; Revisions to ZCPR Version 3.3 to make Version 3.4 (C) Copyright Jay P. Sage, ; 1988, all rights reserved. ENTRY: ; ENTRY POINTS INTO ZCPR40 ; For compatibility with CP/M, two entry points are provided here. In ; standard CP/M if the code is entered from the first entry point, then the ; command in the resident command buffer is executed; if entered from the ; second entry point, the command line is flushed. With ZCPR34 and its ; multiple command line buffer, these two entry points function identically ; and go to the same address. ; We have kept the entry points in their standard locations but have used a ; relative jump for the second entry point and replaced the last byte with the ; version number. In this way the version number occupies a position that ; would otherwise contain the page number at which the CPR runs. It will ; always be possible, therefore, to distinguish ZCPR33 and later versions ; from other command processors. The first jump is kept as an absolute jump ; so that 1) the code will be compatible with Z-COM and Z3-DOT-COM and 2) the ; execution address of a CPR module can always be determined. JP ZCPR JR ENTRY ; Vector to first jump to go round Comnd Tbl VERSION: DEFB 40H ; Version ID squeezed in here (offset = 5) ;----------------------------------------------------------------------------- ; Configuration information OPTIONS: ; (offset = 6) OPTFLAG badduecp,rootonly,ndrenv,fcpenv,rcpenv,inclenv,aduenv,duenv OPTFLAG highuser,drvprefix,scancur,incldir,incldu,dufirst,accptdir,accptdu OPTFLAG badcmdecp,pwcheck,pwnoecho,wdu,wpass,wprefix,fastecp,skippath ATTDIR DEFL [ COMATT EQ 80H ] OR [ COMATT EQ 01H ] OR [ NOT ATTCHK ] ATTSYS DEFL [ COMATT EQ 00H ] OR [ COMATT EQ 01H ] OR [ NOT ATTCHK ] SUBQUIET DEFL [ SUBNOISE EQ 1 ] SUBECHO DEFL [ SUBNOISE GT 1 ] OPTFLAG shellif,attsys,attdir,attchk,subecho,subquiet,subclue,subon ; Byte with information about the alternate colon option. If the byte is ; zero, the option is not supported. Otherwise the byte contains the ; prefix character that serves as an alias for a colon prefix. Offset = 10. IF altcolon DEFB ALTCHAR ELSE DEFB 0 ENDIF ;altcolon ; Byte with information about the FASTECP implementation (option bit above ; indicates whether the feature is enabled at all). If no character appears ; here (zero byte), then only a leading space can be used. Otherwise, the ; first seven bits contain the character, and the high bit, if set, indicates ; that ONLY this character will be recognized and not a space. Offset = 11. IF fastecp AND altspace IF altonly DEFB ECPCHAR + 80H ELSE ;not altonly DEFB ECPCHAR ENDIF ;altonly ELSE ;no alternate character DEFB 0 ENDIF ;fastecp and altspace ZEXQUIET DEFL [ ZEXNOISE EQ 1 ] ZEXECHO DEFL [ ZEXNOISE GT 1 ] OPTFLAG LONGSUB,ZEXECHO,ZEXQUIET,NO,NO,NO,NO,NO DEFB 0,0,0 ; Space reserved for expansion ;----------------------------------------------------------------------------- ; Entry points to file name parsing code. ; Entry point REPARSE. A call to this point can be used to parse a command ; line tail into the default file control blocks at 5CH and 6CH. Each time ; the parser is called it leaves the starting address of the second token in ; the PARSPTR address so that successive calls to the routine reparse the ; command tail one token later. A program can load its own pointer into ; REPARSE+1 to successively parse command lines as well. Offset = 16 (10H). REPARSE: LD HL,$-$ ; Pointer for in-the-code modification REPARS: JP PRSTAIL ; Entry point SCAN. A call to this point can be used to parse a single token ; pointed to by HL into the FCB pointed to by DE. Offset 22 (16H). SCAN: JP SCANNER ;----------------------------------------------------------------------------- ; -- BUFFERS ; In this area various data items are kept. First comes the list of commands ; supported by ZCPR34; then comes the name of the extended command processor ; (ECP). By putting these items here, an 'H' command in the RCP or a utility ; like SHOW.COM can find this information and report it to the user. ; ---------- RESIDENT COMMAND TABLE ; The command table entry is structured as follows: First there is a byte ; which indicates the number of characters in each command. Then there is a ; series of entries comprising the name of a command followed by the address ; of the entry point to the code for carrying out that command. Finally, ; there is a null byte (00h) to mark the end of the table. Offset = 25 (19h). CMDTBL: DEFB CMDSIZE ; Length of command names CTABLE ; Define table via macro in Z40HDR.LIB DEFB 0 ; End of table ; ---------- NAME FOR EXTENDED COMMAND PROCESSOR ; The name of the extended command processor is placed here after the command ; table so that utilities like SHOW or an RCP 'H' command can find it. ECPFCB: ECPNAME ; From Z40HDR.LIB ; ---------- FILE TYPE FOR TRANSIENT COMMANDS (usually COM) ; This file type also applies to the extended command processor name. COMMSG: COMTYP ; From Z40HDR.LIB ; ---------- SUBMIT FILE CONTROL BLOCK IF subon ; If submit facility enabled ... SUBFCB: DEFB SUBDRV-'A'+1 ; Explicit drive for submit file DEFB '$$$ ' ; File name SUBTYP ; From Z40HDR.LIB DEFB 0 ; Extent number DEFB 0 ; S1 SUBFS2: DEFS 1 ; S2 SUBFRC: DEFS 1 ; Record count DEFS 16 ; Disk group map SUBFCR: DEFS 1 ; Current record number IF longsub SUBFR: DEFS 3 ; Random record number and overflow ENDIF ;longsub ENDIF ; subon ; End Z40-1.Z80