| ??? 04/25/02 15:56 Read: times |
#22153 - RE: Assembly on C programm - Erik |
"the SRC etc. way is ridiculous and I have not seen it in any other compiler."
As Bryan said, it is common - and I've seen it in other compilers. The "opcode injection" method (eg Bryan's asm{} keyword) seems easy if you consider that each 'C' source line produces a distinct piece of object; but - especially with modern optimising compilers - this is not necessarily the case! Thus, although the position of the "injected" opcode may seem obvious in the source file, the corresponding position in the generated object could be a bit more tricky! |



