;CCPCHAIN.ASM OCT. 1986 P.P.P. ; ;Attach this program to the end of your assembly ;language program. It will chain the program named ;in FILENAM to your program by inserting that file ;name into the CCP buffer. A jump to the CCP causes ;the named program to load and execute. ; ;************************************************* ;NOTE: THE FOLLOWING ARE THE VALUES FOR MY SYSTEM ;ACTUAL VALUES ARE CALCULATED AND INSERTED FOR THE ;SYSTEM IN USE CCP EQU 0CB00H ;START OF CCP LENBIT EQU 0CB07H ;LENGTH OF CCP BUFFER CCPBUF EQU 0CB08H ;START OF CCP BUFFER PNTR EQU 0CB88H ;POINTER TO CCP BUFFER ;************************************************* BDOS EQU 5 CR EQU 0DH LF EQU 0AH .ORIGIN 100H ;************************************************** ;*****PUT YOUR PROGRAM HERE************************ ;************************************************** JP FINDCCP MES1: DB CR,LF,LF,LF,LF,'CCPCHAIN.COM OCT. 1986 P.P.P.' DB CR,LF,LF,'*****PUT YOUR MESSAGE HERE*****' DB CR,LF,LF,'Attach this program to the end' DB CR,LF,'of your assembly language program.' DB CR,LF,'It will chain the program named in' DB CR,LF,'FILENAM to your program by inserting' DB CR,LF,'that file name into the CCP buffer.' DB CR,LF,'A jump to the CCP causes the named' DB CR,LF,'program to load and execute.' DB CR,LF,'$' FINDCCP:LD HL,(6) LD DE,806H SBC HL,DE LD (CCP1+1),HL ;CCP LD DE,7 ADD HL,DE LD (PNTR1+1),HL ;LENGTH BIT INC HL LD (CCPBUF1+1),HL ;START OF BUFFER LD (CCPBUF2+1),HL LD DE,80H ADD HL,DE LD (PNTR1+1),HL ;POINTER TO CCP BUFFER LD C,9 LD DE,MES1 CALL BDOS LD HL,FILENAM CCPBUF1:LD DE,CCPBUF LD BC,ENDNAM-STARTNAM LDIR LD A,ENDNAM-STARTNAM LENBIT1:LD (LENBIT),A CCPBUF2:LD HL,CCPBUF PNTR1: LD (PNTR),HL LD HL,4 ;GET DRIVE # LD C,(HL) ;PLACE IT IN C CCP1: JP CCP STARTNAM EQU $ FILENAM:DB 'DDT' ;PUT NAME OF PROGRAM HERE ENDMARK:DB 00H ENDNAM EQU $ .END