LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 04: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:00 AM
asm in gcc snowing Programming 1 05-08-2006 04:52 AM
inline assembly in gcc gursev Programming 2 03-04-2005 03:17 AM
gcc: compilation with extern inline function philipsyyy Linux - Software 0 10-14-2002 12:52 AM
subrouine_call in gcc inline assembly sakeeb Programming 4 08-15-2002 11:22 PM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration