CP/M V2.2 Application Note 01, 2/20/82 The CCP Auto-Load Feature Copyright 1982 by Digital Reserch CP/M is a registered trademark of Digital Research. DDT is a trademark of Digital Research. Compiled November 1982 Applicable products and version numbers: CP/M V1.4, V2.0, V2.1, and V2.2 Program: CCP (Console Command Processor) Usually, you interact with the CP/M CCP following the sign-on prompt. With the CCP Auto Load feature, CP/M executes an initial program immediately after loading the operating system. Under usual operation, the CCP receives control from the BIOS upon a warm or cold boot. The beginning of the CCP module contains a two-element jump vector and a command line that takes the form: CCP: JMP CCPSTART ;START THE CONSOLE PROCESSOR JMP CCPCLEAR ;CLEAR THE INITIAL COMMAND DB 127 ;MAXIMUM COMMAND LENGTH CL: DB 0 ;COMMAND LENGTH DB ' ' ;8 BLANK CHARACTERS DB ' ' ; " DB 'COPYRIGHT...' ;COPYRIGHT NOTICE If control is transferred to location CCP (address 3400H in a 20K CP/M), the console processor examines the command length at location CL (3407H in a 20K CP/M). If the command length byte is zero, then you receive the sign-on prompt and the CCP waits for console input. If the command length byte is not zero, the CCP assumes an initial command has already been entered. The CCP executes the command on each cold or warm boot if control is transferred to location CCP. However, if control is transferred to location CCP+3 (JMP CCPCLEAR), the initial command is cleared and the program enters the CCP at the command line level, displaying the default drive prompt. Specify the length of the initial command using a nonzero CL byte. The command must be followed by a terminating zero. CP/M executes the command following that CL byte. Although only 16 blank spaces are provided, you can move the Digital Research copyright notice for more spaces. You can initialize the command line of the CCP on the operating system tracks or in the relocatable image within the MOVCPM data area. The initial command executes in distributed or reconfigured CP/M systems. Following SYSGEN and SAVE commands, save the CP/M memory image above the cold boot loader code starting at location (980H). If the system boot routines require more than 80H bytes, the CCP code begins at location 0A00H. Modifying MOVCPM.COM is similar to modifying the CCP. The difference is that the CCP always begins at location 0A00H. The following procedure uses DDT to modify the CCP, allowing execution of the initial command DIR after each warm or cold boot. A>movcpm * * CONSTRUCTING 64K CP/M Vers. 2.2 READY FOR "SYSGEN" OR "SAVE 35 CPM64.COM A>save 35 cpm64.com A>ddt cpm64.com DDT VERS 2.2 NEXT PC 2400 0100 -d980 0980 C3 5C E7 C3 58 E7 7F 00 20 20 20 20 20 20 20 20 ...X... 0990 20 20 20 20 20 20 20 20 43 4F 50 59 52 49 47 48 COPYRIGH 09A0 54 20 28 43 29 20 31 39 37 39 2C 20 44 49 47 49 T (C) 1979, DIGI 09B0 54 41 4C 20 52 45 53 45 41 52 43 48 20 20 00 00 TAL RESEARCH .. 09C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -s987 0987 00 3 0988 20 44 0989 20 49 098A 20 52 098B 20 0 098C 20 . -d980 0980 C3 5C E7 C3 58 E7 7F 03 44 49 52 00 20 20 20 20 ...X...DIR. 0990 20 20 20 20 20 20 20 20 43 4F 50 59 52 49 47 48 COPYRIGH 09A0 54 20 28 43 29 20 31 39 37 39 2C 20 44 49 47 49 T (C) 1979, DIGI 09B0 54 41 4C 20 52 45 53 45 41 52 43 48 20 20 00 00 TAL RESEARCH .. 09C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -g0 A>save 35 cpm64.com A>sysgen cpm64.com SYSGEN VER 2.0 DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b DESTINATION ON B, THEN TYPE RETURN FUNCTION COMPLETE DESTINATION DRIVE NAME (OR RETURN TO REBOOT) Licensed users are granted the right to include these modifications in CP/M software.