首页 > 解决方案 > 使用 DOS 在 Fasm 中编写 hello,world 到控制台

问题描述

我正在用 FASM 中的 DOS 编写“Hello,World”来控制台。但它不适用于 x64。

我尝试为 x64 编写程序,但它也不起作用。

我的错在哪里?

这是我的代码:

format PE64

org  100h       


mov ax, cs
mov ds, ax
mov dx, msg     
mov ah, 9h        
int  21h         

mov  ah, 4c00h     
int  21h       

msg  db 'Hello, World!$'

标签: assemblyfasm

解决方案


推荐阅读