📜  用汇编语言注释 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:40.559000             🧑  作者: Mango

代码示例1
In assembly, comments are usually denoted by a semicolon ;
 although GAS uses # for single line comments 
 and /* … */ for block comments possibly spanning multiple lines.

Here is an example:

    xor rax, rax                          ; rax ≔ false
    
    ; divisibility by four
    test rcx, 3                           ; are the two right-most bits set?
    jnz done                              ; yes ⇒ not divisible by 4
    
    setz al                               ; al ≔ ZF  [i.e. `true`, since `jnz` above]
    …