Interrupt On GAS

Posted by Nathan Campos on Stack Overflow See other posts from Stack Overflow or by Nathan Campos
Published on 2010-05-28T17:36:30Z Indexed on 2010/05/28 18:22 UTC
Read the original article Hit count: 242

Filed under:
|
|

I'm trying to convert my simple program from Intel syntax to the AT&T(to compile it with GAS). I've successfully converted a big part of my application, but I'm still getting an error with the int(the interrupts). My function is like this:

printf:
    mov $0x0e, %ah
    mov $0x07, %bl

    nextchar:
       lodsb
       or %al, %al
       jz return
       int 10
       jmp nextchar

    return:
       ret

msg db "Welcome To Track!", 0Ah

But when I compile it, I got this:

hello.S: Assembler messages:
hello.S:13: Error: operand size mismatch for int'
hello.S:19: Error: no such instruction:
msg db "Hello, World!",0Ah'

What I need to do?

© Stack Overflow or respective owner

Related posts about assembly

Related posts about gas