hi all problem: i have an array defined in some c function suppose something like this: void dummy() { int arr[] = {1,2,3}; asm(...); } how to iterate this array inside asm(...) block? ----------------------------------------------- P.S. We using gcc!(inline assembly uses GAS syntax)
hi quantum thanks for offering help,but there is no answer for my question in GCC-inline-Assembly-HOWTO so question stil opened...
nopnopnop That HOWTO explains how to deal with input and output operands in GCC inline assembly blocks. The arr[] array whould be the only operand in your case. You can map it to any register and iterate in a loop. That document also covers some basic AT&T syntax for people who aren't familiar with GAS. The only thing you won't find there is an assembler tutorial for newbies. Do you have any experience coding in asm? If you do, the HOWTO contains enough information, so you can find the answer by yourself.
hi quantum i have experience of two weeks of learning assembly...(not a joke) i think better to leave for a while this complicated problem.may be after more two weeks a will be enable of mapping array to register and iterating it(array thank you anyway P.S i can read russian(and anderstand),but i can't write... my ergonomic keybord have not russian letters
nopnopnop Extended asm syntax is a bit tricky and I'm afraid it's also a little buggy. It takes some time to understand it. You'd better use pure assembly compilers, like fasm, nasm or even that GNU tool called GAS. Don't use assembly in GCC unless it's absolutly necessary. P.S. You could carve cyrillic chars on your keyboard or screen 'em with some kind of fast colour.