.hm 1 .he THE UCPM MANUAL General Information on CP/M Computers for Programmers version 1.0 released 1 February 1988 compiled by Ted A. Campbell based on contributions from the CP/M user community .pa Š Table of Contents Part 1: Introductory Materials Preface The Prospects for CP/M Software Development Strategies for Overcoming Compatibility Problems Part 2: CPU Survey: Information on Basic Computer Hardware      Altaiò 880° (MITS)      Altoó 8000-10      Amstrad CPC 6128      Apple ][ with PCPI Applicard      Apple ][ with Microsoft Softcard I      Big Board I      Cromemco Z2D      Compupro      Epson PX-8 "Geneva"      Epson QX-10      A Homemade System      Kaypro II modified to Kaypro 8      Multiflex      Northstar Advantage      Osborne 1      Osborne Executive      Stride 440      Sord M-68      Tektronix 4132      Televideo TS803      Visual Technology 1050 Part 3: Terminal Survey: Information on Terminals and Video Displays      Amstrad CPC 6128      Apple ][      Apple ][e with Microsoft Softcard I      DEC VT-220      Epson PX-8 "Geneva"      Epson QX-10      Kaypro '83 series Kaypro '84 series      Kimtron (PC Shadow)      Multiflex Video Card      Northstar Advantage      Osborne 1      Osborne Executive Š     Televideo TS803      Visual Technology 1050 = ANSI      Zenith Z19 Appendix to Part 3: Comparative Table of Escape Sequences Part 4: Disk Format Survey: Information on Disk Formats      Altos Double Density      Amstrad System Format      Atari CP/M Format      Apple CP/M      Applå Disë II      Cromemco Z2D and Cromemco DSDD      Epson QX-10      Generic CP/M (8")      Exchange Format (8")      Kaypro DSDD      Multiflex Format      Northstar Format      Osborne SSSD      Osborne SSDD      Stride 640K Format      Sunswick Engineering 5-640      Sord Format      Televideo TS802/TS803/TPC      Visual Technology Proprietary Format Parô 5º Referencå Materialó foò Generaì CP/Í Programming 1® CP/Í BDOÓ ANÄ BIOÓ ENTRÙ POINTS BDOS BIOS 2® Referencå Informatioî foò Standarä CP/Í Assembly Languagå Tools ASM LOAD DDT MAC LINK SID 3® Referencå Informatioî foò Microsofô BASIC .pa Š PART 1: Introductory Materials .pa Š.pn 1 .op Preface Thå  UCPÍ manuaì attemptó tï providå basiã informatioî foò program� meró oî á rangå oæ CP/Í computers®  Thió ió itó firsô release¬  anä  wå � hopå  thaô  thió releaså wilì encouragå otheró tï completå surveù  formó � and correct or complete information in the manual. Thå  informatioî supplieä iî thå manuaì haó beeî collecteä  largelù � froí  thå comp.os.cpí newsgrouð oæ Usenet¬  althougè somå  surveù  formó � werå collecteä froí otheò sources¬  sucè aó thå CP/Í Foruí oæ GENIE¬ anä � local Bulletin Board Services. Tï  mù  knowledge¬  alì oæ thå informatioî iî thå manuaì ió iî  thå � publiã domain¬  anä É herebù releaså thå text¬  tï thå extenô thaô iô ió � mù  owî  work¬  intï  thå publiã domain®  Thió meanó thaô  yoõ  caî  dï � anythinç yoõ wanô witè iô excepô selì it®  Mù hopå ió thaô thå completå � ucpm.arã filå wilì bå uploadeä tï Bulletiî Boarä Services¬ networks¬ anä � other repositories where it can be available to CP/M programmers. É  wanô tï thanë alì oæ thå CP/Í useró whï havå contributeä  surveù � forms®  Thió worë ió possiblå becauså oæ theiò help®  É woulä likå  tï � thanë Keitè Petersoî foò transferrinç surveù formó froí thå GENIÅ systeí � tï  Useneô  sï thaô É coulä accesó theí withouô runninç uð mù owî  GENIÅ � bill®   Thankó alsï tï Richarä Conn¬ froí whoså HELÐ fileó mucè  oæ  thå � materiaì iî Parô µ oæ thió worë ió derived. Again¬  iæ  yoõ havå furtheò information¬  oò  suggestions¬  pleaså � forwarä theí tï meº tcamp@dukeac.uucp Happy computing! - Ted A. Campbell President, Raleigh Other Computer Club .pa Š .he UCPM Manual, Introductory Materials, Page # The Prospects for CP/M Software Development Twï  oò  threå yearó agï CP/Í waó describeä aó á  "dead¢  operatinç � system¬ anä iô waó lareglù presumeä thaô furtheò developmenô iî thå CP/Í � areá  haä oò woulä sooî cease®  Anù surveù oæ recenô releaseó  oæ  CP/Í � softwarå wilì falsifù thió presupposition®  However¬  thå prospectó foò � CP/Í  developmenô  arå  changing¬  anä wå shoulä takå  notå  oæ  currenô � trends® Iô haó beeî estimateä thaô therå arå betweeî onå anä á halæ anä twï � millioî CP/M-baseä computeró iî existence¬ roughlù divideä betweeî Applå � CP/Í  anä otheò CP/Í systemó (seå Robiî Nelsoî anä Daviä Needle¬  "CP/Mº � Stilì  thå Ol§ Workhorse,¢ Personaì Computing‚ 9:· [Julù  1985]º  54-65)® � Aô leasô threå CP/Í compatiblå systemó arå stilì iî  production¬  namelù � thå Microminô SB180¬  thå Commodorå 12¸ anä thå Amstraä PC× series® Onå � caî  arguå  that¬  sincå CP/Í machineó arå nï longeò beinç  produceä  iî � impressivå  numbers¬  thå prospectó foò softwarå developmenô musô noô bå � good®  Whilå mosô woulä admiô thå trutè iî this¬ thå facô ió thaô oldeò � CP/Í machineó arå beinç maintaineä anä passeä oî tï ne÷ users® Onå woulä � suspecô  thaô aô leasô onå halæ oæ thå existinç CP/Í machineó arå  stilì � iî use® Á  betteò  estimatå  oæ thå currenô markeô mighô  bå  gleaneä  froí � currenô saleó oæ CP/Í relateä softwarå products®  Wheî MicroPrï  Inter� nationaì Corporatioî recentlù decideä tï markeô aî upgradå oæ theiò CP/Í � Wordstaò  (tm© product¬  theù attempteä tï determinå witè morå precisioî � thå sizå oæ thå useò community¬ buô werå unablå tï dï so® Bù contactinç � thå  Firsô Osbornå Grouð (FOG© anä otheò Useò  Groups¬  theù  determineä � thaô thå projecô woulä bå feasible® Á MicroPrï Marketinç Communicationó � Manageò  workinç witè thå CP/Í producô stateä iî á letteò tï må thaô thå � companù  solä 17,00° CP/Í upgradeó betweeî Augusô anä Novembeò  oæ  198· � (thå  producô  waó releaseä iî August)®  MicroPrï expectó  tï  continuå � sellinç  upgrades¬  althougè theù arå realistiã iî projectinç thaô saleó � oæ  thå CP/Í upgradeó wilì droð ofæ afteò aî initiaì surgå oæ  interest® � Saleó  oæ otheò CP/M-relateä productó confirí thió pattern®  É recentlù � spokå bù telephonå tï á representativå oæ Echelon¬  Inc.¬  whicè marketó � thå ZCPR³ commanä processor¬  ZRDOS¬ anä otheò products® Theù explaineä � thaô afteò aî initiaì surgå oæ interest¬ saleó haä declineä slowly® Whaô  thió meanó ió thaô therå ió á communitù oæ useró whï  welcomå � moderately-priceä  ne÷  softwarå  thaô  wilì  ruî  oî  theiò   machines® � MicroPrï correctlù identifieä useò groupó aó thå mosô promisinç meanó oæ � gettinç  tï thå useò community®  Softwarå developeró caî expecô tï finä � initiaì  interesô  higè iæ theù arå ablå tï  publicizå  theiò  products® � However¬  theù  cannoô counô oî continuinç interest®  Onå suspectó thaô � therå arå pricå thresholdó thaô coulä bå exploiteä (releaså thå  producô � aô á giveî price¬ theî wheî enthusiasí flagó brinç thå pricå dowî tï thå � point where another group of users might purchase it, etc.). Giveî thió generaì picture¬  onå doeó noô expecô mucè iî thå waù oæ � commerciaì developmenô iî thå CP/Í area¬  howeveò thankfuì wå arå wheî á � producô  likå Wordstaò ió revised®  Oî thå otheò hand¬  privatå public-�Šdomain¬ shareware¬ oò "useò supported¢ softwarå haó alwayó beeî prolifiã � iî  thå  CP/Í  area¬  iî somå caseó  positivelù  hinderinç  attemptó  aô � commerciaì  developmenô (i.e.¬  whù buù á modeí prograí wheî yoõ caî geô � MEØ oò IMP»  whù buù á texô editoò wheî yoõ caî geô VDE¬ etc.)® Aó lonç � aó personó witè programminç interestó owî CP/Í computers¬ onå caî expecô � a trickle if not a stream of new development. Buô  thió  raiseó á cruciaì problem®  CP/Í  developeró  arå  ofteî � frustrateä  becauså  timå spenô developinç á prograí foò onå machinå  ió � ofteî  noô translatablå intï workinç versionó oæ thå softwarå foò  otheò � machines®  Thå UCPÍ projecô attemptó tï addresó thió probleí bù  makinç � informatioî  oî  á  widå rangå oæ CP/Í computeró  available®  Thå  nexô � articlå  wilì discusó somå strategieó foò gettinç  arounä  compatibilitù � problems on CP/M and other computers. .pa Š.he .he UCPM Manual, Introductory Materials, Page # Strategies for Overcoming Compatibility Problems A. CP/M Compatibility Problems "He'ó  á  COMPUTEÒ  PROGRAMMER,¢ mù grandmotheò saiä oæ  á  distanô � cousin¬ heò eyeó bulging® Whaô thió meanô tï heò waó thaô mù cousiî waó � oî á paò witè braiî surgeonó anä Einsteins®  Indeed¬  therå waó á  timå � wheî programmeró haä tï bå intelligent® Iî thoså days¬ iæ onå wisheä tï � writå  somethinç  tï á screeî oò á piecå oæ magnetiã tape¬  onå  haä  tï � writå bottom-leveì routineó foò eacè process®  Programminç waó aô leasô � aî arcanå art¬ iæ noô á rigorouó science® Whaô  openeä programminç uð tï Bearó oæ Verù Littlå Braiî likå Pooè � anä må waó thå developmenô oæ OPERATINÇ SYSTEMÓ whicè coulä handlå  low-� leveì inpuô anä outpuô operations®  Theså alloweä thå programmeò tï uså � á  seô  oæ standarä "systeí calls,¢ whicè woulä worë oî anù computeò  oî � whicè thå operatinç systeí haä beeî implemented® CP/M¬ developeä bù Dr® � Garù  Kildalì whï foundeä Digitaì Research¬  Inc.¬  becamå thå  standarä � operatinç systeí oî 8-biô microcomputeró iî thå latå  1970s®  Operatinç � systemó  likå CP/Í wenô á lonç waù towardó solvinç problemó oæ  softwarå � anä hardwarå compatibilitù foò programmers®  Buô threå oò fouò criticaì � problemó remaineä iî thå CP/Í world® (a©  Iî thå firsô place¬  therå waó nï standarä videï  systeí  foò � CP/Í  computers®  Earlù  CP/Í machineó utilizeä  commercially-availablå � datá terminals¬ eacè oæ whicè haä itó owî seô oæ escapå codeó tï controì � thå screen® Wheî self-containeä CP/Í computeró werå developeä (likå thå � Northstar¬ Osborne¬ anä Kayprï computers)¬ theù utilizeä terminaì escapå � sequenceó modeleä oî thoså oæ earlieò datá terminals¬  buô addeä  consi� derablå capbilitieó beyonä them¬  sucè aó memory-mappeä video¬ á varietù � oæ videï attributes¬ anä characteò oò pixeì graphics® Eacè CP/Í prograí � haä  tï  bå adapteä tï thå specifiã computeò iæ iô waó tï utilizå  theiò � more sophisticated features. (b© Iî thå seconä place¬  therå developeä problemó witè disk-formaô � compatibility®  Therå waó á generiã CP/Í disë format¬  buô iô waó aî 8¢ � format¬ anä iô employeä single-densitù recordinç techniques® Wheî 5.25¢ � disë  driveó anä double-densitù (anä double-sided© recordinç  techniqueó � becamå available¬  CP/Í hardwarå manufactureró developeä á vasô arraù oæ � differenô disë formats¬ eacè incompatiblå witè thå other® (c©  Iî  thå thirä place¬  therå werå developinç  generaì  hardwarå � incompatibilitieó betweeî thå CP/Í computers® Earlieò machineó useä thå � Inteì 808° c.p.u®  chip¬  buô lateò oneó tooë advantagå oæ thå  extendeä � instructioî setó oæ thå 808µ oò especiallù thå Ziloç Z8° chip® Softwarå � usinç  Z8°  instructionó  coulä  operatå oî  memorù  anä  perforí  otheò � functionó mucè morå quickly¬ buô coulä noô bå executeä oî thå Inteì 808° � chip®  Variouó chipó haä differenô clocë speeds®  Differenô computers¬ � moreover¬  haä varyinç inpuô anä outpuô capabilities® Differenô systemó � for serial communication posed very serious problems for programmers. Partó 2¬  3¬  anä ´ oæ thå UCPÍ manuaì givå informatioî relevanô tï �Štheså  threå  areas¬  Parô ² addressinç generaì  hardwarå  compatibilitù � problems¬  Parô  ³ addressinç terminaì anä videï compatibilitù problems¬ � and Part 4 addressing problems of disk format incompatibilities. (d© Therå ió onå furtheò areá oæ compatibilitù problemó thaô shoulä � bå  noted®  Thå  CP/Í operatinç systeí itselæ  passeä  througè  severaì � generationó  oæ development¬  anä companieó anä privatå programmeró havå � madå furtheò developmentó iî CP/Í compatiblå software® CP/Í versioî 2.² � becamå á då facto‚ standard¬  althougè CP/Í versioî 3.° (alsï calleä CP/Í � Plus©  madå criticaì improvementó anä waó adopteä oî variouó  computers® � Digitaì Researcè alsï releaseä MP/M¬ á multitaskinç versioî oæ CP/M® Iî � thå mid-1980ó developmenô oæ ne÷ Consolå Commanä Processoró wenô on¬ anä � sincå  theî entirå replacementó foò CP/Í (sucè aó Echelon'ó ZRDOS©  havå � beeî available®  Parô ² oæ thå UCPÍ manuaì noteó whicè versionó oæ CP/Í � or equivalent systems are implemented on various hadware. B. Strategies for Overcoming CP/M System Incompatibilities 1. Strategy 1: Revision of Source Code, Recompilation Giveî  thå problemó outlineä above¬  ho÷ doeó onå producå  programó � thaô  caî bå implementeä oî á rangå oæ CP/Í computers¿  Thå mosô  basiã � solutioî  woulä bå tï reviså thå sourcå codå anä possiblù recompilå  thå � prograí  foò  eacè implementation®  Thió haó thå advantagå oæ  enablinç � eacè  implementatioî tï takå advantagå oæ machine-specifiã  featureó  tï � thå  maximum¬  buô  iô  haó thå disadvantagå oæ requirinç thå  stepó  oæ � recompilatioî   (anä  possiblù  reassembly©  foò  alì  buô   interpreteä � languages®  Witè interpreteä languages¬  thió strategù ió usuallù  pre� ferred®  Iô  ió  alsï useä witè highlù machine-specifiã  programó  (foò � instance¬  thå  ZCPÒ serieó oæ Consolå Commanä Processors)®  Iî  eitheò � case¬  thió strategù requireó carefuì modulizatioî oæ sourcå code¬ ofteî � witè  machine-specifiã codå locateä aô thå beginninç sï aó tï makå revi� sioî anä recompilatioî morå straightforward. 2. Strategy 2: Inserts Thå uså oæ insertó ió structurallù equivalenô tï thå firsô strategù � above¬ buô ofteî involveó morå carefuì specificatioî oæ thå requirementó � foò  aî inserô (anä oæ courså carefuì modulizatioî oæ thå sourcå  code)® � Oî  thió  strategy¬  thå  sourcå codå haó á poinô aô  whicè  á  machine-� specifiã blocë oæ codå ió tï bå inserted¬ anä insertó arå supplieä foò á � varietù oæ machines®  Again¬ reassemblù anä recompilatioî arå required® � Somå  user-supporteä programó thaô requirå á higè degreå oæ systeí  spe� cifiã  codå  utilizå inserts¬  mosô notablù thå serieó oæ  BYÅ  programó � whicè allow CP/M computers to be used remotely. 3. Strategy 3: Overlays Overlayó  arå  perhapó  thå mosô  commoî  strategù  foò  overcominç � incompatibilitieó  foò user-supporteä software®  Aî overlaù involveó  á � seô  oæ codå thaô haó beeî converteä (typically© intï Inteì HEX  format¬ � anä  whicè  maù  theî  bå overlaiä oî aî existinç  prograí  aô  specifiã �Špositionó specifieä iî thå assemblù codå anä theî iî thå HEØ file® Thió � approacè  doeó  noô requirå recompilation¬  onlù thå  actuaì  overlayinç � accomplisheä typicallù bù thå uså oæ DDT¬  SID¬  oò MLOAD®  Á  possiblå � disadvantagå  oæ thió strategù ió thaô ne÷ useró maù noô understanä  thå � uså  oæ DDT¬  SID¬  oò MLOAD¬  anä thuó maù finä installatioî foò  theiò � computeró frustrating® Oî thå otheò hand¬ mosô folkó whï havå useä CP/Í � for very long have learned to do this. 4. Strategy 4: Install Programs Thå  strategù  utilizeä  iî  thå  mosô  sophisticateä  commerciallù � produceä  programó (sucè aó Wordstar¬  SuperCalc¬  anä dBaså II© anä  iî � somå  user-supporteä  softwarå  (sucè aó VDE© ió tï  supplù  á  separatå � prograí  whicè  leadó thå useò througè thå stepó  oæ  installation®  Aî � instalì  prograí caî bå á verù nicå feature¬  buô somå arå aó compleø aó � installinç aî overlay¬ anä thå productioî oæ aî instalì prograí requireó � considerablå  worë  oî  thå parô oæ  thå  programmer¬  anä  considerablå � information on the variety of computers. 5® Strategù 5º Autodetecô Software Thió shoulä bå listeä aó á logicaì thougè noô á testeä possibility® � Iô  woulä bå possiblå tï writå CP/Í softwarå iî sucè á waù thaô  initiaì � bitó  oæ codå coulä detecô whoså BIOÓ ió presenô (bù scanninç thå  firsô � fe÷  bytes¬  say¬ oæ thå BIOÓ Colä Starô routinå tï seå  what'ó  there)® � Thå  prograí  coulä  theî utilizå internaì sequenceó  appropriatå  tï  á � varietù oæ terminals® Thió approach¬ howeveò woulä requirå á gooä  deaì � oæ worë iî detectinç differenô BIOÓ signatureó (ofteî morå thaî onå  foò � eacè CP/Í computer)¬ anä mighô resulô iî codå sï bulkù thaô iô woulä  bå � impracticaì oî existinç CP/Í-baseä computers. C. Strategies for Compatibility Problems between Operating Systems Manù  programmeró wilì bå unwillinç tï devotå á greaô deaì oæ  CP/Í � programming¬  duå tï thå limitationó iî thå markeô indicateä above®  Iô � woulä  bå  attractive¬  theî  tï  develoð  codå  thaô  coulä  bå  easilù � translated¬  noô onlù tï otheò CP/Í systems¬  buô alsï tï computeró witè � otheò operatinç systems¬  sucè aó thå IBÍ Pà serieó anä compatibles¬ thå � Ataré SÔ series¬  thå Commodorå Amigá series¬  anä UNIX-baseä computers® � Iî thió case¬ thå strategieó indicateä abovå wilì noô suffice¬ sincå thå � whollù  incompatiblå instructioî setó utilizeä oî otheò systemó  mandatå � thaô á completå revisioî oò recompilatioî oæ thå codå necessary® Never� theless¬  therå arå aô leasô twï strategieó foò accomplishinç thió goal® 1. Strategy 1: Code Translation Iô ió possible¬  utilizinç speciaì software¬ tï translatå codå froí � onå processoò intï equivalenô codå foò anotheò processor®  Onå suspectó � thaô  thió  ió  thå techniquå thaô waó useä  wheî  CP/Í  programó  (likå � Wordstaò  anä  dBaså  II©  werå firsô porteä oveò tï thå  IBÍ  PC'ó  anä � compatibles® Nevertheless¬ thå translatioî almosô neveò takeó advantagå �Šoæ  morå  sophisticateä  operationó oî thå  targeô  processor¬  anä  thå � translatioî  usuallù requireó considerablå efforô tï interfacå witè  thå � operatinç  systeí  anä  otheò  input-outpuô  facilitieó  oî  thå  targeô � computer¬  sincå methodó foò interfacinç diffeò greatlù froí onå  systeí � tï  another®  (Thå mosô obviouó examplå ió thaô althougè MSDOÓ anä  thå � IBÍ  Pà Disë  Operatinç Systeí utilizå somå oæ thå samå BDOÓ  calló  aó � CP/M¬ thå calló arå madå bù calló tï locatioî 0µ undeò CP/Í anä arå madå � bù á calì tï interrupô 21è undeò MSDOS)® .cp 6 2. Strategy 2: Higher Level Languages Mosô programmeró intendinç tï develoð softwarå foò highlù differenô � processoró  anä operatinç systemó havå turneä tï highleò leveì languageó � whicè  havå á higè degreå oæ systeí independence®  Aî examplå woulä  bå � thå à programminç language® Therå arå aô leasô twï problemó involveä iî � thió approach®  Iî thå firsô place¬  thå uså oæ sucè á languagå  almosô � alwayó requireó thå threå stepó oæ compilation¬  assembly¬  anä linking® � Second¬  higheò  leveì  languageó  havå stilì  (largely©  noô  developeä � specificationó  foò usinç morå sophisticateä featureó sucè aó  graphics¬ � alternatå  characteò  sets¬  pointeò deviceó ("mice")¬  oò  asynchronouó � communications®  Thus¬  programmeró stilì tenä tï spenä á  considerablå � amounô  oæ  timå  aô  thå  systemó  leveì  developinç  high-speed¬  morå � sophisticateä systeí interfaces® Iî thió regard¬ yoõ mighô watcè foò mù � ALTIÏ  package¬   whicè  offeró  conventionó  oò  specificationó  foò  à � programming between different hardware configurations. .pa Š