x_64 registers

Everything else that doesn't fall into one of the other PB categories.
Denis
Enthusiast
Enthusiast
Posts: 790
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

x_64 registers

Post by Denis »

Fred/Freak, there's no information about x_64 registers to use without saving them firt (eax, edx, ecx in x_86).
I've done search here but without succes. English PB help file is not available when installing PB x_64, so, it's not possible to take a look at it.
German doc is like french doc.

wich registers ?

Fred, please add these infos in help file.

Merci
A+
Denis
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: x_64 registers

Post by Demivec »

Denis wrote:which registers ?
rax, rdx, rcx in x_64
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: x_64 registers

Post by DarkDragon »

This information isn't related to purebasic, so it should never get into the purebasic manual, should it?
bye,
Daniel
Denis
Enthusiast
Enthusiast
Posts: 790
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: x_64 registers

Post by Denis »

Demivec wrote:
Denis wrote:which registers ?
rax, rdx, rcx in x_64
Demivec, I think that's the same as x_86 (rax for eax etc.) but no infos for that (may be a thread on it but i didn't found it).

DarkDragon wrote:This information isn't related to purebasic, so it should never get into the purebasic manual, should it?
DarkDragon, why did you say that. It's related for x_86 in the PB help file. It's a possibility to code in asm with PB, so PB rules have to be known.

Thanks both.
A+
Denis
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: x_64 registers

Post by Demivec »

Denis wrote:
Demivec wrote:
Denis wrote:which registers ?
rax, rdx, rcx in x_64
Demivec, I think that's the same as x_86 (rax for eax etc.) but no infos for that (may be a thread on it but i didn't found it).
Yes it is the same, that's the point. :wink: This is why I think this is true.

It would be nice if there was a note in the manual about it (for 64-bit in-line assembly).
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: x_64 registers

Post by DarkDragon »

Denis wrote:DarkDragon, why did you say that. It's related for x_86 in the PB help file. It's a possibility to code in asm with PB, so PB rules have to be known.
That are assembler rules, not PB rules:
http://flatassembler.net/docs.php?article=manual#2.1.19
bye,
Daniel
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: x_64 registers

Post by Demivec »

DarkDragon wrote:
Denis wrote:DarkDragon, why did you say that. It's related for x_86 in the PB help file. It's a possibility to code in asm with PB, so PB rules have to be known.
That are assembler rules, not PB rules:
http://flatassembler.net/docs.php?article=manual#2.1.19
To use inline assembler in PB you have to follow PB's rules, which may have originated in the document you linked to. Nevertheless they are also present in PB with regard to crafting assembly code that works alongside PB's language framework and it's foundations in assembly.

The registers that need to be preserved for x86 are listed in the manual under the 'Rules' heading of 'Inline x86 ASM'.
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: x_64 registers

Post by DarkDragon »

Demivec wrote:
DarkDragon wrote:
Denis wrote:DarkDragon, why did you say that. It's related for x_86 in the PB help file. It's a possibility to code in asm with PB, so PB rules have to be known.
That are assembler rules, not PB rules:
http://flatassembler.net/docs.php?article=manual#2.1.19
To use inline assembler in PB you have to follow PB's rules, which may have originated in the document you linked to. Nevertheless they are also present in PB with regard to crafting assembly code that works alongside PB's language framework and it's foundations in assembly.

The registers that need to be preserved for x86 are listed in the manual under the 'Rules' heading of 'Inline x86 ASM'.
Yes, well for this documentation part it might be senseful, but don't insert a whole assembler documentation into the purebasic help!

Denis sounded like he didn't know assembler and purebasic are two different things.
bye,
Daniel
Denis
Enthusiast
Enthusiast
Posts: 790
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: x_64 registers

Post by Denis »

DarkDragon, i take a quickly look to the FASM doc (big doc) but i didn't find thoses rules.
I just want to have those infos in PB doc.
A+
Denis
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: x_64 registers

Post by Demivec »

DarkDragon wrote:Yes, well for this documentation part it might be senseful, but don't insert a whole assembler documentation into the purebasic help!
Agreed! :)
User avatar
Shardik
Addict
Addict
Posts: 2079
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: x_64 registers

Post by Shardik »

DarkDragon,

I think that Denis only wants to have the equivalent statement for x64 to this rule in the help:
Inline x86 ASM help wrote:- The available volatile registers are: eax, edx and ecx. All others must be always preserved.
So that he knows which x64 registers he has to preserve in his x64 asm code block... :wink:
Helle
Enthusiast
Enthusiast
Posts: 178
Joined: Wed Apr 12, 2006 7:59 pm
Location: Germany
Contact:

Re: x_64 registers

Post by Helle »

remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: x_64 registers

Post by remi_meier »

Athlon64 3700+, 1024MB Ram, Radeon X1600
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: x_64 registers

Post by DarkDragon »

Denis wrote:DarkDragon, i take a quickly look to the FASM doc (big doc) but i didn't find thoses rules.
I just want to have those infos in PB doc.
I posted a link to it! It scrolls right there after loading the page.
Do you also expect all the assembler keywords inside the PB doc? That would mess everything up like hell.

@Shardik: but for now it sounds like he wants everything inside the PB documentation.

[EDIT]
Ok, do what you want to.
Last edited by DarkDragon on Thu Jun 16, 2011 12:25 pm, edited 2 times in total.
bye,
Daniel
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: x_64 registers

Post by Trond »

DarkDragon wrote:
Denis wrote:DarkDragon, why did you say that. It's related for x_86 in the PB help file. It's a possibility to code in asm with PB, so PB rules have to be known.
That are assembler rules, not PB rules:
http://flatassembler.net/docs.php?article=manual#2.1.19
No, in pure assembly you can use registers are you please. This information tells us which registers PB expect NOT to change and which PB expect to change. We can't know what PB expects unless it says in the manual.
Post Reply