LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2009, 03:37 AM   #1
vv40in
LQ Newbie
 
Registered: Jun 2008
Posts: 7

Rep: Reputation: 0
gcc inline asm question


hello!
1) stack var (e.g. pBuff) contains pointer to byte array
2) register (e.g. ebx) contains index to this array

i need take as follows:
movzbl <offsetof_pBuff_from_esp>(%esp,%ebx), %eax
i.e. i need access to byte pBuff[ebx]

how do write such asm command on gcc inline asm?
note: it must be single command!

thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
inteeresting ASM generated by GCC bambolin Programming 5 09-17-2006 09:00 AM
asm in gcc snowing Programming 1 05-08-2006 03:52 AM
inline assembly in gcc gursev Programming 2 03-04-2005 02:17 AM
gcc: compilation with extern inline function philipsyyy Linux - Software 0 10-13-2002 11:52 PM
subrouine_call in gcc inline assembly sakeeb Programming 4 08-15-2002 10:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:54 PM.

Main Menu
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
Open Source Consulting | Domain Registration