Hi all !
In most C compilers inline assembly is accepted in one way or another. Often just a matter of finding the correct syntax.
For a few days now I´ve searched for a source that could tell/show how to do this with Qdos GCC, but so far I´ve been unsuccesful. I´m using XorA qdos-gcc docker container.
Can anyone please shine a light on how to do this please ?
Qdos GCC and inline assembly code
Re: Qdos GCC and inline assembly code
In a nutshell, you simply pack your assembly statements in-between an asm volatile () bracket.
The volatile should be present to prevent GCC from over-eagerly optimizing away your precious code.
GCC knows an extended asm statement that allows you to specify input / output operands and clobbered registers:
A description on how to specify these extended arguments to asm can be found here, for example.
Code: Select all
void main () {
asm volatile (
"move.l #100,d0");
}
GCC knows an extended asm statement that allows you to specify input / output operands and clobbered registers:
Code: Select all
asm asm-qualifiers ( AssemblerTemplate
: OutputOperands
[ : InputOperands
[ : Clobbers ] ])
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Qdos GCC and inline assembly code
That is exactly what I’ve tried, but when compiling gcc complains about jas missing :
Tried different variants, but same error.
Tried different variants, but same error.
Re: Qdos GCC and inline assembly code
Solved it....sat me down and figured about the error and more or less tried until I got it right 
