0

我必须将此 Intel ASM 代码转换为 AT&T ASM:

    mov al, byte ptr [n]
    mov byte ptr [genint+1], al
    jmp genint
genint:
    int 0

我做不到,但我在这里尝试:

    movb (n), %al
    movb %al, (genint+1)
    jmp genint
genint:
    int 0

请问有什么帮助吗?非常感谢 :)

4

1 回答 1

1

The int 0 should be int $0. Otherwise it should be fine, even though you have a few harmless extra parentheses. Note that if you are using gnu assembler, that can be switched to intel syntax using .intel_syntax noprefix.

    movb n, %al
    movb %al, genint+1
    jmp genint
genint:
    int $0
于 2013-10-14T18:28:47.007 回答