Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: 0
gcc inline asm question

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!



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 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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:54 AM.

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