Just "for fun and profit" (learning), I inserted an unnecessary HLASM
statement into a C program (helloworld.c type). I am curious about the
generated code. Mainly that the compiler inserted an NOPR 0 after my simple
command. The statement was the first executable in main() and output in the
compiler listing looks like:

                           000008 |       *      char word[]="123456";
 00006E  D206  D0B4  1000  000008 |                 MVC
 word$init$0(7,r13,180),+CONSTANT_AREA(r1,0)
                           000009 |       *      __asm(" L
1,%0":"=m"(i3)::"r1");
 *000000 581D 00B0            000B0     8          L     1,176(13)
                                        000009
 *000004 0700                           9          NOPR  0
                                        000009
 000074  581D  00B0        000009 |                 L        r1,176(r13,)
 000078  0700              000009 |                 NOPR     0
                           000010 |       *      printf("%.*s\n",i1,word);


The compile was done on z/OS UNIX shell invocation of xlc:

xlc  -qaggregate -qasm -qchars=unsigned -qevents=hello.events -qexpmac
-qinfo -qlanglvl=extc1x -qoffset -qshowinc -qlist -qskipsrc=hide
-qsource=hello.lst hello.c

The compiler said it was: "5650ZOS V2.1.1 z/OS XL C"

This is just curiosity on my part. It is not a "bug" or a complaint.

-- 

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to