Page 1 of 1

How compiler works?

PostPosted: Thu Apr 10, 2008 7:16 pm
by amitkool29
Hi all,
LIke in C programming, when C compiler reads int x; a memory area of 4 bytes gets reserved for variable x.
Similarly how the PERFORM and IF statements are executed in cobol compiler?

Re: How compiler works?

PostPosted: Thu Apr 10, 2008 11:18 pm
by CICS Guy
The PERFORM sets up looping logic and the IF generates compare logic.
For more detail, write a very simple short program with the verbs you are wanting to understand and look at the generated Assembler code....

Re: How compiler works?

PostPosted: Thu Aug 21, 2008 11:40 am
by dudu325
Hi CICS Guy,

How could we view the generated assembler code? could you please help me with more details?
Thanks

Re: How compiler works?

PostPosted: Sat Sep 13, 2008 10:05 pm
by pi17388
Displaying the compiler generated assembler code is controlled by compiler options -- the specific option depends on the compiler version. For instance, in OS/VS Cobol the option would be coded as "PMAP".