Page 1 of 1

What is the difference between Object code and Source code?

PostPosted: Mon Jul 19, 2010 3:06 pm
by ramesh4mainframes
Hi,

When we compile the program the source code will load into Load modules. I have read that Source code become Object code. Is it true?

Re: What is the difference between Object code and Source code?

PostPosted: Mon Jul 19, 2010 3:30 pm
by NicC
Yes, it is true. The object module is then linked into the final program along with the various routines required e.g. read/write. Suggest you get a beginners book - this will be explained. Something like COBOL for Dummies. I am not trying to be funny or rude - I use this book myself along with others. It comes with compilers for the PC so, if you do not have access to your normal machine then you can learn at home. One thing, it does seem to be a bit old now (1997) but the basics do not change!

Whilst researching this I came across SAMS Teach Yourself COBOL in 24 hours. Again an old book but again it has a PC compiler (which may not work with WIN/V WIN/7).

Re: What is the difference between Object code and Source code?

PostPosted: Mon Jul 19, 2010 4:13 pm
by nagendra
hiiiii,

yes, i heard this when one of my seniour was teaching me...

its true....

Re: What is the difference between Object code and Source code?

PostPosted: Mon Jul 19, 2010 11:37 pm
by dick scherrer
Hello,

Source code is what the developer writes and is input to the compiler. Object code is output from the compiler.

Object code is combined (linkedited) with other code and the output of this is a load module. If you look at the output of a linkage editor step, you will see many components that are linked in automatically.