gpt4 book ai didi

linux - 在 Windows 上编译 Linux 汇编器

转载 作者:太空宇宙 更新时间:2023-11-04 10:42:07 26 4
gpt4 key购买 nike

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

此代码适用于 32 位 Linux。如何在 Windows 上运行它?

gcc hello.s

最佳答案

您需要找到 Windows 版本的 x86 汇编器。 GNU 汇编程序可通过 MinGW 在 Windows 上使用。项目。这与您在 Linux 上使用的汇编程序相同。

关于linux - 在 Windows 上编译 Linux 汇编器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34646874/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com