home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
sigm
/
vol179
/
cutils.lbr
/
CPMCALC.C
< prev
next >
Wrap
Text File
|
1985-02-09
|
1KB
|
31 lines
/*
Program to calculate CP/M bios offsets and provide location
information of CCP, BDOS, BIOS. C B Mueller 12-9-82
*/
main()
{
int msize,biosex,ccp;
printf("CP/M System generation calculator Ver 1.0 C B Mueller 12-9-82\n\n");
printf("This program calculates CP/M addresses based on system");
printf(" memory sizes.\n");
printf("If no additional memory is required enter 0 or CR.\n");
printf("Exit with control C.\n\n");
while(1) {
printf("Enter desired system memory size in K->");
scanf("%d",&msize);
printf("Enter additional memory in K (CCS requires 2) ->");
if((scanf("%d",&biosex))==0)biosex=0;
ccp = 0x3400 + (msize - 20 - biosex) * 1024;
printf("\nFor system size of %d K with %d K additional memory:\n\n",
msize,biosex);
printf("CCP starts at %x H\n",ccp);
printf("BDOS starts at %x H\n",ccp+0x800);
printf("BIOS starts at %x H\n",ccp+0x1600);
printf("BIOS OFFSET LOAD = %x H\n\n",0x980-ccp);
printf("When CP/M has been loaded with DDT:\n\n");
printf("BOOT starts at 900 H\n");
printf("CCP starts at 980 H\n");
printf("BDOS starts at 1180 H\n");
printf("BIOS starts at 1F80 H\n\n");
}
}