Tell me, please, where to read the documentation on assembler inserts into C ++ code. For example, what the expression in the operand means: jnz $+11 . I understand that this is the address of the label, but what does the dollar sign mean here?

    1 answer 1

    For your specific question, $ is a predefined label indicating the current address. So that

     jmp $ 

    it's just an endless loop :) You have a transition to a point determined by the offset from the current address. Frankly, I wondered where it met in the assembler box. Usually in an assembler, such a label is not so common.

    Since assembly inserts are generally not standardized, every compiler here can use its own assembler, so it’s better to read the documentation + tutorial of that assembler used by the compiler.

    But the counter question - for what? What exactly do you want to achieve, why use assembler?

    Roughly speaking, you can hardly optimize the code generated by modern compilers with their optimizers with assembler inserts, but easily worsen it. Any tricky interaction with the system, perhaps at the level of iron? For application programs, this made sense except in the days of DOS. Of course, there are specific areas where assembler is a working tool, but judging by the question, this is not the case ...

    • Well, if it suits you - mark it as accepted (as a bird) - Harry