On Wednesday, December 19, 2018 at 8:45:17 PM UTC+1,
bbel...@gmail.com wrote:
> I have a copy of the source code for CCP3, and I assembled it with DR MAC. The assembler threw
> a bunch of Phase warnings that I am note sure are okay or not.
Also reading the source helps. The phase errors are intentional, so that one can make
sure ccp and loader modules match:
title 'CP/M 3 - Console Command Processor - November 1982'
; version 3.00 Nov 30 1982 - Doug Huskey
; Copyright (C) 1982
; Digital Research
; P.O. Box 579
; Pacific Grove, CA 93950
; Revised: John Elliott, 25-5-1998, to include DRI patches and multiple
; error checking ability:
;
; If the sequence
; COMMAND
; :C1
; :C2
;
; was executed under DRI's CCP, and COMMAND returned an error,
; then C1 would not be executed but C2 would. Under this CCP
; C2 would not be.
;
; ****************************************************
; ***** The following equates must be set to 100H ***
; ***** + the addresses specified in LOADER.PRN ***
; ***** ***
equ1 equ rsxstart ;does this adr match loader's?
equ2 equ fixchain ;does this adr match loader's?
equ3 equ fixchain1 ;does this adr match loader's?
equ4 equ fixchain2 ;does this adr match loader's?
equ5 equ rsx$chain ;does this adr match loader's?
equ6 equ reloc ;does this adr match loader's?
equ7 equ calcdest ;does this adr match loader's?
equ8 equ scbaddr ;does this adr match loader's?
equ9 equ banked ;does this adr match loader's?
equ10 equ rsxend ;does this adr match loader's?
equ11 equ ccporg ;does this adr match loader's?
equ12 equ ccpend ;This should be 0D80h
rsxstart equ 0100h
fixchain equ 01D0h
fixchain1 equ 01EBh
fixchain2 equ 01F0h
rsx$chain equ 0200h
reloc equ 02CAh
calcdest equ 030Fh
scbaddr equ 038Dh
banked equ 038Fh
rsxend equ 0394h
ccporg equ 040Ah ;[JCE] was 041Ah, but reduced
; to incorporate patches
; ****************************************************
> Then I tried to compare the assembled code in the PRN file to the
CCP.COM file I am loading and
> trying to run. Ultimately, with a correct PRN file, I can Trace execution of CCP using ZSID and
> hopefully find out what it is doing to cause the looping I described above. However, the assembled
> code is not matching a dump of the
CCP.COM file.
You are using a patched
ccp.com but the unpatched source from DRI, comments in above
source sniped explain the difference.
> The very first instruction in the COM file is a JUMP to 040A. I'm sure the jump was put there as a
> result of the ORG statement in the source.
Of course the jump is put there by the loader in front of the ccp:
title 'CP/M 3 - PROGRAM LOADER RSX - November 1982'
; version 3.0b Nov 04 1982 - Kathy Strutynski
; version 3.0c Nov 23 1982 - Doug Huskey
; Dec 22 1982 - Bruce Skidmore
;
;
; copyright (c) 1982
; digital research
; box 579
; pacific grove, ca.
; 93950
;
****************************************************
***** The following values must be placed in ***
***** equates at the front of CCP3.ASM. ***
***** ***
***** Note: Due to placement at the front these ***
***** equates cause PHASE errors which can be ***
***** ignored. ***
equ1 equ rsxstart +0100h ;set this equate in the CCP
equ2 equ fixchain +0100h ;set this equate in the CCP
equ3 equ fixchain1+0100h ;set this equate in the CCP
equ4 equ fixchain2+0100h ;set this equate in the CCP
equ5 equ rsx$chain+0100h ;set this equate in the CCP
equ6 equ reloc +0100h ;set this equate in the CCP
equ7 equ calcdest +0100h ;set this equate in the CCP
equ8 equ scbaddr +0100h ;set this equate in the CCP
equ9 equ banked +0100h ;set this equate in the CCP
equ10 equ rsxend +0100h ;set this equate in the CCP
ccporg equ CCP ;set origin to this in CCP
patch equ patcharea+0100h ;LOADER patch area
CCP equ 40Ah ;ORIGIN OF CCP3.ASM
...
...
...
cseg
;
;
; ********* LOADER RSX HEADER ***********
;
rsxstart:
jmp ccp ;the ccp will move this loader to
db 0,0,0 ;high memory, these first 6 bytes
;will receive the serial number from
;the 6 bytes prior to the BDOS entry
;point
tojump:
jmp begin
next db 0c3h ;jump to next module
nextjmp dw 06
prevjmp dw 07
db 0 ;warm start flag
db 0 ;bank flag
db 'LOADER ' ;RSX name
db 0ffh ;end of RSX chain flag
db 0 ;reserved
db 0 ;patch version number
> Is it possible that there may be more than one version of
CCP.COM for CPM3?
Of course.