Hi All,
My sourcecode contains some sections of assembly code. when I build the
code under 64bit envronment (build successfully under 32bit build
environment), I got a lot of compiling errors with undefined identifiers for
such as _asm, pop.
How can I compile this code succesfully under 64bit build enviromnent?
thanks
Robert
--
Robert

Re: xp ddk 64bit built environment by Don

Don
Tue Jul 05 15:37:02 CDT 2005

You can't. If you really need assembler you need to move that code into
seperate functions, and use an assembler to do it.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"robert" <robert@discussions.microsoft.com> wrote in message
news:6BD85A2B-C790-43B7-9D86-4134D6C2E3F5@microsoft.com...
> Hi All,
> My sourcecode contains some sections of assembly code. when I build the
> code under 64bit envronment (build successfully under 32bit build
> environment), I got a lot of compiling errors with undefined identifiers
> for
> such as _asm, pop.
> How can I compile this code succesfully under 64bit build enviromnent?
> thanks
> Robert
> --
> Robert



Re: xp ddk 64bit built environment by robert

robert
Tue Jul 05 16:03:02 CDT 2005

Hi Don,

Do you know why Micososft DDK has removed compiling assembly code under
64bit environment?
I read some Microsoft doc about BIOS Callbacks for 64bit drivers: these
callbaks are not allowed. Can drivers still call BIOS functions such as
thorugh SMI under 64bit environment?

thanks
Robert
--
Robert


"Don Burn" wrote:

> You can't. If you really need assembler you need to move that code into
> seperate functions, and use an assembler to do it.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:6BD85A2B-C790-43B7-9D86-4134D6C2E3F5@microsoft.com...
> > Hi All,
> > My sourcecode contains some sections of assembly code. when I build the
> > code under 64bit envronment (build successfully under 32bit build
> > environment), I got a lot of compiling errors with undefined identifiers
> > for
> > such as _asm, pop.
> > How can I compile this code succesfully under 64bit build enviromnent?
> > thanks
> > Robert
> > --
> > Robert
>
>
>

Re: xp ddk 64bit built environment by Don

Don
Tue Jul 05 16:07:24 CDT 2005

Robert,

I have no idea on BIOS callbacks. I'd be careful though, Longhorn may
support EFI everywhere, so you could encounter some very different
environment.s


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"robert" <robert@discussions.microsoft.com> wrote in message
news:CDC39079-2889-4EB8-AADE-03C4D8C00541@microsoft.com...
> Hi Don,
>
> Do you know why Micososft DDK has removed compiling assembly code
> under
> 64bit environment?
> I read some Microsoft doc about BIOS Callbacks for 64bit drivers:
> these
> callbaks are not allowed. Can drivers still call BIOS functions such as
> thorugh SMI under 64bit environment?
>
> thanks
> Robert
> --
> Robert
>
>
> "Don Burn" wrote:
>
>> You can't. If you really need assembler you need to move that code into
>> seperate functions, and use an assembler to do it.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>>
>>
>> "robert" <robert@discussions.microsoft.com> wrote in message
>> news:6BD85A2B-C790-43B7-9D86-4134D6C2E3F5@microsoft.com...
>> > Hi All,
>> > My sourcecode contains some sections of assembly code. when I build
>> > the
>> > code under 64bit envronment (build successfully under 32bit build
>> > environment), I got a lot of compiling errors with undefined
>> > identifiers
>> > for
>> > such as _asm, pop.
>> > How can I compile this code succesfully under 64bit build
>> > enviromnent?
>> > thanks
>> > Robert
>> > --
>> > Robert
>>
>>
>>



Re: xp ddk 64bit built environment by Ray

Ray
Tue Jul 05 16:38:05 CDT 2005

robert wrote:
> Do you know why Micososft DDK has removed compiling assembly code under
> 64bit environment?

Probably because it's widely accepted that inline assembly in kernel
mode is a bad idea? Inline assembly is vastly less likely to be a)
secure, b) correct/safe, c) as efficient as compiled code on modern
heavily pipelined processors, and d) source-code compatible with x86 and
IA64.

As Don says, if you really need assembly in the kernel (which almost no
one ever really does), put it in a separate asm file and assemble it as
a library that you link with your driver.
--
../ray\..

Re: xp ddk 64bit built environment by Tim

Tim
Wed Jul 06 01:20:45 CDT 2005

robert <robert@discussions.microsoft.com> wrote:
>
> Do you know why Micososft DDK has removed compiling assembly code under
>64bit environment?

In part, because at least one of the supported 64-bit architectures (ia64)
has an entirely different instruction set. "pop eax" is not a valid
Itanium instruction.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc

Re: xp ddk 64bit built environment by David

David
Wed Jul 06 01:38:18 CDT 2005

The compiler would have to support three different assembly instruction
sets. You get three different assemblers with the IFS Kit and I suspect the
DDK also. ML64.exe, version 8.0.40310.39, ML.exe, version 7.10.4035.0, and
ias.exe, version 8.0.4299.0. The first two are copyright by Microsoft and
the last by Intel. I think there are new instruction formats for the 64-bit
processors. I do like assembler but it is a real pain and almost never
required even for Windows drivers. If you are writing the HAL or a bus
driver if it doesn't follow the Microsoft hardware compatibility rules, you
might need to do some assembler.

If you want assistance with this you will need to say why you need to do
assembler. The Microsoft compiler that does allow inline assembly will not
optimize the remaining code in that function as well as it can with pure 'C'
or 'C++' code. It may have some effect on the rest of that module.

"Tim Roberts" <timr@probo.com> wrote in message
news:50umc1pl1l7fr08f7hqc3deoie2iqehnn1@4ax.com...
> robert <robert@discussions.microsoft.com> wrote:
>>
>> Do you know why Micososft DDK has removed compiling assembly code
>> under
>>64bit environment?
>
> In part, because at least one of the supported 64-bit architectures (ia64)
> has an entirely different instruction set. "pop eax" is not a valid
> Itanium instruction.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc



Re: xp ddk 64bit built environment by robert

robert
Thu Jul 07 00:14:01 CDT 2005

Are there any official Microsoft doc, which documents this information?
I do need to use assembly code. I need call functions implemented in my
company's BIOS.
thanks
Robert
--
Robert


"David J. Craig" wrote:

> The compiler would have to support three different assembly instruction
> sets. You get three different assemblers with the IFS Kit and I suspect the
> DDK also. ML64.exe, version 8.0.40310.39, ML.exe, version 7.10.4035.0, and
> ias.exe, version 8.0.4299.0. The first two are copyright by Microsoft and
> the last by Intel. I think there are new instruction formats for the 64-bit
> processors. I do like assembler but it is a real pain and almost never
> required even for Windows drivers. If you are writing the HAL or a bus
> driver if it doesn't follow the Microsoft hardware compatibility rules, you
> might need to do some assembler.
>
> If you want assistance with this you will need to say why you need to do
> assembler. The Microsoft compiler that does allow inline assembly will not
> optimize the remaining code in that function as well as it can with pure 'C'
> or 'C++' code. It may have some effect on the rest of that module.
>
> "Tim Roberts" <timr@probo.com> wrote in message
> news:50umc1pl1l7fr08f7hqc3deoie2iqehnn1@4ax.com...
> > robert <robert@discussions.microsoft.com> wrote:
> >>
> >> Do you know why Micososft DDK has removed compiling assembly code
> >> under
> >>64bit environment?
> >
> > In part, because at least one of the supported 64-bit architectures (ia64)
> > has an entirely different instruction set. "pop eax" is not a valid
> > Itanium instruction.
> > --
> > - Tim Roberts, timr@probo.com
> > Providenza & Boekelheide, Inc
>
>
>

Re: xp ddk 64bit built environment by David

David
Thu Jul 07 02:35:13 CDT 2005

What documentation? Microsoft doesn't seem to document the assemblers any
more. Get an old doc and try it. If you need assistance with BIOS
interfaces, use a MSDN incident and ask questions. Most BIOS companies
would have someone at Microsoft they can ask, especially the HAL development
team.

"robert" <robert@discussions.microsoft.com> wrote in message
news:85421D9B-977A-4AE7-B7B5-9AC5C83345DB@microsoft.com...
> Are there any official Microsoft doc, which documents this information?
> I do need to use assembly code. I need call functions implemented in my
> company's BIOS.
> thanks
> Robert
> --
> Robert
>
>
> "David J. Craig" wrote:
>
>> The compiler would have to support three different assembly instruction
>> sets. You get three different assemblers with the IFS Kit and I suspect
>> the
>> DDK also. ML64.exe, version 8.0.40310.39, ML.exe, version 7.10.4035.0,
>> and
>> ias.exe, version 8.0.4299.0. The first two are copyright by Microsoft
>> and
>> the last by Intel. I think there are new instruction formats for the
>> 64-bit
>> processors. I do like assembler but it is a real pain and almost never
>> required even for Windows drivers. If you are writing the HAL or a bus
>> driver if it doesn't follow the Microsoft hardware compatibility rules,
>> you
>> might need to do some assembler.
>>
>> If you want assistance with this you will need to say why you need to do
>> assembler. The Microsoft compiler that does allow inline assembly will
>> not
>> optimize the remaining code in that function as well as it can with pure
>> 'C'
>> or 'C++' code. It may have some effect on the rest of that module.
>>
>> "Tim Roberts" <timr@probo.com> wrote in message
>> news:50umc1pl1l7fr08f7hqc3deoie2iqehnn1@4ax.com...
>> > robert <robert@discussions.microsoft.com> wrote:
>> >>
>> >> Do you know why Micososft DDK has removed compiling assembly code
>> >> under
>> >>64bit environment?
>> >
>> > In part, because at least one of the supported 64-bit architectures
>> > (ia64)
>> > has an entirely different instruction set. "pop eax" is not a valid
>> > Itanium instruction.
>> > --
>> > - Tim Roberts, timr@probo.com
>> > Providenza & Boekelheide, Inc
>>
>>
>>



Re: xp ddk 64bit built environment by Philip

Philip
Thu Jul 07 05:22:53 CDT 2005

> "robert" <robert@discussions.microsoft.com> wrote in message
> news:85421D9B-977A-4AE7-B7B5-9AC5C83345DB@microsoft.com...
>> Are there any official Microsoft doc, which documents this information?
>> I do need to use assembly code. I need call functions implemented in my
>> company's BIOS.
>> thanks
>> Robert
>> --
>> Robert

If you ask Microsoft... the best way to access BIOS functionality while
Windows is operational is using ACPI on the BIOS side and in the kernel and
WMI at the service/user level.

Phil



Re: xp ddk 64bit built environment by Tim

Tim
Thu Jul 07 23:22:16 CDT 2005

robert <robert@discussions.microsoft.com> wrote:
>
>Are there any official Microsoft doc, which documents this information?
>I do need to use assembly code. I need call functions implemented in my
>company's BIOS.

Oh, you can certainly include assembly code in your driver. You just have
to put it in separate .asm files, not as inlines. That's what Microsoft
has recommended all along.

It will be interesting to see if you can figure out a way to call your BIOS
code from a 64-bit driver. What instruction set will the BIOS be written
in?
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc

Re: xp ddk 64bit built environment by Tonald

Tonald
Thu Aug 18 03:21:05 CDT 2005

You can write asm inline into a instrinsic function(a seperatly assemble file).
and build it with your c code.
C can call the asm function, the asm function also can call other functions.

"robert" wrote:

> Are there any official Microsoft doc, which documents this information?
> I do need to use assembly code. I need call functions implemented in my
> company's BIOS.
> thanks
> Robert
> --
> Robert
>
>
> "David J. Craig" wrote:
>
> > The compiler would have to support three different assembly instruction
> > sets. You get three different assemblers with the IFS Kit and I suspect the
> > DDK also. ML64.exe, version 8.0.40310.39, ML.exe, version 7.10.4035.0, and
> > ias.exe, version 8.0.4299.0. The first two are copyright by Microsoft and
> > the last by Intel. I think there are new instruction formats for the 64-bit
> > processors. I do like assembler but it is a real pain and almost never
> > required even for Windows drivers. If you are writing the HAL or a bus
> > driver if it doesn't follow the Microsoft hardware compatibility rules, you
> > might need to do some assembler.
> >
> > If you want assistance with this you will need to say why you need to do
> > assembler. The Microsoft compiler that does allow inline assembly will not
> > optimize the remaining code in that function as well as it can with pure 'C'
> > or 'C++' code. It may have some effect on the rest of that module.
> >
> > "Tim Roberts" <timr@probo.com> wrote in message
> > news:50umc1pl1l7fr08f7hqc3deoie2iqehnn1@4ax.com...
> > > robert <robert@discussions.microsoft.com> wrote:
> > >>
> > >> Do you know why Micososft DDK has removed compiling assembly code
> > >> under
> > >>64bit environment?
> > >
> > > In part, because at least one of the supported 64-bit architectures (ia64)
> > > has an entirely different instruction set. "pop eax" is not a valid
> > > Itanium instruction.
> > > --
> > > - Tim Roberts, timr@probo.com
> > > Providenza & Boekelheide, Inc
> >
> >
> >