Page 1 of 1
Mysterious RA value in assembly file
Posted: Mon Aug 05, 2013 8:24 am
by newanabe
Hi! I am trying to translate a piece of assembly code written for GAS(I guess it is gas, cuz it's a Linux site) to NASM syntax.
Here:
https://github.com/torvalds/linux/blob/ ... 4-asm_64.S
at the line 206 I have the "RA" "RB" "RC" and "RD" I don't know where they are coming from.
I am not a GAS user, so please help me!!!!
I will appreciate it a lot!
Thanks!
Re: Please help me with a GAS doubt!!!!!!!
Posted: Mon Aug 05, 2013 8:40 am
by Combuster
!!!!!!!
(...)
!!!!
I'm sure you didn't read the forum rules properly yet.
"RA" "RB" "RC" and "RD" I don't know where they are coming from.
Learn macro syntax, look at line 54-62 and 193.
Re: Please help me with a GAS doubt!!!!!!!
Posted: Mon Aug 05, 2013 9:09 am
by newanabe
Thank you for the help!
I think i could understand it now.
What have i done wrong? Where can I read the rules?
Re: Please help me with a GAS doubt!!!!!!!
Posted: Mon Aug 05, 2013 12:10 pm
by sortie
Please don't use a lot of exclamation marks and beg for help. Your question isn't that important to warrant that many exclamation marks, and even if it wasn't, it isn't that important to those that would help you. If I see 7 exclamation marks, your statement better be about the imminent explosion of the sun and the annihilation of all life on Earth.
For example:
Bad topic: Please help me with a GAS doubt!!!!!!!
Good topic: Mysterious RA value in assembly file
To answer your question, look into how the GNU C preprocessor works and how the assembly file in question is preprocessed. It uses the ## assembly operator to concatenate a RA and 1 to form the RA1 value.
Re: Mysterious RA value in assembly file
Posted: Mon Aug 05, 2013 12:30 pm
by newanabe
ok, I fixed the title.
and I understood the RA problem after the combuster's answer.
thank you!