You are on page 1of 4

HOW TO OPERATE/USE THE DOSBOX

1. Click on the DosBox icon.

2. Two windows will appear. We will use the window with blue box.
3. Then, type (non-case sensitive) “MOUNT drive:\ drive:” Then type the ‘drive:’
Note: The “drive” specified where your COBOL compiler saved.

4. Type the directory/folder where your COBOL compiler found. CD stands for change
directory/folder. Then type EDIT

5. The blue screen will appear. The screen is the EDITOR of COBOL where you can type your
program. Start coding your program at column 8. Then save as “filename.COB”. COBOL program
is case sensitive.
Note: You can use NOTEPAD or NOTEPAD++ as your editor.
6. After saving the program, click File and choose Exit. From this window, you can now compile
your program.

HOW TO COMPILE THE COBOL PROGRAM


1. In the command prompt of DosBox, type (non-case sensitive) “REALCOB filename.COB” then
press ENTER key.
Note: the “Object filename” and “Source Listing” is an optional to input any entry because
the compiler will automatically create that files for you. Compilation in COBOL is up to PASS
4. If there is/are errors/warnings it will show at Pass 2 or Pass 2a. if your program has
error/s or you want to modify your program, type EDIT again and open your file on the
EDITOR.

2. If your program is an error-free, type ”LINK filename.OBJ” then press ENTER key. Just press
ENTER key until “Libraries and Paths: ” appeared then type REALDOS and press ENTER key.
3. This time you can execute your program by typing “filename” only or “filename.EXE”. The
“HELLO.COB” will only display “HELLO WORLD!”.

You might also like