简体   繁体   中英

ASM - Intel to AT&T

I've to convert this Intel ASM code into AT&T ASM:

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

I was not able to do it, but here my try:

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

Any help please ? Thank you very much :)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM