|xo}|'p*rHCPMADR C CPMCALC C  MAKSUB11C SECTRAN C :CPMADR OBJB*SECTRAN OBJlYsBq!*!6 +!X/* program to experiment with cpm addresses */ main() { int wb,cs,ci,co,lo,po,ro,hd,sd,st,ss; int sdma,rd,wd,rl,strn,dphadr,seldrv,logdrv; int xtbl,diradr,dpbadr,dava,davb; int spt,bsh,blm,exm,dsm,mdb,drm,al0; char drv; wb=getadr(1); cs=wb+3; ci=cs+3; co=ci+3; lo=co+3; po=lo+3; ro=po+3; hd=ro+3; sd=hd+3; st=sd+3; ss=st+3; sdma=ss+3; rd=sdma+3; wd=rd+3; rl=wd+3; strn=rl+3; Printf("\n\nCP/M Data Program Version 1.0 by C. B. Mueller 12/15/82\n\n"); printf("This program will print CP/M information based on your system"); printf(" size\nand attributes of the drive that it is run on.\n\n"); printf("%x = CCP Start Address\n",wb-0x1603); printf("%x = BDOS Start Address\n",wb-0xE03); printf("%x = BIOS start Address (Cold Boot)\n\n",wb-3); printf("BIOS ENTRY ADDRESS\n"); printf("%x = Warm Boot\t\t%x = Select Disk\n",wb,sd); printf("%x = Console Stat\t\t%x = Set Track Number\n",cs,st); printf("%x = Console Input\t\t%x = Set Sector number\n",ci,ss); printf("%x = Console Output\t\t%x = Set DMA Address\n",co,sdma); printf("%x = List Output\t\t%x = Read Disk\n",lo,rd); printf("%x = Punch Output\t\t%x = Write Disk\n",po,wd); printf("%x = Reader Output\t\t%x = Return List Status\n",ro,rl); printf("%x = Home Drive\t\t%x = Sector Translate\n\n",hd,strn); logdrv=peek(4); if(logdrv==0)drv='A'; else drv='B'; dphadr=call(sd,0,0,logdrv,0); printf("DRIVE %c DISK PARAMETER HEADER TABLES\n",drv); printf("Disk Parmater Header Address = %x\n",dphadr); printf("Translation Table Address = %x\n",xtbl=getadr(dphadr)); printf("Directory Buffer Address = %x\n",diradr=getadr(dphadr+8)); printf("Disk Parameter Block Address = %x\n",dpbadr=getadr(dphadr+10)); printf("Disk Allocation Vector = %x\n\n",dava=getadr(dphadr+14)); printf("DISK %c PARAMETER BLOCK TABLES\n"); printf("Logical Sectors per Track = %dD\n",spt=peek(dpbadr)); printf("Block Shift Factor = %dD\n",bsh=peek(dpbadr+2)); printf("Block Mask = %x\n",blm=peek(dpbadr+3)); printf("Extent Mask = %x\n",exm=peek(dpbadr+4)); printf("Max Disk Blocks = %dD\n",dsm=(getadr(dpbadr+5)+1)); printf("Max Directory Entries = %dD\n",drm=(peek(dpbadr+7)+1)); printf("Directory Block Alloc = %x\n",al0=peek(dpbadr+9)); exit(); } getadr(lobyte) int lobyte; { int lsbyte,msbyte,adr; lsbyte=peek(lobyte); msbyte=peek(lobyte+1); adr = (msbyte * 0x100)+lsbyte; return(adr); }/* 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"); } }/* BDS 'C' Programers Aid makesub.c ver 1.1 by Cliff Mueller This program accepts as a command line argument the filename you are going to work with, as well as any link files you might want to use. The program then generates; W.SUB, C.SUB and S.SUB. W.SUB merely invokes the Wordstar editor with your filename and quits after exiting Wordstar. C.SUB runs the 'C' compiler then the linker and quits. S.SUB invokes Wordstar, then the 'C' compiler and linker, then runs your program. To implement: First get SUBMIT.COM or SUPSUB.COM on to the disk and rename it to S.COM. Then enter makesub [filename] and makesub wil generate the proper files for you. You may omit the link files if they are not needed. When entering filenames DO NOT enter the extent .C, or .CRL. The program will do that for you. After compiling and linking run the com file through NOBOOT to eliminate the warm booting. Finally, to save typing rename the maksub11.com file to ms.com. To use: Enter sw for the WS "filename.c". Enter sc for the CC1 "filename.c" & L2 "filename". Enter ss for both of above and to run the program. Author's note: I have been using this version for about six months now and the only bug I've found is that if a compiler error appears its difficult to abort the sub file. The procedure I use is to use W first, then C to clear errors, then use S to fine tune the code. If you find any bugs or have any suggestions call me at 408-736-9401. Happy Hacking */ #include main(argc,argv) int argc; char *argv[]; { int fd; char obuf[BUFSIZ]; printf("makesub.c version 1.1 1/17/83 by Cliff Mueller\n\n"); while(1) { if (argc < 2) { printf("Usage: filename "); exit(); } if((fd = fcreat("w.sub",obuf))==ERROR) /* ws .sub file */ { printf("\nCan't open w.sub"); exit(); } fprintf(obuf,"WS %s.C\n",argv[1]); putc(CPMEOF,obuf); fflush(obuf); fclose(obuf); if((fd = fcreat("c.sub",obuf))==ERROR) /* CC1 & L2 .sub file */ { printf("\nCan't open c.sub"); exit(); } fprintf(obuf,"CC1 %s.C\n",argv[1]); if(argc==2) fprintf(obuf,"L2 %s\n",argv[1]); if(argc==3) fprintf(obuf,"L2 %s %s\n",argv[1],argv[2]); if(argc==4) fprintf(obuf,"L2 %s %s %s\n",argv[1],argv[2],argv[3]); if(argc==5) fprintf(obuf,"L2 %s %s %s %s\n",argv[1],argv[2],argv[3],argv[4]); putc(CPMEOF,obuf); fflush(obuf); fclose(obuf); if((fd = fcreat("s.sub",obuf))==ERROR) /* CC1 & L2 $ program .sub file */ { printf("\nCan't open s.sub"); exit(); } fprintf(obuf,"WS %s.C\n",argv[1]); fprintf(obuf,"CC1 %s.C\n",argv[1]); if(argc==2) fprintf(obuf,"L2 %s\n",argv[1]); if(argc==3) fprintf(obuf,"L2 %s %s\n",argv[1],argv[2]); if(argc==4) fprintf(obuf,"L2 %s %s %s\n",argv[1],argv[2],argv[3]); if(argc==5) fprintf(obuf,"L2 %s %s %s %s\n",argv[1],argv[2],argv[3],argv[4]); fprintf(obuf,"%s\n",argv[1]); putc(CPMEOF,obuf); fflush(obuf); fclose(obuf); printf("\n.SUB files now contain filename -> %s.C\n",argv[1]); if(argc==3)printf("link file = %s\n",argv[2]); if(argc==4)printf("link files = %s, %s\n",argv[2],argv[3]); if(argc==5)printf("link files = %s, %s, %s\n",argv[2],argv[3],argv[4]); printf("The disc with the .SUB files must be on the 'A' drive.\n"); exit(); } } /* Program to print a translation table based on the logged in drive. */ main() { int logdrv,bios,seldrv,sectran,dphadr,xtbl,dpbadr; int sec,maxsec,physec; logdrv=peek(4); bios=getadr(1); seldrv=bios+24; sectran=bios+45; dphadr=call(seldrv,0,0,logdrv,0); printf("\n\nLogical to physical sector translation program"); printf(" ver 1.0 C.B. Mueller 12-16-82\n\n"); printf("Disk Parameter Header address = %x\n",dphadr); printf("Translation Table Address = %x\n",xtbl=getadr(dphadr)); printf("Disk Paramater Block Address = %x\n",dpbadr=getadr(dphadr+10)); printf("Logical Sectors per Track = %dD\n\n",maxsec=peek(dpbadr)); sec = 0; for (sec=0; sec < maxsec; sec++) { printf("logical= %2d physical = %2d\n",sec, physec=(call(sectran,0,0,sec,xtbl))); } exit(); } getadr(lobyte) int lobyte; { int lsbyte,msbyte,adr; lsbyte=peek(lobyte); msbyte=peek(lobyte+1); adr = (msbyte * 0x100)+lsbyte; return(adr); }!9"y4K͞+'+FÎr*y*w#w#w^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2qZZk:q|/g}/o#|/g}/o#:q<2qqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2qZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! !9~#A"s!`*"!"!Y">2>2>22!"!"!@"!" ʞ!F#x±~#±!b2r~# "2r+}|~#G:rx"2r+w# +6#!6#2w2x*s!>r<o&F=-/` r'~h6!+`W?_!~7z?` :>ª@w#G.¶ww#?*>?w#> w#.7:77!a{   `OE!y6$ -7rBo&))T])))!y## !2 s#r!C ͐*### !4 s#r!f ͐*#### !6 s#r! ͐*#!8 s#r! ͐* #!< s#r! ͐*  !> s#r! !A9 CP/M Data Program Version 1.0 by C. B. Mueller 12/15/82 This program will print CP/M information based on your system size and attributes of the drive that it is run on. %x = CCP Start Address %x = BDOS Start Address %x = BIOS start Address (Cold Boot) BIOS ENTRY ADDRESS %x = Warm Boot %x = Select Disk %x = Console Stat %x = Set Tra!9DM!͛`is#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐ ###! s#r͐ ###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r͐###! s#r!W ! ! ͐! ͐! ͐+++!9 !_ ͐͐!s ͐͐! ͐͐! ͐͐! ͐͐! ͐͐ !8 ͐͐ !\ ͐͐! !/!$ s#r͐$|¬ !@ 6Aò !@ 6B!͐$!!͐6! s#r!@ n&! ͐ ! ͐ ͛!& s#r! ͐ ͛!( s#r!͐  ͛!* s#r!B͐ ͛!, s#r!e!͐*/!0 s#r!͐*##/!2 s#r!͐*###/!4 s#r!͐*####/!6 s#r!͐*͛#!8 s#r!3͐*/#!< s#r!V͐* /!> s#r!yT!A9 CP/M Data Program Version 1.0 by C. B. Mueller 12/15/82 This program will print CP/M information based on your system size and attributes of the drive that it is run on. %x = CCP Start Address %x = BDOS Start Address %x = BIOS start Address (Cold Boot) BIOS ENTRY ADDRESS %x = Warm Boot %x = Select Disk %x = Console Stat %x = Set Track Number %x = Console Input %x = Set Sector number %x = Console Output %x = Set DMA Address %x = List Output %x = Read Disk %x = Punch Output %x = Write Disk %x = Reader Output %x = Return List Status %x = Home Drive %x = Sector Translate DRIVE %c DISK PARAMETER HEADER TABLES Disk Parmater Header Address = %x Translation Table Address = %x Directory Buffer Address = %x Disk Parameter Block Address = %x Disk Allocation Vector = %x DISK %c PARAMETER BLOCK TABLES Logical Sectors per Track = %dD Block Shift Factor = %dD Block Mask = %x Extent Mask = %x Max Disk Blocks = %dD Max Directory Entries = %dD Directory Block Alloc = %x !9DM͐ /`is#r͐ #/! s#r͐?͐! s#r͐!9!y9DM! `i`ir!9!h9DM! ^#Vr+s~#fo! s#r͐! s#r! ^#Vr+sn`is{c`in}%M! ! s#r! 6#6! s! s! s͐n}-¢! ^#Vr+s! 4͐n}0²! 4͐n&@}! o!! s#r! ^#Vr+sn`is{.! o! s#r! 4! ^#Vr+sn`is`in&}DFUʂXʋOʔCS 7͐~#fo|҂! ^#Vr+s6-͐͐~#fos#r! ^#Vr+s! 6 Ú! 6Ú! 6! ~#fo! n&! ^#Vr+s~#fo! ͞ѯgs#rÃ! ^#Vr+s! ^#Vr+s~#fos! ^#Vr+sÃ! n}! 6#6! ^#Vr+s~#fo! s#r͐n}ʃ͐|ʃ! ^#Vr+s! ^#Vr+sns! ^#Vr+s! ^#Vr+s9͐6! ! s#r! n}! ^#Vr+s!|! ^#Vr+s! n}!0! sß͐! ^#Vr+sns{! ^#Vr+s! n}4! ^#Vr+s!|4! ^#Vr+s6 J! ^#Vr+s`ins`! ^#Vr+s`insA͐6!9!9DM͐n}ʜ! ^#Vr+sn&Wz!9DM͐͐ ͐^#Vr+s͐͐0͐7s!&7͐ ͐͐ ͉͐͞`is͐ ͐͐ )͐͞`in&#&7!9!9DM! n&|ͯk! n&|ͩ!9DM`iw#w͐~#fon&@}ʼ͐ ?͐^#Vr+snѯg`is#r}͐!9!9DM! n&|! n&! n&&!9DM! n&|ͯ+! n&|ͩ n&7**DM:!R**   k > _ zx = List Output %x = Read Disk #%x = Punch Output %x = Write Disk ,%x = Reader Output %x = Return List Status (%x*K͞+'+FÎr ͖ 8{ Ăw#w#w^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2qZZk:q|/g}/o#|/g}/o#:q<2qqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2qZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! !9~#A"s!`*"!"!Y">2>2>22!"!"!@"!" ʞ!F#x±~#±!b2r~# "2r+}|~#G:rx"2r+w# +6#!6#2w2x*s!>r<o&F=-` r'~h6!+`W?_!~7z?` :>ª@w#G.¶ww#?*>?w#> w#.7:77!a{   `OE!y6$ -7rBo&))T])))!y8\LH]PL]MT]MB]HM\FM\PC\PO\SR\UJ\BP\CW\PA\CP\PN\OP\HE\FO\IG\PF ]OJ ]IJ ]LM ]LS ]RM ]CS ]DM ]SV ]AV ]RP ]DF ]RV ]FI ]!vL;LT%ʼ];Lw\]b`o ] ]ͣR!6]bP0]bPL͉V *v1_^h__@_1c^ `y`!6p_L`1^p__y`C_!6`^_c^W:c5}^:{…^`͛^͛^T"!{j&~!x":6W0# *7[*7[!!W_:c5_:t_>^`:+^:6!6^:6^26ͳ)1)ͥ"> ͜ `'_'_!tÏ^:6W0#w 7_||g}o&!9DM!̈́`is#r! ! s#r͐! s#r͐-! s#r!͐!!͐͋! s#r!B ! B ͐!A B ͐ ! s#r!e B ͐  ! s#r! B ͐ ̈́! s#r! B ! w#w! w#w͐͐͐ ͐!!͐͋! s#r͐! B ! ^#Vr+sÍͩ!9 Logical to physical sector translation program ver 1.0 C.B. Mueller 12-16-82 Disk Parameter Header address = %x Translation Table Address = %x Disk Paramater Block Address = %x Logical Sectors per Track = %dD logical= %2d physical = %2d !9DM͐ ̈́`is#r͐ #̈́! s#r͐?͐! s#r͐9 !9!y9DM! `ig `i !9!h9DM! ^#Vr+s~#fo! s#r͐! s#r! ^#Vr+sn`is{ʸ `in}%¢ ! ! s#r! 6#6! s! s! s͐n}- ! ^#Vr+s! 4͐n}0 ! 4͐n&͕}$ ! ' !! s#r! ^#Vr+sn`is{.o ! ! s#r! 4! ^#Vr+sn`is`in&!}Dʛ U X O C/ S` Ì ͐~#fo| ! ^#Vr+s6-͐͐~#fos#r! ^#Vr+s! 6 ! 6 ! 6! ~#fo! n&! ^#Vr+s~#fo! ѯgs#r ! ^#Vr+s! ^#Vr+s~#fos! ^#Vr+s ! n}s ! 6#6! ^#Vr+s~#fo! s#r͐n} ͐| ! ^#Vr+s! ^#Vr+sns! ^#Vr+s! ^#Vr+sÎ ͐6! ! s#r! n}/ ! ^#Vr+s!|/ ! ^#Vr+s! n}& !0) ! s ͐! ^#Vr+sns{X ! ^#Vr+s/ ! n}ʉ ! ^#Vr+s!|ډ ! ^#Vr+s6 b ß ! ^#Vr+s`insõ ! ^#Vr+s`insÖ ͐6!9!9DM͐n} ! ^#Vr+sn&ͬ !9DM͐͐ A͐^#Vr+s͐.͐06͐7s!&Ì͐ ͐͐ ͉͐ `is͐ ͐͐ )͐ `in&#&Ì!9!9DM! n&|ͯ! n&|ͩ!9DM`iw#w͐~#fon&͕}͐ ?͐^#Vr+snѯg`is#r͐!9!9DM! n&U|H! n&O! n&&!9DM! n&|ͯڀ! n&|ͩ n&7**DM:!**    > _ vsI"7 KsI?I*7ͣH͎U