MASM编译器配置

使用xp或者win7 32位系统,可以直接运行16位程序

下载编译器:
MSAM 6.15.8803, link.exe 5.31.009(无法运行在win7 32位系统上,只能运行在xp上):
https://gitee.com/veenlee/DOSBox_MASM/blob/master/masm615.zip

MASM 6.14.8444, link.exe 5.60.339:
https://github.com/VeenLee/MASMAssembler
或
MASM 5.10, link.exe 3.64:
https://gitee.com/veenlee/DOSBox_MASM/tree/master/masm


创建hello.asm文件
stack   segment stack
      db	200 dup(0)
stack  ends

data segment
      disp db 'Hello World!$'   ;定义输出字符串
data ends

code segment
       assume cs:code,ds:data,ss:stack
main: mov ax,data
          mov ds,ax
          lea dx,disp
          mov ah,09h
           int 21h
          mov ah,4ch
          int 21h
code ends
          end main

MASM 6.14/6.15版:
ml hello.asm

MASM 5.10版:
汇编程序:
masm hello.asm
链接程序:
link hello

执行程序:
hello.exe

即可输出:Hello World!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

5 × 1 =