flat assembler
Message board for the users of flat assembler.

Index > Windows > A 64-bit example?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
BoR0



Joined: 12 Nov 2004
Posts: 31
BoR0
Privalov, can you show me a Windows 64-bit example program? Just a simple one Smile

haha f0dder, if you didn't tell i wouldn't even notice Embarassed


Last edited by BoR0 on 16 Feb 2005, 19:45; edited 1 time in total
Post 16 Feb 2005, 12:59
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
I need first to implement the Win64 PE/COFF formats into fasm, and I won't start it before I end implementing the ELF64 (should be soon, anyway).
Post 16 Feb 2005, 13:03
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
"Win32 64-bit example"? ^_^
Is XP64 even out yet? I thought the only 64bit windows was for the Itanium (and the old NT4 versions for Alpha).
Post 16 Feb 2005, 19:20
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Well, quick googling shows there already are examples (with ML64) for the AMD64 Windows: http://www.codegurus.be/codegurus/Programming/assembler&win64_en.htm#Win64
Post 16 Feb 2005, 19:27
View user's profile Send private message Visit poster's website Reply with quote
BoR0



Joined: 12 Nov 2004
Posts: 31
BoR0
It's pretty confusing that you dont use the stack no more to fill parameters.

I wonder how this thing goes with registers to fill params Mad
Post 16 Feb 2005, 19:49
View user's profile Send private message Reply with quote
HarryTuttle



Joined: 26 Sep 2003
Posts: 211
Location: Poland
HarryTuttle
no stack no buffer overrun but what a hell could be worse instead of it ?

Russian crackers found the way how to skip SP2 for XP improvements and laugh so laud because of all the confusion with stack guard system called "DEP" which slow the system and can protect anything ...
anyway...

win64 syntax is little strange and until I do not own 64 platform it is a far far...future.
Day after day I like more the oldest PC's than the newer one.

best regards,

Do you think that voulnerabilities depend on the processors' features?

_________________
Microsoft: brings power of yesterday to computers of today.
Post 16 Feb 2005, 21:55
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Harry, XP SP2 is certainly not perfect, but it helps a lot. And hardware no-execute page protection (when executed correctly) certainly helps a lot.
Post 17 Feb 2005, 04:08
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Privalov wrote:
Well, quick googling shows there already are examples (with ML64) for the AMD64 Windows: http://www.codegurus.be/codegurus/Programming/assembler&win64_en.htm#Win64


Hm... Confused And what?.. Question It looks like for x86-64 we must remember all of registrs' using for all of apis?! Shocked Or there is some straight system of handling function's parameters? I'm confused...

HarryTuttle wrote:
Russian crackers found the way how to skip SP2 for XP improvements


Smile Sometimes Russians are crazy and hard-minded men. Smile
Post 17 Feb 2005, 19:07
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
iklin wrote:
It looks like for x86-64 we must remember all of registrs' using for all of apis?! Shocked

Hmmm, a bit like calling interrupts in DOS; nice! Wink Very Happy
Post 17 Feb 2005, 20:49
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
yeah
Post 17 Feb 2005, 22:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Privalov wrote:
Hmmm, a bit like calling interrupts in DOS; nice!


Well, it's interesting! But this causes some kind of incompatibility with current 32-bit systems. Confused Am I wrong?
Post 18 Feb 2005, 18:19
View user's profile Send private message ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Hey, I'm just realize that x86-64 is only AMD version of 64-bit platform! Embarassed And that IA-64 is Intel version. But this is not the same.
Good! Evil or Very Mad In the near future we can get 2 different platforms!
Will fasm support IA-64?
Post 18 Feb 2005, 18:59
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
It's not AMD only - Intel came up with its own implementation of x86-64, it's called EM64T:
http://www.intel.com/technology/64bitextensions/
It has also a few instructions that AMD64 doesn't have (80-bit far call and CMPXCHG16B), fasm already implements all.
Post 18 Feb 2005, 19:10
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
But what about IA-64? I'm confuses more and more... Embarassed
Post 18 Feb 2005, 19:12
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Read the Intel's FAQ for EM64T - they answer there a question why are they introducing two different 64-bit architectures.
Post 18 Feb 2005, 19:15
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Thanx a lot! But 3 64-bit platform is too much for me! Every software will be in a 3 versions: x86-64, IA-64, EM64T? Or more? Are they compatible?
Post 18 Feb 2005, 19:25
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
AMD64 and EM64T are compatible and x86-64 IMO should be used as a common name for them both.
IA64 is something entirely different.
Post 18 Feb 2005, 19:26
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Privalov wrote:
AMD64 and EM64T are compatible and x86-64 IMO should be used as a common name for them both.
IA64 is something entirely different.

OK, now I'm read all of infos I can get. And I like AMD realization more than IA-64 'coz it's the logically way to extend 32 to 64 like 8 to 16 to 32. a -> ax -> eax -> rax - is more clear!
On the http://www.x86-64.org/downloads there is Bochs and AMD64 Simics Simulator. Smile But only for Linux if I'm right.
And who knows x86-64 disassembler or debugger to inspect produced code?
Post 19 Feb 2005, 09:43
View user's profile Send private message ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
in short:
IA-32 - Intel's 32-bit Architecture (x86)
IA-64 - Intel's 64-bit Architecture (Itanium/Xenon, servers)
AMD64 - AMD's name on the IS of the "Hammers" (Opteron, Athlon64), some refer to this as AA-64 (very few) or x86-64 (quite a few, many really). Afaik/iirc AMD wants the IS to be called AMD64 (wonder why Razz).
EM64T - Intels version of the AMD64 (with their own enhacements, sort of like the Athlons AMD made when it was they who followed intel and not the other way around).
x86-64 - the common name for AMD64 (and EM64T), probably a good choice, since it makes the 'link to x86 more clear.

Debugger, well, gdb/ddd works, but, well, I just can't get it to do what I want... (I dream of olly beeing ported to linux and given the code to handle x86-64 Smile). If you find one I'd be happy to heard which one, I've thought of testing "the Dude" ( http://the-dude.sourceforge.net/ ), just haven't had time yet.

btw, before a flame war erupts over whether it's good or not to 'expand' the x86 IS to x86-64. There are both advantages and disadvantages of this, but imho backward compabillity is the most important (which can be achived in many ways, hardware or software). I (too) think x86-64 (and a linux OS or similar, since it's pretty much the only non-beta version OS currently avalibe) is the best solution for the "common people", and it seems many of thse who decide the hardware/OS for servers seems to like it too (though I don't know that much about that part of the world, that's the impression I've gotten of the situation - correct me if I'm wrong).
Post 19 Feb 2005, 13:24
View user's profile Send private message Visit poster's website Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis
Just a few questions, why the hell use 64-bit programming when there isn't any use for it yet?? i've have seen one program in 64 bit asm, its was a virus so lol, and can windows 98 even understand 64 bit code?? ps, i like my 16bit Razz and of course a little 32 bit :-s
Post 19 Feb 2005, 15:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.