topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 12:34 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: coding x86 assembler on a 64 bit machine??[coding on a x64]  (Read 15709 times)

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Hi, :)

Im a self taught pretty good C# programmer, i know a bunch of visual languages, i do know a little C and JAVA to but i'm not that experienced, which is a good enough excuse to ask....

Can i code x86 assembler on a 64 bit machine? I've just started reading Dr. Paul Carters free book, and i'm going to get a personal laptop with a 64 bit processor. Unfortunately, the laptop is the only one affordable yet fast enough for my work. So i don't have much of a choice.

Also, on the general level are there any unforeseen problems i might run into with programming C#, C , JAVA etc on a 64 bit machine? Will there be problems calling x86 code from C#? Or anything else i should know?


Hope that wasn't too much of a silly question,

Thanks so much
Gideon

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #1 on: April 02, 2008, 08:30 AM »
Yes, you can code x86 assembly on a 64-bit x86 machine. If you're going to run 64-bit windows on it, you have the choice of writing either 32- or 64-bit assembly code, since 64-bit windows still supports 32-bit applications. Iirc the situation is the same with linux. If you're going to run a 32-bit OS, you're limited to 32-bit code.

For a 64-bit assembler, I'd suggest either FASM or the NASMX project. FASM has the advantage of very quickly adopting new instruction sets, so it has been the choice if you needed to use bleeding-edge features (like intel's VMX/Vanderpool instruction set).
- carpe noctem

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembly on a 64 bit machine??[coding on a x64]
« Reply #2 on: April 02, 2008, 11:21 AM »
hi,

Thanks so much for your reply, thats pretty re assuring! Going to buy me a new laptop soon! :P

I would like to ask you: Has assembly come to use to you when coding apps? Or does it help you understand it all better?

I'm learning it just out of a lot of curiosity. Also i hope to get into electronics and understand ICs and microprocessor architecture better. Someone did tell me to learn it well enough to know whats its like but not enough to write an app, so will I be wasting time then??  Also I hope to learn MSIL soon, should I do that after I learn ASM?

Thanks so much
Gideon
« Last Edit: April 02, 2008, 12:30 PM by giddy »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #3 on: April 02, 2008, 05:06 PM »
Assembly has come useful multiple times in debugging my programs (as well as reversing other people's). It's been useful in writing more efficient code (both by writing it in assembly, but also for high-level languages, by choosing better structure layouts, organizing algorithms differently, etc.)

In my opinion it's a waste of time writing full applications in assembly (aside from the initial learning experience), you don't get much advantage over writing in C/C++ (people claiming "size! speed!" are just ignorant of how to use programming tools properly).

Dunno if there's much reason to learn MSIL assembly, except if you want to write an obfuscator or reverse-engineer existing programs. As far as I know, you won't really see any speed gains by hand-crafting MSIL - except for very specific stuff, like runtime code generation, where you'd probably be better off using a native module, anyway :)
- carpe noctem

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #4 on: April 06, 2008, 04:57 AM »
hi,

Thanks so much for the advice.

I finally got my laptop and I'm having quite some trouble findinf x64 drivers, I should warn anyone planning to run x64 Windows XP, try and find the required drivers! They're hardly available!! >:(

Anyway, So now i'm thinking of dumping the whole x64 idea, there not MUCH of a difference in performance right? I mean unless  I'm running a x64 app which itself will have problems connecting to x86 apps? Like IE x64 can't load a 32 bit applet!?

I want to know if i have any advantages on the programming front? Besides being able to test x64 assembly and apps what real advantages do i have with Windows Xp x64??

Thanks so much
From a very frustrated,:mad:
Gideon

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #5 on: April 06, 2008, 06:49 AM »
Technically x64 apps should run faster. I remember early on the x64 versions of 7-zip were slower than the 32bit ones. Now though v4.57 benchmarks itself about 25% when 64bit version on XP x64 against the 32 bit version on regular XP Pro SP2.

That is only one small test but I guess I'm pointing out that the rule of thumb I see thrown around (not necessarily here) suggesting only go for an x64 OS if you need 4+ GBs of ram is not the whole story.

As for drivers, I've never had a problem but I run it on a desktop not a laptop.

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #6 on: April 06, 2008, 07:44 AM »
hi,

Thanks for your reply. Yes I did notice everyone just mention the RAM access bit, but I've also heard around places that WinXP x64 is slower?? However, I know that part of its base code is Win Server 2003? So it should be stabler right?

I own a Compaq C772tu and the hp website hardly has most of the drivers, its so silly that they can't give it on disk.

Back to the part about the performance, what you say does make sense, x64 should end up crunching bits in half the time right? Or I've heard places that only a 64 bit app would run faster?? Could you give me more details on the performance, is it worth it? I also have 2 GB Ram and a Intel Dual Core processor.

Thanks so much
Gideon


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #7 on: April 06, 2008, 09:53 AM »
XP64 is based on win2k3 server, yes.

Some things can wind up a bit slower - for instance, foxit reader renders a lot slower on XP64 than XP32, for some weird reason (GDI+ problem?). Native x64 applications can run faster, but don't necessarily; depends on whether they can make use of the extra & wider registers. Memory footprint of applications can grow somewhat, but it generally isn't very much.

As things are now, 64-bit windows is a bit more resistant against some types of malware.

Basically, I started running XP64 because I didn't need XP32... after getting a new box with 8 gigabytes of memory, I run XP64 because I need it :)

As for drivers, you might not be able to find it from your laptop vendor, so you need to figure out what hardware you have, and grab drivers from the individual sites of the producers.
- carpe noctem

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #8 on: April 06, 2008, 12:35 PM »
You might hit printer drivers issue if you have a canon. I use xp64bit and generally all my applications and hardware seems to work (except my canon printer). I use pdf printing server on my other laptop to print from my 64bit

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #9 on: April 06, 2008, 01:02 PM »
So there is definitely some in compatibility! Right now my compaq is so screwed up with the various audio drivers that the volume control shows up and songs play but with NO SOUND! even with full volume!   

Ok, a little more off topic, i'm sorry, would Xp64 be able to get drivers for me online? If i connect?

I did try a whole LOAD of places, and spent about 7 hours today scouring for an audio driver and touchpad driver(for the scroll line thingy) and a way to test my webcam? I have the infamous Conexant SmartAudio 221 card, and someone quite knowledgeable on the hp drivers forum said the card is so new they've probably not coded an x64 driver?

My question earlier was basically, will it be worth the effort running x64? Will the speed difference be large?(Win32 vs Win64) Will i have any other advantage programming? My little sister barely understands anything about this but she whacked my head when she found out that I've spent all day trying to get drivers when I have all drivers for win32!  :(

Should i go on, on my conquest for the right drivers or should I just install Win32? I'm only afraid when the x64 drivers do come in, my x86 system will be all set and it'll be difficult to revert to x64, so i have to make a decision now!

Please help! :(
Thanks so much
Gideon

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #10 on: April 06, 2008, 01:10 PM »
So there is definitely some in compatibility! Right now my compaq is so screwed up with the various audio drivers that the volume control shows up and songs play but with NO SOUND! even with full volume!
Hm, that could be because of a missing/wrong "HD Audio Bus" (or something  similar) device... I've had quite some trouble with that, but that goes for 32-bit Windows as well.

Ok, a little more off topic, i'm sorry, would Xp64 be able to get drivers for me online? If i connect?
Not very likely, no... only some drivers are managed by Microsoft this way.

With a laptop it might be quite a quest finding the right drivers, but imho it's worth it. In daily use you won't see much of a performance difference, neither positive nor negative. But XP64 lets you test both 32- and 64-bit code, which makes it easier to write portably. And if you need the speed the extra & wider registers offer you, 64-bit is nice (you can't access those from 32-bit code, even though your CPU is 64-bit).
- carpe noctem

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #11 on: April 06, 2008, 06:27 PM »
Myself I use XP x64 even though I only have 2GBs of ram and 32bit would have worked fine. It runs absolutely rock solid stable for me, that could well be due to the 2k3 core but I wouldn't dream of switching back to 32bit XP.

If you just can't get the drivers then I appreciate that will force your hand, but if you want to play around with developing 64bit apps I say bite the bullet and waste two or three days more trying to get the drivers working. Assembly is great fun, I don't do enough (any?) of it myself any more but wouldn't dream of toying around in 32bits when there is the whole new 64bit world to explore.

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #12 on: April 11, 2008, 09:11 AM »
hi,
Thanks for the replies but alas, its been over 10 days since i got the thing and I haven't found half my drivers.So i'm going to go ol Win32 tonight.

I did have some problems win XP64, I put a DOS version of mario and it didn't work, there was also another game that mysteriously would never start, it should up in the TaskManager like this 'CakeMania.exe *32' and then poof! Disappear.
Yes the games were to pacify my sister since I was hogging my desktop trying to find drivers all day! I've literally been crippled. I got the sound to work but the mic stopped working, seems most of my hardware was manufactured only a few months ago so they haven't bothered to write drivers for Xp64!!

I think not many people care about XP64, HP has every x64 driver right on they're site for Vista64. So I'm guessing when I make the move to Vista I'll get Vista64. It was fun getting to know a little about x64, I guess WinXP64 its only good for the guys really interested in x64 Assembly Programming. I mean, with Visual Studio I can still build a x64 app, i only won't be able to run it!

Thanks so much :)
Gideon

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #13 on: April 11, 2008, 09:14 AM »
Well, 16-bit programs don't work on x64 at all - it would require full CPU emulation to do so. For DOS games, google for 'dosbox'.

Sorry to hear you've had so much trouble!
- carpe noctem

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #14 on: April 11, 2008, 09:22 AM »
lol! never thought it was 16-bit geesh! Thanks :up: Makes more sense now. Guess I'll have to keep that in mind for Vista64! :)



giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #15 on: April 13, 2008, 03:44 AM »
wow! the madness never ends! There aren't any proper drivers for Win32 either! :mad: :mad: :mad: They flatly told me, the machine was "made for vista" and I should get vista! They released the laptop before releasing drivers for WindowsXP? All the drivers they've got are for Vista!

So I want to know how are people doing with Vista? Its been a long time since I whacked Vista Beta2 off my system, it was more or less a nightmarish experience!

Has compatibility got stability got better with Vista now, especially for programmer? I'm certainly going to have a performance hit right?

Thanks so much
Gideon

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #16 on: April 13, 2008, 06:02 AM »
I guess Vista is OK by now, have been maintaining some laptops that came with it preinstalled... but I certainly prefer XP and will stick with it for as long as it's feasible.

Wrt. no XP drivers for your laptop, you should be able to find (a lot of) them if you track down the individual components and go to the manufacturer's sites... but it can be a damn lot of work.
- carpe noctem

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #17 on: April 13, 2008, 07:32 AM »
um, well, it came straight from the HP guys itself, the laptop is so new(manufactured in March) the hardware was made a month or so earlier, so they haven't bothered to write drivers for WinXP, the only actual drivers written are the ones on the websites and there are just 2-3 of them. The rest of the drivers just managed to work(By asking device manager to read the inf setup file). I chatted a second time with HP a techie and this guy said they'll release the drivers "soon". It seems the thing was "made for Vista"

But, I'm not to sure of the manufacturers to some of my hardware, is there a way I can find out, with some app? The full name and model of my Ethernet Controller! I've figured the names just from forums. It just shows as "Ethernet Controller" in Device manager.

Thanks so much
Gideon

« Last Edit: April 13, 2008, 07:57 AM by giddy »

giddy

  • Member
  • Joined in 2008
  • **
  • Posts: 20
    • View Profile
    • Giddy - We make websites and software
    • Donate to Member
Re: coding x86 assembler on a 64 bit machine??[coding on a x64]
« Reply #18 on: April 13, 2008, 08:01 AM »
Thought It was what I needed:
http://www.d-a-l.com/hardware-scan.php

Good stuff, gives you all the info by running a standalone exe. But under network adapters it just gives me my Realtek LAN, my WLAN doesn't show!? Is there a better way to detect my hardware?

Thanks
Gideon
« Last Edit: April 13, 2008, 08:11 AM by giddy »