I've been using Ubuntu up until a few weeks ago and now I'm back on Windows. I have a test coming up in basic assembly programming. I remember that while I was on Linux I could compile .s assembly files through terminal using gcc file.s, and it all worked fine.
But now that I'm on Windows, it doesn't work so great. Here's the code that I copied from my faculty's website (I didn't write it):
.intel_syntax noprefix
.data
fmt_string: .asciz "Hello, world!\n"
.text
.global main
main:
enter 0,0
mov rax, 0
lea rdi, fmt_string
call printf
mov rax, 0
leave
ret
I'm using MinGW in ordere to compile .c and .s files, and here's what I get after tried to compile this code:
Now, keep in mind that I'm only starting (trying to start) learning assembly so if you go all theoretical on me I'll probably have no idea what you're talking about.
All I want to know is whether I can compile this assembly code on Windows or if I should think about just going back to Linux.