2023-12-18 2026-01-25 安装msys2 1pacman -S nasm 12345678910111213141516; ----------------------------------------------------------------------------------------; 仅使用系统调用来输出 "Hello, World" 到控制台。 这个程序仅windows 64 下运行。; 如何编译执行:;; nasm -fwin64 hello.s && gcc hello.obj && ./a.exe; ---------------------------------------------------------------------------------------- global main extern puts section .textmain: sub rsp, 20h mov rcx, message call puts add rsp, 20hmessage: db "Hello, World", 0 windows下汇编比较复杂,但是为了方便学习,使用nasm进行编译,操作,为了适应intel语法,使用gcc链接,为了能够使用puts这样的函数,比winapi(WriteConsoleA)要简单很多。 前一篇 使用dism++重置无法启动的Windows 后一篇 解决cloudflare worker遇到failed to dial to (wss://): 200 OK > websocket: bad handshake 的问题
说些什么吧!