Re: asm code and an inout function argument

2009-05-15 Thread Denis Koroskin
On Fri, 15 May 2009 19:11:55 +0400, Jesse Phillips wrote: > On Fri, 15 May 2009 07:14:50 -0400, Vladimir A. Reznichenko wrote: > >> It looks like "inout/ref uint a" is equal to "uint* a" but the situation >> when we write D's code "a = 5" means "*a = 5". This is not obvious, at >> all. So when I

Re: asm code and an inout function argument

2009-05-15 Thread Jesse Phillips
On Fri, 15 May 2009 07:14:50 -0400, Vladimir A. Reznichenko wrote: > It looks like "inout/ref uint a" is equal to "uint* a" but the situation > when we write D's code "a = 5" means "*a = 5". This is not obvious, at > all. So when I wrote asm code, it wouldn't work. Isn't that the point of a refer

Re: asm code and an inout function argument

2009-05-15 Thread Vladimir A. Reznichenko
Denis Koroskin Wrote: > On Fri, 15 May 2009 14:41:35 +0400, Vladimir A. Reznichenko > wrote: > > > Denis Koroskin Wrote: > > > >> On Fri, 15 May 2009 14:24:16 +0400, Vladimir A. Reznichenko > >> wrote: > >> > >> > I have a function: > >> > > >> > void test (inout uint a) > >> > { > >> > asm

Re: asm code and an inout function argument

2009-05-15 Thread Denis Koroskin
On Fri, 15 May 2009 14:41:35 +0400, Vladimir A. Reznichenko wrote: > Denis Koroskin Wrote: > >> On Fri, 15 May 2009 14:24:16 +0400, Vladimir A. Reznichenko >> wrote: >> >> > I have a function: >> > >> > void test (inout uint a) >> > { >> >asm >> >{ >> >mov a, 0x25; >> >

Re: asm code and an inout function argument

2009-05-15 Thread Vladimir A. Reznichenko
Tim Matthews Wrote: > On Fri, 15 May 2009 22:29:07 +1200, Robert Fraser > wrote: > > > Vladimir A. Reznichenko wrote: > >> I have a function: > >> void test (inout uint a) > >> { > >>asm > >>{ > >>mov a, 0x25; > >>} > >> } > >> The trouble is that the function's call

Re: asm code and an inout function argument

2009-05-15 Thread Vladimir A. Reznichenko
Denis Koroskin Wrote: > On Fri, 15 May 2009 14:24:16 +0400, Vladimir A. Reznichenko > wrote: > > > I have a function: > > > > void test (inout uint a) > > { > > asm > > { > > mov a, 0x25; > > } > > } > > > > The trouble is that the function's call doesn't change the a va

Re: asm code and an inout function argument

2009-05-15 Thread Denis Koroskin
On Fri, 15 May 2009 14:24:16 +0400, Vladimir A. Reznichenko wrote: > I have a function: > > void test (inout uint a) > { > asm > { > mov a, 0x25; > } > } > > The trouble is that the function's call doesn't change the a variable. > Any ideas? > I believe your code

Re: asm code and an inout function argument

2009-05-15 Thread Tim Matthews
On Fri, 15 May 2009 22:29:07 +1200, Robert Fraser wrote: Vladimir A. Reznichenko wrote: I have a function: void test (inout uint a) { asm { mov a, 0x25; } } The trouble is that the function's call doesn't change the a variable. Any ideas? Inout var

Re: asm code and an inout function argument

2009-05-15 Thread Robert Fraser
Vladimir A. Reznichenko wrote: I have a function: void test (inout uint a) { asm { mov a, 0x25; } } The trouble is that the function's call doesn't change the a variable. Any ideas? Inout variables are pointers.

asm code and an inout function argument

2009-05-15 Thread Vladimir A. Reznichenko
I have a function: void test (inout uint a) { asm { mov a, 0x25; } } The trouble is that the function's call doesn't change the a variable. Any ideas?