Part 2: a Comparison of CP/M-86 and MS-DOS an End User and a Systems Programmer Examine the Two Operating Systems Vying for Dominance in the Idbit Arena
Total Page:16
File Type:pdf, Size:1020Kb
Upward Migration Part 2: A Comparison of CP/M-86 and MS-DOS An end user and a systems programmer examine the two operating systems vying for dominance in the idbit arena. Roger Taylor and Phil Lemmons c/o BYTE Publications Inc. POB 372 Hancock, NH 03449 Last month, we looked at programs as applications programs for both level languages like BASIC and that translate &bit CP/M-80 software CP/M46 and MS-DOS; and one was Pascal. For these users, comparing to 16-bit MS-DOS or CP/M-86 soft- written by the head of a company Digital Research's CP/M-86 and ware. In this part, we look at what that manufactures 8086-based S-100 Microsoft's MS-DOS (sold by IBM as the translated software will find when systems and processor boards. PC-DOS and by Lifeboat Associates it reaches the new world of MS-DOS If any pattern of opinion seems to as SB-86) is a study in trade-offs. We and CP/M-86. We first examine the be emerging, it is that MS-DOS is a will first examine some of the trade- two operating systems from a non- better and faster single-user, single- offs in the current versions of MS- technical user's perspective and then tasking operating system for nontech- DOS and CP/M-86. Then, we will turn to a close technical look at how nical users (consumers). CP/M46 of- describe what additional trade-offs they make basic functions available fers superior memory management; may appear in the enhanced versions to programmers. Along the way, we development into a multitasking, promised for later this year. will report the results of some bench- single-user operating system; and an marks. easier upgrade path to a multi-user Speed and Space We have also invited other in- operating system. The issues, how- The most obvious general advan- dividuals to express their opinions ever, are complex, and many dissent- tages of MS-DOS are its greater speed about MS-DOS and CP/M-86. These ing voices are heard. To complicate in disk input/output, greater efficien- opinions appear in text boxes accom- matters further, vendors of both cy in use of disk space, and its ability panying this article and represent a operating systems are promising to recover from errors. variety of perspectives. One expresses major changes this year. You will MS-DOS is faster primarily be- the view of a systems integrator; one have to make the decision in light of cause it buffers more data in each states the view of an assembly-lan- your exact needs in an operating gulp and because it keeps the File Al- guage programmer at a large applica- system. location Table in memory rather than tions and languages software house; on disk. CP/M-86 keeps information one comes from an applications pro- The Nontechnical about file locations stored on the grammer working in high-level lan- User's Perspective disk, and buffers data in small guages; one comes from a software Most microcomputer users spend mouthfuls. Tables 1, 2, and 3 give house that produced a BIOS (basic in- their time running off-the-shelf ap- some timings of MS-DOS and put/output system) for CP/M-86 on plications programs and, to a lesser CP/M-86 on the same hardware. It the IBM Personal Computer, as well degree, writing programs in high- should be noted, however, that the 330 July 1982 O.BME Publications lnc tual data in the file is only a few System X System X System X bytes-like letting a mouse sleep in a CPIM-86 1.0 CPIM-86 1.0 Preliminary MS-DOS Benchmark BASIC-86 Rev. 5.21 BASIC-86 Rev. 5.22 BASIC-86 Rev. 5.21 separate queen-size bed. With larger data files, of course, CP/M-86's Empty do-loop 7.2 7.3 7.8 methods of allocation are less waste- Division 25.0 20.6 21.8 Subroutine jump 15.5 15.4 16.9 ful. But if your system's disk space is MID$ (substring) 23.6 23.6 24.6 limited, wasting 2K bytes to store a Prime number few bytes can be important. program 199.2 189.9 197.0 Disk write program Error recovery in an operating sys- (64K-byte file) 60.8 60.8 50.3 tem functions like the shoulder on a Disk read program mountain road: in its absence, one (64K-byte file) 20.6 20.3 21.3 wrong move can plunge you into the Table 1: Timings of benchmark programs run in Microsoft BASIC-86 under abyss. Error recovery is especially CP/M-86 and MS-DOS. The three sets of timings differon the computational bench- crucial to new and nontechnical com- marks (the first five) because the BASICS themselves are different. BASIC-86 comes puter users. MS-DOS provides error in two different versions for CP/M-86, as well as a version for MS-DOS. MS-DOS's recovery as part of the disk operating superior speed in the disk-write benchmark is remarkable because the version run system; as for CP/M-86, there is no was a preliminary version that had not yet been optimized for disk input/output on provision for error recovery in the system X. disk operating system, although there is nothing to stop a hardware manu- L facturer from writing error recovery into its own BIOS for CP/M-86. System X System X Manufacturers don't always do so. CPIM-86 1.0 Preliminary MS-DOS With CP/M-56 (unless the manu- Load BASIC-86 facturer does add error recovery), if 30K bytes 5.7 2.7 you try to read a disk in an empty drive, or forget to turn on the printer Table 2: Timings for loading BASIC-86 under CP/M46 and MS-DOS. Again, note before trying to print a file, the that this preliminary version of MS-DOS had not yet been optimized for disk in- put/output on system X. system either "hangs" (no message at all) or presents a farewell message ex- plaining why the system is shutting I down. This is about as useful as hav- ing a note pinned to your chest to in- IBM-PC IBM-PC Compuview CPIM-86 MS-DOS 1.1 form you that you are dead. If you're PIP COPY trying to save new data on disk, the data is lost. If the problem is a bad File copy: Copy three files 36.9 19.3 13K, 13K, 6K sector on the disk, you can't swap Load 30K file using VEDlT 10.1 18.8 disks and try again. You have to reload the operating system and do Table 3: Timings for file-copying and file-loading under CP/M-86 and MS-DOS on again whatever work was wasted. the IBM Personal Computer. MS-DOS's COPY command is faster, partly because it MS-DOS responds to errors by offer- resides in system memory rather than on disk, and despite the fact that the BIOS in the Compuview CP/M-86 seems quite fast. The speed of the Cornpuview BIOS is ing you a chance to salvage the situa- reflected in the time required to load Compuview's editing program VEDIT with a tion. A typical message is: 30K-byte text file. The CP/M46 version of VEDIT is actually faster than the MS- DOS version. (BASIC-86 is unavailable for use with CP/M-86 on the IBM Personal Data error reading drive B Computer.) Abort, Retry, Ignore? If the problem is a bad disk, you can differences in speed are proportional- DOS or CP/M-86 is so fast that any insert a new disk in B and retry. If the ly less on large operations because differences are negligible. The fact re- printer is off, you can turn it on and CP/M46 has to find a file only once, mains that MS-DOS is significantly retry. You can also abort the opera- at the beginning. Different versions of faster on floppydisk-based systems, tion and start over without reloading CP/M-86 also vary greatly in speed. as the benchmarks in table 1 show. the operating system. Hardware manufacturers write a MS-DOS uses disk space more effi- CP/M-86 BIOS for their own sys- ciently because it can have files rang- Help tems, which vary in performance. ing in size from tiny to huge. CP/M-86 comes with a large HELP Finally, on systems using hard disks, CP/M-86 allocates disk space in file. Whenever you are puzzled about disk input/output under either MS- blocks of 2K bytes even when the ac- what to do, if you type HELP and the 332 July 1982 O BYE Publications Inc r, % -. -, . >-. .~ ' . .:-.--. ' , ' -. :. .. '. :. .,. .. .. '. ' : : , ~a~~~~i:Caveats :,. ' . .. ,'~i~h<bw for -., . ... .., .. , , .. .. ..:. 1,. MS-DOS Software Developers -~. .. ... ... ::. -.. [Mr. Wilson is &e tq . .ture. On the ofher hand, the 'CHAM storage allocation) space. Howeoer; . in supporting the software author, but . statem* lets you hEPnAIelarger pro- like EMSIC'S DEF SEG, .the ADS data key. pieces are missing: overlays and, gram+ so that the limitatio~.on pro- - tyBe allows you to - dress any. 'most important, comprehensive tech- gram size & not 9eyYprle... ,. - . memo@ {a~atiotl,.&en . outside.-$he nit$ dqenSati~n.AbWfieme usqs But BASIC- is not h hgtaage fur ,, &k-&te -'.data.segment. But om&-. are .prm,@ed :wEth. : ~Ogfa~.logic writing carnplex.