LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices



Old

ASM: 64 bit intel asm in linux

Posted 02-03-2012 at 05:01 PM by rainbowsally

If you're used to 32 bit asm in gcc, the 64 bit asm might throw you for a loop initially. That's because part of the stack is passed around in registers.

Let's compile a bit of test code and see what's going on.

If you're using our makefile-creator put this in a subdirectory named "src" or use whatever method you prefer if not.

file: src/main.c
Code:
// main.c
#include <stdio.h>

void  dbg(){}
...
Member
Posted in Uncategorized
Views 1038 Comments 0 rainbowsally is offline
Old

Assembler Stuff: Asm and Inline Asm

Posted 01-25-2012 at 08:15 PM by rainbowsally

Assembler Stuff: Asm and Inline Asm

Features:
  • Asm and inline asm examples
  • Using C macros to create global function names
  • Intel and ATT syntax
  • Viewing disassembly in a *.s file and using objdump

Let's get right to the point...

Code:
// main.c
// COMPILE: gcc main.c -o main --save-temps
// take a look at the C asm output file, 'main.s' afterwar

// 64 bit asm keeps part of the stack in registers in C, so let's
//
...
Member
Posted in Uncategorized
Views 798 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 11:19 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration