On Sun, 26 Apr 2020 13:38:49 -0400, Joseph Reichman  wrote:

>Tried that great idea however I think you helped me uncover a bug in the 
>compiler
>So it seems that a  short is 2 bytes look below
>
>However when I passed reclen as a parameter it was by value not by address 
>guess what the compiler did 
>
> L       R14,@...RECLEN
> ST      R14,232(R13)    
>
>I would of thought it would be STH  ?
> 
Some of this antedates function prototypes, when the specification was to
widen char and short actual parameters to (long?) int on the stack, and
float to double.

This got me in trouble with Whitesmith compiler when I had such as:
    f( char c) {
        ....
        g( &c );
        ....  }
The compiler passed the address of the int it expected on the stack.
Woulda worked on little-endian, where they probably developed and
tested it.

>      
>         *   len = sizeof(reclen);    
>         LA    15,2          
>         ST    15,@111len    
>*   return len;              
>         NILH  15,X'0000'    
>         NILH  15,X'0000'    
>         BRU   @1L38         

-- gil

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

Reply via email to