Sponsoring website: Emergency Boot Kit



Using PCE (the PC Emulator)
by Hampa Hug
to Run and Examine Early Versions of
the IBM® Personal Computer
Disk Operating System (DOS)


Copyright © 2017, 2021, 2022 by Daniel B. Sedory

NOT to be reproduced in any form without Permission of the Author!


First, I want everyone to know that PCE will run under both 32-bit and 64-bit Windows OSs!
Here's a screenshot of it running under the latest update of Windows 10:

Note: That date "10/19/81" is embedded in an image file of the original IBM PC BIOS; which you can use with PCE to provide a close to authentic environment for running early PC DOS software.

Second, it's standalone (portable) software; no install, nothing in the Registry... simply:

1) Create a new folder on your Desktop named PCE (PCE does not install itself anywhere, nor create any shortcuts; once you're familiar with it, you can move it anywhere else if you wish).

2) Download and save in that folder one of the updated ZIP files from here: http://www.hampa.ch/pub/pce/pre/. For example, to run IBM PC DOS 1.00 as shown above, you would click on the latest directory link: pce-20220115-fa52687a/ 2022-01-15 17:36 (at this time); in which there is another directory link: "machines/" (click on that). Finally, in that directory, click on:
  pce-20220115-fa52687a-ibm-pc-pcdos-1.00.zip 2022-01-15 17:31 1.3M (at this time), and save it to your PCE folder. (Note: Some Windows users, often Pro, may need to "Unblock" Zip files with executable files in them, using the right-click "Properties" window; check the box and "Apply" it).

3) Open the Zip file with Windows Explorer (or 7-Zip, or whatever Zip application you prefer), and using the Sub-Folder Names in that Zip file, copy (or extract) all the files and folders into your PCE folder. (Note: If you decide to use PCE for other emulations, we recommend making a "Downloads" folder in PCE and putting all PCE Zip files there.) Then:

4) Run/execute the batch file run-cga.bat in your PCE folder, and note what happens:

The larger black "Windows Command window" will show many lines while the bin\pce-ibmpc.exe program uses the pce-5150.cfg file to configure how the emulator will run. Near the end of those lines, a reset pc line and then a number of keyboard reset lines will appear, there will be a beep (if your computer's audio is on) and finally in the smaller black "pce-ibmpc" window, you will be asked you to enter a date. Under IBM PC DOS 1.00, you must ENTER a date (such as "1-16-2022") to proceed (with PC DOS 1.10, it's possible to simply press the ENTER key for both the default date and time; which can be changed later using the date and time commands.) Only after that, will you see the IBM PC DOS 1.00 prompt!

To recap: It may take some time for PCE to execute all the code in the configured BIOS image, load and then run DOS before finally getting to the date question, or it may be rather quick; especially with the latest update. At that prompt, here are a few things for you may wish to try:

Enter: basica samples.bas, and when it starts running the BASIC console, you'll soon see:

Now press the SPACE BAR and you'll see why we had you start
SAMPLES.BAS in BASICA: A number of the programs require it:

Here's the COLORBAR running (note that someone decided to call what's obviously light grey "white,"
and white "int(ense) white," and programmers were stuck with those terms for a very long time):

Note: In order to use the ESC key in the emulator, you must press and release it, twice! (In your PCE's doc folder, section "Generic Terminal Keys," of the "keys.txt" file, you'll see: "<ESC> <ESC>   Send a single <ESC> to the emulated machine."

Other very important key combinations found there are:

  Alt-Ctrl [or CTRL-ALT]   Release[s] the mouse grab [if you clicked your mouse inside the emulator screen].
  <ESC> q   Quit [the whole program]. (Note: For all of the <ESC> key commands, press and release the <ESC> key, then press the other key! There's no need to do it simultaneously like the CTRL-ALT key combination.)
  <ESC> Up [Arrow]   [will] Increase the terminal scale factor [great for those of you using resolutions of say, 1920 x 1080, and use:
  <ESC> Down [Arrow] to reverse the change. For exploring what you can do with the larger "Monitor" screen, you can use the:
  <ESC> m   (or the key combination: CTRL-`; easy to use on USA keyboards) to drop out of the emulator screen and into its control; be sure to read the "monitor.txt" file (also in doc folder).

If you have your audio turned on, try the MUSIC files and think about how little you could do back then compared to being able to compose commercial scores for movies on some home PCs today!

When you're finished, you must ENTER the word system in order to get back to the DOS prompt!

For something a bit more serious, if you appreciated our Forensic Exam of the IBM PC DOS 1.00 diskette, ENTER: debug at the DOS prompt, and when the 'dash' appears, ENTER: L 100 0 B2 1 [Note: That first character is an 'L' for LOAD; not a '1'; space, followed by '100', space, '0', space, 'B2' (the Sector number in HEX), space and '1'] then do a 'd' (dump) from 100h to 1FFh and you'll see a curious bit of data left in the Slack Space of Sector 178 (B2 hex): "DEC-20 Downlink to Boca Raton [300-bps] 9-Apr-81"


Leave the DEBUG prompt by entering: q (for quit).

(Note: If you're used to using DEBUG from say DOS 5.00, or later, the original DEBUG did not have many of the commands you're familiar with! For example, the [A]ssemble command did not exist until IBM PC DOS 2.00; no easy help screen either.)

You can also prove that the original IBM PC BASIC ROM chips had a math error in them, by following each step I showed in the screenshot under the Historical Notes and References section, near the bottom of that page:

1) ENTER basic at the prompt, to get into the BASIC screen.
2) Type a line number, such as 1, followed by a space then REM followed by a description of what will be your original IBM PC BASIC Math Error Test program. For myself, I used the following:

1 REM   A simple BASIC program by Daniel B. Sedory showing how to obtain an
2 REM  error in the IBM PC's (or Microsoft's) BASIC or BASICA 1.00 program:
3 REM
5 REM  Note: The Error only occurs when using "Double Precision" math.
6 REM  The symbol (#) appended to the end of a number indicates double
7 REM  precision will be used; it must also follow the variable name.
8 REM

3) (It doesn't matter what line numbers you use, provided they are in increasing order; duplicating a line number will overwrite any previous line with that number, and entering a line number with nothing after it deletes that line.) That could be followed by:

12 C# = .1# / 10
20 PRINT C#

or whatever line numbers or variations on the program you prefer.

4) Press the F4 key to bring up SAVE"_ on the screen, and then enter a file name, such as MATHERR.BAS, followed by a quote (") mark and press the ENTER key. Then wait until you see "ok" on the screen!

At this point you could press the F1 key and then ENTER to list your program, check it and then RUN it, or... Well, let's do that before you're interrupted: Press the F2 key to RUN your program! You should see: .001 and another ok on the next line. But the answer is supposed to be .01 (.1 / 10 = .01). So, you proved there was an error in the original IBM PC.

Now type the word system and press ENTER key. At the DOS A> prompt, ENTER: DIR M*.BAS (if your program name started with an M, or simply DIR *.BAS otherwise) and you should see at the very end of the list that BASIC saved your *.BAS program to the diskette:

However, read this Important Note: PCE does not immediately save any of your work to an image file (on your PC)! Everything (including FORMAT commands) is only stored in Memory; until you commit the changes. Why not have PCE write the changes immediately? Well, if you ever made a big mistake or forgot to set an image file as write-protected, this allows you to make a copy of the image file or even have the OS write-protect it before you shut down PCE. And the latest versions of PCE now have an easy way to save your work; without even ejecting an image file — which is another way to do so: Simply press <ESC> and then m to drop into the black Monitor screen; which will then have a dash (-) prompt, and ENTER: m disk.commit 0 ("0" meaning the A: drive). Then ENTER a g (as in 'go') to continue at the emulator screen.

Note that BASIC saved my *.BAS file as 512 bytes... this is not a 'cool coincidence' as someone may first think. The actual size of what I had written is only 413 bytes! So why does BASIC save it as 512 bytes? Because both BASIC and BASICA always round-up the size of any file they save from Memory using 128-byte increments! If you look at all the .BAS files on the IBM PC DOS 1.00 or 1.10 diskettes, you'll find their file sizes are always multiples of 128. You can download my MATHERR.BAS program as the only file (of 413 bytes) in a 160 KiB IBM PC DOS 1.00/1.10 floppy diskette image file in a Zip here.

 

I will be adding more material in the near future!

 

 


 

Updated: February 28, 2017 (2017.02.28); December 24, 2021 (2021.12.24); January 16, 2022 (2022.01.16); full revision, added more PCE command examples.
Last Update: February 7, 2022 (2022.02.07); finished paragraph on how BASIC saves in 128-byte increments.

 

You can reply to us here.

IBM PC DOS 1.00 Index

MBR and Boot Records Index

The Starman's Realm Index