 |
Linux Format forums Help, discussion, magazine feedback and more
|
| View previous topic :: View next topic |
| Author |
Message |
JanPihlgren
Joined: Wed Mar 05, 2008 5:09 am Posts: 5 Location: Marsta, Sweden
|
Posted: Tue Apr 10, 2012 6:51 am Post subject: push/pop in x86_64 |
|
|
I'm trying to follow "Assembly language" in LXF and in issue 155 I get in problem.
I wish to use 64-bit version of Mageia 1 to do my programming lessons.
When I try to use push and pop (push ecx and pop ecx) i discover that these commands are invalid in x86_64.
It would be helpfull if the author will give som hints about this things that does not works in a 65bit system.
I'm not the one that could find out how to solve this problem.
Thanksful for help. |
|
| Back to top |
|
 |
Xelous
Joined: Thu Apr 19, 2012 3:46 pm Posts: 16
|
Posted: Tue Apr 24, 2012 4:41 pm Post subject: |
|
|
I'm not an expert in assembly, so forgive me if I am wrong here but... You can't (usually) push or pop into the ECX register, its the counting register, used for LOOP and other counting actions.
So, the assembler is correct to push or pop that register is invalid, you can however mov the value out of ECX into another register and inspect it.
Check this for an interesting coverage of use of most registers.
http://www.swansontec.com/sregisters.html
Hope that helps
Xel |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|