1
2
3
4
5
6
7
8
9
10
11
12
13
; Hello, World! for DOS (.COM file)
; Prints "Hello, World!" using INT 21h
ORG 0100h
start:
MOV AH, 09h ; DOS print string function
MOV DX, msg ; Pointer to message string
INT 21h ; Call DOS interrupt
MOV AH, 4Ch ; DOS terminate program function
INT 21h ; Exit to DOS
msg:
DB 'Hello, World!
#x27;
; '
#x27; terminated string for INT 21h
Click [▶ Assemble] or press Ctrl+Enter to assemble your code