On Thu, Oct 22, 2015 at 9:40 AM, Elardus Engelbrecht < elardus.engelbre...@sita.co.za> wrote:
> John McKown wrote: > > >Mainly that the compiler inserted an NOPR 0 after my simple command. > > Hmmm, I remembered that Borland Turbo Pascal [1] could do that similar > trick, but I don't have MSDOS and Pascal anymore. > > I never tried that [inserting machine code to speed up things] out with C > and C++. > > > *000004 0700 9 NOPR 0 > > 000074 581D 00B0 000009 | L r1,176(r13,) > > Is that compiler action just for [full word / half word?] alignment? > Increase/decrease the instruction length by 1 or 2 bytes with same or other > instruction and see where it ends up. > Hum, I inserted a second instruction "LR 2,1" after the first one: 000009 | * __asm(" L 1,%0\n LR 2,1":"=m"(i3)::"r1","r2"); *000000 581D 00B0 000B0 8 L 1,176(13) 000009 *000004 1821 9 LR 2,1 000009 *000006 0700 10 NOPR 0 000009 000074 581D 00B0 000009 | L r1,176(r13,) 000078 1821 000009 | LR r2,r1 00007A 0700 000009 | NOPR 0 000010 | * printf("%.*s\n",i1,word); The NOPR is still there. I wonder if it is somehow used if I were to set a break point in a debugging session. I.e. the NOPR is there so that it can be overlain with the debug SVC or whatever is used. I'm just doing this to see if I can get up to the real desire: to embed assembler macros, such as TPG (TSO terminal I/O), in my C code. Although it might actually be simpler to just continue writing LE enabled HLASM "service" routines. Hum, wish I had a way to make an HLASM "program" which could be "in lined" by the C compiler in order to avoid the entry/exit code overhead. I am still, perhaps stupidly, concerned with "CPU overhead". If I weren't I could be a Windows programmer! <grin type="snide"/> > > >This is just curiosity on my part. It is not a "bug" or a complaint. > > This is why we all need you. You learn on the hard way and we look on the > easy way. ;-D > > Groete / Greetings > Elardus Engelbrecht > > [1] - I wrote cryptographic code in mix of Turbo Pascal and MASM to > protect my and my clients files. Good old MSDOS days when nothing was > available for pure protection. > > -- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN