8086 Assembly Program to Print ‘hello’ using 09H

data segment
msg1 db 'hello$'
data ends

code segment
assume cs:code,ds:data
mov ax,data
mov ds,ax
mov sp,0d00h
mov ah,09h
int 21h
mov ax,4c00h
int 21h
int 3
code ends
end start


C:\TASM>masm an_hello.asm
Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987.  All rights reserved.

Object filename [an_hello.OBJ]:
Source listing  [NUL.LST]:
Cross-reference [NUL.CRF]:

  50394 + 450262 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors

C:\TASM>link an_hello.obj

Microsoft (R) Overlay Linker  Version 3.60
Copyright (C) Microsoft Corp 1983-1987.  All rights reserved.

Run File [AN_HELLO.EXE]:
List File [NUL.MAP]:
Libraries [.LIB]:
LINK : warning L4021: no stack segment

C:\TASM>debug an_hello.exe
Program terminated normally

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.