PC Software to Compile/Execute in Console Mode on
Win98/NT/2000
Click here to get the (zip) file for the free C++ system that is
recommended for the class. The system is configured so that you can edit/compile/execute
with all software on one floppy, which you can easily carry with you to any machine (on or
off campus).
- MOVE the zip file to your hard disk; make sure that you delete it from
your floppy.
- Type a: to switch to the floppy and make a directory entitled
cs5232 (md cs5232). Then create two sub-directories mod and work. Change directory to mod
(cd cs5232\mod) and unzip the files. Go to www.pkware.com
if you need a copy of the zip software.
- Change directory to a:\cs5232\work to do all your programming
- Execute "..\mod\r36 fcreate" in the work directory to create the
"disk" used by the operating system.
- To compile a progam
- a) the program must have the .cpp suffix e.g. test.cpp
- b) type ..\mod\c35 test.cpp from the work directory
- c) any errors will be output to a .lst file e.g. test.lst (L S T)
- To run a program in a DOS shell window
- a) the program must have a .obj suffix e.g. test.obj
- b) type ..\mod\r36 test from the work directory
- c) you can type CTRL-C to terminate a program; CTRL-Z is end-of-file
- To run the Phoenix operating system
- Be sure that you are in the work directory
- type ..\mod\r36 zsos then type "n" when asked whether to trace the disk.
- type man (short for manual) at the command prompt to learn about various
UNIX commands.
Sample Program (hello.cpp)
#include <iostream.h>
void main()
{
cout<<"hello world\n";
};
The compiler will generate hello.LST if syntax errors are detected; otherwise, the
compiler generates hello.obj (the executable instructions) and hello.rfc (the encoded
symbols in the program). hello.obj can be executed using the DOS (r36.exe) version of the
runtime.