JKS
JKS

Reputation: 349

Compiling Linux assembler on Windows

    .string "Hello\n"
    .globl main
main:
    pushl %ebp
    movl %esp, %ebp
    pushl $hello
    call puts
    movl $0, %eax
    movl %ebp, %esp
    popl %ebp
    ret

This code works on 32bit Linux. How can I run this on Windows?

gcc hello.s

Upvotes: 0

Views: 108

Answers (1)

Cameron Roe
Cameron Roe

Reputation: 290

You need to find a Windows version of an x86 assembler. The GNU Assembler is available on Windows through the MinGW project. This is the same assembler you are using on Linux.

Upvotes: 1

Related Questions